~bigbes/sr-ht-spec

ref: 5bb0bb134d608263da3197df9fb4f1d8a3fe42db sr-ht-spec/web/templates/layout.html -rw-r--r-- 1.8 KiB
5bb0bb13 — Eugene Blikh graph: serve /query on the anonymous router with a bearer credential 2 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{{/*
  The SourceHut chrome. The brand, the service switcher, the login block and
  the environment banner are NOT rendered here: they come from sr-ht-ecore's
  shared partials ("srht-env-banner", "srht-nav"), which every custom service
  on this instance draws from one copy. The dot is this package's viewData,
  which embeds chrome.Page, so the fields those partials read promote into it.

  What is left is the document and three seams:
    head     extra <head> content. A block, so a page that needs none renders.
    content  the page itself; every page template defines it.
    scripts  nothing uses it yet; the proposal page's script goes in "head"
              with defer.
*/}}
<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>{{.Title}}</title>
    {{/* The stylesheet and the favicon, both from sr-ht-ecore's own partial and
         both guarded there rather than emitted empty: <link href=""> re-requests
         the page it is on, which is a page load per page load, and the
         stylesheet is empty in a binary built without `make css`.

         The icon used to be the literal /static/logo.svg written here. It is
         still that file, but the href is now resolved at startup through
         assets.Resolve: a path a template asserts is one that 404s on every page
         load if the file is ever renamed or hashed, where a resolved one is
         absent once, at startup, in front of whoever can fix it. */}}
    {{template "srht-head-links" .}}
    {{block "head" .}}{{end}}
  </head>
  <body>
    {{template "srht-env-banner" .}}
    <nav class="container navbar navbar-light navbar-expand-sm">
      {{template "srht-nav" .}}
    </nav>
    <div class="{{.ContainerClass}}">
      {{template "content" .}}
    </div>
  </body>
</html>