summaryrefslogtreecommitdiffstats
path: root/layouts/partials/scripts.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/scripts.html')
-rw-r--r--layouts/partials/scripts.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index 48a056e..cd47e6f 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -25,6 +25,41 @@
});
</script>
{{ end }}
+{{ with .Params.playerURL }}
+<script>
+ $(function () {
+ const postAPlayer = new APlayer({
+ container: document.getElementById("post-aplayer"),
+ theme: "#8F82BC",
+ volume: 0.25,
+ audio: [{
+ name: "{{ $.Params.playerName }}",
+ artist: "{{ $.Params.playerArtist }}",
+ url: "{{ . }}",
+ cover: "{{ $.Params.playerCover }}"
+ }]
+ });
+ });
+</script>
+{{ end }}
+{{ with .Site.Params.playerURL }}
+<script>
+ $(function () {
+ const siteAPlayer = new APlayer({
+ container: document.getElementById("aplayer"),
+ fixed: true,
+ theme: "#8F82BC",
+ volume: 0.25,
+ audio: [{
+ name: "{{ $.Site.Params.playerName }}",
+ artist: "{{ $.Site.Params.playerArtist }}",
+ url: "{{ . }}",
+ cover: "{{ $.Site.Params.playerCover }}"
+ }]
+ });
+ });
+</script>
+{{ end }}
{{ if .Site.Params.scrollTop }}
<!-- scroll to top button -->
<script>