aboutsummaryrefslogtreecommitdiff
path: root/views/layouts/main.html
blob: 74b86e4ee09b63fb6e32887b9c2a1e3f1cc45edf (plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html>
  <head>
    <title>{{ .page.Title }}</title>
    <meta charset="UTF-8">
    <meta name='robots' content='noindex, nofollow'/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="keywords" content="Federated Imageboard based on Activtypub">
    <meta name="description" content="{{ .page.Meta.Description }}">
    <meta property="og:url" content="{{ .page.Meta.Url }}">
    <meta property="og:site_name" content="{{ .page.Instance.PreferredUsername }}" />

    <meta property="og:title" content="{{ .page.Meta.Title }}">
    <meta property="og:description" content="{{ .page.Meta.Description }}">

    <meta property="og:locale" content="en_US" />
    <meta property="og:type" content="website" />

    <meta name="twitter:title" content="{{ .page.Meta.Title }}">
    <meta name="twitter:description" content="{{ .page.Meta.Description }}">
    <meta name="twitter:card" content="summary_large_image">

    {{ if not (eq .page.Meta.Preview "") }}
    <meta property="og:image" content="{{ .page.Meta.Preview }}" />
    <meta name="twitter:image" content="{{ .page.Meta.Preview }}" />
    {{ end }}

    <link rel="icon" type="image/png"  href="/static/favicon.png">

    {{ if gt (len .page.ThemeCookie) 0 }}
    <link rel="stylesheet" type="text/css" href="/static/css/themes/{{.page.ThemeCookie}}.css" title="selected theme">
    {{ else }}
    <link rel="stylesheet" type="text/css" href="/static/css/themes/default.css" title="default">
    {{ end }}
    {{ range .page.Themes }}
    <link rel="alternate stylesheet" type="text/css" href="/static/css/themes/{{.}}.css" title="{{.}}" disabled>
    {{ end }}
  </head>
  <body {{ if not .page.Board.Restricted }}class="nsfw"{{ end }} onload="applyTheme()">
    <ul id="boardlinks">
      {{ $l := len .page.Boards }}
      <li>[<a href="/">Home</a>]</li>
      {{range $i, $e := .page.Boards}}
      {{ if eq (sub $l 1) 0 }}
      <li>[ <a href="{{.Location}}">{{$e.Name}} </a>]</li>
      {{ else if eq $i 0 }}
      <li>[<a href="{{.Location}}">{{$e.Name}} </a>/</li>
      {{ else if eq $i (sub $l 1) }}
      <li><a href="{{.Location}}">{{$e.Name}}</a>]</li>
      {{ else }}
      <li><a href="{{.Location}}">{{$e.Name}} </a>/</li>
      {{ end }}
      {{ end }}
    </ul>
    {{ if .page.Board.ModCred }}
    {{ if eq .page.Board.ModCred .page.Board.Domain .page.Board.Actor.Id }}
    <span style="float: right;">[<a href="/{{ .page.Key }}/{{ .page.Board.Name }}">Manage Board</a>]</span>
    {{ end }}
    {{ end }}

    {{ embed }}
  </body>
</html>