Skip to content

Commit

Permalink
add contact icons to bottom of the page
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Holbach <[email protected]>
  • Loading branch information
dholbach committed Dec 23, 2023
1 parent 4269990 commit 175781d
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 0 deletions.
11 changes: 11 additions & 0 deletions assets/css/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -273,3 +273,14 @@ a.fn-item {
.site-footer a:hover {
color: var(--sticky-menu-text-color);
}

/* Bottom Icons */
.icons {
ol {
padding-left: 0;
}

li {
display: inline-block;
}
}
4 changes: 4 additions & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ title = "Jane Doe - Nutrition Coach & Chef Consultant"
# The sections of the home page alternate styling. Mark invert as true to swap the styling of the sections
invertSectionColors = false

[params.footer]
# Show contact icons for email/phone (if specified) in the footer of the page
showContactIcons = false

[params.meta]
keywords = "some, keywords, for, seo, you, know, google, duckduckgo, and, such"

Expand Down
5 changes: 5 additions & 0 deletions i18n/de.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[email]
other = "Email"

[phone]
other = "Telefon"
5 changes: 5 additions & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[email]
other = "Email"

[phone]
other = "Phone"
11 changes: 11 additions & 0 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
<footer class="site-footer">
<div class="inner">
{{ if ne .Site.Params.footer.showContactIcons false }}
{{ with .Site.Params.contact }}
<section class="icons">
<ol>
<li><a href="mailto:{{ .email }}" aria-label='{{ i18n "email" }}'><i class="fa fa-envelope"></i></a></li>
<li><a href="tel:{{ .phone }}" aria-label='{{ i18n "phone" }}'><i class="fa fa-phone"></i></a></li>
</ol>
</section>
{{ end }}
{{ end }}

{{ with .Site.Params.copyright }}
<section class="copyright">{{ . | safeHTML }}</section>
{{ end }}
Expand Down

0 comments on commit 175781d

Please sign in to comment.