aboutsummaryrefslogtreecommitdiff
path: root/themes/hugo-pt2021/layouts
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2021-10-14 12:47:50 -0400
committerPaul Duncan <pabs@pablotron.org>2021-10-14 12:47:50 -0400
commit4b6c0e31385f5f27a151088c0a2b614495c4e589 (patch)
tree12243cdcd00704bc1a9d94ac9cc128459417370c /themes/hugo-pt2021/layouts
downloadpablotron.org-4b6c0e31385f5f27a151088c0a2b614495c4e589.tar.bz2
pablotron.org-4b6c0e31385f5f27a151088c0a2b614495c4e589.zip
initial commit, including theme
Diffstat (limited to 'themes/hugo-pt2021/layouts')
-rw-r--r--themes/hugo-pt2021/layouts/404.html0
-rw-r--r--themes/hugo-pt2021/layouts/_default/archive.html35
-rw-r--r--themes/hugo-pt2021/layouts/_default/baseof.html10
-rw-r--r--themes/hugo-pt2021/layouts/_default/blog.html43
-rw-r--r--themes/hugo-pt2021/layouts/_default/list.html0
-rw-r--r--themes/hugo-pt2021/layouts/_default/single.html0
-rw-r--r--themes/hugo-pt2021/layouts/articles/list.html31
-rw-r--r--themes/hugo-pt2021/layouts/articles/single.html22
-rw-r--r--themes/hugo-pt2021/layouts/index.html55
-rw-r--r--themes/hugo-pt2021/layouts/partials/footer.html0
-rw-r--r--themes/hugo-pt2021/layouts/partials/head.html12
-rw-r--r--themes/hugo-pt2021/layouts/partials/header.html78
-rw-r--r--themes/hugo-pt2021/layouts/posts/single.html16
13 files changed, 302 insertions, 0 deletions
diff --git a/themes/hugo-pt2021/layouts/404.html b/themes/hugo-pt2021/layouts/404.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/themes/hugo-pt2021/layouts/404.html
diff --git a/themes/hugo-pt2021/layouts/_default/archive.html b/themes/hugo-pt2021/layouts/_default/archive.html
new file mode 100644
index 0000000..737fd94
--- /dev/null
+++ b/themes/hugo-pt2021/layouts/_default/archive.html
@@ -0,0 +1,35 @@
+{{- define "title" -}}
+ {{- .Title -}}
+{{- end -}}
+
+{{- define "main" -}}
+ <div class='container'>
+ <div class='section is-small'>
+ <h1 class='title'>
+ {{- .Title -}}
+ </h1><!-- title -->
+
+ <div class='content'>
+ {{- $posts := where .Site.RegularPages "Section" "posts" -}}
+ {{- range $posts.GroupByDate "2006" -}}
+ {{- $head := index .Pages 0 -}}
+ {{- $year := $head.Date.Format "2006" -}}
+ <h2 id='{{$year}}'>{{$year}}</h2>
+ <ul>
+ {{- range .Pages -}}
+ <li>
+ <a
+ href='{{.Permalink}}'
+ title='{{.Title}}'
+ aria-label='{{.Title}}'
+ >
+ {{- .Title -}}
+ </a>
+ </li>
+ {{- end -}}
+ </ul>
+ {{- end -}}
+ </div><!-- content -->
+ </div><!-- section -->
+ </div><!-- container -->
+{{- end -}}
diff --git a/themes/hugo-pt2021/layouts/_default/baseof.html b/themes/hugo-pt2021/layouts/_default/baseof.html
new file mode 100644
index 0000000..ba3c4f8
--- /dev/null
+++ b/themes/hugo-pt2021/layouts/_default/baseof.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html lang='en-US'>
+ {{- partial "head.html" . -}}
+
+ <body>
+ {{- partial "header.html" . -}}
+ {{- block "main" . }}{{- end }}
+ {{- partial "footer.html" . -}}
+ </body>
+</html>
diff --git a/themes/hugo-pt2021/layouts/_default/blog.html b/themes/hugo-pt2021/layouts/_default/blog.html
new file mode 100644
index 0000000..af5affd
--- /dev/null
+++ b/themes/hugo-pt2021/layouts/_default/blog.html
@@ -0,0 +1,43 @@
+{{- define "title" -}}
+ {{- .Title -}}
+{{- end -}}
+
+{{- define "main" -}}
+ <div class='container'>
+ {{- $posts := where .Site.RegularPages "Section" "posts" -}}
+ {{- range first 10 $posts.ByDate.Reverse -}}
+ {{- $date := .Date.Format "January 2, 2006" -}}
+
+ <div class='section is-small'>
+ <h2 class='title'>
+ {{- .Title -}}
+ </h2>
+
+ <h3 class='subtitle'>
+ {{- $date -}}
+
+ <a
+ href='{{.Permalink}}'
+ title='Permanent link to {{.Title}}'
+ aria-label='Permanent link to {{.Title}}'
+ >
+ Link
+ </a>
+ </h3>
+
+ <div class='content'>
+ {{- .Content -}}
+ </div><!-- content -->
+ </div><!-- section -->
+ {{- end -}}
+
+ <a
+ href='/archive/'
+ class='button is-link'
+ title='View archived posts.'
+ aria-label='View archived posts.'
+ >
+ Archived Posts...
+ </a>
+ </div><!-- container -->
+{{- end -}}
diff --git a/themes/hugo-pt2021/layouts/_default/list.html b/themes/hugo-pt2021/layouts/_default/list.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/themes/hugo-pt2021/layouts/_default/list.html
diff --git a/themes/hugo-pt2021/layouts/_default/single.html b/themes/hugo-pt2021/layouts/_default/single.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/themes/hugo-pt2021/layouts/_default/single.html
diff --git a/themes/hugo-pt2021/layouts/articles/list.html b/themes/hugo-pt2021/layouts/articles/list.html
new file mode 100644
index 0000000..8db3f26
--- /dev/null
+++ b/themes/hugo-pt2021/layouts/articles/list.html
@@ -0,0 +1,31 @@
+{{- define "title" -}}
+ Articles
+{{- end -}}
+
+{{- define "main" -}}
+ <div class='container'>
+ <div class='section is-small'>
+ <h1 class='title' title='{{.Title}}' aria-label='{{.Title}}'>
+ Articles
+ </h1>
+
+ <div class='content'>
+ <ul>
+ {{- range .Pages -}}
+ {{- if default true .Params.show -}}
+ <li>
+ <a
+ href='{{.Permalink}}'
+ title='{{.Title}}'
+ aria-label='{{.Title}}'
+ >
+ {{- .Title -}}
+ </a>
+ </li>
+ {{- end -}}
+ {{- end -}}
+ </ul>
+ </div><!-- content -->
+ </div><!-- section -->
+ </div><!-- container -->
+{{- end -}}
diff --git a/themes/hugo-pt2021/layouts/articles/single.html b/themes/hugo-pt2021/layouts/articles/single.html
new file mode 100644
index 0000000..76d5c00
--- /dev/null
+++ b/themes/hugo-pt2021/layouts/articles/single.html
@@ -0,0 +1,22 @@
+{{- define "title" -}}
+ {{.Title}}
+{{- end -}}
+
+{{- define "main" -}}
+ <div class='container'>
+ <div class='section is-small'>
+ <h1 class='title' title='{{.Title}}' aria-label='{{.Title}}'>
+ {{- .Title -}}
+ </h1>
+ {{- if .Date -}}
+ <h2 class='subtitle' title='article date' aria-label='article date'>
+ {{- .Date.Format "January 2, 2006" -}}
+ </h2>
+ {{- end -}}
+
+ <div class='content'>
+ {{- .Content -}}
+ </div><!-- content -->
+ </div><!-- section -->
+ </div><!-- container -->
+{{- end -}}
diff --git a/themes/hugo-pt2021/layouts/index.html b/themes/hugo-pt2021/layouts/index.html
new file mode 100644
index 0000000..259e9d2
--- /dev/null
+++ b/themes/hugo-pt2021/layouts/index.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<html lang='en-US'>
+ {{- partial "head.html" . -}}
+
+ <body>
+ {{- partial "header.html" . -}}
+ {{- block "main" . }}{{- end }}
+
+ <div class='container'>
+ {{- $posts := where .Site.RegularPages "Section" "posts" -}}
+ {{- range first 10 $posts.ByDate.Reverse -}}
+ {{- $date := .Date.Format "January 2, 2006" -}}
+
+ <div class='section is-small'>
+ <a
+ href='{{.Permalink}}'
+ title='Permanent link to {{.Title}}'
+ aria-label='Permanent link to {{.Title}}'
+ >
+ <h2 class='title'>
+ {{- .Title -}}
+ </h2>
+ </a>
+
+ <h3 class='subtitle'>
+ {{- $date -}}
+ </h3>
+
+ <div class='content'>
+ {{- .Content -}}
+ </div><!-- content -->
+ </div><!-- section -->
+ {{- end -}}
+
+ <div class='section is-small'>
+ <a
+ href='/archive/'
+ class='button is-dark'
+ title='View archived posts.'
+ aria-label='View archived posts.'
+ >
+ Archived Posts...
+ </a>
+ </div><!-- section -->
+ </div><!-- container -->
+
+ <footer class='footer'>
+ <div class='container is-black'>
+ <div class='content'>
+ &copy; 1998-{{now.Format "2006"}} Paul Duncan
+ </div><!-- content -->
+ </div><!-- container -->
+ </footer>
+ </body>
+</html>
diff --git a/themes/hugo-pt2021/layouts/partials/footer.html b/themes/hugo-pt2021/layouts/partials/footer.html
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/themes/hugo-pt2021/layouts/partials/footer.html
diff --git a/themes/hugo-pt2021/layouts/partials/head.html b/themes/hugo-pt2021/layouts/partials/head.html
new file mode 100644
index 0000000..409f6ee
--- /dev/null
+++ b/themes/hugo-pt2021/layouts/partials/head.html
@@ -0,0 +1,12 @@
+<head>
+ <meta charset='utf-8'/>
+ <title>
+ {{- block "title" . -}}
+ {{- .Page.Title -}}
+ {{- end -}}
+ </title>
+
+ {{- $options := (dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" true) -}}
+ {{- $style := resources.Get "bulma-0.9.3/bulma.sass" | resources.ToCSS $options | resources.Fingerprint -}}
+ <link rel='stylesheet' type='text/css' href='{{ $style.Permalink }}' integrity='{{ $style.Data.Integrity }}'/>
+</head>
diff --git a/themes/hugo-pt2021/layouts/partials/header.html b/themes/hugo-pt2021/layouts/partials/header.html
new file mode 100644
index 0000000..a1d1246
--- /dev/null
+++ b/themes/hugo-pt2021/layouts/partials/header.html
@@ -0,0 +1,78 @@
+<nav class='navbar is-black' role='navigation' aria-label='main navigation'>
+ <div class='navbar-brand'>
+ <a
+ href='/'
+ class='navbar-item'
+ title='home page'
+ aria-label='home page'
+ >
+ <img src='/logo.svg'
+ width='37'
+ height='28'
+ title='logo'
+ />
+ </a><!-- navbar-item -->
+
+ <a
+ role='button'
+ class='navbar-burger'
+ aria-label='menu'
+ aria-expanded='false'
+ data-target='page-menu'
+ >
+ <span aria-hidden='true'></span>
+ <span aria-hidden='true'></span>
+ <span aria-hidden='true'></span>
+ </a>
+ </div>
+
+ <div id='page-menu' class='navbar-menu'>
+ <div class='navbar-start'>
+ {{- range $.Site.Data.menu.start -}}
+ <a
+ href='{{.href}}'
+ class='navbar-item {{if eq .id $.Params.page_id}}is-active{{end}}'
+ title='{{.help}}'
+ aria-label='{{.help}}'
+ >
+ {{- if .icon -}}
+ <img
+ src='{{.icon}}'
+ width='20'
+ height='20'
+ title='{{.help}}'
+ />
+ {{- end -}}
+
+ {{- if .name -}}
+ {{- .name -}}
+ {{- end -}}
+ </a><!-- navbar-item -->
+ {{- end -}}
+ </div><!-- navbar-start -->
+
+ <div class='navbar-end has-text-white'>
+ {{- range $.Site.Data.menu.end -}}
+ <a
+ href='{{.href}}'
+ class='navbar-item {{if eq .id $.Params.page_id}}is-active{{end}}'
+ title='{{.help}}'
+ aria-label='{{.help}}'
+ >
+ {{- if .icon -}}
+ <img
+ src='{{.icon}}'
+ width='20'
+ height='20'
+ title='{{.help}}'
+ />
+ {{- end -}}
+
+ {{- if .name -}}
+ {{- .name -}}
+ {{- end -}}
+ </a><!-- navbar-item -->
+ {{- end -}}
+ </div><!-- navbar-start -->
+ </div><!-- navbar-menu -->
+</nav><!-- navbar -->
diff --git a/themes/hugo-pt2021/layouts/posts/single.html b/themes/hugo-pt2021/layouts/posts/single.html
new file mode 100644
index 0000000..4c0002f
--- /dev/null
+++ b/themes/hugo-pt2021/layouts/posts/single.html
@@ -0,0 +1,16 @@
+{{- define "title" -}}
+ {{.Title}}
+{{- end -}}
+
+{{- define "main" -}}
+ <div class='container'>
+ <div class='section is-small'>
+ <h1 class='title'>{{.Title}}</h1>
+ <h2 class='subtitle'>{{.Date.Format "January 2, 2006" }}</h2>
+
+ <div class='content'>
+ {{- .Content -}}
+ </div><!-- content -->
+ </div><!-- section -->
+ </div><!-- container -->
+{{- end -}}