{{define "base"}} {{/* Browser chrome follows the chosen appearance. Only "auto" hands the decision back to the OS, so only "auto" carries media queries. */}} {{if eq .Appearance "light"}} {{else if eq .Appearance "dark"}} {{else if eq .Appearance "black"}} {{else}} {{end}} {{if .RSSFeedURL}}{{end}} {{.Title}}{{if .Title}} - {{end}}{{if .InstanceName}}{{.InstanceName}}{{else}}littleFedi{{end}} {{if .ThemeCSS}}{{end}} {{/* The viewer's own stylesheet, last so it needs no !important. Inlined rather than served from a route: a per-account stylesheet has to be hashed at render time to cache-bust anyway, so a route would only add an authenticated request per page. */}} {{if .CustomCSS}}{{end}}
{{/* app.js announces and relabels things the server never re-renders, so the strings it needs travel with the page rather than being baked in English. */}}
{{if .Account}}
{{else}} {{/* A visitor without an account still needs the pages that help them decide whether to make one, so they sit beside sign in rather than only in the footer. */}} {{end}}
{{if .Account}} {{end}} {{/* Page padding lives in .container, not an inline style, so a theme can change it: an inline style would beat every stylesheet rule. */}}
{{if .IsAdmin}}
Admin navigation
{{end}} {{if and .Account .BackURL (not .IsAdmin)}} {{T "back.label"}} {{end}} {{trustedTemplateHTML .ContentHTML}} {{if .IsAdmin}}
{{end}}
{{/* Reachable from every page, signed in or not: /about is what someone reads while deciding whether this is a server they want an account on, so it must not be buried behind the authenticated navigation. */}} {{if not .IsAdmin}} {{end}} {{if and .Account (not .IsAdmin)}} {{/* Side rail. Hidden by the default theme; Roost pins it to the right of the feed. Everything here already exists elsewhere in the page, so no theme is missing functionality when it chooses not to show it. */}} {{end}} {{end}}