diff options
author | Thedro Neely <thedroneely@gmail.com> | 2019-05-17 22:56:00 -0400 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2019-05-17 22:56:00 -0400 |
commit | 51c0cc199f30e195eafbf04e6be09dd8b2561574 (patch) | |
tree | eac3c7950a8855b3f38c1bb9d7744f5a60e2a4f8 /generators/hugo/themes/tdro/layouts/_default | |
parent | 48e0d578c7f65e6a0ab8d293217983ba8bb21c00 (diff) | |
download | thedroneely.com-51c0cc199f30e195eafbf04e6be09dd8b2561574.tar.gz thedroneely.com-51c0cc199f30e195eafbf04e6be09dd8b2561574.tar.bz2 thedroneely.com-51c0cc199f30e195eafbf04e6be09dd8b2561574.zip |
generators/hugo: Add Hugo theme source files
Diffstat (limited to 'generators/hugo/themes/tdro/layouts/_default')
8 files changed, 212 insertions, 0 deletions
diff --git a/generators/hugo/themes/tdro/layouts/_default/archive.html b/generators/hugo/themes/tdro/layouts/_default/archive.html new file mode 100644 index 0000000..237bfbd --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/_default/archive.html @@ -0,0 +1,42 @@ +{{ define "main" }} +<section class="section is-fullheight" itemscope itemtype="https://schema.org/WebPage"> + <div class="container"> + <div class="columns is-centered"> + <div class="column is-7"> + + {{ $type := .Type }} + {{ $.Scratch.Set "count" 1 }} + + {{ range (.Site.RegularPages.GroupByDate "2006") }} + {{ if (gt .Key 2000) }} + + {{ range (where .Pages "Type" $type) }} + {{ if (eq ($.Scratch.Get "count") 1) }} + {{ $.Scratch.Set "count" 0 }} + <h1 class="title is-4 has-text-weight-normal">{{ .Date.Format "2006" }}</h1> + {{ end }} + {{ end }} + + {{ $.Scratch.Set "count" 1 }} + + <ul class="article__list"> + {{ range (where .Pages "Type" $type) }} + {{ if (ne .Params.hidden true) }} + <li> + <span class="has-text-grey-dark">{{ .Date.Format "02 Jan" }}</span> + — <a href="{{ .RelPermalink }}">{{ .Title }}</a> + </li> + {{ end }} + {{ end }} + + </ul> + <br> + + {{ end }} + {{ end }} + + </div> + </div> + </div> +</section> +{{ end }} diff --git a/generators/hugo/themes/tdro/layouts/_default/baseof.html b/generators/hugo/themes/tdro/layouts/_default/baseof.html new file mode 100644 index 0000000..dff50c6 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/_default/baseof.html @@ -0,0 +1,18 @@ +<!DOCTYPE html> +<html class="has-navbar-fixed-top" lang="en-us"> + +<head> + +{{ partial "head.html" . -}} + +</head> + +<body> + +{{ partial "nav.html" . -}} + + {{- block "main" . }} + <p>If you are seeing this, your page content hasn't been created.</p> + {{- end }} + +{{ partial "footer.html" . -}} diff --git a/generators/hugo/themes/tdro/layouts/_default/list.html b/generators/hugo/themes/tdro/layouts/_default/list.html new file mode 100644 index 0000000..fd854f5 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/_default/list.html @@ -0,0 +1,17 @@ +{{ define "main" }} +<section class="section" itemscope itemtype="http://schema.org/AboutPage"> + <div class="container"> + <div class="columns is-centered"> + <div class="column is-7"> + <article class="content"> + <h1 class="title">{{ .Title }}</h1> + {{ range .Paginator.Pages }} + {{ .Render "summary" }} + {{ end }} + </article> + {{ partial "pagination.html" . }} + </div> + </div> + </div> +</section> +{{ end }} diff --git a/generators/hugo/themes/tdro/layouts/_default/section.html b/generators/hugo/themes/tdro/layouts/_default/section.html new file mode 100644 index 0000000..ca0bb22 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/_default/section.html @@ -0,0 +1,29 @@ +{{ define "main" }} +<section class="section is-fullheight" itemscope itemtype="https://schema.org/AboutPage"> + <div class="container"> + <div class="columns is-centered"> + <div class="column is-7"> + <article class="content"> + <br> + <span class="marginnote rightnote"> + See an archive of all {{ .Type }} <a class="underline" href="/{{ .Type }}/archive/">here.</a> + </span> + <recent-article> + {{ range where .Paginator.Pages ".Params.hidden" "ne" "true" }} + {{ .Render "summary" }} + {{ end }} + </recent-article> + </article> + {{ partial "pagination.html" . }} + <br> + <a href="/{{ .Type }}/archive/" class="front__more is-block has-text-centered"> + Archive of all {{ .Type }} + <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> + <polyline points="9 18 15 12 9 6"></polyline> + </svg> + </a> + </div> + </div> + </div> +</section> +{{ end }} diff --git a/generators/hugo/themes/tdro/layouts/_default/single.html b/generators/hugo/themes/tdro/layouts/_default/single.html new file mode 100644 index 0000000..36d0959 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/_default/single.html @@ -0,0 +1,46 @@ +{{ define "main" }} +<section class="section is-fullheight" itemscope itemtype="https://schema.org/WebPage"> + <div class="container"> + <div class="columns is-centered"> + <div class="column is-7"> + <article class="content document"> + <h1 class="title serif">{{ .Title }}</h1> + + <p class="subtitle is-6 has-text-grey-dark"> + {{- partial "page-meta.html" . -}} + <br> + <script>document.write('<a href="#isso-thread">Comments</a> ·');</script> {{- partial "read-time.html" . -}} · {{ .FuzzyWordCount }} words + </p> + + {{- partial "page-status.html" . -}} + + {{- .Content | replaceRE "<p>" "<p class=\"serif is-size-serif\">" | replaceRE "<h2" "<h2 class=\"serif\"" | replaceRE "<h3" "<h3 class=\"serif\"" | safeHTML }} + + <div class="has-text-right"> + <p class="article__updated has-text-grey-dark is-inline-block"> + Updated + {{ if .Params.updated }} + {{ dateFormat "2 January 2006" .Params.updated }} + {{ else }} + {{ dateFormat "2 January 2006" .Params.date }} + {{ end }} + </p> + </div> + + <script>document.write('<h3 id="comments">Comments</h3>');</script> + + </article> + + {{ if .Params.syntax }} + <link rel="stylesheet" href="/css/syntax-highlight.css"> + {{ end }} + + <script data-isso="/isso/" data-isso-css="false" src="/isso/js/embed.min.js"></script> + + <section id="isso-thread" data-title="{{ .Title }}"></section> + + </div> + </div> + </div> +</section> +{{ end }} diff --git a/generators/hugo/themes/tdro/layouts/_default/subsection.html b/generators/hugo/themes/tdro/layouts/_default/subsection.html new file mode 100644 index 0000000..3db0ca4 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/_default/subsection.html @@ -0,0 +1,15 @@ +{{ define "main" }} +<section class="section is-fullheight" itemscope itemtype="https://schema.org/WebPage"> + <div class="container"> + <div class="columns is-centered"> + <div class="column is-7"> + <article class="content"> + <h1 class="title is-3">{{ .Title }}</h1> + {{- partial "page-status.html" . -}} + {{- .Content | replaceRE "<p>" "<p class=\"\">" | safeHTML }} + </article> + </div> + </div> + </div> +</section> +{{ end }} diff --git a/generators/hugo/themes/tdro/layouts/_default/summary.html b/generators/hugo/themes/tdro/layouts/_default/summary.html new file mode 100644 index 0000000..1a084da --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/_default/summary.html @@ -0,0 +1,27 @@ +<div class="columns is-mobile"> + + <div class="column is-5 has-text-centered"> + <a href="{{ .Permalink }}"> + <img class="image__thumbnail" alt="{{ .Title }}" src="{{ partial "article-image.html" . }}"> + </a> + </div> + + <div class="column is-7"> + <article> + <header class="post-header"> + + <h2 class="article__title title is-5 has-text-weight-bold"> + <a href="{{ .Permalink }}" title="{{ .Title }}">{{ .Title }}</a> + </h2> + + <p class="article__date subtitle is-6"> + {{ partial "page-date.html" . }}{{ partial "page-status.html" .}} · {{ partial "read-time.html" .}} </p> + </header> + <p class="article__summary">{{ if .Params.summary }}{{ .Params.summary }}{{ else }}{{ .Summary }}{{ end }}</p> + <a class="underline" href='{{ .Permalink }}'>Continue reading ({{ .FuzzyWordCount }} words)</a> + </article> + </div> + +</div> + +<hr class="article__divider"> diff --git a/generators/hugo/themes/tdro/layouts/_default/taxonomy.html b/generators/hugo/themes/tdro/layouts/_default/taxonomy.html new file mode 100644 index 0000000..de57250 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/_default/taxonomy.html @@ -0,0 +1,18 @@ +{{ define "main" }} +{{- if $.Site.Params.debug }}<p class="has-text-danger">DEBUG: layouts/_default/taxonomy.html</p>{{ end -}} +<section class="section is-fullheight" itemscope itemtype="http://schema.org/AboutPage"> + <div class="container"> + <div class="columns is-centered"> + <div class="column is-7"> + <article class="content"> + <h1 class="title">{{ .Data.Singular | title }}: {{ .Title }}</h1> + {{ range .Paginator.Pages }} + {{ .Render "summary" }} + {{ end }} + </article> + {{ partial "pagination.html" . }} + </div> + </div> + </div> +</section> +{{ end }} |