updated headers / footers / links / post tags

This commit is contained in:
Philipp Häfelfinger 2019-10-27 01:16:35 +02:00
parent c196fcf7a8
commit 261206c9bc
10 changed files with 124 additions and 40 deletions

View File

@ -304,10 +304,6 @@
padding: $spacing-unit 0; padding: $spacing-unit 0;
} }
.page-heading {
font-size: 20px;
}
.post-list { .post-list {
margin-left: 0; margin-left: 0;
list-style: none; list-style: none;
@ -320,6 +316,8 @@
.post-meta { .post-meta {
font-size: $small-font-size; font-size: $small-font-size;
color: $grey-color; color: $grey-color;
margin-top: 2*$spacing-unit;
} }
.post-link { .post-link {
@ -328,7 +326,6 @@
} }
/** /**
* Posts * Posts
*/ */
@ -337,14 +334,42 @@
} }
.post-title { .post-title {
font-size: 42px; font-size: 36px;
letter-spacing: -1px; letter-spacing: -1px;
line-height: 1; line-height: 1;
color: $title-color;
@include media-query($on-laptop) { @include media-query($on-laptop) {
font-size: 36px; font-size: 32px;
} }
} }
.post-tags {
color: $grey-color;
font-size: $small-font-size;
a {
color: $link-visited-color;
line-height: $base-line-height;
// Gaps between nav items, but not on the last one
&:not(:last-child) {
margin-right: $spacing-unit;
}
&:visited {
color: $link-visited-color;
}
&:hover {
color: $link-hover-color;
}
}
}
.post-cover {
}
.post-content { .post-content {
margin-bottom: $spacing-unit*2; margin-bottom: $spacing-unit*2;

View File

@ -1,29 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="{{ $.Site.LanguageCode }}">
<head> <head>
<meta charset="utf-8"> {{ partial "site-head.html" . }}
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
{{ $style := resources.Get "sass/main.scss" | toCSS | minify | fingerprint "sha512" }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
{{ block "title" . }}
<title>
{{ if .IsHome }}
{{ $.Site.Title }}
{{ else }}
{{ .Title }} / {{ $.Site.Title }}
{{ end }}
</title>
{{ end }}
{{ partial "head.html" . }}
</head> </head>
<body> <body>
@ -34,7 +12,7 @@
</div> </div>
</div> </div>
{{ block "footer" . }} {{ block "footer" . }}
{{ partial "footer.html" . }} {{ partial "site-footer.html" . }}
{{ end }} {{ end }}
</body> </body>
</html> </html>

View File

@ -1,6 +1,32 @@
{{ define "main" }} {{ define "main" }}
<article class="post"> <article class="post">
<h1><a href="{{ .Permalink }}">{{ .Title }}</a> {{ if .Draft }}(Draft){{ end }}</h1> <div class="post-header">
<h1 class="post-title">{{ .Title }} {{ if .Draft }}(Draft){{ end }}</h1>
<div class="post-meta">
{{ if .Params.Date }}
<span class="post-date"><i class="fa fa-chevron-right"></i>&nbsp;Posted on {{ .Date.Format "2006-01-02" }}</span>
{{ end }}
{{ with .Params.Author }}
<span class="post-author"><i class="fa fa-chevron-right"></i>&nbsp;{{ . }}</span>
{{ end }}
</div>
<div class="post-tags">
{{ if .Params.tags }}
<span class="post-tags">
<i class="fa fa-chevron-right"></i>&nbsp;
{{ range .Params.tags }}
<a href="{{ (urlize (printf "tags/%s/" .)) | absLangURL }}">#{{ . }}</a>&nbsp;
{{ end }}
</span>
{{ end }}
</div>
{{ with .Params.Cover }}
<img src="{{ . | absURL }}" class="post-cover" />
{{ end }}
</div>
<div class="post-content">{{ .Content | safeHTML }}</div> <div class="post-content">{{ .Content | safeHTML }}</div>

View File

@ -1 +1 @@
<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank"><img alt="CC BY-SA 4.0 - Creative Commons License" title="CC BY-SA 4.0 - Creative Commons License" style="border-width:0" src="/assets/creativecommons.png" /></a> <a rel="noreferrer" href="http://creativecommons.org/licenses/by-sa/4.0/" aria-label="CC BY-SA 4.0 - Creative Commons License" target="_blank"><img alt="CC BY-SA 4.0 - Creative Commons License" title="CC BY-SA 4.0 - Creative Commons License" style="border-width:0" src="/assets/creativecommons.png" /></a>

View File

@ -1,5 +1,5 @@
{{ if $.Site.Params.github_username }} {{ if $.Site.Params.github_username }}
<a href="https://github.com/{{ .Site.Params.github_username }}" target="_blank"> <a href="https://github.com/{{ .Site.Params.github_username }}" aria-label="github" rel="noreferrer" target="_blank">
<span class="icon icon--github">{{ partial "icon-github.svg" }}</span> <span class="icon icon--github">{{ partial "icon-github.svg" }}</span>
</a> </a>
{{end}} {{end}}

View File

@ -1,5 +1,5 @@
{{ if $.Site.Params.twitter_username }} {{ if $.Site.Params.twitter_username }}
<a href="https://twitter.com/{{ .Site.Params.twitter_username }}" target="_blank"> <a href="https://twitter.com/{{ .Site.Params.twitter_username }}" aria-label="twitter" rel="noreferrer" target="_blank">
<span class="icon icon--twitter">{{ partial "icon-twitter.svg" }}</span> <span class="icon icon--twitter">{{ partial "icon-twitter.svg" }}</span>
</a> </a>
{{end}} {{end}}

View File

@ -4,7 +4,7 @@
<div class="footer-col-wrapper"> <div class="footer-col-wrapper">
<div class="footer-col footer-col-1"> <div class="footer-col footer-col-1">
<ul class="contact-list"> <ul class="contact-list">
<li><a href="{{ "/" | relURL }}">{{ .Site.Params.title }}</a></li> <li><a href="{{ "/" | relURL }}" aria-label="{{ .Site.Title }}">{{ .Site.Title }}</a></li>
<li>{{ $.Site.Params.author }}</li> <li>{{ $.Site.Params.author }}</li>
<li><a href="mailto:{{ $.Site.Params.email }}">{{ $.Site.Params.email }}</a></li> <li><a href="mailto:{{ $.Site.Params.email }}">{{ $.Site.Params.email }}</a></li>
</ul> </ul>
@ -25,7 +25,7 @@
<div class="footer-col footer-col-3"> <div class="footer-col footer-col-3">
<ul class="contact-list"> <ul class="contact-list">
<li>{{ partial "license.html" . }}</li> <li>{{ partial "license.html" . }}</li>
<li><span>Theme <i>Tiles</i> by <a href="https://twitter.com/haefelfinger" target="_blank">haefelfinger</a></span></li> <li><span>Theme <i>Tiles</i> by <a href="https://twitter.com/haefelfinger" aria-label="haefelfinger on twitter" rel="noreferrer" target="_blank">haefelfinger</a></span></li>
</ul> </ul>
</div> </div>
</div> </div>

View File

@ -0,0 +1,55 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="canonical" href="{{ .Permalink }}">
<meta name="generator" content="Source Themes Tiles {{ site.Data.academic.version }}">
{{/* Generate page description. */}}
{{ $desc := $.Site.Title }}
{{ if .Params.Summary }}
{{ $desc = .Params.Summary }}
{{ else if .IsPage }}
{{ $desc = .Summary }}
{{ else if site.Params.description }}
{{ $desc = site.Params.description }}
{{ end }}
<meta name="description" content="{{ $desc }}">
<meta name="author" content="{{ .Params.author }}">
{{ with .OutputFormats.Get "RSS" }}
<link href="{{ .RelPermalink }}" rel="alternate" type="application/rss+xml" title="{{ $.Site.Title }}" />
<link href="{{ .RelPermalink }}" rel="feed" type="application/rss+xml" title="{{ $.Site.Title }}" />
{{ end }}
{{ $style := resources.Get "sass/main.scss" | toCSS | minify | fingerprint "sha512" }}
<link rel="stylesheet" href="{{ $style.Permalink }}" integrity="{{ $style.Data.Integrity }}">
<meta property="og:site_name" content="{{ site.Title }}">
<meta property="og:url" content="{{ .Permalink }}">
<meta property="og:title" content="{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ site.Title }}">
<meta property="og:description" content="{{ $desc }}">
{{ if .IsPage }}
<meta property="og:type" content="article">
{{ if not .PublishDate.IsZero }}
<meta property="article:published_time" content="{{ .PublishDate.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">
{{ else if not .Date.IsZero }}
<meta property="article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">
{{ end }}
{{ if not .Lastmod.IsZero }}
<meta property="article:modified_time" content="{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">
{{ end }}
{{ else }}
{{ if not .Date.IsZero }}
<meta property="og:updated_time" content="{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}">
{{ end }}
{{ end }}
{{ block "title" . }}
{{ if .IsHome }}
<title>{{ $.Site.Title }}</title>
{{ else }}
<title>{{ .Title }} / {{ $.Site.Title }}</title>
{{ end }}
{{ end }}

View File

@ -5,7 +5,7 @@ Usage: {{< linkBlank "URL" "TITLE" >}}
{{ $linkUrl := .Get 0 }} {{ $linkUrl := .Get 0 }}
{{ if $linkTitle }} {{ if $linkTitle }}
<a target="_blank" rel="nofollow" href="{{ $linkUrl | absLangURL }}">{{ $linkTitle | markdownify }} <i class="fa fa-external-link"></i></a> <a target="_blank" rel="noreferrer" href="{{ $linkUrl | absLangURL }}" aria-label="{{ $linkTitle | markdownify }}">{{ $linkTitle | markdownify }} <i class="fa fa-external-link"></i></a>
{{ else }} {{ else }}
<a target="_blank" rel="nofollow" href="{{ $linkUrl | absLangURL }}">{{ $linkUrl }} <i class="fa fa-external-link"></i></a> <a target="_blank" rel="noreferrer" href="{{ $linkUrl | absLangURL }}" aria-label="{{ $linkUrl }}">{{ $linkUrl }} <i class="fa fa-external-link"></i></a>
{{ end }} {{ end }}