diff options
Diffstat (limited to 'themes/hugo-pt2021/layouts')
-rw-r--r-- | themes/hugo-pt2021/layouts/404.html | 0 | ||||
-rw-r--r-- | themes/hugo-pt2021/layouts/_default/archive.html | 35 | ||||
-rw-r--r-- | themes/hugo-pt2021/layouts/_default/baseof.html | 10 | ||||
-rw-r--r-- | themes/hugo-pt2021/layouts/_default/blog.html | 43 | ||||
-rw-r--r-- | themes/hugo-pt2021/layouts/_default/list.html | 0 | ||||
-rw-r--r-- | themes/hugo-pt2021/layouts/_default/single.html | 0 | ||||
-rw-r--r-- | themes/hugo-pt2021/layouts/articles/list.html | 31 | ||||
-rw-r--r-- | themes/hugo-pt2021/layouts/articles/single.html | 22 | ||||
-rw-r--r-- | themes/hugo-pt2021/layouts/index.html | 55 | ||||
-rw-r--r-- | themes/hugo-pt2021/layouts/partials/footer.html | 0 | ||||
-rw-r--r-- | themes/hugo-pt2021/layouts/partials/head.html | 12 | ||||
-rw-r--r-- | themes/hugo-pt2021/layouts/partials/header.html | 78 | ||||
-rw-r--r-- | themes/hugo-pt2021/layouts/posts/single.html | 16 |
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'> + © 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 -}} |