Define contact information in params, add to footer of the page (#166)
contact icons in footer, opt-in via parameter
This commit is contained in:
parent
4f5883c14d
commit
f1d65eeccb
8 changed files with 44 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,5 +51,13 @@ 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"
|
||||
|
||||
[params.contact]
|
||||
email = "mail@janedoe.com"
|
||||
phone = "+49 1111 555555"
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ weight: 4
|
|||
header_menu: true
|
||||
---
|
||||
|
||||
{{<icon class="fa fa-envelope">}} [mail@janedoe.com](mailto:your-email@your-domain.com)
|
||||
{{<icon class="fa fa-envelope">}} [{{<email>}}](mailto:{{<email>}})
|
||||
|
||||
{{<icon class="fa fa-phone">}} [+49 1111 555555](tel:+491111555555)
|
||||
{{<icon class="fa fa-phone">}} [{{<phone>}}](tel:{{<phone>}})
|
||||
|
||||
Let us get in touch!
|
||||
|
|
|
|||
5
i18n/de.toml
Normal file
5
i18n/de.toml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[email]
|
||||
other = "Email"
|
||||
|
||||
[phone]
|
||||
other = "Telefon"
|
||||
5
i18n/en.toml
Normal file
5
i18n/en.toml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[email]
|
||||
other = "Email"
|
||||
|
||||
[phone]
|
||||
other = "Phone"
|
||||
|
|
@ -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 }}
|
||||
|
|
|
|||
1
layouts/shortcodes/email.html
Normal file
1
layouts/shortcodes/email.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
{{ .Site.Params.contact.email }}
|
||||
1
layouts/shortcodes/phone.html
Normal file
1
layouts/shortcodes/phone.html
Normal file
|
|
@ -0,0 +1 @@
|
|||
{{ .Site.Params.contact.phone }}
|
||||
Loading…
Add table
Reference in a new issue