mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-09-13 05:45:31 -04:00
clean up shortcodes
This commit is contained in:
@@ -5,7 +5,7 @@ snapshot:
|
|||||||
- 1050
|
- 1050
|
||||||
enable-javascript: true
|
enable-javascript: true
|
||||||
percy-css: >
|
percy-css: >
|
||||||
div.embed,
|
.embed,
|
||||||
iframe,
|
iframe,
|
||||||
video,
|
video,
|
||||||
img[src$=".gif"],
|
img[src$=".gif"],
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
// External social embeds
|
// External social embeds
|
||||||
div.embed {
|
.embed {
|
||||||
&.codepen {
|
&.codepen {
|
||||||
iframe {
|
iframe {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -8,8 +8,10 @@ div.embed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.tweet {
|
&.tweet {
|
||||||
.twitter-tweet-rendered iframe {
|
margin: 0.5em 0;
|
||||||
margin: 0.5em 0;
|
|
||||||
|
> .twitter-tweet-rendered {
|
||||||
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,12 +42,25 @@ div.embed {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.vimeo {
|
||||||
|
padding: 75% 0 0 0;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
iframe {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.gh-buttons {
|
&.gh-buttons {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
// GitHub's script replaces <a> with <span>, so cover both
|
// GitHub's script replaces <a> with <span>, so cover both
|
||||||
> span,
|
> a,
|
||||||
> a {
|
> span {
|
||||||
margin: 0 0.5em;
|
margin: 0 0.5em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
<div class="embed {{ .Name }}">
|
<div class="embed {{ .Name }}">
|
||||||
<iframe src="{{ .Get "src" }}"{{ with .Get "title" }} title="{{ . }}"{{ end }}{{ with .Get "sandbox" }} sandbox="{{ . }}"{{ end }}></iframe>
|
<iframe
|
||||||
|
src="{{ .Get "src" }}"
|
||||||
|
{{ with .Get "title" }}
|
||||||
|
title="{{ . }}"
|
||||||
|
{{ end }}
|
||||||
|
{{ with .Get "sandbox" }}
|
||||||
|
sandbox="{{ . }}"
|
||||||
|
{{ end }}>
|
||||||
|
</iframe>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -6,9 +6,11 @@
|
|||||||
{{- with .Inner }}
|
{{- with .Inner }}
|
||||||
alt="{{ . | $.Page.RenderString | plainify | safeHTML }}"
|
alt="{{ . | $.Page.RenderString | plainify | safeHTML }}"
|
||||||
{{- else }}
|
{{- else }}
|
||||||
{{ with .Get "alt" }} alt="{{ . | safeHTML }}"{{ end }}
|
{{ with .Get "alt" }}
|
||||||
|
alt="{{ . | safeHTML }}"
|
||||||
|
{{ end }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
>
|
/>
|
||||||
{{ if .Get "link" }}</a>{{ end }}
|
{{ if .Get "link" }}</a>{{ end }}
|
||||||
|
|
||||||
{{ with .Inner -}}
|
{{ with .Inner -}}
|
||||||
|
@@ -1,10 +1,17 @@
|
|||||||
{{- $optimized := partial "functions/optimize-image" . -}}
|
{{- $optimized := partial "functions/optimize-image" . -}}
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
{{ with .Get "link" }}<a href="{{ . }}">{{ end }}
|
{{ with .Get "link" }}<a href="{{ . }}">{{ end }}
|
||||||
<img src="{{ print .Site.Params.baseUrl $optimized.Permalink }}" width="{{ $optimized.Width }}" height="{{ $optimized.Height }}"
|
<img src="{{ print .Site.Params.baseUrl $optimized.Permalink }}" width="{{ $optimized.Width }}" height="{{ $optimized.Height }}"
|
||||||
{{- with .Get "alt" }} alt="{{ . | safeHTML }}"{{ end }}
|
{{- with .Inner }}
|
||||||
{{- with .Inner }} alt="{{ . | $.Page.RenderString | plainify | safeHTML }}"{{ end }}>
|
alt="{{ . | $.Page.RenderString | plainify | safeHTML }}"
|
||||||
{{ if .Get "link" }}</a>{{ end }}
|
{{- else }}
|
||||||
{{ with .Inner }}<br>{{ . | $.Page.RenderString | safeHTML }}{{ end -}}
|
{{ with .Get "alt" }}
|
||||||
|
alt="{{ . | safeHTML }}"
|
||||||
|
{{ end }}
|
||||||
|
{{- end -}}
|
||||||
|
/>
|
||||||
|
{{ if .Get "link" }}</a>{{ end }}
|
||||||
|
|
||||||
|
{{ with .Inner }}<br>{{ . | $.Page.RenderString | safeHTML }}{{ end -}}
|
||||||
</p>
|
</p>
|
||||||
|
@@ -6,5 +6,5 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{- define "__shortcode_instagram_js" }}
|
{{- define "__shortcode_instagram_js" }}
|
||||||
<script async src="https://www.instagram.com/embed.js"></script>
|
<script async defer src="https://www.instagram.com/embed.js"></script>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{{- $url := printf "https://publish.twitter.com/oembed?lang=en&omit_script=true&dnt=true&align=center&url=%s" (index .Params 0 | safeURL) -}}
|
{{- $url := printf "https://publish.twitter.com/oembed?lang=en&omit_script=true&dnt=true&url=%s" (index .Params 0 | safeURL) -}}
|
||||||
{{- $json := getJSON $url -}}
|
{{- $json := getJSON $url -}}
|
||||||
|
|
||||||
<div class="embed {{ .Name }}">
|
<div class="embed {{ .Name }}">
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
{{- $url := printf "https://publish.twitter.com/oembed?lang=en&omit_script=true&dnt=true&align=center&url=%s" (index .Params 0 | safeURL) -}}
|
{{- $url := printf "https://publish.twitter.com/oembed?lang=en&omit_script=true&dnt=true&url=%s" (index .Params 0 | safeURL) -}}
|
||||||
{{- $json := getJSON $url -}}
|
{{- $json := getJSON $url -}}
|
||||||
|
|
||||||
{{ $json.html | safeHTML }}
|
{{ $json.html | safeHTML }}
|
||||||
|
@@ -1,7 +1,12 @@
|
|||||||
<div class="embed {{ .Name }}" style="padding:75% 0 0 0;position:relative;">
|
<div class="embed {{ .Name }}">
|
||||||
<iframe src="https://player.vimeo.com/video/{{ .Get "id" }}&dnt=1" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" allow="fullscreen" allowfullscreen></iframe>
|
<iframe
|
||||||
|
class="vimeo-player"
|
||||||
|
src="https://player.vimeo.com/video/{{ .Get "id" }}&dnt=1"
|
||||||
|
allow="fullscreen"
|
||||||
|
allowfullscreen>
|
||||||
|
</iframe>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{- define "__shortcode_vimeo_js" }}
|
{{- define "__shortcode_vimeo_js" }}
|
||||||
<script src="https://player.vimeo.com/api/player.js"></script>
|
<script async defer src="https://player.vimeo.com/api/player.js"></script>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
<iframe
|
<iframe
|
||||||
class="youtube-player"
|
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"
|
src="https://www.youtube-nocookie.com/embed/{{ index .Params 0 }}?autoplay=0&hl=en&fs=1&showinfo=1&rel=0&iv_load_policy=3"
|
||||||
|
allow="fullscreen"
|
||||||
allowfullscreen>
|
allowfullscreen>
|
||||||
</iframe>
|
</iframe>
|
||||||
</div>
|
</div>
|
||||||
|
1
resources/_gen/getjson/66253b5f9b7458cc40f01f1e4dec5b54
generated
Normal file
1
resources/_gen/getjson/66253b5f9b7458cc40f01f1e4dec5b54
generated
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"url":"https:\/\/twitter.com\/archiveis\/status\/1018691421182791680","author_name":"archive.today","author_url":"https:\/\/twitter.com\/archiveis","html":"\u003Cblockquote class=\"twitter-tweet\" data-lang=\"en\" data-dnt=\"true\"\u003E\u003Cp lang=\"en\" dir=\"ltr\"\u003E"Having to do" is not so direct here.\u003Cbr\u003EAbsence of EDNS and massive mismatch (not only on AS\/Country, but even on the continent level) of where DNS and related HTTP requests come from causes so many troubles so I consider EDNS-less requests from Cloudflare as invalid.\u003C\/p\u003E— archive.today (@archiveis) \u003Ca href=\"https:\/\/twitter.com\/archiveis\/status\/1018691421182791680?ref_src=twsrc%5Etfw\"\u003EJuly 16, 2018\u003C\/a\u003E\u003C\/blockquote\u003E\n","width":550,"height":null,"type":"rich","cache_age":"3153600000","provider_name":"Twitter","provider_url":"https:\/\/twitter.com","version":"1.0"}
|
1
resources/_gen/getjson/6a1f75720293575d6406621061cdf3a1
generated
Normal file
1
resources/_gen/getjson/6a1f75720293575d6406621061cdf3a1
generated
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"url":"https:\/\/twitter.com\/sandofsky\/status\/1138686582859239425","author_name":"Ben Sandofsky","author_url":"https:\/\/twitter.com\/sandofsky","html":"\u003Cblockquote class=\"twitter-tweet\" data-lang=\"en\" data-dnt=\"true\"\u003E\u003Cp lang=\"en\" dir=\"ltr\"\u003EDropbox now uses over half a gig of memory. Let’s peak into its frameworks folder. \u003Ca href=\"https:\/\/t.co\/altzzc2q8L\"\u003Epic.twitter.com\/altzzc2q8L\u003C\/a\u003E\u003C\/p\u003E— Ben Sandofsky (@sandofsky) \u003Ca href=\"https:\/\/twitter.com\/sandofsky\/status\/1138686582859239425?ref_src=twsrc%5Etfw\"\u003EJune 12, 2019\u003C\/a\u003E\u003C\/blockquote\u003E\n","width":550,"height":null,"type":"rich","cache_age":"3153600000","provider_name":"Twitter","provider_url":"https:\/\/twitter.com","version":"1.0"}
|
1
resources/_gen/getjson/954c649ddc7e7df8e60b773d80d62c8d
generated
Normal file
1
resources/_gen/getjson/954c649ddc7e7df8e60b773d80d62c8d
generated
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"url":"https:\/\/twitter.com\/natfriedman\/status\/1271253144442253312","author_name":"Nat Friedman","author_url":"https:\/\/twitter.com\/natfriedman","html":"\u003Cblockquote class=\"twitter-tweet\" data-lang=\"en\" data-dnt=\"true\"\u003E\u003Cp lang=\"en\" dir=\"ltr\"\u003EIt's a great idea and we are already working on this! cc \u003Ca href=\"https:\/\/twitter.com\/billygriffin22?ref_src=twsrc%5Etfw\"\u003E@billygriffin22\u003C\/a\u003E\u003C\/p\u003E— Nat Friedman (@natfriedman) \u003Ca href=\"https:\/\/twitter.com\/natfriedman\/status\/1271253144442253312?ref_src=twsrc%5Etfw\"\u003EJune 12, 2020\u003C\/a\u003E\u003C\/blockquote\u003E\n","width":550,"height":null,"type":"rich","cache_age":"3153600000","provider_name":"Twitter","provider_url":"https:\/\/twitter.com","version":"1.0"}
|
1
resources/_gen/getjson/f1d0987a50faef9d3f14ed3d2359d95e
generated
Normal file
1
resources/_gen/getjson/f1d0987a50faef9d3f14ed3d2359d95e
generated
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"url":"https:\/\/twitter.com\/w3Nicolas\/status\/1134529316904153089","author_name":"Nicolas Beauvais","author_url":"https:\/\/twitter.com\/w3Nicolas","html":"\u003Cblockquote class=\"twitter-tweet\" data-lang=\"en\" data-dnt=\"true\"\u003E\u003Cp lang=\"en\" dir=\"ltr\"\u003EHow \u003Ca href=\"https:\/\/twitter.com\/digitalocean?ref_src=twsrc%5Etfw\"\u003E@DigitalOcean\u003C\/a\u003E just killed our company \u003Ca href=\"https:\/\/twitter.com\/raisupcom?ref_src=twsrc%5Etfw\"\u003E@raisupcom\u003C\/a\u003E. A long thread for a very sad story. \u003Ca href=\"https:\/\/t.co\/uOFCDRoYJ6\"\u003Epic.twitter.com\/uOFCDRoYJ6\u003C\/a\u003E\u003C\/p\u003E— Nicolas Beauvais (@w3Nicolas) \u003Ca href=\"https:\/\/twitter.com\/w3Nicolas\/status\/1134529316904153089?ref_src=twsrc%5Etfw\"\u003EMay 31, 2019\u003C\/a\u003E\u003C\/blockquote\u003E\n","width":550,"height":null,"type":"rich","cache_age":"3153600000","provider_name":"Twitter","provider_url":"https:\/\/twitter.com","version":"1.0"}
|
@@ -8,10 +8,7 @@
|
|||||||
{ "source": "/favicon.ico", "destination": "/assets/images/favicon.ico" },
|
{ "source": "/favicon.ico", "destination": "/assets/images/favicon.ico" },
|
||||||
{ "source": "/favicon.png", "destination": "/assets/images/favicon-64.png" },
|
{ "source": "/favicon.png", "destination": "/assets/images/favicon-64.png" },
|
||||||
{ "source": "/apple-touch-icon.png", "destination": "/assets/images/apple-touch-icon.png" },
|
{ "source": "/apple-touch-icon.png", "destination": "/assets/images/apple-touch-icon.png" },
|
||||||
{
|
{ "source": "/apple-touch-icon-precomposed.png", "destination": "/assets/images/apple-touch-icon.png" }
|
||||||
"source": "/apple-touch-icon-precomposed.png",
|
|
||||||
"destination": "/assets/images/apple-touch-icon.png"
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
"redirects": [
|
"redirects": [
|
||||||
{ "source": "/notes/:slug/amp.html", "destination": "/notes/:slug/", "statusCode": 301 },
|
{ "source": "/notes/:slug/amp.html", "destination": "/notes/:slug/", "statusCode": 301 },
|
||||||
|
Reference in New Issue
Block a user