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/partials/head.html | 2 +- layouts/partials/scripts-end.html | 72 +++++++++++++++++++++++-------------- layouts/partials/scripts-front.html | 2 +- 3 files changed, 48 insertions(+), 28 deletions(-) (limited to 'layouts/partials') 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 -- cgit v1.2.3