mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-10-13 09:25:44 -04:00
global header/navbar on all pages like a grown-up website (#17)
This commit is contained in:
30 files changed
+616
-640
No files matched your search
@@ -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" . }}
|
||||
@@ -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
@@ -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
@@ -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
@@ -1,10 +1,5 @@
|
||||
{{ partial "header.html" . }}
|
||||
<main>
|
||||
{{ .Content }}
|
||||
<footer>
|
||||
<div id="blog"><a href="{{ "notes/" | absURL }}" title="{{ .Site.Author.name }}'s Blog" rel="me"><span>📝</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>🐼</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">© {{ .Site.Params.copyrightFirstYear }} –</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" . }}
|
||||
@@ -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
|
||||
@@ -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 }} –</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>🐼</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>
|
||||
@@ -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">🏠</a></li>
|
||||
<li><a class="no-underline" href="{{ "notes/" | absURL }}" title="Notes">📝</a></li>
|
||||
<li><a class="no-underline" href="https://github.com/{{ .Site.Author.github }}" title="GitHub" target="_blank" rel="me noopener noreferrer">👨‍💻</a></li>
|
||||
<li><a class="no-underline" href="mailto:jake@jarv.is" title="Email Me">💌</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
@@ -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 }} –</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>🐼</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>
|
||||
|
||||
|
||||
@@ -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">🏠</a></li>
|
||||
<li><a class="no-underline" href="{{ "notes/" | absURL }}" title="Notes">📝</a></li>
|
||||
<li><a class="no-underline" href="https://github.com/{{ .Site.Author.github }}" title="GitHub" target="_blank" rel="me noopener noreferrer">👨‍💻</a></li>
|
||||
<li><a class="no-underline" href="mailto:jake@jarv.is" title="Email Me">💌</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
@@ -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",
|
||||
|
||||
@@ -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>
|
||||
Reference in new issue
Block a user