mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-07 00:58:13 +00:00
Switch themes to minimo
This commit is contained in:
3
themes/minimo/layouts/shortcodes/center.html
Normal file
3
themes/minimo/layouts/shortcodes/center.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class='align-center'>
|
||||
{{ .Inner | markdownify }}
|
||||
</div>
|
26
themes/minimo/layouts/shortcodes/convo.html
Normal file
26
themes/minimo/layouts/shortcodes/convo.html
Normal file
@@ -0,0 +1,26 @@
|
||||
<div class='convo'>
|
||||
<ol>
|
||||
{{ range ( split .Inner "\n" ) }}
|
||||
{{ with . }}
|
||||
<li>
|
||||
{{ range $i, $chunk := ( split . "::" ) }}
|
||||
{{ if or $chunk "s" }}
|
||||
{{ if eq $i 0 }}
|
||||
<div class='person'>
|
||||
{{- $chunk | markdownify -}}
|
||||
</div>
|
||||
{{ else }}
|
||||
<div class='sep'>
|
||||
{{- print " " ( $.Get "sep" | default ":" ) " " -}}
|
||||
</div>
|
||||
<div class='text'>
|
||||
{{- $chunk | markdownify -}}
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ol>
|
||||
</div>
|
13
themes/minimo/layouts/shortcodes/file.html
Normal file
13
themes/minimo/layouts/shortcodes/file.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{{- if gt ( len .Params ) 1 -}}
|
||||
{{- $.Scratch.Set "format" ( .Get 1 ) -}}
|
||||
{{- else -}}
|
||||
{{- $splits := ( split ( .Get 0 ) "." ) -}}
|
||||
{{- $splitsLength := ( len $splits ) -}}
|
||||
{{- $format := ( index $splits ( sub $splitsLength 1 ) ) -}}
|
||||
{{- $.Scratch.Set "format" $format -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $file := ( .Get 0 ) -}}
|
||||
{{- $format := ( $.Scratch.Get "format" ) -}}
|
||||
|
||||
{{- ( print "```" $format "\n" ( readFile $file ) "\n" "```" ) | markdownify -}}
|
5
themes/minimo/layouts/shortcodes/katex.html
Normal file
5
themes/minimo/layouts/shortcodes/katex.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{- $displayMode := ( not ( eq ( .Get 0 ) "inline" ) ) -}}
|
||||
|
||||
{{- print ( cond $displayMode "\\[" "\\(" ) }}
|
||||
{{ .Inner }}
|
||||
{{- print ( cond $displayMode "\\]" "\\)" ) -}}
|
7
themes/minimo/layouts/shortcodes/mermaid.html
Normal file
7
themes/minimo/layouts/shortcodes/mermaid.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{{- if eq .Page.Params.mermaid true -}}
|
||||
|
||||
<div class="mermaid">
|
||||
{{ safeHTML .Inner }}
|
||||
</div>
|
||||
|
||||
{{- end -}}
|
7
themes/minimo/layouts/shortcodes/slideshare.html
Normal file
7
themes/minimo/layouts/shortcodes/slideshare.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<iframe
|
||||
style='width: 100%; height: 500px;'
|
||||
frameborder='0' marginwidth='0' marginheight='0' scrolling='no'
|
||||
src='https://www.slideshare.net/slideshow/embed_code/{{.Get "id"}}?rel=0'
|
||||
allowfullscreen webkitallowfullscreen mozallowfullscreen>
|
||||
</iframe>
|
||||
<br/>
|
5
themes/minimo/layouts/shortcodes/svg.html
Normal file
5
themes/minimo/layouts/shortcodes/svg.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{ $svg := .Get 0 }}
|
||||
<svg class='icon' viewbox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' aria-hidden='true'>
|
||||
{{ $icon := print "svg/" $svg ".svg" | resources.Get }}
|
||||
{{ $icon.Content | replaceRE `(?s)^.*<svg.*?>(.*)<\/svg>.*$` "$1" | safeHTML }}
|
||||
</svg>
|
17
themes/minimo/layouts/shortcodes/text.html
Normal file
17
themes/minimo/layouts/shortcodes/text.html
Normal file
@@ -0,0 +1,17 @@
|
||||
<div class='text-shortcode' style='
|
||||
{{- if .IsNamedParams -}}
|
||||
{{- with or ( .Get "s" ) ( .Get "size" ) -}}
|
||||
font-size: {{- . -}}em;
|
||||
{{- end -}}
|
||||
{{- with or ( .Get "c" ) ( .Get "color" ) -}}
|
||||
color: {{- . -}};
|
||||
{{- end -}}
|
||||
{{- else -}}
|
||||
{{- with .Get 0 -}} font-size: {{- . -}}em; {{- end -}}
|
||||
{{- if gt ( len .Params ) 1 -}}
|
||||
{{- with .Get 1 -}} color: {{- . -}}; {{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
'>
|
||||
{{- .Inner | markdownify -}}
|
||||
</div>
|
Reference in New Issue
Block a user