-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.html
More file actions
114 lines (104 loc) · 5.1 KB
/
Copy pathheader.html
File metadata and controls
114 lines (104 loc) · 5.1 KB
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>{{ if $.IsPage }}{{ .Title }} | {{ .Site.Title }}{{ else }}{{ .Title }}{{ if not $.IsHome }} | {{ .Site.Title }}{{ end }}{{ end }}</title>
<meta name="description" content="{{ .Site.Title }}">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
{{ if .OutputFormats.Get "RSS" }}
<link href="{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}" rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" />
{{ end }}
{{ $bootstrap := resources.GetRemote "https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.css" }}
{{ $fontawesome := resources.GetRemote "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.4/css/all.css" }}
{{ $chroma := resources.Get "css/chroma-vs.css" }}
{{ $style := resources.Get "css/style.scss" | resources.ExecuteAsTemplate "style.scss" . | resources.ToCSS }}
{{ $styleBundle := slice $bootstrap $fontawesome $chroma $style | resources.Concat "css/style.css" | minify | fingerprint }}
<link href="{{ $styleBundle.RelPermalink }}" rel="stylesheet">
{{ if isset .Site.Params.profile "twitter" }}
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@{{ .Site.Params.profile.twitter }}" />
<meta name="twitter:creator" content="@{{ .Site.Params.profile.twitter }}" />
{{ end }}
<meta property="og:url" content="{{ .Permalink }}" />
<meta property="og:site_name" content="{{ .Site.Title }}" />
<meta property="og:type" content="website">
<meta property="og:title" content="{{ .Title }}" />
{{ if $.Param "description" }}
<meta property="og:description" content="{{ $.Param "description" | htmlEscape }}" />
{{ else }}
<meta property="og:description" content="{{ .Site.Params.subtitle }}" />
{{ end }}
<meta property="twitter:card" content="summary">
{{ if and ($.Param "image") (ne nil ($.Param "image")) (ne "" ($.Param "image")) }}
{{ $image := .Resources.GetMatch (printf "%s*" ($.Param "image")) }}
<meta property="og:image" itemprop="image" content="{{ $image.RelPermalink | absURL }}" />
<meta property="og:image:secure_url" itemprop="image" content="{{ $image.RelPermalink | absURL }}" />
<meta property="twitter:image" content="{{ $image.RelPermalink | absURL }}" />
{{ else if .Resources.GetMatch "postimg" }}
{{ $image := .Resources.GetMatch "postimg" }}
<meta property="og:image" itemprop="image" content="{{ $image.RelPermalink | absURL }}" />
<meta property="og:image:secure_url" itemprop="image" content="{{ $image.RelPermalink | absURL }}" />
<meta property="twitter:image" content="{{ $image.RelPermalink | absURL }}" />
{{ else }}
<meta property="og:image" itemprop="image" content="/screenshot.png" />
<meta property="og:image:secure_url" itemprop="image" content="/screenshot.png">
<meta property="twitter:image" content="/screenshot.png" />
{{ end }}
<meta property="og:image:type" content="image/png">
</head>
<body>
<header class="site-header">
<div class="banner">
<div class="container">
<h1><a class="text" href="/" rel="home">{{ .Site.Title }}</a></h1>
<div class="text tagline">{{ .Site.Params.subtitle }}</div>
</div>
</div>
<nav class="navbar navbar-expand-sm px-3">
<div class="container">
<div class="navlinks">
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarLinks" aria-controls="navbarLinks" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarLinks">
<ul class="navbar-nav mr-auto">
<li class="nav-item"><a class="nav-link" href="/">Home</a></li>
{{ range (where .Site.Pages "Type" "page") }}
{{ if ne .RelPermalink "/" }}
<li class="nav-item"><a class="nav-link" href="{{ .RelPermalink }}">{{ .Title }}</a></li>
{{ end }}
{{ end }}
</ul>
</div>
</div>
<div class="contact-icons ms-auto">
{{ if isset .Site.Params.profile "email" }}
<a href="mailto:{{ .Site.Params.profile.email }}" target="_blank" class="mx-2">
<i class="fas fa-envelope"></i>
</a>
{{ end }}
{{ if isset .Site.Params.profile "github" }}
<a href="https://www.github.com/{{ .Site.Params.profile.github }}" target="_blank" class="mx-2">
<i class="fab fa-github"></i>
</a>
{{ end }}
{{ if isset .Site.Params.profile "twitter" }}
<a href="https://www.twitter.com/{{ .Site.Params.profile.twitter }}" target="_blank" class="mx-2">
<i class="fab fa-twitter"></i>
</a>
{{ end }}
{{ if isset .Site.Params.profile "facebook" }}
<a href="https://www.facebook.com/{{ .Site.Params.profile.facebook }}" target="_blank" class="mx-2">
<i class="fab fa-facebook"></i>
</a>
{{ end }}
{{ if isset .Site.Params.profile "linkedin" }}
<a href="https://www.linkedin.com/in/{{ .Site.Params.profile.linkedin }}" target="_blank" class="mx-2">
<i class="fab fa-linkedin"></i>
</a>
{{ end }}
</div>
</div>
</nav>
</header>
<main class="container">