diff options
| author | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2022-03-27 18:44:06 +0530 |
|---|---|---|
| committer | Aditya Telange <21258296+adityatelange@users.noreply.github.com> | 2022-03-27 18:44:06 +0530 |
| commit | 575cc0ca8c4e5904c7ae77e76db812c52e5f8ed1 (patch) | |
| tree | 29b83f765f6ccae88651886167681b4afdb71069 /layouts/partials/footer.html | |
| parent | 975972e04181007c61302054d18735dc440a0586 (diff) | |
Use `site` function instead of `.Site` or `$.Site`
- The site function provides global access to the same data as the .Site page method.
- Current context (`.`) is never considered.
Diffstat (limited to 'layouts/partials/footer.html')
| -rw-r--r-- | layouts/partials/footer.html | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 8dee328..d76058f 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,9 +1,9 @@ {{- if not (.Param "hideFooter") }} <footer class="footer"> - {{- if .Site.Copyright }} - <span>{{ .Site.Copyright | markdownify }}</span> + {{- if site.Copyright }} + <span>{{ site.Copyright | markdownify }}</span> {{- else }} - <span>© {{ now.Year }} <a href="{{ "" | absLangURL }}">{{ .Site.Title }}</a></span> + <span>© {{ now.Year }} <a href="{{ "" | absLangURL }}">{{ site.Title }}</a></span> {{- end }} <span> Powered by @@ -13,7 +13,7 @@ </footer> {{- end }} -{{- if (not .Site.Params.disableScrollToTop) }} +{{- if (not site.Params.disableScrollToTop) }} <a href="#top" aria-label="go to top" title="Go to Top (Alt + G)" class="top-link" id="top-link" accesskey="g"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 6" fill="currentColor"> <path d="M12 6H0l6-6z" /> @@ -53,7 +53,7 @@ </script> -{{- if (not .Site.Params.disableScrollToTop) }} +{{- if (not site.Params.disableScrollToTop) }} <script> var mybutton = document.getElementById("top-link"); window.onscroll = function () { @@ -69,7 +69,7 @@ </script> {{- end }} -{{- if (not .Site.Params.disableThemeToggle) }} +{{- if (not site.Params.disableThemeToggle) }} <script> document.getElementById("theme-toggle").addEventListener("click", () => { if (document.body.className.includes("dark")) { |
