From a49b8d35b9707ac1185f066160e847e681e3c1c1 Mon Sep 17 00:00:00 2001 From: Garrett Battaglia Date: Thu, 18 Jun 2020 09:47:37 +0000 Subject: refactor scripts and improve copyright --- exampleSite/config.toml | 12 ++++++++++++ layouts/_default/baseof.html | 1 + layouts/partials/copyright.html | 15 +++++++++++++++ layouts/partials/footer.html | 36 +----------------------------------- layouts/partials/head.html | 3 --- layouts/partials/scripts.html | 30 ++++++++++++++++++++++++++++++ 6 files changed, 59 insertions(+), 38 deletions(-) create mode 100644 layouts/partials/copyright.html create mode 100644 layouts/partials/scripts.html diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 12cce16..c103bc7 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -40,6 +40,18 @@ preserveTaxonomyNames = true # Enables or disables the second flyby cursor. Default is false. loadonepass = false +[params.copyright] + name = "JM Fergeau" + + # The url to use as link in the copyright name in the footer. Leave empty to use none. + url = "http://jmf-portfolio.netlify.com" + + # Text to go before copyright information + prefix = "[hugo.386 theme by Max le Fou](https://gitlab.com/maxlefou/hugo.386)" + + # Text to go between copyright and hugo disclaimer (if enabled) + suffix = "Example site" + [menu] # This displays buttons in the navbar to access your contents [[menu.main]] diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 3319470..991a221 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -8,4 +8,5 @@ {{- partial "footer.html" . -}} + {{- partial "scripts.html" . -}} diff --git a/layouts/partials/copyright.html b/layouts/partials/copyright.html new file mode 100644 index 0000000..7a83dfe --- /dev/null +++ b/layouts/partials/copyright.html @@ -0,0 +1,15 @@ + +{{ with .Site.Params.Copyright.Prefix }} + {{ . | markdownify }} | +{{end}} +© +{{ with .Site.Params.copyright.url }}{{ end }} + {{ .Site.Params.copyright.name }} +{{ with .Site.Params.copyright.url }}{{ end }} +2020 +{{ with .Site.Params.Copyright.Suffix }} + | {{ . | markdownify }} +{{end}} +{{ if isset .Site.Params "showhugo" }} + | {{ i18n "builton" }} Hugo +{{ end }} \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index cd8f5ce..cb7e370 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,14 +1,7 @@ - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html index e7a2d75..7c84942 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -8,8 +8,5 @@ {{/* Don't ask why it's like this. This original theme is a mess... */}} - - - diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html new file mode 100644 index 0000000..05891be --- /dev/null +++ b/layouts/partials/scripts.html @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3