mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-14 02:46:16 +01:00
add format and music shortcode
This commit is contained in:
parent
5e55b25c8a
commit
0e48c9f3e3
7 changed files with 64 additions and 1 deletions
|
@ -196,6 +196,22 @@
|
|||
color: #7E848F;
|
||||
}
|
||||
}
|
||||
|
||||
.align-center {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.align-right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.align-left {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.float-right {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
p {
|
||||
|
|
|
@ -36,6 +36,14 @@
|
|||
{{ $countdown := `
|
||||
<script src="https://cdn.jsdelivr.net/npm/jquery-countdown@2.2.0/dist/jquery.countdown.min.js" integrity="sha256-Ikk5myJowmDQaYVCUD0Wr+vIDkN8hGI58SGWdE671A8=" crossorigin="anonymous"></script>
|
||||
` }}
|
||||
<!-- jQuery.countdown https://github.com/hilios/jQuery.countdown/ -->
|
||||
{{ $metingjs := `
|
||||
<!-- require APlayer -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script>
|
||||
<!-- require MetingJS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/meting@2/dist/Meting.min.js"></script>
|
||||
` }}
|
||||
|
||||
{{ $jquery | safeHTML }}
|
||||
{{ $typeit | safeHTML }}
|
||||
|
@ -49,8 +57,14 @@
|
|||
{{ end }}
|
||||
|
||||
{{ if .IsPage }}
|
||||
{{ $prettify | safeHTML }}
|
||||
{{ if .Params.Code }}
|
||||
{{ $prettify | safeHTML }}
|
||||
{{ end }}
|
||||
{{ if .Params.Music }}
|
||||
{{ $metingjs | safeHTML }}
|
||||
{{ end }}
|
||||
{{ $countdown | safeHTML }}
|
||||
|
||||
{{ $scripts = $scripts | append $dynamicToTop }}
|
||||
|
||||
{{ if $postHasImages }}
|
||||
|
|
3
layouts/shortcodes/align-center.html
Normal file
3
layouts/shortcodes/align-center.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<div class='align-center'>
|
||||
{{ .Inner }}
|
||||
</div>
|
3
layouts/shortcodes/align-left.html
Normal file
3
layouts/shortcodes/align-left.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<div class='align-left'>
|
||||
{{ .Inner }}
|
||||
</div>
|
3
layouts/shortcodes/align-right.html
Normal file
3
layouts/shortcodes/align-right.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<div class='align-right'>
|
||||
{{ .Inner }}
|
||||
</div>
|
3
layouts/shortcodes/float-right.html
Normal file
3
layouts/shortcodes/float-right.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
<div class='float-right'>
|
||||
{{ .Inner }}
|
||||
</div>
|
21
layouts/shortcodes/music.html
Normal file
21
layouts/shortcodes/music.html
Normal file
|
@ -0,0 +1,21 @@
|
|||
{{ if .IsNamedParams }}
|
||||
<meting-js server={{ .Get "server" }} type={{ .Get "type" }} id={{ .Get "id" }}
|
||||
{{ with .Get "autoplay" }}
|
||||
autoplay={{ . }}
|
||||
{{ end }}
|
||||
{{ with .Get "mini" }}
|
||||
mini={{ . }}
|
||||
{{ end }}
|
||||
{{ with .Get "fixed" }}
|
||||
fixed={{ . }}
|
||||
{{ end }}
|
||||
{{ with .Get "list-folded" }}
|
||||
list-folded={{ . }}
|
||||
{{ end }}
|
||||
{{ with .Get "list-max-height" }}
|
||||
list-max-height={{ . }}
|
||||
{{ end }}
|
||||
theme="#A9A9B3"></meting-js>
|
||||
{{ else }}
|
||||
<meting-js server={{ .Get 0 }} type={{ .Get 1 }} id={{ .Get 2 }} theme="#A9A9B3"></meting-js>></meting-js>
|
||||
{{ end }}
|
Loading…
Reference in a new issue