Make home page sections dynamic and configurable

This commit is contained in:
hossainemruz 2020-06-28 22:23:33 +06:00
parent 8f99f05a98
commit 9a95163b7d
17 changed files with 227 additions and 177 deletions

View file

@ -3,20 +3,23 @@
<div class="row text-left">
<div class="col-md-4 col-sm-12">
<h5>Navigation</h5>
{{ if .Site.Data.site }}
<ul>
{{ range .Site.Data.site.menus }}
{{ if .Site.Data.sections }}
<ul>
{{- range sort .Site.Data.sections "section.weight" }}
{{ if .section.enable }}
<li class="nav-item">
<a class="smooth-scroll" href="{{ .url }}">{{ .name }}</a>
<a class="smooth-scroll" href="#{{ replace (lower .section.name) " " "-" }}">{{ .section.name }}</a>
</li>
{{ end }}
</ul>
{{- end }}
</ul>
{{ end }}
</div>
<div class="col-md-4 col-sm-12">
<h5>Contact Me</h5>
<ul>
{{ range $key,$value:=.Site.Data.site.author.contactInfo }}
{{ range $key,$value:=.Site.Params.author.contactInfo }}
<li><span>{{ title $key }}: </span> <span>{{ $value }}</span></li>
{{ end }}
</ul>