mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 03:58:28 -04:00
re-organize a bunch of partials
This commit is contained in:
parent
53099d3a77
commit
6c44b7d44d
@ -81,21 +81,33 @@ main#single {
|
||||
}
|
||||
}
|
||||
|
||||
div.embed.video-player {
|
||||
position: relative;
|
||||
padding-bottom: 56.25%;
|
||||
margin: 1em auto;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
div.embed {
|
||||
p {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
iframe.youtube-player {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0;
|
||||
display: inline-block;
|
||||
&.youtube {
|
||||
position: relative;
|
||||
padding-bottom: 56.25%;
|
||||
margin: 1em auto;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
|
||||
iframe.youtube-player {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 0;
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
&.codepen {
|
||||
iframe {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ If you examine [my homepage](/) long enough, you might notice the 👋 hand emoj
|
||||
Below are the code snippets you can grab and customize to make your own
|
||||
["waving hand" 👋](https://emojipedia.org/waving-hand-sign/) emojis ***actually wave***, and a [CodePen playground](https://codepen.io/jakejarvis/pen/pBZWZw) for live testing.
|
||||
|
||||
{{< codepen username="jakejarvis" id="pBZWZw" left-tab="css" right-tab="result" height="400" >}}
|
||||
{{< codepen username="jakejarvis" id="pBZWZw" left-tab="css" right-tab="result" >}}
|
||||
|
||||
### CSS:
|
||||
|
||||
|
@ -2,15 +2,15 @@
|
||||
{{ printf "<!--\n ,,, ,,,\n ;\" ^; ;\" \",\n ; s$$$$$s ;\n , ss$$$$$$$ss ,\"\n ;$$$$$$$$$$$$$$$$\n $$$$$$$$$$$$$$$$$$ Hello, human. :)\n $$$$$\"\"\"$$$\"\"\"$$$$$$\n $$$$$ p\"$$$\"q $$$$$ %s\n $$$$ .$$$$$. $$$$\n $$$$$$$$$$$$$$$$$\n \"$$$$\"*\"$$$$\"\n \"$$.$$\"\n-->" ("humans.txt" | absURL) | safeHTML }}
|
||||
<html lang="{{ with .Site.LanguageCode }}{{ . }}{{ else }}en{{ end }}">
|
||||
<head>
|
||||
{{ partial "head" . }}
|
||||
{{ partial "head/head" . }}
|
||||
</head>
|
||||
<body>
|
||||
{{ partialCached "header" . }}
|
||||
{{ partialCached "page/header" . }}
|
||||
<div id="wrap">
|
||||
{{ block "main" . }}{{ end }}
|
||||
</div>
|
||||
{{ partialCached "footer" . }}
|
||||
{{ partial "scripts" . }}
|
||||
{{ partialCached "page/footer" . }}
|
||||
{{ partial "scripts/shortcodes" . }}
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
|
||||
<meta name="description" content="{{ with .Description }}{{ . }}{{ else }}{{ .Site.Params.description }}{{ end }}">
|
||||
<meta name="author" content="{{ .Site.Author.name }}">
|
||||
{{ partial "seo/open-graph" . }}
|
||||
{{ partial "head/open-graph" . }}
|
||||
|
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:400,500,700" rel="stylesheet">
|
||||
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
|
||||
@ -170,14 +170,14 @@
|
||||
<link rel="shortcut icon" href="{{ "favicon.ico" | absURL }}">
|
||||
<link rel="alternate" type="application/rss+xml" href="{{ "feed.xml" | absURL }}" title="{{ .Site.Title }} (RSS)">
|
||||
|
||||
{{ partial "seo/schema-person" . }}
|
||||
{{ partial "seo/schema-article" . }}
|
||||
{{ partial "head/schema-person" . }}
|
||||
{{ partial "head/schema-article" . }}
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<nav>
|
||||
<a id="logo" href="{{ .Site.BaseURL }}" title="{{ .Site.Title }}">
|
||||
{{ partialCached "logo" . }}
|
||||
{{ partialCached "page/logo" . }}
|
||||
<span id="name">{{ .Site.Title }}</span>
|
||||
</a>
|
||||
|
||||
|
@ -1,35 +0,0 @@
|
||||
<meta charset="utf-8">
|
||||
{{ hugo.Generator }}
|
||||
<title>{{ .Title }}{{ if not .IsHome }} – {{ .Site.Title }}{{ else }} 👨‍💻{{ 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 }}
|
8
layouts/partials/head/favicons.html
Normal file
8
layouts/partials/head/favicons.html
Normal 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 }}">
|
22
layouts/partials/head/head.html
Normal file
22
layouts/partials/head/head.html
Normal 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 }}
|
6
layouts/partials/head/meta.html
Normal file
6
layouts/partials/head/meta.html
Normal file
@ -0,0 +1,6 @@
|
||||
<meta charset="utf-8">
|
||||
{{ hugo.Generator }}
|
||||
<title>{{ .Title }}{{ if not .IsHome }} – {{ .Site.Title }}{{ else }} 👨‍💻{{ 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">
|
3
layouts/partials/head/preload.html
Normal file
3
layouts/partials/head/preload.html
Normal 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>
|
@ -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>
|
Before Width: | Height: | Size: 915 B After Width: | Height: | Size: 915 B |
@ -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" . }}
|
22
layouts/partials/scripts/disqus.html
Normal file
22
layouts/partials/scripts/disqus.html
Normal 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 }}
|
8
layouts/partials/scripts/google_analytics.html
Normal file
8
layouts/partials/scripts/google_analytics.html
Normal 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 }}
|
19
layouts/partials/scripts/piwik.html
Normal file
19
layouts/partials/scripts/piwik.html
Normal 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 }}&rec={{ .Site.Params.PiwikSiteId }}" style="border:0;" alt="" /></p></noscript>
|
||||
{{ end }}
|
11
layouts/partials/scripts/shortcodes.html
Normal file
11
layouts/partials/scripts/shortcodes.html
Normal 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 -}}
|
2
layouts/partials/scripts/shortcodes/facebook.html
Normal file
2
layouts/partials/scripts/shortcodes/facebook.html
Normal 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>
|
1
layouts/partials/scripts/shortcodes/gh-buttons.html
Normal file
1
layouts/partials/scripts/shortcodes/gh-buttons.html
Normal file
@ -0,0 +1 @@
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
1
layouts/partials/scripts/shortcodes/tweet.html
Normal file
1
layouts/partials/scripts/shortcodes/tweet.html
Normal file
@ -0,0 +1 @@
|
||||
<script async defer src="https://platform.twitter.com/widgets.js"></script>
|
@ -3,5 +3,5 @@
|
||||
width="1200"
|
||||
height="{{ with .Get "height" }}{{ . }}{{ else }}500{{ end }}"
|
||||
scrolling="no"
|
||||
src="https://codepen.io/{{ .Get "username" }}/embed/{{ .Get "id" }}/?height={{ with .Get "height" }}{{ . }}{{ else }}500{{ end }}&theme-id=light&default-tab={{ .Get "left-tab" }}{{ with .Get "right-tab" }},{{ . }}{{ end }}">
|
||||
src="https://codepen.io/{{ .Get "username" }}/embed/{{ .Get "id" }}/?theme-id=light&default-tab={{ .Get "left-tab" }}{{ with .Get "right-tab" }},{{ . }}{{ end }}">
|
||||
</amp-iframe>
|
||||
|
@ -1,6 +1,7 @@
|
||||
<iframe
|
||||
height="{{ with .Get "height" }}{{ . }}{{ else }}500{{ end }}"
|
||||
style="width: 100%;"
|
||||
scrolling="no"
|
||||
src="https://codepen.io/{{ .Get "username" }}/embed/{{ .Get "id" }}/?height={{ with .Get "height" }}{{ . }}{{ else }}500{{ end }}&theme-id=light&default-tab={{ .Get "left-tab" }}{{ with .Get "right-tab" }},{{ . }}{{ end }}">
|
||||
</iframe>
|
||||
<div class="embed codepen">
|
||||
<iframe
|
||||
height="{{ with .Get "height" }}{{ . }}{{ else }}500{{ end }}"
|
||||
src="https://codepen.io/{{ .Get "username" }}/embed/{{ .Get "id" }}/?theme-id=light&default-tab={{ .Get "left-tab" }}{{ with .Get "right-tab" }},{{ . }}{{ end }}"
|
||||
scrolling="no">
|
||||
</iframe>
|
||||
</div>
|
||||
|
@ -1,3 +1,6 @@
|
||||
{{- $url := printf "https://www.facebook.com/plugins/post/oembed.json/?omitscript=1&url=%s" (.Get "url" | urlize) -}}
|
||||
{{- $json := getJSON $url -}}
|
||||
{{- $json.html | safeHTML -}}
|
||||
|
||||
<div class="embed facebook">
|
||||
{{ $json.html | safeHTML }}
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<p style="text-align: center;">
|
||||
<div class="embed gh-buttons"><p>
|
||||
<a class="github-button" href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star {{ .Get "username" }}/{{ .Get "repo" }} on GitHub">Star</a>
|
||||
<a class="github-button" href="https://github.com/{{ .Get "username" }}/{{ .Get "repo" }}/issues" data-icon="octicon-issue-opened" data-size="large" data-show-count="true" aria-label="Issues for {{ .Get "username" }}/{{ .Get "repo" }} on GitHub">Issue</a>
|
||||
</p>
|
||||
</p></div>
|
||||
|
@ -1,5 +1,6 @@
|
||||
{{- /* Modified from tpl/tplimpl/embedded/templates/shortcodes/twitter.html, minus script */ -}}
|
||||
|
||||
{{- $url := printf "https://api.twitter.com/1/statuses/oembed.json?id=%v&dnt=1&omit_script=1" (index .Params 0) -}}
|
||||
{{- $json := getJSON $url -}}
|
||||
{{- $json.html | safeHTML -}}
|
||||
|
||||
<div class="embed tweet">
|
||||
{{ $json.html | safeHTML }}
|
||||
</div>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="embed video-player">
|
||||
<div class="embed youtube">
|
||||
<iframe
|
||||
class="youtube-player"
|
||||
src="https://www.youtube-nocookie.com/embed/{{ index .Params 0 }}?autoplay=0&hl=en&fs=1&showinfo=1&rel=0&iv_load_policy=3"
|
||||
|
@ -28,7 +28,8 @@
|
||||
"lint:sass": "stylelint assets/sass/**/* --syntax scss",
|
||||
"lint:links": "linkinator http://localhost:1313/ --recurse --silent --skip https://www.shodan.io/ --skip https://images.shodan.io/ --skip https://archive.today/ --skip https://archive.is/ --skip https://www.linkedin.com/ --skip http://localhost:1313/y2k/ --skip 'asdfasdf404/?$'",
|
||||
"debug:hugo": "hugo version; hugo env",
|
||||
"debug:size": "get-folder-size --folder=public"
|
||||
"debug:size": "get-folder-size --folder=public",
|
||||
"debug:netlify": "netlify status"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user