From fcfb6bf0085c0c611e5e07141bbe4a102edef1b4 Mon Sep 17 00:00:00 2001 From: Aiden Bai Date: Sat, 28 May 2022 22:52:18 -0700 Subject: [PATCH] Add option to toggle footer --- data/config.yaml | 1 + layouts/partials/footer.html | 5 +++++ layouts/partials/head.html | 4 ++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/data/config.yaml b/data/config.yaml index b79ad572..cae94ef4 100644 --- a/data/config.yaml +++ b/data/config.yaml @@ -4,6 +4,7 @@ openToc: false enableLinkPreview: true enableLatex: true enableSPA: true +enableFooter: true enableContextualBacklinks: true enableRecentNotes: false description: diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 6d4ef17b..ddefe75c 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,4 +1,8 @@ + +
+ +{{if $.Site.Data.config.enableFooter}}
+{{end}} {{partial "contact.html" .}} \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 25120d51..f10ce145 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -63,7 +63,7 @@ const draw = () => { // NOTE: everything within this callback will be executed for every page navigation. This is a good place to put JavaScript that loads or modifies data on the page. - + {{if $.Site.Data.config.enableFooter}} const container = document.getElementById("graph-container") // retry if the graph is not ready if (!container) return requestAnimationFrame(draw) @@ -78,7 +78,7 @@ {{$.Site.Data.graphConfig.enableLegend}}, {{$.Site.Data.graphConfig.enableZoom}} ); - + {{end}} {{if $.Site.Data.config.enableLinkPreview}} initPopover( {{strings.TrimRight "/" .Site.BaseURL }},