add an optional boolean showVisitedLinks parameter

This commit is contained in:
Andre Sousa 2016-05-24 15:08:53 +01:00
parent 079e2a0400
commit b644aa817b

View file

@ -27,7 +27,9 @@
{{ printf $first.Params.icon | safeHTML }} {{ printf $first.Params.icon | safeHTML }}
{{ end }} {{ end }}
{{ $first.Title }} {{ $first.Title }}
{{ if .Site.Params.showVisitedLinks}}
<i class="fa fa-check read-icon"></i> <i class="fa fa-check read-icon"></i>
{{ end }}
</span> </span>
</a> </a>
{{ if gt .Pages.Len 1}} {{ if gt .Pages.Len 1}}
@ -36,7 +38,7 @@
{{ if gt $k 0 }} {{ if gt $k 0 }}
<li class="dd-item {{ if eq $page.RelPermalink $p.RelPermalink }}active{{ end }}" data-nav-id="{{ $p.RelPermalink }}"> <li class="dd-item {{ if eq $page.RelPermalink $p.RelPermalink }}active{{ end }}" data-nav-id="{{ $p.RelPermalink }}">
<a href="{{ $p.RelPermalink }}"> <a href="{{ $p.RelPermalink }}">
<span>{{ $p.Title }} <i class="fa fa-check read-icon"></i></span> <span>{{ $p.Title }} {{ if .Site.Params.showVisitedLinks}} <i class="fa fa-check read-icon"> {{ end }} </i></span>
</a> </a>
</li> </li>
{{ end }} {{ end }}
@ -48,7 +50,9 @@
{{ end }} {{ end }}
</ul> </ul>
<hr> <hr>
{{ if .Site.Params.showVisitedLinks}}
<a class="padding" href="#" data-clear-history-toggle=""><i class="fa fa-fw fa-history"></i> Clear History</a> <a class="padding" href="#" data-clear-history-toggle=""><i class="fa fa-fw fa-history"></i> Clear History</a>
{{ end }}
<section id="footer"> <section id="footer">
<p>Built with <a href="https://github.com/matcornic/hugo-theme-learn"><i class="fa fa-heart"></i></a> from <a href="http://getgrav.org">Grav</a> and <a href="http://gohugo.io/">Hugo</a></p> <p>Built with <a href="https://github.com/matcornic/hugo-theme-learn"><i class="fa fa-heart"></i></a> from <a href="http://getgrav.org">Grav</a> and <a href="http://gohugo.io/">Hugo</a></p>
</section> </section>