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 | |
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')
29 files changed, 394 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 }} diff --git a/generators/hugo/themes/tdro/layouts/partials/article-image.html b/generators/hugo/themes/tdro/layouts/partials/article-image.html new file mode 100644 index 0000000..7d2e599 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/partials/article-image.html @@ -0,0 +1 @@ +{{ replaceRE "posts|projects|post|project" "/images/thumbnails" (trim .Permalink "/") }}{{ print ".png" -}} diff --git a/generators/hugo/themes/tdro/layouts/partials/footer.html b/generators/hugo/themes/tdro/layouts/partials/footer.html new file mode 100644 index 0000000..a39bf67 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/partials/footer.html @@ -0,0 +1,4 @@ +{{ safeHTML "<?php require $_SERVER['DOCUMENT_ROOT'] . '/..' . '/app/views/partials/footer.php'; ?>" }} + + </body> +</html> diff --git a/generators/hugo/themes/tdro/layouts/partials/head.html b/generators/hugo/themes/tdro/layouts/partials/head.html new file mode 100644 index 0000000..956e6ac --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/partials/head.html @@ -0,0 +1,30 @@ + +<!-- HTML Meta Tags --> +<title>{{ partial "title.html" . -}}</title> +<meta name="description" content="{{ if .Params.summary }}{{ .Params.summary }}{{ else }}{{ .Summary }}{{ end }}"> +<meta name="keywords" content="{{ partial "title.html" . -}}"> +<meta name="author" content="Thedro Neely"> + +<meta charset="utf-8"> +<meta name="robots" content="index,follow"> +<meta name="viewport" content="width=device-width, initial-scale=1"> + +<!-- Search Engine Tags --> +<meta itemprop="name" content="{{ partial "title.html" . -}}"> +<meta itemprop="description" content="{{ if .Params.summary }}{{ .Params.summary }}{{ else }}{{ .Summary }}{{ end }}"> +<meta itemprop="image" content="{{ partial "article-image.html" . -}}"> + +<!-- Open Graph Meta Tags --> +<meta property="og:title" content="{{ partial "title.html" . -}}"> +<meta property="og:description" content="{{ if .Params.summary }}{{ .Params.summary }}{{ else }}{{ .Summary }}{{ end }}"> +<meta property="og:url" content="{{ .Permalink }}"> +<meta property="og:image" content="{{ partial "article-image.html" . -}}"> +<meta property="og:type" content="website"> + +<!-- Twitter Meta Tags --> +<meta name="twitter:card" content="summary_large_image"> +<meta name="twitter:title" content="{{ partial "title.html" . -}}"> +<meta name="twitter:description" content="{{ if .Params.summary }}{{ .Params.summary }}{{ else }}{{ .Summary }}{{ end }}"> +<meta name="twitter:image" content="{{ partial "article-image.html" . -}}"> + +{{ safeHTML "<?php require $_SERVER['DOCUMENT_ROOT'] . '/..' . '/app/views/partials/header.posts.php'; ?>" }} diff --git a/generators/hugo/themes/tdro/layouts/partials/nav.html b/generators/hugo/themes/tdro/layouts/partials/nav.html new file mode 100644 index 0000000..1b1829c --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/partials/nav.html @@ -0,0 +1 @@ +{{ safeHTML "<?php require $_SERVER['DOCUMENT_ROOT'] . '/..' . '/app/views/partials/navigator.php'; ?>" }} diff --git a/generators/hugo/themes/tdro/layouts/partials/page-categories.html b/generators/hugo/themes/tdro/layouts/partials/page-categories.html new file mode 100644 index 0000000..efd6cb7 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/partials/page-categories.html @@ -0,0 +1,2 @@ +{{- range $i, $value := sort . -}}{{ if $i }}, {{ end -}} +<a href="{{ "categories/" | absLangURL }}{{ $value | urlize }}/">{{ $value }}</a>{{- end -}} diff --git a/generators/hugo/themes/tdro/layouts/partials/page-date.html b/generators/hugo/themes/tdro/layouts/partials/page-date.html new file mode 100644 index 0000000..e53e222 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/partials/page-date.html @@ -0,0 +1,5 @@ +{{ if .Params.date }} +<time datetime="{{ dateFormat "2006-01-02" .Params.date }}">{{ dateFormat "2 January 2006" .Params.date }}</time> +{{else}} +<time datetime="{{ .Date.Format "2006-01-02"}}">{{ .Date.Format "2 January 2006" }}</time> +{{- end -}} diff --git a/generators/hugo/themes/tdro/layouts/partials/page-meta.html b/generators/hugo/themes/tdro/layouts/partials/page-meta.html new file mode 100644 index 0000000..ea189ba --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/partials/page-meta.html @@ -0,0 +1,11 @@ +{{- if eq .Type "posts" -}} + {{ partial "page-date.html" . -}} + {{- with .Params.categories }} in {{ partial "page-categories.html" . }}{{ end }} + {{- with .Params.tags }}· {{ partial "page-tags.html" . }}{{ end }} +{{- end -}} + +{{- if eq .Type "projects" -}} + {{ partial "page-date.html" . -}} + {{- with .Params.categories }} in {{ partial "page-categories.html" . }}{{ end }} + {{- with .Params.tags }}· {{ partial "page-tags.html" . }}{{ end }} +{{- end -}} diff --git a/generators/hugo/themes/tdro/layouts/partials/page-status.html b/generators/hugo/themes/tdro/layouts/partials/page-status.html new file mode 100644 index 0000000..f6f46db --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/partials/page-status.html @@ -0,0 +1 @@ +{{ if .Draft }}<span>·<strong class="has-text-danger"> DRAFT</strong></span>{{end}} diff --git a/generators/hugo/themes/tdro/layouts/partials/page-tags.html b/generators/hugo/themes/tdro/layouts/partials/page-tags.html new file mode 100644 index 0000000..b2721a8 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/partials/page-tags.html @@ -0,0 +1,2 @@ +{{- range $i, $value := sort . }}{{ if $i }} {{ end }} +<a class="page__tags" href="{{ "tags/" | absLangURL }}{{ $value | urlize }}/">{{ $value }}</a>{{ end }} diff --git a/generators/hugo/themes/tdro/layouts/partials/pagination.html b/generators/hugo/themes/tdro/layouts/partials/pagination.html new file mode 100644 index 0000000..daaed8f --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/partials/pagination.html @@ -0,0 +1,53 @@ +{{ $HugoPaginator := $.Paginator }} +{{ $Pages := sub $HugoPaginator.TotalNumberOfElements 1 }} +{{ $MyPaginator := math.Ceil (div (float $Pages) 3) }} + +{{ if gt $HugoPaginator.TotalPages 1 }} + +<nav class="pagination" aria-label="pagination"> + + <a href="{{ if $HugoPaginator.HasPrev }}{{ $HugoPaginator.Prev.URL }}{{ end }}" class="pagination-previous" + aria-label="Previous page" {{ if not $HugoPaginator.HasPrev }}disabled aria-hidden="true"{{ end }}> + Previous + </a> + + <a href="{{ if not (le (int $MyPaginator) $HugoPaginator.PageNumber) }}{{ if $HugoPaginator.HasNext }}{{ $HugoPaginator.Next.URL }}{{ end }}{{ end }}" class="pagination-next" + aria-label="Next page" {{ if le (int $MyPaginator) $HugoPaginator.PageNumber }}disabled aria-hidden="true"{{ end }}> + Next + </a> + + <ul class="pagination-list"> + + {{ $.Scratch.Set "__paginator.ellipsed" false }} + {{ range (first $MyPaginator $HugoPaginator.Pagers) }} + {{ $right := sub .TotalPages .PageNumber }} + {{ $showNumber := or (le .PageNumber 3) (eq $right 0) }} + {{ $showNumber := or $showNumber (and (gt .PageNumber (sub $HugoPaginator.PageNumber 2)) (lt .PageNumber (add $HugoPaginator.PageNumber 2))) }} + + {{ if $showNumber }} + {{ $.Scratch.Set "__paginator.ellipsed" false }} + {{ $.Scratch.Set "__paginator.shouldEllipse" false }} + {{ else }} + {{ $.Scratch.Set "__paginator.shouldEllipse" (not ($.Scratch.Get "__paginator.ellipsed") ) }} + {{ $.Scratch.Set "__paginator.ellipsed" true }} + {{ end }} + + {{ if $showNumber }} + + <li> + <a href="{{ .URL }}" aria-label="Go to page {{ .PageNumber }}" + class="pagination-link {{ if eq . $HugoPaginator }}is-current{{ end }}"> + {{ .PageNumber }} + </a> + </li> + + {{ else if ($.Scratch.Get "__paginator.shouldEllipse") }} + + <li><span class="pagination-ellipsis" aria-hidden="true">…</span></li> + + {{ end }} + + {{ end }} + </ul> +</nav> +{{ end }} diff --git a/generators/hugo/themes/tdro/layouts/partials/read-time.html b/generators/hugo/themes/tdro/layouts/partials/read-time.html new file mode 100644 index 0000000..128bc56 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/partials/read-time.html @@ -0,0 +1,6 @@ +{{ $minutes := div .WordCount 150 }} +{{ if lt $minutes 1 }} + less than 1 min read +{{ else }} + {{ $minutes }} min read +{{ end }} diff --git a/generators/hugo/themes/tdro/layouts/partials/title.html b/generators/hugo/themes/tdro/layouts/partials/title.html new file mode 100644 index 0000000..874d944 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/partials/title.html @@ -0,0 +1,2 @@ +{{ with .Title }}{{ . }}{{ end }} +{{- with $.Site.Title }} - {{ . }}{{ end -}} diff --git a/generators/hugo/themes/tdro/layouts/robots.txt b/generators/hugo/themes/tdro/layouts/robots.txt new file mode 100644 index 0000000..8afbb22 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/robots.txt @@ -0,0 +1,4 @@ +User-agent: * +Allow: / + +Sitemap: {{.Site.BaseURL}}sitemap.xml diff --git a/generators/hugo/themes/tdro/layouts/rss.xml b/generators/hugo/themes/tdro/layouts/rss.xml new file mode 100644 index 0000000..bcf8941 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/rss.xml @@ -0,0 +1,27 @@ + +<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> + <channel> + <title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title> + <link>{{ .Permalink }}</link> + <description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description> + <generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }} + <language>{{.}}</language>{{end}}{{ with .Site.Author.email }} + <managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }} + <webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }} + <copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }} + <lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }} + {{ with .OutputFormats.Get "RSS" }} + {{ printf "<atom:link href=%q rel=\"self\" type=%q />" .Permalink .MediaType | safeHTML }} + {{ end }} + {{ range .Pages }} + <item> + <title>{{ .Title }}</title> + <link>{{ .Permalink }}</link> + <pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate> + {{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}} + <guid>{{ .Permalink }}</guid> + <description>{{ .Content | html }}</description> + </item> + {{ end }} + </channel> +</rss> diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/footer.html b/generators/hugo/themes/tdro/layouts/shortcodes/footer.html new file mode 100644 index 0000000..96eb385 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/shortcodes/footer.html @@ -0,0 +1 @@ +<footer class="serif">{{ .Inner }}</footer> diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/image.html b/generators/hugo/themes/tdro/layouts/shortcodes/image.html new file mode 100644 index 0000000..cc2ce0b --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/shortcodes/image.html @@ -0,0 +1,13 @@ +{{ safeHTML "<?php" }} +$width = '"' . getimagesize($_SERVER['DOCUMENT_ROOT'] . '{{.Get `source`}}')[0] . '"'; +$height = '"' . getimagesize($_SERVER['DOCUMENT_ROOT'] . '{{.Get `source`}}')[1] . '"'; +{{ safeHTML "?>" }} + +<figure> + <a href="{{.Get `source`}}" onclick="return false;"> + <img data-image-zoom src="{{.Get `source`}}" alt="{{.Get `title`}}" title="{{.Get `title`}}" + {{ safeHTMLAttr "<?php echo 'width=' . $width; ?>" }} + {{ safeHTMLAttr "<?php echo 'height=' . $height; ?>" }} /> + </a> + <figcaption class="has-text-centered has-text-grey-dark">{{ .Inner }}</figcaption> +</figure> diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/marginnote.html b/generators/hugo/themes/tdro/layouts/shortcodes/marginnote.html new file mode 100644 index 0000000..93b0461 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/shortcodes/marginnote.html @@ -0,0 +1,5 @@ +<label for="{{ .Get `mark` }}" class="marginnote-toggle marginnote-mark">{{ .Get `mark` }}</label> +<input type="checkbox" id="{{ .Get `mark` }}" class="marginnote-toggle"> +<span class="serif marginnote {{ .Get `set` }}note"> +{{ .Inner }} +</span> diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/mathjax.html b/generators/hugo/themes/tdro/layouts/shortcodes/mathjax.html new file mode 100644 index 0000000..031faa0 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/shortcodes/mathjax.html @@ -0,0 +1,2 @@ + +<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML" integrity="sha384-3lJUsx1TJHt7BA4udB5KPnDrlkO8T6J6v/op7ui0BbCjvZ9WqV4Xm6DTP6kQ/iBH" crossorigin="anonymous" async></script> diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/sidenote.html b/generators/hugo/themes/tdro/layouts/shortcodes/sidenote.html new file mode 100644 index 0000000..5a5dbed --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/shortcodes/sidenote.html @@ -0,0 +1,5 @@ +<label for="{{ .Get `mark` }}" class="sidenote-toggle sidenote-mark">{{ .Get `mark` }}</label> +<input type="checkbox" id="{{ .Get `mark` }}" class="sidenote-toggle"> +<span class="serif sidenote {{ .Get `set` }}note"> +{{ .Inner }} +</span> diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/smallcaps.html b/generators/hugo/themes/tdro/layouts/shortcodes/smallcaps.html new file mode 100644 index 0000000..31c4c34 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/shortcodes/smallcaps.html @@ -0,0 +1 @@ +<span class="is-small-caps">{{ .Get `set` }}</span> diff --git a/generators/hugo/themes/tdro/layouts/shortcodes/video.html b/generators/hugo/themes/tdro/layouts/shortcodes/video.html new file mode 100644 index 0000000..9cf9b3a --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/shortcodes/video.html @@ -0,0 +1,6 @@ +<div class="video has-text-centered"> + <video width="{{ .Get `width` }}" height="{{ .Get `height`}}" controls {{ .Get `options` | safeHTMLAttr }}> + <source src="{{ .Get `source` }}" type="video/mp4"> + Your browser does not support the video tag. + </video> +</div> |