mirror of
https://github.com/davegallant/davegallant.github.io.git
synced 2025-08-09 18:12:27 +00:00
port to gitlab.
This commit is contained in:
3
themes/custom/layouts/shortcodes/center.html
Normal file
3
themes/custom/layouts/shortcodes/center.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class='align-center'>
|
||||
{{ .Inner }}
|
||||
</div>
|
3
themes/custom/layouts/shortcodes/left.html
Normal file
3
themes/custom/layouts/shortcodes/left.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class='align-left'>
|
||||
{{ .Inner }}
|
||||
</div>
|
62
themes/custom/layouts/shortcodes/music.html
Normal file
62
themes/custom/layouts/shortcodes/music.html
Normal file
@@ -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 -}}
|
||||
|
3
themes/custom/layouts/shortcodes/right.html
Normal file
3
themes/custom/layouts/shortcodes/right.html
Normal file
@@ -0,0 +1,3 @@
|
||||
<div class='align-right'>
|
||||
{{ .Inner }}
|
||||
</div>
|
Reference in New Issue
Block a user