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

head.html « partials « layouts - github.com/kakawait/hugo-tranquilpeak-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 239fb2cbd27c1e64a4a4e290e2e0180bd007cbc9 (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
{{- $.Scratch.Set "isTypeInMainSections" false -}}
{{- if .IsPage -}}
  {{- if in site.Params.mainSections .Type -}}
    {{- $.Scratch.Set "isTypeInMainSections" true -}}
  {{- end -}}
{{- end -}}
{{- if and (and ($.Scratch.Get "isTypeInMainSections") (lt .Site.Params.sidebarBehavior 3)) (or (and .Site.Params.clearReading (not .Params.clearReading)) .Params.clearReading) -}}
  {{- .Scratch.Set "sidebarBehavior" (add .Site.Params.sidebarBehavior 3) -}}
{{- else -}}
  {{- .Scratch.Set "sidebarBehavior" .Site.Params.sidebarBehavior -}}
{{- end -}}
<!-- Fix hugo 0.17 expects ".Site.Author.gravatarEmail" whereas hugo 0.18 expects ".Site.Author.gravataremail" -->
{{- if .Site.Author.gravatarEmail -}}
  {{- .Scratch.Set "gravatarEmail" .Site.Author.gravatarEmail -}}
{{- end -}}
{{- if .Site.Author.gravataremail -}}
  {{- .Scratch.Set "gravatarEmail" .Site.Author.gravataremail -}}
{{- end -}}
{{- if .Scratch.Get "gravatarEmail" -}}
  {{- .Scratch.Set "authorPicture" (printf "https://www.gravatar.com/avatar/%s" (urlize (md5 (.Scratch.Get "gravatarEmail")))) -}}
{{- else if .Site.Author.picture -}}
  {{- .Scratch.Set "authorPicture" (absURL .Site.Author.picture) -}}
{{- end -}}
<!DOCTYPE html>
<html lang="{{ .Site.LanguageCode }}">
  <head>
    {{ partial "head_start.html" . }}
    {{ partial "schema.html" . }}
    {{ partial "meta.html" . }}
    <title>{{ with .Title }}{{ . }}{{ else }}{{ .Site.Title }}{{ end }}</title>

    <link rel="icon" href="{{ with .Site.Params.favicon }}{{ . | absURL }}{{ else }}/favicon.png{{ end }}">
    {{ with .OutputFormats.Get "RSS" }}
      <link rel="alternate" type="application/rss+xml" title="RSS" href="{{ .RelPermalink }}">
    {{ end }}

    {{ with .Site.Author.googleplus }}
      <link rel="publisher" href="https://plus.google.com/{{ . | urlize }}">
    {{ end }}

    <link rel="canonical" href="{{ .Permalink }}">

    <!--EXTERNAL STYLES-->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" integrity="sha512-iBBXm8fW90+nuLcSKlbmrPcLa0OT92xO1BIsZ+ywDWZCvqsWgccV3gFoRBv0z+8dLJgyAHIhR35VZc2oM/gI1w==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.5.7/jquery.fancybox.min.css" integrity="sha512-H9jrZiiopUdsLpg94A333EfumgUBpO9MdbxStdeITo+KEIMaNfHNvwyjjDJb+ERPaRS6DpyRlKbvPUasNItRyw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    {{ if .Site.Params.comment.gitalk.enable }}
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/gitalk/1.7.2/gitalk.css" integrity="sha512-MLcK/YRapzET1qTBXrOiZE6bGBgtATMo2bIyalVJ8EKDEGNoeA3SPQkvWAR0zNS650YG13ocXBMeioDuZcSRuQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    {{ end }}
    <!--EXTERNAL STYLES END-->
    <!--STYLES-->
    <link rel="stylesheet" href="{{ "css/style-x4v5aep1xln8tw4u8b4utrzzm45rcnnq6emr4myqn5eka2yri56y1t7q.min.css" | absURL }}" />
    <!--STYLES END-->
    {{ range .Site.Params.customCSS }}
      {{ if isset . "href" }}
        <link {{ if not (isset . "rel") }}rel="stylesheet" {{ end }}{{ range $key, $value := . }} {{ if eq $key "href" }}{{ (printf "%s=\"%s\"" $key ($value | absURL)) | safeHTMLAttr }}{{ else }}{{ (printf "%s=\"%s\"" $key (string $value)) | safeHTMLAttr }}{{ end }}{{ end }}>
      {{ else }}
        <link rel="stylesheet" href="{{ . | absURL }}">
      {{ end }}
    {{ end }}

    {{ if or .Params.googleAnalytics.async .Params.ga.async }}
      {{ template "_internal/google_analytics_async.html" . }}
    {{ else }}
      {{ template "_internal/google_analytics.html" . }}
    {{ end }}
    {{ partial "head_end.html" . }}
  </head>