summaryrefslogtreecommitdiff
path: root/layouts
diff options
context:
space:
mode:
Diffstat (limited to 'layouts')
-rw-r--r--layouts/404.html9
-rw-r--r--layouts/_default/baseof.html66
-rw-r--r--layouts/_default/list.html10
-rw-r--r--layouts/_default/single.html11
-rw-r--r--layouts/index.html39
-rw-r--r--layouts/partials/footer.html5
-rw-r--r--layouts/partials/head.html35
-rw-r--r--layouts/partials/head_fonts.html1
-rw-r--r--layouts/partials/hook_head_end.html0
-rw-r--r--layouts/partials/sidebar.html39
-rw-r--r--layouts/partials/theme-color.html17
11 files changed, 159 insertions, 73 deletions
diff --git a/layouts/404.html b/layouts/404.html
index a919514..4f1c246 100644
--- a/layouts/404.html
+++ b/layouts/404.html
@@ -1,4 +1,7 @@
{{ define "main" -}}
-<h1>404: Page not found</h1>
-<p class="lead">Sorry, we've misplaced that URL or it's pointing to something that doesn't exist. <a href="{{ .Site.BaseURL }}">Head back home</a> to try finding it again.</p>
-{{- end }} \ No newline at end of file
+<h1>Page not found</h1>
+<p class="lead">
+ Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.
+ <a href="{{ .Site.BaseURL }}">Head back home</a> to try finding it again.
+</p>
+{{- end }}
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 4fada03..658c98e 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -1,10 +1,62 @@
-{{ partial "head.html" . }}
- <body class="{{ .Site.Params.themeColor }} {{if .Site.Params.layoutReverse}}layout-reverse{{end}}">
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml"{{with .Site.LanguageCode}} xml:lang="{{.}}" lang="{{.}}"{{end}}>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8">
+
+ {{ hugo.Generator }}
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+
+ {{ if .IsHome -}}
+ <title>{{ .Site.Title }}</title>
+ {{- else -}}
+ <title>{{ .Title }} &middot; {{ .Site.Title }}</title>
+ {{- end }}
+
+ <meta name="description" content="{{if .IsHome}}{{ $.Site.Params.description }}{{else}}{{.Description}}{{end}}" />
+
+ <link type="text/css" rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print">
+ <link type="text/css" rel="stylesheet" href="{{ .Site.BaseURL }}css/poole.css">
+ <link type="text/css" rel="stylesheet" href="{{ .Site.BaseURL }}css/hyde.css">
+
+ {{ partial "theme-color.html" . }}
+
+ {{ range $.Site.Params.customCss -}}
+ <link type="text/css" rel="stylesheet" href="{{ $.Site.BaseURL }}{{ . }}">
+ {{- end}}
+
+ <link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700&display=swap" rel="stylesheet">
+
+ <link rel="stylesheet"
+ href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css"
+ integrity="sha256-mmgLkCYLUQbXn0B1SRqzHar6dCnv9oZFPEC1g1cwlkk="
+ crossorigin="anonymous" />
+
+ <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
+ <link rel="shortcut icon" href="/favicon.png">
+
+ <!-- RSS -->
+ {{ range .AlternativeOutputFormats -}}
+ {{ printf `<link href="%s" rel="%s" type="%s" title="%s" />` .Permalink .Rel .MediaType.Type $.Site.Title | safeHTML }}
+ {{ end -}}
+</head>
+<body>
{{ partial "sidebar.html" . }}
- <main class="content container">
- {{ block "main" . -}}{{- end }}
- </main>
- {{ template "_internal/google_analytics_async.html" . }}
- </body>
+ <main class="content container">
+ {{ block "main" . -}}{{- end }}
+ </main>
+
+ {{ partial "footer.html" . }}
+
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/js/all.min.js"
+ integrity="sha256-MAgcygDRahs+F/Nk5Vz387whB4kSK9NXlDN3w58LLq0="
+ crossorigin="anonymous"></script>
+
+ {{ range $.Site.Params.customJs -}}
+ <script src="{{ $.Site.BaseURL }}{{ . }}"></script>
+ {{- end}}
+
+ {{ template "_internal/google_analytics_async.html" . }}
+</body>
</html>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 47a6453..b5b6ed3 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -1,9 +1,13 @@
{{ define "main" -}}
<ul class="posts">
-{{ range .Data.Pages -}}
+ <h1>{{ .Title }}</h1>
+ {{ range .Data.Pages -}}
<li>
- <span><a href="{{ .Permalink }}">{{ .Title }}</a> <time class="pull-right post-list" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Mon, Jan 2, 2006" }}</time></span>
+ <span>
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+ <time class="pull-right post-list" datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
+ </span>
</li>
-{{- end }}
+ {{- end }}
</ul>
{{- end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 735bbf7..b3554ca 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,12 +1,19 @@
{{ define "main" -}}
<div class="post">
<h1>{{ .Title }}</h1>
- <time datetime={{ .Date.Format "2006-01-02T15:04:05Z0700" }} class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
+
+ {{ if ne .Type "page" -}}
+ <div class="post-date">
+ <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> · {{ .ReadingTime }} min read
+ </div>
+ {{- end }}
+
{{ .Content }}
</div>
-{{ if .Site.DisqusShortname -}}
+{{ if (and .Site.DisqusShortname (eq .Params.DisableComments false)) -}}
<h2>Comments</h2>
{{ template "_internal/disqus.html" . }}
{{- end }}
+
{{- end }}
diff --git a/layouts/index.html b/layouts/index.html
index ec6d2eb..28e95ae 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,18 +1,29 @@
{{ define "main" -}}
<div class="posts">
-{{ range .Site.RegularPages -}}
-<article class="post">
- <h1 class="post-title">
- <a href="{{ .Permalink }}">{{ .Title }}</a>
- </h1>
- <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}" class="post-date">{{ .Date.Format "Mon, Jan 2, 2006" }}</time>
- {{ .Summary }}
- {{ if .Truncated }}
- <div class="read-more-link">
- <a href="{{ .RelPermalink }}">Read More…</a>
- </div>
- {{ end }}
-</article>
-{{- end }}
+ {{ range .Site.RegularPages -}}
+ {{ if and (or (eq .Type "post") (eq .Type "article")) (or (not (isset .Params "Hidden")) (eq .Params.Hidden false)) -}}
+ <article class="post">
+ <h1 class="post-title">
+ <a href="{{ .Permalink }}">{{ .Title }}</a>
+ </h1>
+
+ <div class="post-date">
+ <time datetime="{{ .Date.Format "2006-01-02T15:04:05Z0700" }}">{{ .Date.Format "Jan 2, 2006" }}</time> · {{ .ReadingTime }} min read
+ </div>
+
+ {{ if .Description }}
+ {{ .Description }}
+ {{ else }}
+ {{ .Summary }}
+ {{ end }}
+
+ {{ if .Truncated }}
+ <div class="read-more-link">
+ <a href="{{ .RelPermalink }}">Read More</a>
+ </div>
+ {{ end }}
+ </article>
+ {{- end }}
+ {{- end }}
</div>
{{- end }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html
new file mode 100644
index 0000000..d8e44e7
--- /dev/null
+++ b/layouts/partials/footer.html
@@ -0,0 +1,5 @@
+<footer>
+ <div class="copyright">
+ &copy; {{ $.Site.Params.copyright }} {{ now.Format "2006"}} · {{ with $.Site.Params.license }}<a href="{{ $.Site.Params.licenseURL }}">{{ . | safeHTML }}</a>{{end}}
+ </div>
+</footer>
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
deleted file mode 100644
index 56a3157..0000000
--- a/layouts/partials/head.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml"{{with .Site.LanguageCode}} xml:lang="{{.}}" lang="{{.}}"{{end}}>
-<head>
- <link href="https://gmpg.org/xfn/11" rel="profile">
- <meta http-equiv="content-type" content="text/html; charset=utf-8">
- {{ hugo.Generator }}
-
- <!-- Enable responsiveness on mobile devices-->
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
- {{ if .IsHome -}}
- <title>{{ .Site.Title }}</title>
- {{- else -}}
- <title>{{ .Title }} &middot; {{ .Site.Title }}</title>
- {{- end }}
- <meta name="description" content="{{if .IsHome}}{{ $.Site.Params.description }}{{else}}{{.Description}}{{end}}" />
-
- <!-- CSS -->
- <link type="text/css" rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print">
- <link type="text/css" rel="stylesheet" href="{{ .Site.BaseURL }}css/poole.css">
- <link type="text/css" rel="stylesheet" href="{{ .Site.BaseURL }}css/syntax.css">
- <link type="text/css" rel="stylesheet" href="{{ .Site.BaseURL }}css/hyde.css">
- {{ partial "head_fonts.html" . }}
-
- <!-- Icons -->
- <link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144-precomposed.png">
- <link rel="shortcut icon" href="/favicon.png">
-
- <!-- RSS etc -->
- {{ range .AlternativeOutputFormats -}}
- {{ printf `<link href="%s" rel="%s" type="%s" title="%s" />` .Permalink .Rel .MediaType.Type $.Site.Title | safeHTML }}
- {{ end -}}
-
- {{ partial "hook_head_end.html" . }}
-</head>
diff --git a/layouts/partials/head_fonts.html b/layouts/partials/head_fonts.html
deleted file mode 100644
index 4729eb2..0000000
--- a/layouts/partials/head_fonts.html
+++ /dev/null
@@ -1 +0,0 @@
- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Abril+Fatface|PT+Sans:400,400i,700">
diff --git a/layouts/partials/hook_head_end.html b/layouts/partials/hook_head_end.html
deleted file mode 100644
index e69de29..0000000
--- a/layouts/partials/hook_head_end.html
+++ /dev/null
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 162fcad..22ecbf5 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -1,21 +1,44 @@
<aside class="sidebar">
- <div class="container sidebar-sticky">
+ <div class="container">
<div class="sidebar-about">
- <a href="{{ .Site.BaseURL }}"><h1>{{ .Site.Title }}</h1></a>
- <p class="lead">
- {{ with .Site.Params.description }} {{.}} {{ else }}An elegant open source and mobile first theme for <a href="http://hugo.spf13.com">hugo</a> made by <a href="http://twitter.com/mdo">@mdo</a>. Originally made for Jekyll.{{end}}
- </p>
+ {{ with .Site.Params.gravatar }}
+ <div class="author-image">
+ <img src="https://www.gravatar.com/avatar/{{md5 .}}?s=200&d=mp" class="img-circle img-headshot center" alt="Gravatar">
+ </div>
+ {{ else }}
+ {{ with .Site.Params.profilePicture }}
+ <div class="author-image">
+ <img src="{{ $.Site.BaseURL }}{{ . }}" class="img-circle img-headshot center" alt="Profile Picture">
+ </div>
+ {{ end }}
+ {{ end }}
+
+ <h1>{{ .Site.Title }}</h1>
+
+ {{ with .Site.Params.description }}
+ <p class="lead">{{.}}</p>
+ {{end}}
</div>
<nav>
<ul class="sidebar-nav">
- <li><a href="{{ .Site.BaseURL }}">Home</a> </li>
+ <li>
+ <a href="{{ .Site.BaseURL }}">Home</a>
+ </li>
{{ range .Site.Menus.main -}}
- <li><a href="{{.URL}}"> {{ .Name }} </a></li>
+ <li>
+ <a href="{{.URL}}"> {{ .Name }} </a>
+ </li>
{{- end }}
</ul>
</nav>
- <p>{{ with .Site.Params.copyright }}{{.}}{{ else }}&copy; {{ now.Format "2006"}}. All rights reserved. {{end}}</p>
+ <section class="social-icons">
+ {{ range $item := .Site.Params.socialIcons }}
+ <a href="{{ $item.url }}" rel="me" title="{{ $item.title }}">
+ <i class="fab {{ $item.icon }}" aria-hidden="true"></i>
+ </a>
+ {{ end }}
+ </section>
</div>
</aside>
diff --git a/layouts/partials/theme-color.html b/layouts/partials/theme-color.html
new file mode 100644
index 0000000..0f624af
--- /dev/null
+++ b/layouts/partials/theme-color.html
@@ -0,0 +1,17 @@
+{{ with $.Site.Params.themeColor }}
+<style type="text/css">
+ .sidebar {
+ background-color: {{ . }};
+ }
+
+ .read-more-link a {
+ border-color: {{ . }};
+ }
+
+ footer a,
+ .content a,
+ .related-posts li a:hover {
+ color: {{ . }};
+ }
+</style>
+{{ end }}