Skip to content
Open
Show file tree
Hide file tree
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
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,17 @@ If you want to use these branded icons in your contact list, use the full class
icon = "fa-brands fa-github"
```

You may also use the `icon` parameter in your page frontmatter to set an icon before your title in the section heading, as well as in the header button and nav bar.

```yaml
---
title: "Contact us"
icon: comments
header_menu: true
weight: 6
---
```

### Header logo

Configured in `_index.md`, see `exampleSite`: `header_logo: "images/chef-hat.png"`
Expand Down
1 change: 1 addition & 0 deletions exampleSite/content/de/homepage/contact.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "Contact"
icon: comments
weight: 4
header_menu: true
---
Expand Down
1 change: 1 addition & 0 deletions exampleSite/content/en/homepage/contact.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: "Contact"
icon: comments
weight: 4
header_menu: true
---
Expand Down
11 changes: 11 additions & 0 deletions exampleSite/content/en/homepage/services.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ If you want to use these branded icons in your contact list, use the full class
icon = "fa-brands fa-github"
```

You may also use the `icon` parameter in your page frontmatter to set an icon before your title in the section heading, as well as in the header button and nav bar.

```yaml
---
title: "Contact us"
icon: comments
header_menu: true
weight: 6
---
```

### Nutrition Coaching

This is not an easy task.
Expand Down
26 changes: 20 additions & 6 deletions layouts/_default/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,13 @@
{{ else if isset .Params "detailed_page_path" }}
<a class='btn site-menu' href='{{ .Params.detailed_page_path | relURL }}'>{{ $button_title }}</a>
{{ else }}
{{ $fnav_title := .Title }}{{ with .Params.navigation_menu_title }}{{ $fnav_title = . }}{{ end }}
<a class='btn site-menu' data-title-anchor='{{ anchorize $fnav_title }}' href='#{{ anchorize $fnav_title }}'>{{ $button_title }}</a>
{{ $fnav_title := .Title }}{{ with .Params.navigation_menu_title }}{{ $fnav_title = . }}{{ end }}
<a class='btn site-menu' data-title-anchor='{{ anchorize $fnav_title }}' href='#{{ anchorize $fnav_title }}'>
{{ with .Params.icon }}
<i class='fas fa-{{ . }} fa-fw'></i>
{{ end }}
{{ $button_title }}
</a>
{{ end }}
{{ end }}

Expand All @@ -131,7 +136,12 @@
{{ $last_index_val := 0 }}
{{ range $index_val, $elem_val := $content }}
{{ $fnav_title := .Title }}{{ with .Params.navigation_menu_title }}{{ $fnav_title = . }}{{ end }}
<a class='fn-item' item_index='{{ (add $index_val 1) }}' href='#{{ anchorize $fnav_title }}'>{{ $fnav_title | safeHTML }}</a>
<a class='fn-item' item_index='{{ (add $index_val 1) }}' href='#{{ anchorize $fnav_title }}'>
{{ with .Params.icon }}
<i class='fas fa-{{ . }} fa-fw'></i>
{{ end }}
{{ $fnav_title | safeHTML }}
</a>
{{ $last_index_val = $index_val }}
{{ end }}
{{ if eq .Params.nav_to_top_weight "last" }}
Expand All @@ -145,9 +155,13 @@
{{ if .Title }}
{{ $fnav_title := .Title }}{{ with .Params.navigation_menu_title }}{{ $fnav_title = . }}{{ end }}
<div class='post-holder{{ if and (ne .Site.Params.invertSectionColors true) (not (modBool $index_val 2)) }} dark{{ else if and (eq .Site.Params.invertSectionColors true) (modBool $index_val 2) }} dark{{ end }}'>
<article id='{{ anchorize $fnav_title }}' class='post {{ if eq $index_val 0 }}first{{ end }} {{ if eq (add $index_val 1) (len $content) }}last{{ end }}'>
<header class="post-header">
<h2 class="post-title">{{ .Title | emojify | safeHTML }}</h2>
<article id='{{ anchorize $fnav_title }}' class='post {{ if eq $index_val 0 }}first{{ end }} {{ if eq (add $index_val 1) (len $content) }}last{{ end }}'> <header class="post-header">
<h2 class="post-title">
{{ with .Params.icon }}
<i class='fas fa-{{ . }} fa-fw'></i>
{{ end }}
{{ .Title | emojify | safeHTML }}
</h2>
</header>
<section class="post-content">
{{ .Content }}
Expand Down