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

head.html « partials « layouts - github.com/gethugothemes/dot-hugo-documentation-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1a17d83747bfeb81cae7915a39f9600aaaf93327 (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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<head>
  <meta charset="utf-8">
  <title>{{ .Title }}</title>
  <meta name="viewport" content="width=device-width, initial-scale=1"/>
  {{ hugo.Generator }}
  <meta name="description" content="{{ .Title }} - {{ .Site.Title }} ">
  
  {{ "<!-- ** CSS Plugins Needed for the Project ** -->" | safeHTML }}
  
  {{ "<!-- Bootstrap -->" | safeHTML }}
  <link rel="stylesheet" href="{{ `plugins/bootstrap/bootstrap.min.css` | absURL }}">

  {{ "<!-- themefy-icon -->" | safeHTML }}
  <link rel="stylesheet" href="{{ `plugins/themify-icons/themify-icons.css` | absURL }}">

  {{ "<!--Favicon-->" | safeHTML }}
  <link rel="icon" href="{{ `images/favicon.png` | absURL }}" type="image/x-icon">

  {{ "<!-- fonts -->" | safeHTML }}
  <link href="https://fonts.googleapis.com/css?family={{replace .Site.Params.font_family ' ' '+' | title}}:300,400,700&display=swap" rel="stylesheet">
  
  <style>
  :root{
    --primary-color:{{ .Site.Params.primary_color }};
    --body-color:{{ .Site.Params.body_color }};
    --text-color:{{ .Site.Params.text_color }};
    --text-color-dark:{{ .Site.Params.text_color_dark }};
    --white-color:{{ .Site.Params.white_color }};
    --light-color:{{ .Site.Params.light_color }};
    --font-family:{{ replace .Site.Params.font_family ' ' '+' | title }};
  }
  </style>

{{ "<!-- Main Stylesheet -->" | safeHTML }}
{{ $css := resources.Get "css/style.css" | minify }}
<link href="{{ $css.Permalink }}" rel="stylesheet" media="screen"/>
  
{{ "<!-- ** JS Plugins Needed for the Project ** -->" | safeHTML }}

{{ "<!-- jquiry -->" | safeHTML }}
<script src="{{ `plugins/jquery/jquery-1.12.4.js` | absURL }}"></script>

{{ "<!-- jquary ui -->" | safeHTML }}
<script src="{{ `plugins/jquery/jquery-ui.js`| absURL }}"></script>

{{ "<!-- Bootstrap JS -->" | safeHTML }}
<script src="{{ `plugins/bootstrap/bootstrap.min.js` | absURL }}"></script>

{{ "<!-- match-height JS -->" | safeHTML }}
<script src="{{ `plugins/match-height/jquery.matchHeight-min.js` | absURL }}"></script>

{{ template "_internal/google_analytics.html" . }}
  
{{ if templates.Exists ( printf "partials/overrides/header.html" ) }}
  {{ partial "partials/overrides/header.html" . }}
{{ else }}
  {{ "<!-- create /layouts/partials/overrides/header.html in your own theme or root directory to add your custom content here -->" | safeHTML }}
{{ end }}


<!-- Open Graph image and Twitter Card metadata -->
{{ $image_path := .Params.image | default site.Params.image }}
{{ $image_path_local :=  printf "static/%s" $image_path }}
{{ $image_ext := trim (path.Ext $image_path | lower) "." }}
{{ if fileExists $image_path_local }}
  <meta property="og:image" content="{{ $image_path | absURL }}" />
  {{ if ne $image_ext "svg" }}
    {{ with (imageConfig $image_path_local) }}
    {{ if (and (gt .Width 144) (gt .Height 144)) }}
      <meta name="twitter:image" content="{{ $image_path | absURL }}"/>
      <meta name="twitter:card" content="summary{{ if (and (gt .Width 300) (gt .Height 157) (not (eq .Width .Height))) }}_large_image{{ end }}">
    {{ end }}
    <meta property="og:image:width" content="{{ .Width }}">
    <meta property="og:image:height" content="{{ .Height }}">
    {{ end }}
  {{ end }}
  <meta property="og:image:type" content="image/{{ if eq $image_ext `svg` }}svg+xml{{ else }}{{ replaceRE `^jpg$` `jpeg` $image_ext }}{{ end }}">
{{ end }}
<meta name="twitter:title" content="{{ .Title }}"/>
<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{ if .IsPage }}{{ .Summary }}{{ else }}{{ with site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}"/>
{{ with site.Social.twitter }}<meta name="twitter:site" content="@{{ . }}"/>{{ end }}
{{ range site.Authors }}
  {{ with .twitter }}<meta name="twitter:creator" content="@{{ . }}"/>{{ end }}
{{ end }}

{{ template "_internal/opengraph.html" . }}
{{ template "_internal/twitter_cards.html" . }}

</head>