diff options
| author | Gabriel Schneider <[email protected]> | 2026-08-02 17:38:06 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-02 23:11:01 -0300 |
| commit | a9263daee9413c5eff3c1f1bebcd224442fd8685 (patch) | |
| tree | f0a74fe1420cd9933cb2f85dc8313914aa674e94 /vrsite/templates | |
| parent | e16f78b255bcf46d8c6f9a4b9e76dd7a3817edeb (diff) | |
| download | notevi-a9263daee9413c5eff3c1f1bebcd224442fd8685.tar.gz notevi-a9263daee9413c5eff3c1f1bebcd224442fd8685.zip | |
vrsite: toggle repository file list
Diffstat (limited to 'vrsite/templates')
| -rw-r--r-- | vrsite/templates/layout.tmpl | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/vrsite/templates/layout.tmpl b/vrsite/templates/layout.tmpl index e83730a..a11ef16 100644 --- a/vrsite/templates/layout.tmpl +++ b/vrsite/templates/layout.tmpl @@ -16,7 +16,8 @@ l.rel = "stylesheet"; l.id = "themescss"; l.href = "{{.Href "asset" "themes.css"}}"; document.head.append(l); } - d.dataset.mode = localStorage.getItem("vrsite-mode") || "trace";} + d.dataset.mode = localStorage.getItem("vrsite-mode") || "trace"; + d.dataset.files = localStorage.getItem("vrsite-files-hidden") === "1" ? "hidden" : "shown";} </script> {{if .Live}}<script src="{{.Href "asset" "htmx.min.js"}}"></script>{{end}} <script src="{{.Href "asset" "app.js"}}" defer></script> @@ -35,8 +36,11 @@ {{if .Live}} <div id="activity" class="activity" hx-get="{{.Href "activity"}}?compact=1" hx-trigger="load, every 3s" hx-swap="innerHTML"></div> {{end}} - <input id="filefind" class="find" type="search" placeholder="find file…" aria-label="find file" autocomplete="off" spellcheck="false"> - <div id="tree"><p class="meta hint">loading tree…</p></div> + <button type="button" id="filetoggle" aria-controls="filelist" aria-expanded="true">hide files</button> + <div id="filelist"> + <input id="filefind" class="find" type="search" placeholder="find file…" aria-label="find file" autocomplete="off" spellcheck="false"> + <div id="tree"><p class="meta hint">loading tree…</p></div> + </div> <footer> <span> {{if and .Live (ne .Root "/")}}<a href="/">projects</a> · {{end}} |
