{{ define "header" }} {{ .Data.title }} {{/* Brand fonts (see static/css/style.css Typography). Declared here instead of in the static css so the static helper emits content-hashed urls, which are served with immutable caching. The above-the-fold faces are preloaded with the SAME hashed urls, so each font downloads once */}} {{/* Loads the generated tailwind css, the brand layer (static/css/style.css, auto-included after it) and htmx */}} {{ template "openrun_gen_import" . }}
{{ end }} {{ define "footer" }} {{ if .Data.show_hosted_with }} {{/* mt-auto! pins the footer to the viewport bottom on short pages (important beats the space-y margin-top) */}}

Hosted with OpenRun

{{ end }}
{{ end }} {{/* folder_tree renders the sidebar tree rows. Context: the page context. Rendered in the sidebar and re-rendered out-of-band by the search partial (search_results in index.go.html) so the tree tracks the search */}} {{ define "folder_tree" }}
{{ range .Data.tree }} {{/* One URL for both attributes: href keeps open-in-new-tab and no-js navigation working, hx-get fetches the search_results partial into #apps (it OOB-updates the form's hidden path input and, unless skipped, the tree). Childless rows skip the tree rebuild via X-Tree-Skip (see app.star): their click cannot change which rows show, so only the grid is fetched and toggle.js moves the active row highlight */}} {{ $url := printf "%s/?path=%s" $.AppPath (urlquery .glob) }} {{ if $.Data.keep_query }} {{ $url = printf "%s&q=%s" $url (urlquery $.Data.keep_query) }} {{ end }} {{ if $.Data.internal }} {{ $url = printf "%s&internal=true" $url }} {{ end }} {{ if .children }} {{ else }} {{ end }} {{ if .is_all }} {{ .label }} {{ else if .domain }} {{ .label }} {{ else }} {{ .label }} {{ end }} {{ .count }} {{ end }}
{{ end }}