Move from static -> assets
This commit is contained in:
parent
0a7745a3fe
commit
b662b3ddc0
2365
assets/vendor/asciinema/asciinema-player.css
vendored
Normal file
2365
assets/vendor/asciinema/asciinema-player.css
vendored
Normal file
File diff suppressed because it is too large
Load Diff
1
assets/vendor/asciinema/asciinema-player.min.js
vendored
Normal file
1
assets/vendor/asciinema/asciinema-player.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -4,16 +4,27 @@
|
|||||||
<html lang="{{ .Site.LanguageCode }}">
|
<html lang="{{ .Site.LanguageCode }}">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline' data: ;{{ if .Params.asciinema }}script-src 'self' 'unsafe-inline' 'unsafe-eval';{{ end }}">
|
||||||
|
<link rel="alternate" type="application/rss+xml" href="/posts/index.xml">
|
||||||
|
<!-- Diable favicon requests: https://stackoverflow.com/a/13416784 -->
|
||||||
|
<link rel="icon" href="data:;base64,iVBORw0KGgo=">
|
||||||
|
{{ if .Params.asciinema }}
|
||||||
|
{{ with resources.Get "vendor/asciinema/asciinema-player.css" | resources.Minify | resources.Fingerprint }}
|
||||||
|
<link rel="stylesheet" type="text/css" href="{{ .RelPermalink }}" />
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
{{- if isset .Site.Params "onionlocation" }}
|
{{- if isset .Site.Params "onionlocation" }}
|
||||||
<meta http-equiv="onion-location" content="{{ urls.JoinPath .Site.Params.OnionLocation .RelPermalink }}">
|
<meta http-equiv="onion-location" content="{{ urls.JoinPath .Site.Params.OnionLocation .RelPermalink }}">
|
||||||
{{- end }}
|
{{- end }}
|
||||||
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
|
<title>{{ block "title" . }}{{ .Site.Title }}{{ end }}</title>
|
||||||
<link rel="stylesheet" href="{{ "css/styles.css" | relURL }}">
|
<link rel="stylesheet" href="{{ "css/styles.css" | relURL }}">
|
||||||
<link id="theme_css" rel="stylesheet" href="{{ "css/themes" | relURL }}/{{ .Site.Params.ThemeStyle | default $themeStyleDefault }}">
|
<link id="theme_css" rel="stylesheet" href="{{ "css/themes" | relURL }}/{{ .Site.Params.ThemeStyle | default $themeStyleDefault }}">
|
||||||
{{- if .Site.Params.ThemeStyleSwitcher }}
|
{{- if .Site.Params.ThemeStyleSwitcher }}
|
||||||
<script src="{{ "js/theme-switcher.js" | relURL }}"></script>
|
{{ with resources.Get "js/theme-switcher.js" | resources.Minify | resources.Fingerprint }}
|
||||||
{{- end }}
|
<script src="{{ .RelPermalink }}"></script>
|
||||||
|
{{ end }}
|
||||||
|
{{- end }}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<input class="show-hide-menu-input" style="display:none;" autocomplete="off" type="checkbox" id="toggle-1">
|
<input class="show-hide-menu-input" style="display:none;" autocomplete="off" type="checkbox" id="toggle-1">
|
||||||
|
22
layouts/_shortcodes/asciinema.html
Normal file
22
layouts/_shortcodes/asciinema.html
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<div id='{{ with .Get "key" }}{{ . }}{{ end }}'></div>
|
||||||
|
{{ with resources.Get "vendor/asciinema/asciinema-player.min.js" | resources.Fingerprint }}
|
||||||
|
<script src="{{ .RelPermalink }}"></script>
|
||||||
|
{{ end }}
|
||||||
|
<script>
|
||||||
|
AsciinemaPlayer.create('/casts/{{ with .Get "key" }}{{ . }}{{ end }}.cast', document.getElementById('{{ with .Get "key" }}{{ . }}{{ end }}'), {
|
||||||
|
{{ if .Get "cols" }}cols: "{{ .Get "cols" }}",{{ end }}
|
||||||
|
{{ if .Get "rows" }}rows: "{{ .Get "rows" }}",{{ end }}
|
||||||
|
{{ if .Get "autoPlay" }}autoPlay: "{{ .Get "autoPlay" }}",{{ end }}
|
||||||
|
{{ if .Get "preload" }}preload: "{{ .Get "preload" }}",{{ end }}
|
||||||
|
{{ if .Get "loop" }}loop: "{{ .Get "loop" }}",{{ end }}
|
||||||
|
{{ if .Get "startAt" }}startAt: "{{ .Get "startAt" }}",{{ end }}
|
||||||
|
{{ if .Get "speed" }}speed: "{{ .Get "speed" }}",{{ end }}
|
||||||
|
{{ if .Get "idleTimeLimit" }}idleTimeLimit: "{{ .Get "idleTimeLimit" }}",{{ end }}
|
||||||
|
{{ if .Get "theme" }}theme: "{{ .Get "theme" }}",{{ end }}
|
||||||
|
{{ if .Get "poster" }}poster: "{{ .Get "poster" }}",{{ end }}
|
||||||
|
{{ if .Get "fit" }}fit: "{{ .Get "fit" }}",{{ end }}
|
||||||
|
{{ if .Get "terminalFontSize" }}terminalFontSize: "{{ .Get "terminalFontSize" }}",{{ end }}
|
||||||
|
{{ if .Get "terminalFontFamily" }}terminalFontFamily: "{{ .Get "terminalFontFamily" }}",{{ end }}
|
||||||
|
{{ if .Get "terminalLineHeight" }}terminalLineHeight: "{{ .Get "terminalLineHeight" }}",{{ end }}
|
||||||
|
});
|
||||||
|
</script>
|
9
layouts/_shortcodes/details.html
Normal file
9
layouts/_shortcodes/details.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{{- /*
|
||||||
|
Template comment syntax: https://hugo.d.balki.me/templates/introduction/#comments
|
||||||
|
collapsable section ref: https://stackoverflow.com/a/78475534
|
||||||
|
*/ -}}
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>{{ .Get "title" | default "Click to expand" | markdownify }}</summary>
|
||||||
|
<div>{{ .Inner | markdownify }}</div>
|
||||||
|
</details>
|
Loading…
x
Reference in New Issue
Block a user