Welcome to mirror list, hosted at ThFree Co, Russian Federation.

head.html « partials « layouts - github.com/LukasJoswiak/etch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bb7ef8bdcc7780ae599013d435aa4e893f24311d (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
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    {{ with .Site.Params.description -}}
    <meta name="description" content="{{ . }}">
    {{ end }}
    {{ printf `<link rel="shortcut icon" href="%s">` ("favicon.ico" | absURL) | safeHTML }}
    {{ with .OutputFormats.Get "rss" -}}
        {{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
    {{ end -}}

    {{ $resources := slice -}}

    {{ $resources = $resources | append (resources.Get "css/main.css") -}}

    {{ $resources = $resources | append (resources.Get "css/min770px.css") -}}

    {{ $dark := .Site.Params.dark | default "auto" -}}
    {{ if not (eq $dark "off") -}}
        {{ $resources = $resources | append (resources.Get "css/dark.css" | resources.ExecuteAsTemplate "dark.css" .) -}}
    {{ end -}}

    {{ if .Site.Params.highlight -}}
        {{ $resources = $resources | append (resources.Get "css/syntax.css") -}}
    {{ end -}}

    {{ $css := $resources | resources.Concat "css/style.css" | minify }}
    {{ printf `<link rel="stylesheet" href="%s">` $css.RelPermalink | safeHTML }}

    <link rel="canonical" href="{{ .Permalink }}" />
    <title>{{ .Title }}</title>
</head>