Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: customMenus in footer #513

Merged
merged 3 commits into from
Jan 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{/* variables for enabling/disabling parts of the footer */}}
{{ $footerEnabled := site.Params.footer.enable | default true }}
{{ $navigationEnabled := site.Params.footer.navigation.enable | default true }}
{{ $customMenusEnabled := site.Params.footer.navigation.customMenus | default true }}
{{ $contactMeEnabled := site.Params.footer.contactMe.enable | default true }}
{{ $newsletterEnabled := site.Params.footer.newsletter.enable | default true }}
{{ $credentialsEnabled := site.Params.footer.credentials.enable | default true }}
Expand All @@ -26,6 +27,11 @@
{{ $sections = (index site.Data site.Language.Lang).sections }}
{{ end }}

{{ $customMenus := site.Params.customMenus }}
{{ if (index site.Data site.Language.Lang).site.customMenus }}
{{ $customMenus = (index site.Data site.Language.Lang).site.customMenus }}
{{ end }}

{{ $copyrightNotice := "© 2021 Copyright."}}
{{ if (index site.Data site.Language.Lang).site }}
{{ $siteConfig := (index site.Data site.Language.Lang).site }}
Expand Down Expand Up @@ -77,6 +83,15 @@ <h5>{{ i18n "navigation" }}</h5>
</li>
{{ end }}
{{- end }}
{{ if $customMenusEnabled }}
{{ range $customMenus }}
{{ if .showOnFooter }}
<li class="nav-item">
<a class="smooth-scroll" href="{{ .url }}">{{ .name }}</a>
</li>
{{ end }}
{{ end }}
{{ end }}
</ul>
{{ end }}
</div>
Expand Down