Skip to content

Commit

Permalink
Allow toggling footer style between columns and left-aligned
Browse files Browse the repository at this point in the history
plus set baseURL to localhost:1313
  • Loading branch information
MJacred committed Feb 6, 2023
1 parent f47a945 commit 73bc625
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
4 changes: 3 additions & 1 deletion exampleSite/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# ------------------------------------------
# Website Settings
# ------------------------------------------
baseURL: http://something-invigorating.org/
baseURL: http://127.0.0.1:1313
languageCode: en-us
# Disables warnings
disableKinds:
Expand Down Expand Up @@ -126,6 +126,7 @@ languages:
# Footer
# ------------------------------------------
footer:
useColumns: false
# Logo (from /images/logos/___)
logo: fresh-white-alt.svg
# Social Media Title
Expand Down Expand Up @@ -270,6 +271,7 @@ languages:
# Footer
# ------------------------------------------
footer:
useColumns: false
# Logo (from /images/logos/___)
logo: fresh-white-alt.svg
# Social Media Title
Expand Down
14 changes: 14 additions & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
{{- $footer := .Site.Params.footer }}
{{- $useColumns := index $footer "useColumns" }}
{{- $logo := index $footer "logo" }}
{{- $quickLinks := index $footer "quicklinks" }}
{{- $socialMedia := index $footer "socialmedia" }}
{{- $bulmaLogo := index $footer "bulmalogo" }}
{{- $socialMediaTitle := index $footer "socialmediatitle" }}
<footer class="footer footer-dark">
<div class="container">
{{- if $useColumns }}
<div class="columns">
<div class="column">
{{- else }}
<div style="display:flex;">
<div style="padding: .75rem;">
{{- end }}
<div class="footer-logo">
<img src="{{ printf "/images/logos/%s" $logo | relURL }}">
</div>
</div>
{{- range $quickLinks }}
{{- if $useColumns }}
<div class="column">
{{- else }}
<div style="padding: .75rem;">
{{- end }}
<div class="footer-column">
<div class="footer-header">
<h3>{{ .title }}</h3>
Expand All @@ -30,7 +40,11 @@ <h3>{{ .title }}</h3>
</div>
</div>
{{- end }}
{{- if $useColumns }}
<div class="column">
{{- else }}
<div style="padding: .75rem;">
{{- end }}
<div class="footer-column">
<div class="footer-header">
<h3>{{ $socialMediaTitle }}</h3>
Expand Down

0 comments on commit 73bc625

Please sign in to comment.