Browse Source

fat: improve

tags/v1.21.12.1
colorfulberry 5 years ago
parent
commit
bcd23f9ffe
3 changed files with 5 additions and 2 deletions
  1. +1
    -1
      modules/templates/helper.go
  2. +1
    -1
      templates/repo/datasets/dirs/index.tmpl
  3. +3
    -0
      web_src/less/_dataset.less

+ 1
- 1
modules/templates/helper.go View File

@@ -308,7 +308,7 @@ func NewFuncMap() []template.FuncMap {
"categories": categories, "categories": categories,
"licenses": licenses, "licenses": licenses,
"DatasetPathJoin": func(arr []string, index int, seq string) string { "DatasetPathJoin": func(arr []string, index int, seq string) string {
return strings.Join(arr[0:index+1], seq)
return strings.Join(arr[1:index+1], seq)
}, },
}} }}
} }


+ 1
- 1
templates/repo/datasets/dirs/index.tmpl View File

@@ -7,7 +7,7 @@
<div class="column sixteen wide"> <div class="column sixteen wide">
<p> <p>
{{ range $index, $item := .Path }} {{ range $index, $item := .Path }}
<a href='{{$.Link}}/?parentDir={{if gt $index 0}}{{DatasetPathJoin $.Path $index "/"}}{{else}}{{end}}'>{{ $item }}</a>/
<a href='{{$.Link}}/?parentDir={{if gt $index 0}}{{DatasetPathJoin $.Path $index "/"}}{{else}}{{end}}'>{{ $item }}</a><span class="directory-seperator">/</span>
{{ end }} {{ end }}
</p> </p>
</div> </div>


+ 3
- 0
web_src/less/_dataset.less View File

@@ -155,6 +155,9 @@
font-weight: bold; font-weight: bold;
margin: 0 6px; margin: 0 6px;
} }
.directory-seperator {
padding: 0 4px;
}
} }
.dataset-list { .dataset-list {
.octicon-check { .octicon-check {


Loading…
Cancel
Save