From e5b7e226f064268686c9799e9e54910e3b83b38b Mon Sep 17 00:00:00 2001
From: amzrk2
Date: Sun, 10 Jan 2021 21:11:57 +0800
Subject: new: in-post aplayer support
---
layouts/_default/single.html | 3 --
layouts/partials/head.html | 2 +-
layouts/partials/scripts-end.html | 72 +++++++++++++++++++++++--------------
layouts/partials/scripts-front.html | 2 +-
layouts/shortcodes/aplayer.html | 9 +++++
5 files changed, 57 insertions(+), 31 deletions(-)
create mode 100644 layouts/shortcodes/aplayer.html
(limited to 'layouts')
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 8f7eb35..cd2bd48 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -7,9 +7,6 @@
{{ partial "post-meta.html" . }}
- {{ with .Params.player }}
-
{{ .Content }}
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index f4ebe64..85c840a 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -36,7 +36,7 @@
{{ with .Site.Params.googleAdsense }}
{{ end}}
-{{ if .Params.player }}
+{{ if .Params.aplayer }}
{{ end }}
{{ if .Site.Params.useDisqusJS }}
diff --git a/layouts/partials/scripts-end.html b/layouts/partials/scripts-end.html
index 2a2f316..6db0f43 100644
--- a/layouts/partials/scripts-end.html
+++ b/layouts/partials/scripts-end.html
@@ -1,10 +1,12 @@
{{ if eq .Section "search" }}
-
+
+
{{ else if eq .Section "archives" }}
{{ else }}
-
-
-
+
+
+
+
{{ end }}
{{ $options := (dict "targetPath" "assets/js/fuji.min.js" "minify" true "target" "es2015" "format" "iife") }}
{{ $built := resources.Get "js/fuji.js" | js.Build $options }}
@@ -12,33 +14,51 @@
{{ if or .Params.math .Site.Params.math }}
{{ partial "math.html" . }}
{{ end }}
-{{ with .Params.player }}
+{{ with .Params.aplayer }}
{{ end }}
\ No newline at end of file
diff --git a/layouts/partials/scripts-front.html b/layouts/partials/scripts-front.html
index c28912a..c802702 100644
--- a/layouts/partials/scripts-front.html
+++ b/layouts/partials/scripts-front.html
@@ -10,4 +10,4 @@
document.body.setAttribute('data-theme', fujiThemeData === 'dark' ? 'dark' : 'light');
}
}
-
+
\ No newline at end of file
diff --git a/layouts/shortcodes/aplayer.html b/layouts/shortcodes/aplayer.html
new file mode 100644
index 0000000..12ab16c
--- /dev/null
+++ b/layouts/shortcodes/aplayer.html
@@ -0,0 +1,9 @@
+
\ No newline at end of file
--
cgit v1.2.3