Skip to content

Commit 6def3d4

Browse files
Make header configurable
Add: - Ability to header on home page. - Ability to add CSS classes on header. - Ability to disable on individual pages with a page parameter.
1 parent 848b687 commit 6def3d4

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

README.md

+20-15
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,23 @@ This theme was highly inspired by the [hello-friend](https://github.com/panr/hug
1010

1111
## Table of Contents
1212

13-
- [Features](#features)
14-
- [How to start](#how-to-start)
15-
- [How to configure](#how-to-configure)
16-
- [More](#more-things)
17-
- [Built in shortcodes](#built-in-shortcodes)
18-
- [image](#image)
19-
- [Code highlighting](#code-highlighting)
20-
- [Favicon](#favicon)
21-
- [Audio Support](#audio-support)
22-
- [Social Icons](#social-icons)
23-
- [Known issues](#known-issues)
24-
- [How to edit the theme](#how-to-edit-the-theme)
25-
- [Changelog](CHANGELOG.md)
26-
- [Sponsoring](#sponsoring)
27-
- [Licence](#licence)
13+
- [Hello Friend NG](#hello-friend-ng)
14+
- [General informations](#general-informations)
15+
- [Table of Contents](#table-of-contents)
16+
- [Features](#features)
17+
- [How to start](#how-to-start)
18+
- [How to configure](#how-to-configure)
19+
- [More things](#more-things)
20+
- [Built-in shortcodes](#built-in-shortcodes)
21+
- [image](#image)
22+
- [Code highlighting](#code-highlighting)
23+
- [Favicon](#favicon)
24+
- [Audio Support](#audio-support)
25+
- [Social Icons:](#social-icons)
26+
- [Known issues](#known-issues)
27+
- [How to edit the theme](#how-to-edit-the-theme)
28+
- [Sponsoring](#sponsoring)
29+
- [Licence](#licence)
2830

2931
---
3032

@@ -90,6 +92,9 @@ paginate = 10
9092
keywords = "homepage, blog"
9193
images = [""]
9294

95+
# Header configuration
96+
headerCssClasses = [""] # Css classes appended to <header> of each page
97+
9398
[taxonomies]
9499
category = "blog"
95100
tag = "tags"

layouts/partials/header.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<header class="header">
1+
{{ if not (or .Params.hideMenu (and .Site.Params.hideHeaderOnHome .IsHome)) }}
2+
<header class="header {{ if .Site.Params.headerCssClasses }}{{ range .Site.Params.headerCssClasses }} {{ . }}{{ end }}">
23
<span class="header__inner">
34
{{ partial "logo.html" . }}
45

@@ -19,3 +20,4 @@
1920
</span>
2021
</span>
2122
</header>
23+
{{ end }}

0 commit comments

Comments
 (0)