diff options
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/footer.html | 10 | ||||
-rw-r--r-- | layouts/partials/header.html | 26 | ||||
-rw-r--r-- | layouts/partials/titleblock.html | 10 |
3 files changed, 46 insertions, 0 deletions
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..9787a40 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,10 @@ + <footer> + <hr> + <p> + {{ with .Site.Params.footer }} + {{ . | markdownify }} + {{ end }} + </p> + </footer> + </body> +</html> diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..3aa09f4 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,26 @@ +<!DOCTYPE html> +<html lang="{{ .Site.LanguageCode }}"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1"> + <title>{{ .Title }} | {{ .Site.Title }}</title> + <link rel="stylesheet" href="{{ "/css/pagedown.css" | relURL }}"> + </head> + + <body> + <header> + <nav> + {{ $title := .Site.Title }} + {{ range $menuItem := .Site.Menus.main }} + {{ if eq $menuItem.Name "Home" }} + <a class="brand" href="{{ $menuItem.URL | relURL }}"> + {{ $title }} + {{ else }} + <a href="{{ $menuItem.URL | relURL }}"> + {{ $menuItem.Name }} + {{ end }} + </a> + {{ end }} + </nav> + <hr> + </header> diff --git a/layouts/partials/titleblock.html b/layouts/partials/titleblock.html new file mode 100644 index 0000000..e2f4549 --- /dev/null +++ b/layouts/partials/titleblock.html @@ -0,0 +1,10 @@ +<h1>{{ .Title | markdownify }}</h1> +<p> +{{ if (gt .Params.date 0) }} {{ .Date.Format "January 2, 2006" }} {{ end }} {{ if (gt .Params.author 0) }} by {{ with .Params.author }} {{ . }} {{ end }} {{ end }}<br> +{{ range $i := (slice "categories" "tags") }} +{{ with ($.Param $i) }} +{{ $i | title }}: {{ range $k := . }}<a href="{{ relURL (print "/" $i "/" $k | urlize) }}">{{$k}}</a> {{ end }}<br> +{{ end }} +{{ end }} +</p> +<hr> |