1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-19 15:45:33 -04:00

re-organize a bunch of partials

This commit is contained in:
2020-01-14 18:08:42 -05:00
parent 53099d3a77
commit 6c44b7d44d
34 changed files with 160 additions and 88 deletions

View File

@@ -1,35 +0,0 @@
<meta charset="utf-8">
{{ hugo.Generator }}
<title>{{ .Title }}{{ if not .IsHome }}  {{ .Site.Title }}{{ else }} &#x1F468;&#x200D;&#x1F4BB;{{ end }}</title>
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
{{ with .Site.Author.name }}<meta name="author" content="{{ . }}">{{ end }}
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ partial "seo/social-images" . }}
{{ partial "seo/open-graph" . }}
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="{{ .Site.Title }}">
<meta name="theme-color" content="#0e6dc2">
<link rel="preload" href="{{ "fonts/roboto-latin-regular.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ "fonts/roboto-latin-medium.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ "fonts/roboto-latin-bold.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
{{ partial "styles" . }}
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
<link rel="mask-icon" href="{{ "safari-pinned-tab.svg" | absURL }}" color="#009cdf">
<link rel="icon" href="{{ "favicon-192.png" | absURL }}" sizes="192x192">
<link rel="icon" href="{{ "favicon-48.png" | absURL }}" sizes="48x48">
<link rel="icon" href="{{ "favicon-32.png" | absURL }}" sizes="32x32">
<link rel="icon" href="{{ "favicon-16.png" | absURL }}" sizes="16x16">
<link rel="shortcut icon" href="{{ "favicon.ico" | absURL }}" sizes="16x16 32x32 48x48">
<link rel="canonical" href="{{ .Permalink }}">
<link rel="alternate" type="application/rss+xml" href="{{ "feed.xml" | absURL }}" title="{{ .Site.Title }} (RSS)">
<link rel="author" href="{{ "humans.txt" | absURL }}">
{{ if and .IsPage (eq .Type "notes") }}
{{ with .OutputFormats.Get "amp" }}
<link rel="amphtml" href="{{ .Permalink }}">
{{ end }}
{{ partial "seo/schema-person" . }}
{{ partial "seo/schema-article" . }}
{{ else }}
{{ partial "seo/schema-person" . }}
{{ end }}

View File

@@ -0,0 +1,8 @@
<link rel="apple-touch-icon" href="{{ "apple-touch-icon.png" | absURL }}">
<link rel="mask-icon" href="{{ "safari-pinned-tab.svg" | absURL }}" color="#009cdf">
{{ range (split .png_sizes " ") -}}
<link rel="icon" href="{{ (printf "favicon-%v.png" .) | absURL }}" sizes="{{ . }}x{{ . }}">
{{ end -}}
<link rel="shortcut icon" href="{{ "favicon.ico" | absURL }}" sizes="{{ .ico_sizes }}">

View File

@@ -0,0 +1,22 @@
{{ partial "head/meta" . }}
{{ partial "head/social-images" . }}
{{ partial "head/open-graph" . }}
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta name="apple-mobile-web-app-title" content="{{ .Site.Title }}">
<meta name="theme-color" content="#0e6dc2">
{{ partialCached "head/preload" . }}
{{ partialCached "head/styles" . }}
{{ partialCached "head/favicons" (dict "png_sizes" "192 48 32 16" "ico_sizes" "16x16 32x32 48x48") }}
<link rel="canonical" href="{{ .Permalink }}">
<link rel="alternate" type="application/rss+xml" href="{{ "feed.xml" | absURL }}" title="{{ .Site.Title }} (RSS)">
<link rel="author" href="{{ "humans.txt" | absURL }}">
{{ if and .IsPage (eq .Type "notes") }}
{{ with .OutputFormats.Get "amp" }}
<link rel="amphtml" href="{{ .Permalink }}">
{{ end }}
{{ partial "head/schema-person" . }}
{{ partial "head/schema-article" . }}
{{ else }}
{{ partial "head/schema-person" . }}
{{ end }}

View File

@@ -0,0 +1,6 @@
<meta charset="utf-8">
{{ hugo.Generator }}
<title>{{ .Title }}{{ if not .IsHome }}  {{ .Site.Title }}{{ else }} &#x1F468;&#x200D;&#x1F4BB;{{ end }}</title>
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
{{ with .Site.Author.name }}<meta name="author" content="{{ . }}">{{ end }}
<meta name="viewport" content="width=device-width, initial-scale=1">

View File

@@ -0,0 +1,3 @@
<link rel="preload" href="{{ "fonts/roboto-latin-regular.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ "fonts/roboto-latin-medium.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>
<link rel="preload" href="{{ "fonts/roboto-latin-bold.woff2" | absURL }}" as="font" type="font/woff2" crossorigin>

View File

@@ -1,7 +1,7 @@
<header>
<nav>
<a class="no-underline" href="{{ .Site.BaseURL }}" id="logo" rel="me author" title="{{ .Site.Title }}" aria-label="{{ .Site.Title }}">
{{ partialCached "logo" . }}
{{ partialCached "page/logo" . }}
<h1 id="name">{{ .Site.Title }}</h1>
</a>
<ul>

View File

Before

Width:  |  Height:  |  Size: 915 B

After

Width:  |  Height:  |  Size: 915 B

View File

@@ -1,14 +0,0 @@
{{- if .HasShortcode "gh-buttons"}}
<script async defer src="https://buttons.github.io/buttons.js"></script>
{{ end -}}
{{- if .HasShortcode "tweet"}}
<script async defer src="https://platform.twitter.com/widgets.js"></script>
{{ end -}}
{{- if .HasShortcode "facebook"}}
<div id="fb-root"></div>
<script async defer src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v5.0"></script>
{{ end -}}
{{- template "_internal/google_analytics_async.html" . }}

View File

@@ -0,0 +1,22 @@
{{ if .Site.DisqusShortname }}
{{ if ne .Params.comments false }}
<div id="disqus_thread"></div>
<script type="application/javascript">
var disqus_config = function () {
this.page.title = '{{ $.Title }}';
this.page.url = '{{ $.Permalink }}';
this.page.identifier = '{{ $.Permalink }}';
};
(function() {
// Don't clutter Disqus account with localhost URLs.
if (["localhost", "127.0.0.1"].indexOf(window.location.hostname) != -1) return;
var d = document, s = d.createElement('script'); s.async = true;
s.src = 'https://' + {{ $.Site.DisqusShortname }} + '.disqus.com/embed.js';
s.setAttribute('data-timestamp', +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript" rel="nofollow">comments powered by Disqus.</a></noscript>
{{ end }}
{{ end }}

View File

@@ -0,0 +1,8 @@
{{ with .Site.GoogleAnalytics }}
<script>
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', '{{ . }}', 'auto');
ga('send', 'pageview');
</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
{{ end }}

View File

@@ -0,0 +1,19 @@
{{ if .Site.Params.PiwikServer }}
<script type="text/javascript">
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['setRequestMethod', 'POST']);
_paq.push(['setSecureCookie', true]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
_paq.push(['enableHeartBeatTimer']);
(function() {
var u="{{ .Site.Params.PiwikServer }}";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '{{ .Site.Params.PiwikSiteId }}']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src="{{ .Site.Params.PiwikServer }}/send?idsite={{ .Site.Params.PiwikSiteId }}&amp;rec={{ .Site.Params.PiwikSiteId }}" style="border:0;" alt="" /></p></noscript>
{{ end }}

View File

@@ -0,0 +1,11 @@
{{ if .HasShortcode "gh-buttons" -}}
{{ partial "scripts/shortcodes/gh-buttons" . }}
{{ end -}}
{{ if .HasShortcode "tweet" -}}
{{ partial "scripts/shortcodes/tweet" . }}
{{ end -}}
{{ if .HasShortcode "facebook" -}}
{{ partial "scripts/shortcodes/facebook" . }}
{{ end -}}

View File

@@ -0,0 +1,2 @@
<div id="fb-root"></div>
<script async defer src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v5.0"></script>

View File

@@ -0,0 +1 @@
<script async defer src="https://buttons.github.io/buttons.js"></script>

View File

@@ -0,0 +1 @@
<script async defer src="https://platform.twitter.com/widgets.js"></script>