feat(aplayer): add dark-mode for APlayer and fix Typeit bug
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.typeit_js }}
|
||||
{{ $typeit = .Site.Params.cdn.typeit_js }}
|
||||
{{ else }}
|
||||
{{ $res := resources.Get "js/lib/typeit/typeit.modern.min.js" | resources.Minify }}
|
||||
{{ $res := resources.Get "js/lib/typeit/typeit.min.js" | resources.Minify }}
|
||||
{{ $typeit = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
<!-- jQuery.countdown https://github.com/hilios/jQuery.countdown -->
|
||||
@@ -96,6 +96,8 @@
|
||||
{{ $res := resources.Get "css/lib/aplayer/APlayer.min.css" | resources.Minify }}
|
||||
{{ $aplayer_css = printf "<link rel=\"stylesheet\" href=\"%s\">" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $res := resources.Get "css/lib/aplayer/APlayer.dark.scss" | resources.ToCSS | resources.Minify }}
|
||||
{{ $aplayer_dark_css := printf "<link rel=\"stylesheet\" href=\"%s\">" $res.RelPermalink }}
|
||||
{{ $aplayer_js := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.aplayer_js }}
|
||||
{{ $aplayer_js = .Site.Params.cdn.aplayer_js }}
|
||||
@@ -103,7 +105,7 @@
|
||||
{{ $res := resources.Get "js/lib/aplayer/APlayer.min.js" | resources.Minify }}
|
||||
{{ $aplayer_js = printf "<script src=\"%s\"></script>" $res.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ $aplayer := delimit (slice $aplayer_css $aplayer_js) "" }}
|
||||
{{ $aplayer := delimit (slice $aplayer_css $aplayer_dark_css $aplayer_js) "" }}
|
||||
<!-- MetingJS https://github.com/metowolf/MetingJS -->
|
||||
{{ $meting := "" }}
|
||||
{{ if eq (getenv "HUGO_ENV") "production" | and .Site.Params.cdn.meting_js }}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div id={{ $id }}></div>
|
||||
{{ else if .Get "code" }}
|
||||
<!-- highlight code content without line number -->
|
||||
{{ $content = highlight $content (.Get "code") "linenos=" }}
|
||||
{{ $content = highlight $content (.Get "code") "linenos=false" }}
|
||||
<!-- delete outer label -->
|
||||
{{ $content = replaceRE `<div class="highlight"><pre class="chroma"><code[^<>]*>(?s)(.*)</code></pre></div>` "$1" $content }}
|
||||
<!-- parsing markdown links -->
|
||||
|
||||
Reference in New Issue
Block a user