global header/navbar on all pages like a grown-up website (#17)

This commit is contained in:
jake authored and GitHub committed 2019-11-24 18:07:12 -05:00
1 parent 2bb25a6a5f
commit 8ccd15ab87
30 files changed
+616 -640

No files matched your search

+1 -3
View File
@@ -1,6 +1,5 @@
{{ partial "header.html" . }}
{{ partial "blog-header.html" . }}
<main id="archive">
<main id="list">
{{- range (where .Site.RegularPages "Type" "notes").GroupByDate "2006" }}
<section class="year">
<h2>{{ .Key }}</h2>
@@ -15,5 +14,4 @@
</section>
{{- end }}
</main>
{{ partial "blog-footer.html" . }}
{{ partial "footer.html" . }}
-2
View File
@@ -1,5 +1,4 @@
{{ partial "header.html" . }}
{{ partial "blog-header.html" . }}
<main id="single">
<article>
<div id="info">
@@ -20,5 +19,4 @@
</div>
</article>
</main>
{{ partial "blog-footer.html" . }}
{{ partial "footer.html" . }}
+14 -16
View File
@@ -1,21 +1,19 @@
{{ partial "header.html" . }}
<h1>{{ .Title }}</h1>
<main id="video">
<h1>{{ .Title }}</h1>
<video poster="{{ with .Resources.GetMatch "images/*.png" }}{{ .Permalink }}{{ end }}" controls crossorigin playsinline preload="none">
<!-- Video files -->
{{ with .Resources.GetMatch "*.webm" }}<source src="{{ .Permalink }}" type="video/webm">{{ end }}
{{ with .Resources.GetMatch "*.mp4" }}<source src="{{ .Permalink }}" type="video/mp4">{{ end }}
<video poster="{{ with .Resources.GetMatch "images/*.png" }}{{ .Permalink }}{{ end }}" controls crossorigin playsinline preload="none">
<!-- Video files -->
{{ with .Resources.GetMatch "*.webm" }}<source src="{{ .Permalink }}" type="video/webm">{{ end }}
{{ with .Resources.GetMatch "*.mp4" }}<source src="{{ .Permalink }}" type="video/mp4">{{ end }}
<!-- Caption files -->
{{ with .Resources.GetMatch "*.en.vtt" }}<track src="{{ .Permalink }}" kind="captions" label="English" srclang="en" default>{{ end }}
<!-- Caption files -->
{{ with .Resources.GetMatch "*.en.vtt" }}<track src="{{ .Permalink }}" kind="captions" label="English" srclang="en" default>{{ end }}
<!-- Fallback for browsers that don't support the <video> element -->
Your browser doesn't support HTML5 video. {{ with .Resources.GetMatch "*.mp4" }}<a href="{{ .Permalink }}">Click here to view the raw .mp4 video.</a>{{ end }}
</video>
<div>
<a class="no-underline" id="logo" href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}" aria-label="{{ .Site.Title }}">
{{ partial "logo.html" . }}
</a>
</div>
{{ .Content }}
<!-- Fallback for browsers that don't support the <video> element -->
Your browser doesn't support HTML5 video. {{ with .Resources.GetMatch "*.mp4" }}<a href="{{ .Permalink }}">Click here to view the raw .mp4 video.</a>{{ end }}
</video>
{{ .Content }}
</main>
{{ partial "footer.html" . }}
+18 -1
View File
@@ -1,7 +1,24 @@
# Smart security headers
# Sensible default security headers
# - More info: https://scotthelme.co.uk/hardening-your-http-response-headers/
# - Test website: https://securityheaders.com/
/*
X-Frame-Options: sameorigin
X-XSS-Protection: 1; mode=block
Referrer-Policy: no-referrer
X-Content-Type-Options: nosniff
# Recommended MIME type for RSS feed
/index.xml
Content-Type: application/rss+xml
# Recommended MIME type for PWA manifests
# https://github.com/w3c/manifest/issues/689
/manifest.json
Content-Type: application/manifest+json; charset=UTF-8
/*.webmanifest
Content-Type: application/manifest+json; charset=UTF-8
+3 -8
View File
@@ -1,10 +1,5 @@
{{ partial "header.html" . }}
<main>
{{ .Content }}
<footer>
<div id="blog"><a href="{{ "notes/" | absURL }}" title="{{ .Site.Author.name }}&#39;s Blog" rel="me"><span>&#x1F4DD;</span> Read more at my blog...</a></div>
<div id="panda"><a class="no-underline" href="https://nationalzoo.si.edu/webcams/panda-cam" title="Live Panda Party!!!11" target="_blank" rel="noopener noreferrer nofollow"><span>&#x1F43C;</span></a></div>
<div id="info"><span id="copyright"><a class="no-underline" href="{{ .Site.Params.wayback }}" title="View Old Versions on Wayback Machine" id="wayback" target="_blank" rel="noopener noreferrer nofollow">&copy; {{ .Site.Params.copyrightFirstYear }} &ndash;</a> {{ now.Format "2006" }} <a class="no-underline" href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}">{{ .Site.Title }}</a>.</span> <a class="no-underline" href="{{ .Site.Params.gitRepo }}" title="View Source on GitHub" id="source" target="_blank" rel="noopener noreferrer">View source.</a></div>
</footer>
</main>
<main id="home">
{{ .Content }}
</main>
{{ partial "footer.html" . }}
+8 -3
View File
@@ -2,7 +2,12 @@
# https://www.netlify.com/docs/redirects/
{{ range $p := .Site.Pages -}}
{{ range .Aliases }}
{{- . | printf "%-35s" }} {{ $p.RelPermalink }}
{{- range .Aliases }}
{{- . | printf "%-35s" }} {{ $p.RelPermalink }} 301
{{ end -}}
{{- end -}}
{{- end }}
# Rewrite generated manifest.json to manifest.webmanifest
# https://github.com/w3c/manifest/issues/689
/manifest.webmanifest /manifest.json 200
-5
View File
@@ -1,5 +0,0 @@
<footer>
<div id="copyright">Posts licensed under <a class="no-underline" href="https://creativecommons.org/licenses/by/4.0/" title="Creative Commons Attribution 4.0 International" target="_blank" rel="noopener noreferrer nofollow">CC-BY-4.0</a>, <a class="no-underline" href="{{ .Site.Params.wayback }}" title="View Old Versions on Wayback Machine" id="wayback" target="_blank" rel="noopener noreferrer nofollow">{{ .Site.Params.copyrightFirstYear }} &ndash;</a> {{ now.Format "2006" }}.</div>
<div id="panda"><a class="no-underline" href="https://nationalzoo.si.edu/webcams/panda-cam" title="Live Panda Party!!!11" target="_blank" rel="noopener noreferrer nofollow"><span>&#x1F43C;</span></a></div>
<div id="poweredby"><a class="no-underline" href="https://gohugo.io/" title="Powered by Hugo" id="hugo" target="_blank" rel="noopener noreferrer nofollow">Powered by Hugo.</a> <a class="no-underline" href="{{ .Site.Params.gitRepo }}" title="View Source on GitHub" id="source" target="_blank" rel="noopener noreferrer">View source.</a></div>
</footer>
-14
View File
@@ -1,14 +0,0 @@
<header>
<nav>
<a class="no-underline" href="{{ .Site.BaseURL }}" id="logo" title="{{ .Site.Title }}" aria-label="{{ .Site.Title }}">
{{ partial "logo.html" . }}
<span id="name">{{ .Site.Title }}</span>
</a>
<ul>
<li><a class="no-underline" href="{{ .Site.BaseURL }}" title="Home">&#x1F3E0;</a></li>
<li><a class="no-underline" href="{{ "notes/" | absURL }}" title="Notes">&#x1F4DD;</a></li>
<li><a class="no-underline" href="https://github.com/{{ .Site.Author.github }}" title="GitHub" target="_blank" rel="me noopener noreferrer">&#x1F468;&#x200D;&#x1F4BB;</a></li>
<li><a class="no-underline" href="&#x6D;&#x61;&#x69;&#x6C;&#x74;&#x6F;&#x3A;&#x6A;&#x61;&#x6B;&#x65;&#x40;&#x6A;&#x61;&#x72;&#x76;&#x2E;&#x69;&#x73;" title="Email Me">&#x1F48C;</a></li>
</ul>
</nav>
</header>
+5
View File
@@ -1,3 +1,8 @@
<footer>
<div id="copyright">Content licensed under <a class="no-underline" href="https://creativecommons.org/licenses/by/4.0/" title="Creative Commons Attribution 4.0 International" target="_blank" rel="noopener noreferrer nofollow">CC-BY-4.0</a>, <a class="no-underline" href="{{ .Site.Params.wayback }}" title="View Old Versions on Wayback Machine" id="wayback" target="_blank" rel="noopener noreferrer nofollow">{{ .Site.Params.copyrightFirstYear }} &ndash;</a> {{ now.Format "2006" }}.</div>
<div id="panda"><a class="no-underline" href="https://nationalzoo.si.edu/webcams/panda-cam" title="Live Panda Party!!!11" target="_blank" rel="noopener noreferrer nofollow"><span>&#x1F43C;</span></a></div>
<div id="poweredby"><a class="no-underline" href="https://gohugo.io/" title="Powered by Hugo" id="hugo" target="_blank" rel="noopener noreferrer nofollow">Powered by Hugo.</a> <a class="no-underline" href="{{ .Site.Params.gitRepo }}" title="View Source on GitHub" id="source" target="_blank" rel="noopener noreferrer">View source.</a></div>
</footer>
</body>
</html>
+15 -1
View File
@@ -34,4 +34,18 @@
{{ partial "schema-person.html" . }}
{{ end }}
</head>
<body id="{{ .Type }}">
<body>
<header>
<nav>
<a class="no-underline" href="{{ .Site.BaseURL }}" id="logo" rel="me author" title="{{ .Site.Title }}" aria-label="{{ .Site.Title }}">
{{ partial "logo.html" . }}
<h1 id="name">{{ .Site.Title }}</h1>
</a>
<ul>
<li><a class="no-underline" href="{{ .Site.BaseURL }}" title="Home">&#x1F3E0;</a></li>
<li><a class="no-underline" href="{{ "notes/" | absURL }}" title="Notes">&#x1F4DD;</a></li>
<li><a class="no-underline" href="https://github.com/{{ .Site.Author.github }}" title="GitHub" target="_blank" rel="me noopener noreferrer">&#x1F468;&#x200D;&#x1F4BB;</a></li>
<li><a class="no-underline" href="&#x6D;&#x61;&#x69;&#x6C;&#x74;&#x6F;&#x3A;&#x6A;&#x61;&#x6B;&#x65;&#x40;&#x6A;&#x61;&#x72;&#x76;&#x2E;&#x69;&#x73;" title="Email Me">&#x1F48C;</a></li>
</ul>
</nav>
</header>
+11 -3
View File
@@ -29,9 +29,17 @@
"image": {
"@type": "ImageObject",
"url": {{ "me_large.jpg" | absURL }},
"width": "1000",
"height": "1000"
}
"width": "1200",
"height": "1200"
},
"sameAs": [
{{ .Site.BaseURL }},
{{ printf "%s%s" "https://github.com/" .Site.Author.github }},
{{ printf "%s%s" "https://twitter.com/" .Site.Author.twitter }},
{{ printf "%s%s" "https://www.facebook.com/" .Site.Author.facebook }},
{{ printf "%s%s%s" "https://www.linkedin.com/in/" .Site.Author.linkedin "/" }},
{{ printf "%s%s" "https://" .Site.Author.mastodon }}
]
},
"publisher": {
"@type": "Organization",
+7 -6
View File
@@ -9,15 +9,16 @@
"image": {
"@type": "ImageObject",
"url": {{ "me_large.jpg" | absURL }},
"width": "1000",
"height": "1000"
"width": "1200",
"height": "1200"
},
"sameAs": [
{{ .Site.BaseURL }},
"https://github.com/{{ .Site.Author.github }}",
"https://twitter.com/{{ .Site.Author.twitter }}",
"https://www.facebook.com/{{ .Site.Author.facebook }}",
"https://www.linkedin.com/in/{{ .Site.Author.linkedin }}/"
{{ printf "%s%s" "https://github.com/" .Site.Author.github }},
{{ printf "%s%s" "https://twitter.com/" .Site.Author.twitter }},
{{ printf "%s%s" "https://www.facebook.com/" .Site.Author.facebook }},
{{ printf "%s%s%s" "https://www.linkedin.com/in/" .Site.Author.linkedin "/" }},
{{ printf "%s%s" "https://" .Site.Author.mastodon }}
]
}
</script>