From 02c3891865c7741b8f772aea75cc01564d2f0ff4 Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Mon, 1 Jun 2020 15:44:04 +0800 Subject: Remove jQuery --- layouts/_default/baseof.html | 2 +- layouts/partials/head.html | 7 +------ layouts/partials/scripts-end.html | 9 ++++++++- layouts/partials/scripts-front.html | 19 ++++++++----------- 4 files changed, 18 insertions(+), 19 deletions(-) (limited to 'layouts') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a61499c..4a2a490 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -5,7 +5,7 @@ {{ partial "head.html" . }} - + {{ partial "scripts-front.html" . }} {{ partial "header.html" . }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 7141a40..bf6e1bf 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -33,12 +33,7 @@ {{ template "_internal/twitter_cards.html" . }} -{{ $sass := resources.Get "scss/fuji.scss" }} -{{ $options := (dict "targetPath" "assets/css/fuji.min.css" "outputStyle" "compressed" "enableSourceMap" true) }} -{{ $style := $sass | resources.ToCSS $options }} - - - + {{ if .Params.playerURL }} diff --git a/layouts/partials/scripts-end.html b/layouts/partials/scripts-end.html index 1e02812..99f9e9e 100644 --- a/layouts/partials/scripts-end.html +++ b/layouts/partials/scripts-end.html @@ -1,8 +1,8 @@ + - {{ with .Params.playerURL }} @@ -19,5 +19,12 @@ cover: '{{ $.Params.playerCover }}' }] }); + // aplayer toc anchors fix + // see https://github.com/MoePlayer/APlayer/issues/242#issuecomment-602471423 + document.addEventListener('DOMContentLoaded', function () { + var issueTocEle = document.querySelector('.sidebar-toc'); + var newTocEle = issueTocEle.cloneNode(true); + issueTocEle.parentNode.replaceChild(newTocEle, issueTocEle); + }); {{ end }} \ No newline at end of file diff --git a/layouts/partials/scripts-front.html b/layouts/partials/scripts-front.html index 9425769..c516aad 100644 --- a/layouts/partials/scripts-front.html +++ b/layouts/partials/scripts-front.html @@ -1,16 +1,13 @@ -- cgit v1.2.3