mirror of https://github.com/onweru/compose.git

romanc
12.51.2020 66ab981bc44b2c07817615f326e46d3293af3a0a
Add Site.Params to disable search and copyright

This PR adds site parameters to optionally disable the search field and
the copyright notice. Both options are enabled by default to keep
current default behavior.
2 files modified
5 ■■■■■ changed files
layouts/partials/footer.html 3 ●●●●● patch | view | raw | blame | history
layouts/partials/nav.html 2 ●●●●● patch | view | raw | blame | history
layouts/partials/footer.html
@@ -1,5 +1,8 @@
{{ if .Site.Params.enableCopyright | default true }}
<footer class="mt-2 pt-2 pb-2">
  <div class="wrap">
    <p>&copy; {{ now.Year}} {{ .Site.Params.author }}</p>
  </div>
</footer>
{{ end }}
layouts/partials/nav.html
@@ -9,7 +9,9 @@
            <img srcset = '{{ $normalPath }}' alt = '{{ .Site.Title }} Logo'>
        </picture>
    </a>
    {{ if .Site.Params.enableSearch | default true }}
    {{- partial "search.html" . }}
    {{ end }}
    <ul class="nav_body">
        {{- $p := . }}
        {{- range .Site.Menus.main }}