| 1 | diff --git a/internal/webui/browse.html b/internal/webui/browse.html |
| 2 | index efa808c..7de76f6 100644 |
| 3 | --- a/internal/webui/browse.html |
| 4 | +++ b/internal/webui/browse.html |
| 5 | @@ -18,7 +18,7 @@ |
| 6 | {{else if .Feed}}<table id="rows"> |
| 7 | <thead><tr><th>hash</th><th>type</th><th>uploaded</th></tr></thead> |
| 8 | <tbody> |
| 9 | -{{range .Feed}}{{$f := asMap .}}<tr><td><a href="/file?sha={{str (index $f "sha256")}}">{{shortID (index $f "sha256")}}</a></td><td>{{str (index $f "type")}} <small>{{str (index $f "size")}} B</small></td><td>{{str (index $f "uploaded")}}</td></tr> |
| 10 | +{{range .Feed}}{{$f := asMap .}}<tr><td><a href="/file?sha={{str (index $f "sha256")}}">{{shortID (index $f "sha256")}}</a></td><td>{{str (index $f "type")}} <small>{{str (index $f "size")}} B</small></td><td>{{when (index $f "uploaded")}}</td></tr> |
| 11 | {{end}}</tbody> |
| 12 | </table> |
| 13 | {{else}}<p>No files were reported.</p> |
| 14 | diff --git a/internal/webui/repo.html b/internal/webui/repo.html |
| 15 | index 18f4f19..7a36ef7 100644 |
| 16 | --- a/internal/webui/repo.html |
| 17 | +++ b/internal/webui/repo.html |
| 18 | @@ -32,8 +32,8 @@ |
| 19 | {{end}}{{end}}{{end}} |
| 20 | |
| 21 | {{define "repoTree"}}{{$repo := asMap .Event}}{{$entries := index $repo "entries"}}{{if .Tree}}{{$entries = .Tree}}{{end}}<ul> |
| 22 | -{{range $i, $e := $entries}}{{$entry := asMap $e}}{{$last := eq (add $i 1) (len $entries)}}<li><span>{{if $last}}└─ {{else}}├─ {{end}}</span>{{if eq (str (index $entry "type")) "tree"}}<a href="{{repoURL $.Query "tree" (str (index $entry "path"))}}">{{str (index $entry "name")}}/</a>{{else if eq (str (index $entry "type")) "commit"}}{{str (index $entry "name")}} <span>(submodule)</span>{{else}}<a href="{{repoURL $.Query "file" (str (index $entry "path"))}}"{{if eq (str (index $entry "path")) ($.Query.Get "path")}} aria-current="page"{{end}}>{{str (index $entry "name")}}</a>{{end}}</li> |
| 23 | -{{else}}<li><span> </span>no published files here</li> |
| 24 | +{{range $e := $entries}}{{$entry := asMap $e}}<li>{{if eq (str (index $entry "type")) "tree"}}<a href="{{repoURL $.Query "tree" (str (index $entry "path"))}}">{{str (index $entry "name")}}/</a>{{else if eq (str (index $entry "type")) "commit"}}{{str (index $entry "name")}} <span>(submodule)</span>{{else}}<a href="{{repoURL $.Query "file" (str (index $entry "path"))}}"{{if eq (str (index $entry "path")) ($.Query.Get "path")}} aria-current="page"{{end}}>{{str (index $entry "name")}}</a>{{end}}</li> |
| 25 | +{{else}}<li><span>no published files here</span></li> |
| 26 | {{end}}</ul> |
| 27 | <p id="pages">{{if .Query.Get "offset"}}<a href="{{repoURL .Query "tree" (.Query.Get "path")}}">first page</a> {{end}}{{if hasNextOffset (index $repo "next_offset")}}<a href="{{browsePageURL "/repo" .Query "offset" (index $repo "next_offset")}}">more</a>{{end}}</p> |
| 28 | {{end}} |
| 29 | diff --git a/internal/webui/style.css b/internal/webui/style.css |
| 30 | index 9cff895..c039a03 100644 |
| 31 | --- a/internal/webui/style.css |
| 32 | +++ b/internal/webui/style.css |
| 33 | @@ -70,6 +70,7 @@ img{max-width:100%} |
| 34 | #rows td:last-child{width:170px;text-align:right;font:12px var(--mono);color:var(--muted)} |
| 35 | #rows tr:hover td{background:var(--hover)} |
| 36 | #rows th{text-align:left;font:12px var(--mono);color:var(--muted);font-weight:normal;padding:0 10px;height:28px;border-bottom:1px solid var(--line)} |
| 37 | +#rows th:last-child{text-align:right} |
| 38 | #rows td a{color:inherit}#rows td:first-child a{color:var(--accent)} |
| 39 | #pages{font:12px var(--mono)} |
| 40 | |
| 41 | @@ -127,8 +128,12 @@ nostr-key{font-family:var(--mono);cursor:copy} |
| 42 | #split>tbody>tr>td{vertical-align:top;padding:0;border:0} |
| 43 | #tree{width:300px;overflow:auto;border-right:1px solid var(--line);font:13px/24px var(--mono);padding:8px 0 20px} |
| 44 | #tree header{padding:0 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#tree header small{float:right} |
| 45 | -#tree ul{list-style:none;margin:0;padding:0 0 0 12px} |
| 46 | -#tree li{white-space:nowrap}#tree li>span{color:var(--muted)} |
| 47 | +#tree ul{list-style:none;margin:0 0 0 16px;padding:0 0 0 14px;border-left:1px solid var(--muted)} |
| 48 | +#tree li{white-space:nowrap;position:relative} |
| 49 | +#tree li>a{display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;vertical-align:top} |
| 50 | +#tree li::before{content:"";position:absolute;left:-14px;top:12px;width:10px;border-top:1px solid var(--muted)} |
| 51 | +#tree li:last-child::after{content:"";position:absolute;left:-15px;top:12px;bottom:0;width:1px;background:var(--rail)} |
| 52 | +#tree li>span{color:var(--muted)} |
| 53 | #tree a{color:var(--ink)}#tree a[aria-current=page]{background:var(--soft);padding:0 4px} |
| 54 | #preview{padding:0;overflow:hidden} |
| 55 | #preview header{padding:0 12px;height:36px;line-height:36px;border-bottom:1px solid var(--line);font:13px var(--mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis} |
| 56 | @@ -176,6 +181,6 @@ html[data-menu=open] #layout>tbody>tr>td#rail{transform:none;box-shadow:8px 0 24 |
| 57 | #prompt{display:none}#footer td:last-child{text-align:left} |
| 58 | #split,#split>tbody,#split>tbody>tr,#split>tbody>tr>td{display:block;width:auto} |
| 59 | #tree{border-right:0;border-bottom:1px solid var(--line)} |
| 60 | -#rows td{white-space:normal;height:auto;padding:8px 6px;line-height:1.35}#rows td:first-child{width:90px}#rows td:last-child{width:80px} |
| 61 | +#rows{table-layout:fixed}#rows td{white-space:normal;overflow-wrap:anywhere;height:auto;padding:8px 6px;line-height:1.35}#rows td:first-child{width:90px}#rows td:last-child{width:80px} |
| 62 | #grid,#gridhead,h2:has(+#gridhead){display:none} |
| 63 | } |