From fecc9b268410c8fefcd1ca32bc4228bba9002178 Mon Sep 17 00:00:00 2001 From: GNUxeava Date: Fri, 11 Mar 2022 10:32:10 +0530 Subject: use theme --- layouts/shortcodes/admonition.html | 37 +++++++++++++++++++++++ layouts/shortcodes/bilibili.html | 23 ++++++++++++++ layouts/shortcodes/center.html | 3 ++ layouts/shortcodes/icons.html | 6 ++++ layouts/shortcodes/left.html | 3 ++ layouts/shortcodes/music.html | 62 ++++++++++++++++++++++++++++++++++++++ layouts/shortcodes/right.html | 3 ++ 7 files changed, 137 insertions(+) create mode 100644 layouts/shortcodes/admonition.html create mode 100644 layouts/shortcodes/bilibili.html create mode 100644 layouts/shortcodes/center.html create mode 100644 layouts/shortcodes/icons.html create mode 100644 layouts/shortcodes/left.html create mode 100644 layouts/shortcodes/music.html create mode 100644 layouts/shortcodes/right.html (limited to 'layouts/shortcodes') diff --git a/layouts/shortcodes/admonition.html b/layouts/shortcodes/admonition.html new file mode 100644 index 0000000..fa5aacb --- /dev/null +++ b/layouts/shortcodes/admonition.html @@ -0,0 +1,37 @@ +{{ if .IsNamedParams -}} + + {{ if eq (.Get "details") "true" -}} + +
+ {{- with .Get "title" }}{{ . }}{{ end }} + {{ .Inner }} +
+ + {{- else -}} + +
+ {{- with .Get "title" }}

{{ . }}

{{ end }} + {{ .Inner }} +
+ + {{- end }} + +{{- else -}} + + {{ if eq (.Get 2) "true" -}} + +
+ {{- with .Get 1 }}{{ . }}{{ end }} + {{ .Inner }} +
+ + {{- else -}} + +
+ {{- with .Get 1 }}

{{ . }}

{{ end }} + {{ .Inner }} +
+ + {{- end }} + +{{- end }} \ No newline at end of file diff --git a/layouts/shortcodes/bilibili.html b/layouts/shortcodes/bilibili.html new file mode 100644 index 0000000..005eccb --- /dev/null +++ b/layouts/shortcodes/bilibili.html @@ -0,0 +1,23 @@ + +{{ $videoID := index .Params 0 }} +{{ $pageNum := index .Params 1 | default 1 }} + +{{ if (findRE "^[bB][vV][0-9a-zA-Z]+$" $videoID) }} +
+{{ else }} +
+{{ end }} + + diff --git a/layouts/shortcodes/center.html b/layouts/shortcodes/center.html new file mode 100644 index 0000000..e9022d0 --- /dev/null +++ b/layouts/shortcodes/center.html @@ -0,0 +1,3 @@ +
+ {{ .Inner }} +
\ No newline at end of file diff --git a/layouts/shortcodes/icons.html b/layouts/shortcodes/icons.html new file mode 100644 index 0000000..2279580 --- /dev/null +++ b/layouts/shortcodes/icons.html @@ -0,0 +1,6 @@ + + {{- $fname:=print "icons/" ( .Get 0 ) ".svg" -}} + {{- $path:=" \ No newline at end of file diff --git a/layouts/shortcodes/left.html b/layouts/shortcodes/left.html new file mode 100644 index 0000000..c2c5102 --- /dev/null +++ b/layouts/shortcodes/left.html @@ -0,0 +1,3 @@ +
+ {{ .Inner }} +
\ No newline at end of file diff --git a/layouts/shortcodes/music.html b/layouts/shortcodes/music.html new file mode 100644 index 0000000..22b2268 --- /dev/null +++ b/layouts/shortcodes/music.html @@ -0,0 +1,62 @@ + {{/* + ## Music 163 + + ### Params: + + - `id` + + required param + you can extract from music url + url format "http://music.163.com/#/song?id=3950552" + + - Fiddle `auto` + + optional param + default value 0 + you can overwrite it with 1 + + ### Examples: + + - Simple + + {{% music "3950552" %}} + {{% music "3950552" "1" %}} + + - Named Params + + {{% music id="3950552" %}} + {{% music id="3950552" auto="1" %}} + + */}} + + {{- /* DEFAULTS */ -}} + {{ $auto := "0" }} + + {{- if .IsNamedParams -}} + + + + {{- else -}} + + + + {{- end -}} + \ No newline at end of file diff --git a/layouts/shortcodes/right.html b/layouts/shortcodes/right.html new file mode 100644 index 0000000..37a9a33 --- /dev/null +++ b/layouts/shortcodes/right.html @@ -0,0 +1,3 @@ +
+ {{ .Inner }} +
\ No newline at end of file -- cgit v1.2.3