merge upstream

This commit is contained in:
Niklas Buschmann 2020-02-18 17:40:33 +01:00
parent 1d28ba46b0
commit a136fa977b
4 changed files with 46 additions and 5 deletions

View File

@ -21,14 +21,16 @@
{{ partial "math.html" . }}
{{- end }}
<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 }}
</header>
<body>
{{- block "main" . }}{{- end }}
</body>
</html>

View File

@ -3,9 +3,26 @@
{{ $Pages := .Pages }}
{{ if .IsHome }}
{{ $Pages = where site.RegularPages "Type" "in" site.Params.mainSections }}
{{ $Pages = where site.RegularPages "Type" "in" .Site.Params.mainSections }}
{{ end }}
{{ if .Site.Params.show_excerpts }}
{{- range $Pages }}
<article>
<header>
<h1>{{ .Title }}</h1>
{{ if .Date }}<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "January 02, 2006" }}</time>{{ end }}
</header>
{{ .Summary }}
{{- if .Truncated }}
<div class="more"><a href="{{ .RelPermalink }}">read more</a></div>
{{- end }}
</article>
{{- end }}
{{ else }}
<article>
<header><h1>{{ .Title | default "Posts" | humanize }}</h1></header>
<ul class="archive">
@ -20,3 +37,5 @@
</article>
{{ end }}
{{ end }}

View File

@ -12,6 +12,23 @@
display: none;
}
.more {
margin: 2em 0 1em;
}
.more a {
border-radius: 2px;
border: 1.5px solid #68f;
padding: .4em .8em;
transition: .2s;
}
.more a:hover {
color: #fff;
background: #68f;
text-decoration: inherit;
}
.fa, .fab, .fad, .fal, .far, .fas {
margin-right: 1.2em;
}

View File

@ -72,6 +72,10 @@ hr {
margin: 2em 0;
}
article:not(:last-child) {
border-bottom: 1px solid rgba(142, 142, 145, 0.12);
}
blockquote {
background: rgba(142, 142, 145, 0.06);
border-left: 3px solid rgba(142, 142, 145, 0.9);
@ -138,7 +142,6 @@ body > header {
body > header > a {
font-size: 1.3em;
margin: .2em 0;
}
article header {
@ -151,11 +154,11 @@ article header h1 {
}
nav {
margin: .4em -.8em;
margin: .5em -.8em;
}
nav a {
margin: .4em .8em;
margin: .5em .8em;
}
body > header, body > article, body > footer {