Initial checkin
This commit is contained in:
12
layouts/shortcodes/alert.html
Normal file
12
layouts/shortcodes/alert.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<div class="alert alert-{{ with .Get "context" }}{{.}}{{ else }}doks{{ end }} d-flex" role="alert">
|
||||
<div class="flex-shrink-1 alert-icon">{{ with .Get "icon" }}{{.}} {{ end }}</div>
|
||||
{{ with .Get "text"}}
|
||||
<div class="w-100">{{ . | safeHTML }} </div>
|
||||
{{ else }}
|
||||
{{ with .Inner}}
|
||||
<div class="w-100"> {{ . | markdownify}}</div>
|
||||
{{ else }}
|
||||
{{ errorf "No valid text variable or Inner content given"}}
|
||||
{{ end }}
|
||||
{{ end}}
|
||||
</div>
|
4
layouts/shortcodes/details.html
Normal file
4
layouts/shortcodes/details.html
Normal file
@@ -0,0 +1,4 @@
|
||||
<details{{ with .Get 1 }} {{ . | safeHTML }}{{ end -}}>
|
||||
<summary>{{ with .Get 0 -}}{{ . | safeHTML }}{{ else -}}{{ errorf "No summary provided"}}{{ end -}}</summary>
|
||||
{{ with .Inner -}}{{ . | markdownify}}{{ else -}}{{ errorf "No details provided"}}{{ end -}}
|
||||
</details>
|
1
layouts/shortcodes/email.html
Normal file
1
layouts/shortcodes/email.html
Normal file
@@ -0,0 +1 @@
|
||||
<script type="text/javascript" nonce="dXNlcj0iaGVsbG8iLGRvbWFpbj0iaGVua3ZlcmxpbmRlLmNvbSIsZG9jdW1lbnQud3JpdGUodXNlcisiQCIrZG9tYWluKTs=">user="{{ with .Get "user" }}{{.}}{{ end }}",domain="{{ with .Get "domain" }}{{.}}{{ end }}",document.write(user+"@"+domain);</script><noscript>{{ with .Get "user" }}{{.}}{{ end }} at {{ with .Get "domain" }}{{.}}{{ end }}</noscript>
|
8
layouts/shortcodes/mermaid.html
Normal file
8
layouts/shortcodes/mermaid.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{{ if .Page.Params.mermaid -}}
|
||||
<div class="mermaid{{ with .Get "class" }} {{ . }}{{ end }}">
|
||||
{{ $data := replaceRE "(^\\s+```)" "" .Inner -}}
|
||||
{{ replaceRE "(```\\s+$)" "" $data -}}
|
||||
</div>
|
||||
{{ else -}}
|
||||
{{ errorf "Failed to process mermaid shortcode: %s. Set mermaid to true in page front matter." .Position }}
|
||||
{{ end -}}
|
11
layouts/shortcodes/video.html
Normal file
11
layouts/shortcodes/video.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<div class="ratio ratio-{{ with .Get "ratio" }}{{.}}{{ end }}">
|
||||
<video{{ with .Get "attributes" }} {{ . | safeHTMLAttr }}{{ end }}>
|
||||
{{ with .Get "webm-src" -}}
|
||||
<source src="{{ . | relURL }}" type="video/webm">
|
||||
{{ end -}}
|
||||
{{ with .Get "mp4-src" -}}
|
||||
<source src="{{ . | relURL }}" type="video/mp4">
|
||||
{{ end -}}
|
||||
Sorry, your browser doesn't support embedded videos.
|
||||
</video>
|
||||
</div>
|
Reference in New Issue
Block a user