aboutsummaryrefslogtreecommitdiff
path: root/themes/flamingo/layouts/_default/baseof.html
blob: 86a82c133d5777531d5223b2aa190f3503f21ebc (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
64
65
66
67
68
69
70
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode | default "en-us" }}">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">

        <!-- Favicon -->
        {{ with .Site.Params.favicon }}<link rel="icon" type="image/png" href="{{ . }}" />{{ end }}

        <title itemprop="name">{{ .Title }} | {{ .Site.Params.description }}</title>
        {{ with .Site.Params.description }}<meta name="description" content="{{ . }}">{{ end }}
        {{ with .Site.Params.author }}<meta name="author" content="{{ . }}">{{ end }}

        {{ $styles := resources.Get "scss/main.scss" | resources.ToCSS | minify | fingerprint}}
        <link rel="stylesheet" href="{{ $styles.RelPermalink }}" media="screen">
        <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">

        {{ with .OutputFormats.Get "RSS" -}}
        {{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
        {{- end }}

        <!-- Meta tags -->
        {{ partial "meta" . }}

    </head>
    <body>
        <div class="layout">
            {{ partial "header" . }}
            {{ block "main" . }}{{ end }}
            {{ partial "footer" . }}
        </div>
    </body>

    <script>
     // TODO
     // Use Hugo templating to achieve this
     // Script to check active nav menu
     (function() {
         const links = document.querySelectorAll("nav a")
         const currentUrl = location.href

         for (const link of links) {
             if (location.href.split("/").length === 4 && link.href.endsWith("/posts/")) {
                 link.classList.add("active-link")
                 break;
             }

             if (link.href === currentUrl) {
                 link.classList.add("active-link")
             }
         }
     }())
    </script>

    <!-- Posthog -->
    <script>
        !function(t,e){var o,n,p,r;e.__SV||(window.posthog=e,e._i=[],e.init=function(i,s,a){function g(t,e){var o=e.split(".");2==o.length&&(t=t[o[0]],e=o[1]),t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}}(p=t.createElement("script")).type="text/javascript",p.async=!0,p.src=s.api_host+"/static/array.js",(r=t.getElementsByTagName("script")[0]).parentNode.insertBefore(p,r);var u=e;for(void 0!==a?u=e[a]=[]:a="posthog",u.people=u.people||[],u.toString=function(t){var e="posthog";return"posthog"!==a&&(e+="."+a),t||(e+=" (stub)"),e},u.people.toString=function(){return u.toString(1)+".people (stub)"},o="capture identify alias people.set people.set_once set_config register register_once unregister opt_out_capturing has_opted_out_capturing opt_in_capturing reset".split(" "),n=0;n<o.length;n++)g(u,o[n]);e._i.push([i,s,a])},e.__SV=1)}(document,window.posthog||[]);
        posthog.init('uZJ_bhngsKFhhPaqWyp_2lc-HyE8vY5XKneeAMWS9cE', {api_host: 'https://profhog.herokuapp.com'})
    </script>

    <!-- Ackee -->
    <script async
        src="https://prof-ackee.herokuapp.com/tracker.js"
        data-ackee-server="https://prof-ackee.herokuapp.com"
        data-ackee-domain-id="45af9210-721f-4c09-a69d-77e66fe7bc5d"
    >
    </script>

</html>