Aiden Bai
2022-05-29 8673a7bc3d1061eb11381e8d7e85dd0d2e1fa64c
Add option to toggle footer
3 files modified
10 ■■■■ changed files
data/config.yaml 1 ●●●● patch | view | raw | blame | history
layouts/partials/footer.html 5 ●●●●● patch | view | raw | blame | history
layouts/partials/head.html 4 ●●●● patch | view | raw | blame | history
data/config.yaml
@@ -4,6 +4,7 @@
enableLinkPreview: true
enableLatex: true
enableSPA: true
enableFooter: true
enableContextualBacklinks: true
enableRecentNotes: false
description:
layouts/partials/footer.html
@@ -1,4 +1,8 @@
<hr/>
{{if $.Site.Data.config.enableFooter}}
<div class="page-end">
    <div class="backlinks-container">
        {{partial "backlinks.html" .}}
@@ -7,5 +11,6 @@
        {{partial "graph.html" .}}
    </div>
</div>
{{end}}
{{partial "contact.html" .}}
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 }},