kakawait / hugo-tranquilpeak-theme

A gorgeous responsive theme for Hugo blog framework
https://tranquilpeak.kakawait.com
GNU General Public License v3.0
926 stars 525 forks source link

Delete copyright icon in footer #243

Open gmathieux opened 6 years ago

gmathieux commented 6 years ago

Hi, first of all many thanks for creating this awesome theme. I need some help... how can I remove the copyright icon?

kakawait commented 6 years ago

@gmathieux Currently is not possible using config.toml, only workaround is to override the footer.hml https://github.com/kakawait/hugo-tranquilpeak-theme/blob/3dce10b9ba78b8930e6e401da7603427253d0955/layouts/partials/footer.html#L3

But I'm aware that is not a good solution. I may improve config.toml to be able to control the entire copyright section and not just the name

nodoambiental commented 5 years ago

As @gmathieux, I say many thanks for this Hugo theme. I search for this issue, and after some essays, I did this in footer.html: "

{{ now.Format "2006" }} {{ with .Site.Params.footer.copyright }}{{ . | safeHTML }}{{ else }}{{ with .Site.Author.name }}{{ . }}{{ else }}{{ with .Site.Title }}{{ . }}{{ end }}{{ end }}{{ end }} {{ i18n "footer.Site.Author.name" }}
" Thus, delete copy; , the point after the 3 ends, and replace footer.all_rights_reserved by footer.Site.Author.name

I recognize this is not a good solution, but works by the moment.

SteadyGiant commented 5 years ago

(For anyone out there who finds this thread:)

I use a Creative Commons license, so I changed "All Rights Reserved." to "Some Rights Reserved." by replacing the contents of layouts/partials/footer.html with this:

<footer id="footer" class="main-content-wrap">
  <span class="copyrights">
    &copy; {{ now.Format "2006" }} {{ with .Site.Params.footer.copyright }}{{ . | safeHTML }}{{ else }}{{ with .Site.Author.name }}{{ . }}{{ else }}{{ with .Site.Title }}{{ . }}{{ end }}{{ end }}{{ end }}. Some Rights Reserved.
  </span>
</footer>

Similarly, if you want to remove "All Rights Reserved." entirely, and remove the period following the author name, use this:

<footer id="footer" class="main-content-wrap">
  <span class="copyrights">
    &copy; {{ now.Format "2006" }} {{ with .Site.Params.footer.copyright }}{{ . | safeHTML }}{{ else }}{{ with .Site.Author.name }}{{ . }}{{ else }}{{ with .Site.Title }}{{ . }}{{ end }}{{ end }}{{ end }}
  </span>
</footer>

Very simple fixes, but I'm writing them out just in case anyone isn't super familiar with HTML and just wants a quick fix without breaking things or spending time tinkering.