Find first section for chevron navigation

This commit is contained in:
Jason Tipton 2020-06-30 17:07:45 -08:00
parent 45e36f3532
commit f6b0e97de2

View file

@ -18,7 +18,10 @@
<li>{{ . }}</li>
{{ end }}
</ul>
<!-- @todo this section should go to the first section, not necessarily about -->
<a href="#about"><i class="arrow bounce fa fa-chevron-down"></i></a>
{{ if .Site.Data.sections }}
{{ range first 1 (sort .Site.Data.sections "section.weight") }}
<a href="#{{ replace (lower .section.name) " " "-" }}"><i class="arrow bounce fa fa-chevron-down"></i></a>
{{ end }}
{{ end }}
</div>
</div>