aboutsummaryrefslogtreecommitdiff
path: root/templates/base/base.gohtml
blob: 666e403f3be7165d906063e807a8965822d02d52 (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
{{define "base"}}
    <!doctype html>
    <html lang="fr" prefix="og: https://ogp.me/ns#">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <link rel="shortcut icon" href="{{getStaticPath "logo.png"}}" type="image/png" />
        <title>{{ .Title }}</title>
        <style>
            {{ $font := getFont }}
            {{ if ne $font "" }}
                @font-face {
                    font-family: "custom";
                    src: url("{{ getStaticPath $font }}");
                }
                body {
                    --fonts: "custom";
                }
            {{ end }}
        </style>
        <link rel="stylesheet" href="{{getAssetPath "styles.css"}}" />
        {{template "opengraph-base" .SEO}}
        {{ if .Data.IsCustomPage }}
            <style>
                .links { {{ .Data.Color.Button.GetBackground }}{{ .Data.Color.Button.GetTextColor }} }
            </style>
	    {{ else }}
        {{ range .Data.RelMeLinks }}
            <link rel="me" href="{{ . }}" />
        {{ end }}
        {{ end }}
    </head>
    <body style="{{ .Data.GetBackgroundImage }}{{ .Data.GetTextColor }}">
    <div class="center">
        {{template "body" .Data}}
    </div>
    {{ $rings := getRings }}
    {{ if ne $rings nil }}
    <div class="rings {{ if ne .SEO.URL "/" }}fixed{{ end }}">
        {{ range $ring := $rings }}
            <a href="{{ $ring.Link }}" target="_blank" class="ring">
                <img src="{{ getImage $ring.Image }}" alt="{{ $ring.Name }} logo">
            </a>
        {{ end }}
    </div>
    {{ end }}
    <footer class="credits">
        <p>Crafted by <a href="/legal" target="_blank">Anhgelus Morhtuuzh</a></p>
    </footer>
    <script type="module" src="{{getAssetPath "index.js"}}" defer></script>
    </body>
    </html>
{{end}}