diff options
author | Max le Fou <buttbadger@gmail.com> | 2020-06-18 12:47:37 +0300 |
---|---|---|
committer | Max le Fou <buttbadger@gmail.com> | 2020-06-18 12:47:37 +0300 |
commit | 2558598655fb0d797e526741f2082c8360c720a0 (patch) | |
tree | 752c624f07d85a3fbd2416f4cbdf16f3d0f6ad3c | |
parent | c32c26fff3439f2f3ee44947ffc23da67af1b9ac (diff) | |
parent | a49b8d35b9707ac1185f066160e847e681e3c1c1 (diff) |
Merge branch 'master' into 'master'
refactor scripts and improve copyright
See merge request maxlefou/hugo.386!4
-rw-r--r-- | exampleSite/config.toml | 12 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 1 | ||||
-rw-r--r-- | layouts/partials/copyright.html | 15 | ||||
-rw-r--r-- | layouts/partials/footer.html | 36 | ||||
-rw-r--r-- | layouts/partials/head.html | 3 | ||||
-rw-r--r-- | layouts/partials/scripts.html | 30 |
6 files changed, 59 insertions, 38 deletions
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 @@ </div> {{- partial "footer.html" . -}} </body> + {{- partial "scripts.html" . -}} </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 }}<a href="{{ . }}" target="_blank">{{ end }} + {{ .Site.Params.copyright.name }} +{{ with .Site.Params.copyright.url }}</a>{{ end }} +<span id="thisyear">2020</span> +{{ with .Site.Params.Copyright.Suffix }} + | {{ . | markdownify }} +{{end}} +{{ if isset .Site.Params "showhugo" }} + | {{ i18n "builton" }} <a href="//gohugo.io" target="_blank">Hugo</a> +{{ 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 @@ <footer class="container"> <hr class="soften"> <p> - © - {{ with .Site.Params.copyrighturl }}<a href="{{ . }}" target="_blank">{{ end }} - {{ .Site.Params.copyrightname }} - {{ with .Site.Params.copyrighturl }}</a>{{ end }} - <span id="thisyear">2020</span> - {{ if isset .Site.Params "showhugo" }} - | {{ i18n "builton" }} <a href="//gohugo.io" target="_blank">Hugo</a> - {{ end }} + {{- partial "copyright.html" . -}} </p> <p class="text-center"> {{ with .Site.Params.facebook }}<a href="{{ . }}">Facebook</a> {{ end }} @@ -19,30 +12,3 @@ </p> </footer> -<script src="{{ "/js/jquery.js" | relURL }}"></script> -<script src="{{ "/js/bootstrap-386.js" | relURL }}"></script> -<script src="{{ "/js/bootstrap-transition.js" | relURL }}"></script> -<script src="{{ "/js/bootstrap-alert.js" | relURL }}"></script> -<script src="{{ "/js/bootstrap-modal.js" | relURL }}"></script> -<script src="{{ "/js/bootstrap-dropdown.js" | relURL }}"></script> -<script src="{{ "/js/bootstrap-scrollspy.js" | relURL }}"></script> -<script src="{{ "/js/bootstrap-tab.js" | relURL }}"></script> -<script src="{{ "/js/bootstrap-tooltip.js" | relURL }}"></script> -<script src="{{ "/js/bootstrap-popover.js" | relURL }}"></script> -<script src="{{ "/js/bootstrap-button.js" | relURL }}"></script> -<script src="{{ "/js/bootstrap-collapse.js" | relURL }}"></script> -<script src="{{ "/js/bootstrap-carousel.js" | relURL }}"></script> -<script src="{{ "/js/bootstrap-typeahead.js" | relURL }}"></script> -<script src="{{ "/js/bootstrap-affix.js" | relURL }}"></script> -<script> - _386 = { - fastLoad:{{ .Site.Params.loadfastload }}, - onePass:{{ .Site.Params.loadonepass }}, - speedFactor:{{ .Site.Params.loadspeedfactor }} - }; - - // Free updated script to get the actual year !! no more document.write or stuff!! - function ThisYear() { - document.getElementById('thisyear').innerHTML = new Date().getFullYear(); - }; -</script>
\ 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 @@ <link rel="icon" href="{{ .Site.BaseURL }}/favicon.ico"> <link rel="canonical" href="{{ .Site.BaseURL }}"> {{/* Don't ask why it's like this. This original theme is a mess... */}} - <link rel="stylesheet" href="{{ "/css/bootstrap.css" | relURL }}"> - <link rel="stylesheet" href="{{ "/css/bootstrap-responsive.css" | relURL }}"> - <link rel="stylesheet" href="{{ "/css/style.css" | relURL }}"> <!-- <noscript><style>body { visibility: visible }</style></noscript> --> </head> 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 @@ +<link rel="stylesheet" href="{{ "/css/bootstrap.css" | relURL }}"> +<link rel="stylesheet" href="{{ "/css/bootstrap-responsive.css" | relURL }}"> +<link rel="stylesheet" href="{{ "/css/style.css" | relURL }}"> +<script src="{{ "/js/jquery.js" | relURL }}"></script> +<script src="{{ "/js/bootstrap-386.js" | relURL }}"></script> +<script src="{{ "/js/bootstrap-transition.js" | relURL }}"></script> +<script src="{{ "/js/bootstrap-alert.js" | relURL }}"></script> +<script src="{{ "/js/bootstrap-modal.js" | relURL }}"></script> +<script src="{{ "/js/bootstrap-dropdown.js" | relURL }}"></script> +<script src="{{ "/js/bootstrap-scrollspy.js" | relURL }}"></script> +<script src="{{ "/js/bootstrap-tab.js" | relURL }}"></script> +<script src="{{ "/js/bootstrap-tooltip.js" | relURL }}"></script> +<script src="{{ "/js/bootstrap-popover.js" | relURL }}"></script> +<script src="{{ "/js/bootstrap-button.js" | relURL }}"></script> +<script src="{{ "/js/bootstrap-collapse.js" | relURL }}"></script> +<script src="{{ "/js/bootstrap-carousel.js" | relURL }}"></script> +<script src="{{ "/js/bootstrap-typeahead.js" | relURL }}"></script> +<script src="{{ "/js/bootstrap-affix.js" | relURL }}"></script> +<script> + _386 = { + fastLoad:{{ .Site.Params.loadfastload }}, + onePass:{{ .Site.Params.loadonepass }}, + speedFactor:{{ .Site.Params.loadspeedfactor }} + }; + + // Free updated script to get the actual year !! no more document.write or stuff!! + function ThisYear() { + document.getElementById('thisyear').innerHTML = new Date().getFullYear(); + }; +</script>
\ No newline at end of file |