diff options
Diffstat (limited to 'vrsite/templates/layout.tmpl')
| -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}} |
