merge upstream

This commit is contained in:
Niklas Buschmann 2020-02-18 17:49:01 +01:00
parent a136fa977b
commit 56ce3fcba0
3 changed files with 21 additions and 26 deletions

View File

@ -22,31 +22,18 @@ An example `config.yaml` section could look like this:
```yaml
params:
sidebar: true
show_excerpts: true
fontawesome: true
description: 'Made by <a href="">Blog Author</a>'
menu:
main:
- identifier: "home"
name: "Home"
url: "/"
weight: 1
pre: "<span class='fas fa-home hidden'></span>"
- identifier: "about"
name: "About"
url: "/about/"
weight: 2
pre: "<span class='fas fa-address-card hidden'></span>"
- identifier: "github"
name: "Github"
url: "https://github.com/"
weight: 3
pre: "<span class='fab fa-github hidden'></span>"
- identifier: "feed"
name: "Subscribe"
url: "/index.xml"
weight: 4
pre: "<span class='fas fa-rss hidden'></span>"
- {name: "Home", url: "/", identifier: "home", weight: 1, pre: "<span class='fas fa-home hidden'></span>"}
- {name: "About", url: "/about/", identifier: "address-card", weight: 2, pre: "<span class='fas fa-address-card hidden'></span>"}
remote:
- {name: "Mail", url: "mailto:", identifier: "envelope", weight: 3, pre: "<span class='fas fa-envelope hidden'></span>"}
- {name: "Github", url: "https://github.com/", identifier: "github", weight: 4, pre: "<span class='fab fa-github hidden'></span>"}
- {name: "Subscribe", url: "/index.xml", identifier: "rss", weight: 5, pre: "<span class='fas fa-rss hidden'></span>"}
```
## Features

View File

@ -24,9 +24,19 @@
<body>
<header>
{{ if not (gt (len .Site.Menus) 1) }}<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>{{ end }}
{{ range .Site.Menus }}<nav>{{ range . }}<a href="{{ .URL }}" {{ if (eq $.RelPermalink .URL) }}class="selected"{{ end }}>{{ .Pre }}{{ .Name }}{{ .Post }}</a>{{ end }}</nav>{{ end }}
{{ with .Site.Params.description }}<div class="hidden">{{ safeHTML . }}</div>{{ end }}
{{ if not (gt (len .Site.Menus) 1) }}
<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
{{ end }}
{{ range .Site.Menus }}
<nav>
{{ range . }}
<a href="{{ .URL }}" {{ if (eq $.RelPermalink .URL) }}class="selected"{{ end }}>{{ .Pre }}{{ .Name }}{{ .Post }}</a>
{{ end }}
</nav>
{{ end }}
{{ with .Site.Params.description }}
<div class="hidden description">{{ safeHTML . }}</div>
{{ end }}
</header>
{{- block "main" . }}{{- end }}

View File

@ -51,10 +51,8 @@ article header h1 {
font-size: 2em;
}
header > div {
position: absolute;
.description {
margin: 2em 0;
bottom: 0;
}
.hidden {