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 ```yaml
params: params:
sidebar: true sidebar: true
show_excerpts: true
fontawesome: true fontawesome: true
description: 'Made by <a href="">Blog Author</a>' description: 'Made by <a href="">Blog Author</a>'
menu: menu:
main: main:
- identifier: "home" - {name: "Home", url: "/", identifier: "home", weight: 1, pre: "<span class='fas fa-home hidden'></span>"}
name: "Home" - {name: "About", url: "/about/", identifier: "address-card", weight: 2, pre: "<span class='fas fa-address-card hidden'></span>"}
url: "/" remote:
weight: 1 - {name: "Mail", url: "mailto:", identifier: "envelope", weight: 3, pre: "<span class='fas fa-envelope hidden'></span>"}
pre: "<span class='fas fa-home hidden'></span>" - {name: "Github", url: "https://github.com/", identifier: "github", weight: 4, pre: "<span class='fab fa-github hidden'></span>"}
- identifier: "about" - {name: "Subscribe", url: "/index.xml", identifier: "rss", weight: 5, pre: "<span class='fas fa-rss hidden'></span>"}
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>"
``` ```
## Features ## Features

View File

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

View File

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