aboutsummaryrefslogtreecommitdiff
path: root/themes/even/layouts/shortcodes
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2018-11-06 02:49:16 +0000
committerJulio Capote <jcapote@gmail.com>2018-11-06 02:49:16 +0000
commita62a3e7755579d93ce3a87243dd277575930fffe (patch)
tree6d074f7294c5b7a45bed7ac229a6802830da2a04 /themes/even/layouts/shortcodes
downloadcapotej.com-a62a3e7755579d93ce3a87243dd277575930fffe.tar.gz
init
Diffstat (limited to 'themes/even/layouts/shortcodes')
-rw-r--r--themes/even/layouts/shortcodes/center.html3
-rw-r--r--themes/even/layouts/shortcodes/left.html3
-rw-r--r--themes/even/layouts/shortcodes/music.html62
-rw-r--r--themes/even/layouts/shortcodes/right.html3
4 files changed, 71 insertions, 0 deletions
diff --git a/themes/even/layouts/shortcodes/center.html b/themes/even/layouts/shortcodes/center.html
new file mode 100644
index 0000000..e9022d0
--- /dev/null
+++ b/themes/even/layouts/shortcodes/center.html
@@ -0,0 +1,3 @@
+<div class='align-center'>
+ {{ .Inner }}
+</div> \ No newline at end of file
diff --git a/themes/even/layouts/shortcodes/left.html b/themes/even/layouts/shortcodes/left.html
new file mode 100644
index 0000000..c2c5102
--- /dev/null
+++ b/themes/even/layouts/shortcodes/left.html
@@ -0,0 +1,3 @@
+<div class='align-left'>
+ {{ .Inner }}
+</div> \ No newline at end of file
diff --git a/themes/even/layouts/shortcodes/music.html b/themes/even/layouts/shortcodes/music.html
new file mode 100644
index 0000000..22b2268
--- /dev/null
+++ b/themes/even/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 -}}
+
+ <iframe style="max-width: 100%"
+ class="music163"
+ frameborder="no"
+ border="0"
+ marginwidth="0"
+ marginheight="0"
+ width="330"
+ height="86"
+ src="//music.163.com/outchain/player?type=2&id={{ .Get "id" }}&auto={{ or (.Get "auto") $auto }}&height=66">
+ </iframe>
+
+ {{- else -}}
+
+ <iframe style="max-width: 100%"
+ class="music163"
+ frameborder="no"
+ border="0"
+ marginwidth="0"
+ marginheight="0"
+ width="330"
+ height="86"
+ src="//music.163.com/outchain/player?type=2&id={{ .Get 0 }}&auto={{ if isset .Params 1 }}{{ .Get 1 }}{{ else }}{{ $auto }}{{ end }}&height=66">
+ </iframe>
+
+ {{- end -}}
+ \ No newline at end of file
diff --git a/themes/even/layouts/shortcodes/right.html b/themes/even/layouts/shortcodes/right.html
new file mode 100644
index 0000000..37a9a33
--- /dev/null
+++ b/themes/even/layouts/shortcodes/right.html
@@ -0,0 +1,3 @@
+<div class='align-right'>
+ {{ .Inner }}
+</div> \ No newline at end of file