Migration
This is my new public git source viewer. Source coming soon. Please contact with concerns/bugs.
Contact me
templates/layouts/base.html
c0427d5fc7c0fcf8606c546071085e8af231fb81
· 2.0 KB · 58 lines
raw
| 1 | {{ define "base" }}<!DOCTYPE html> |
| 2 | <html lang="en"> |
| 3 | <head> |
| 4 | <meta charset="utf-8"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 6 | <title>{{ block "title" . }}{{ with .Info.Title }}{{ . }} · {{ end }}{{ .Site.Name }}{{ end }}</title> |
| 7 | <link rel="stylesheet" href="/static/css/base.css"> |
| 8 | {{ block "styles" . }}{{ end }} |
| 9 | </head> |
| 10 | <body> |
| 11 | {{ template "nav" . }} |
| 12 | <main class="wrap">{{ block "main" . }}{{ end }}</main> |
| 13 | <footer class="wrap"> |
| 14 | <div class="footer-left"> |
| 15 | <span class="logo" style="width:24px;height:24px;font-size:0.9rem;">G</span> |
| 16 | <span>{{ .Site.Name }}</span> |
| 17 | </div> |
| 18 | <div class="footer-right"> |
| 19 | <!--<span>served from bare repositories</span>--> |
| 20 | <span style="color:var(--line);margin:0 .5rem;">•</span> |
| 21 | <span>{{ .Site.Name }} v1.0</span> |
| 22 | </div> |
| 23 | </footer> |
| 24 | {{ block "scripts" . }}{{ end }} |
| 25 | </body> |
| 26 | </html>{{ end }} |
| 27 | |
| 28 | {{ define "nav" }} |
| 29 | <nav class="nav"> |
| 30 | <div class="wrap nav-inner"> |
| 31 | <div class="nav-start"> |
| 32 | <a class="brand" href="/"> |
| 33 | <span class="logo">G</span> |
| 34 | <span>{{ .Site.Name }}</span> |
| 35 | </a> |
| 36 | {{ with .Info.Slug }} |
| 37 | <a class="repo-name nav-repo-name" href="/{{ . }}/">{{ $.Info.Title }}</a> |
| 38 | {{ end }} |
| 39 | </div> |
| 40 | {{ with .Info.Slug }} |
| 41 | <nav class="tabs"> |
| 42 | {{ range $.Nav }}<a class="tab{{ if .Active }} active{{ end }}" href="{{ .Href }}">{{ .Label }}</a>{{ end }} |
| 43 | </nav> |
| 44 | <div class="nav-end"> |
| 45 | {{ with modOr "refs" }} |
| 46 | <label class="refpicker"> |
| 47 | <span class="sr">Ref</span> |
| 48 | <select onchange="location.href=this.value"> |
| 49 | {{ range .Branches }}<option value="/{{ $.Info.Slug }}/tree/{{ .Name }}"{{ if eq .Name $.Ref }} selected{{ end }}>{{ .Name }}</option>{{ end }} |
| 50 | {{ range .Tags }}<option value="/{{ $.Info.Slug }}/tree/{{ .Name }}"{{ if eq .Name $.Ref }} selected{{ end }}>{{ .Name }}</option>{{ end }} |
| 51 | </select> |
| 52 | </label> |
| 53 | {{ end }} |
| 54 | </div> |
| 55 | {{ end }} |
| 56 | </div> |
| 57 | </nav> |
| 58 | {{ end }} |