From 49f746f1ee9205c4028bdc8f18aa888367eb3ddb Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Mon, 29 Apr 2019 00:13:49 +0100 Subject: Initial site layout --- layouts/_default/baseof.html | 11 +++++++++++ layouts/_default/home.html | 4 ++++ layouts/_default/posts.html | 9 +++++++++ layouts/_default/shows.html | 22 ++++++++++++++++++++++ layouts/_default/single.html | 21 +++++++++++++++++++++ layouts/partials/footer.html | 2 ++ layouts/partials/head.html | 11 +++++++++++ layouts/partials/header.html | 1 + layouts/partials/nav.html | 8 ++++++++ layouts/shortcodes/posts/recent.html | 6 ++++++ layouts/shortcodes/shows/recent_episodes.html | 6 ++++++ layouts/shortcodes/youtube/playlist_url.html | 1 + 12 files changed, 102 insertions(+) create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/home.html create mode 100644 layouts/_default/posts.html create mode 100644 layouts/_default/shows.html create mode 100644 layouts/_default/single.html create mode 100644 layouts/partials/footer.html create mode 100644 layouts/partials/head.html create mode 100644 layouts/partials/header.html create mode 100644 layouts/partials/nav.html create mode 100644 layouts/shortcodes/posts/recent.html create mode 100644 layouts/shortcodes/shows/recent_episodes.html create mode 100644 layouts/shortcodes/youtube/playlist_url.html (limited to 'layouts') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..8b980fa --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,11 @@ + + + {{ partial "head.html" . }} + +
{{ partial "header.html" . }}
+ +
{{ block "main" . }}{{ end }}
+ + + + diff --git a/layouts/_default/home.html b/layouts/_default/home.html new file mode 100644 index 0000000..d70be7e --- /dev/null +++ b/layouts/_default/home.html @@ -0,0 +1,4 @@ +{{ define "main" }} + {{ .Content }} +{{ end }} + diff --git a/layouts/_default/posts.html b/layouts/_default/posts.html new file mode 100644 index 0000000..dc0587a --- /dev/null +++ b/layouts/_default/posts.html @@ -0,0 +1,9 @@ +{{ define "main" }} +

I write posts about programming and Linux topics that are of interest to me.

+

Subscribe to the blog by using this RSS link.

+ +{{ end }} diff --git a/layouts/_default/shows.html b/layouts/_default/shows.html new file mode 100644 index 0000000..404ebc3 --- /dev/null +++ b/layouts/_default/shows.html @@ -0,0 +1,22 @@ +{{ define "main" }} + {{ if .Sections }} +

YouTube Shows

+

I make and host YouTube shows about programming and Linux.

+ + {{ else }} +

{{ .Title }}

+

{{ .Params.Summary }}

+

The YouTube playlist can be found here.

+

Subscribe to the show posts by using this RSS link.

+

Episodes

+ + {{ end }} +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..4fc7064 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,21 @@ +{{ define "main" }} +
+

{{ .Title }}

+ {{ .Content }} +
+ {{ if or .NextInSection .PrevInSection }} + + {{ end }} +{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..b7245aa --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,2 @@ +© {{ now.Year }} David T. Sadler. Theme adapted from hugo-theme-terminal. + diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..1114b12 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,11 @@ + +{{ .Title }} · {{ .Site.Title }} + + + + +{{ with .OutputFormats.Get "rss" -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} +{{ end -}} + + diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..0a5998a --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1 @@ +
{{ .Site.Params.Name }}
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html new file mode 100644 index 0000000..17e4e8d --- /dev/null +++ b/layouts/partials/nav.html @@ -0,0 +1,8 @@ + + diff --git a/layouts/shortcodes/posts/recent.html b/layouts/shortcodes/posts/recent.html new file mode 100644 index 0000000..f4b28ca --- /dev/null +++ b/layouts/shortcodes/posts/recent.html @@ -0,0 +1,6 @@ + + diff --git a/layouts/shortcodes/shows/recent_episodes.html b/layouts/shortcodes/shows/recent_episodes.html new file mode 100644 index 0000000..fc01a57 --- /dev/null +++ b/layouts/shortcodes/shows/recent_episodes.html @@ -0,0 +1,6 @@ + + diff --git a/layouts/shortcodes/youtube/playlist_url.html b/layouts/shortcodes/youtube/playlist_url.html new file mode 100644 index 0000000..cfdcf05 --- /dev/null +++ b/layouts/shortcodes/youtube/playlist_url.html @@ -0,0 +1 @@ +https://www.youtube.com/playlist?list={{ .Get 0 }} -- cgit v1.2.3-13-gbd6f