diff options
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/blog-list.html | 16 | ||||
-rw-r--r-- | layouts/partials/blog-section-list.html | 8 | ||||
-rw-r--r-- | layouts/partials/footer.html | 5 | ||||
-rw-r--r-- | layouts/partials/head.html | 30 | ||||
-rw-r--r-- | layouts/partials/header.html | 10 |
5 files changed, 69 insertions, 0 deletions
diff --git a/layouts/partials/blog-list.html b/layouts/partials/blog-list.html new file mode 100644 index 0000000..c05eb84 --- /dev/null +++ b/layouts/partials/blog-list.html @@ -0,0 +1,16 @@ +{{ range (union .Sections .Pages).ByDate.Reverse }} + <div class="blog-post-wrapper"> + <a class="blog-post-anchor" href="{{ .RelPermalink }}"> + <div class="blog-post"> + <span class="date"> + {{/* .Date.Format "2" }}{{ if in (slice 1 21 31) .Date.Day}}st{{ else if in (slice 2 22) .Date.Day}}nd{{ else if in (slice 3 23) .Date.Day}}rd{{ else }}th{{ end }} {{ .Date.Format "January" */}} + {{ .Date.Format "02" }} {{ .Date.Format "Jan" }} + </span> + + <span class="title"> + {{ .Title }} + </span> + </div> + </a> + </div> +{{ end }} diff --git a/layouts/partials/blog-section-list.html b/layouts/partials/blog-section-list.html new file mode 100644 index 0000000..b475f27 --- /dev/null +++ b/layouts/partials/blog-section-list.html @@ -0,0 +1,8 @@ +{{ range .Sections.ByDate.Reverse }} + <div class="blog-section-wrapper"> + <a href="{{ .RelPermalink }}"> + <h2 class="blog-section" id="{{ .Title }}">{{ .Title }}</h2> + </a> + {{- partial "blog-list.html" . -}} + </div> +{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..63ba377 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,5 @@ +<footer> + <div id="copyright"> + {{ .Site.Copyright | safeHTML }} + </div> +</footer> diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..9cf7575 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,30 @@ +<head> + <meta charset="UTF-8"> + <meta name="viewport" content="width=device-width,initial-scale=1"> + <meta name="author" content={{ .Site.Author.name }}> + + <meta name="robots" content="index,follow"> + <meta name="description" content="{{ .Title }}"> + + <meta property="og:type" content="website"> + <meta property="og:title" content="{{ if .Title }}{{ .Title }}{{ else }}{{ .Site.Title }}{{ end }}"> + <meta property="og:site_name" content="{{ .Site.Title }}"> + <meta property="og:image" content="{{ .Site.Params.ogImage }}"> + <meta property="og:url" content="{{ .Permalink }}"> + + <link rel="stylesheet" type="text/css" href="/css/styles.css"> + + {{ if eq .Section "blog" }} + <link rel="stylesheet" type="text/css" href="/css/blog.css"> + {{ else }} + <link rel="stylesheet" type="text/css" href="/css/home.css"> + {{ end }} + + <title> + {{ if .Title }} + {{ .Title }} + {{ else }} + {{ .Site.Title }} + {{ end }} + </title> +</head> diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..ba1869b --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,10 @@ +<div id="site-header"> + <nav id="global-nav"> + {{ range .Site.Params.navLinks }} + {{ $path := index . 1 }} + <a href="{{ $path }}" {{ if $.Params.navPath }}{{ $p := printf "/%s" $.Params.navPath | printf "%s" }}{{ if eq $path $p }}id="nav-link-active"{{ end }}{{ else }}{{ $p := printf "/%s" $.Section | printf "%s" }}{{ if eq $path $p }}id="nav-link-active"{{ end }}{{ end }}> + {{ index . 0 }} + </a> + {{ end }} + </nav> +</div> |