feat(aplayer): add dark-mode for APlayer and fix Typeit bug

This commit is contained in:
Dillon
2020-01-29 22:16:50 +08:00
parent 5537e2ccef
commit c8e612b888
10 changed files with 197 additions and 76 deletions

View File

@@ -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 }}