diff options
author | Thedro Neely <thedroneely@gmail.com> | 2021-05-30 00:04:57 -0400 |
---|---|---|
committer | Thedro Neely <thedroneely@gmail.com> | 2021-06-01 02:48:34 -0400 |
commit | f9bac24c040e22c1ba5c05386760810a193b6d66 (patch) | |
tree | 8c76d6e3fc876bb9e5dab86eabaec46f8e70c653 /generators/hugo/themes/tdro/layouts/partials | |
parent | bf11a9885d18b94002929a4ff2e6cb89d18a1593 (diff) | |
download | thedroneely.com-f9bac24c040e22c1ba5c05386760810a193b6d66.tar.gz thedroneely.com-f9bac24c040e22c1ba5c05386760810a193b6d66.tar.bz2 thedroneely.com-f9bac24c040e22c1ba5c05386760810a193b6d66.zip |
generators/hugo/themes/layouts: Add Abstracts
Diffstat (limited to 'generators/hugo/themes/tdro/layouts/partials')
3 files changed, 22 insertions, 11 deletions
diff --git a/generators/hugo/themes/tdro/layouts/partials/archive-link.html b/generators/hugo/themes/tdro/layouts/partials/archive-link.html new file mode 100644 index 0000000..8b08ba3 --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/partials/archive-link.html @@ -0,0 +1,2 @@ +/archives/{{ .Type }}/ +{{- /* Strip newline. */ -}} diff --git a/generators/hugo/themes/tdro/layouts/partials/page-meta.html b/generators/hugo/themes/tdro/layouts/partials/page-meta.html index c2a15c6..44cc4fb 100644 --- a/generators/hugo/themes/tdro/layouts/partials/page-meta.html +++ b/generators/hugo/themes/tdro/layouts/partials/page-meta.html @@ -1,11 +1,3 @@ -{{- 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 -}} +{{ partial "page-date.html" . -}} +{{- with .Params.categories }} in {{ partial "page-categories.html" . }}{{ end }} +{{- with .Params.tags }} {{ partial "page-tags.html" . }}{{ end }} diff --git a/generators/hugo/themes/tdro/layouts/partials/thumbnail-image.html b/generators/hugo/themes/tdro/layouts/partials/thumbnail-image.html new file mode 100644 index 0000000..e4ef3be --- /dev/null +++ b/generators/hugo/themes/tdro/layouts/partials/thumbnail-image.html @@ -0,0 +1,17 @@ +{{ $imageFile := print "public/images/thumbnails/" (partial "article-image.html" .) ".png" }} +{{ if fileExists $imageFile }} +{{ $image := imageConfig $imageFile }} +<a href="{{ .Permalink }}"> + <picture> + <source srcset="/images/thumbnails/{{ partial "article-image.html" . }}.png" type="image/png"> + <source srcset="/images/thumbnails/{{ partial "article-image.html" . }}.jpg" type="image/jpeg"> + <source srcset="/images/thumbnails/{{ partial "article-image.html" . }}.webp" type="image/webp"> + <img class="image__thumbnail" alt="{{ .Title }}" src="/images/thumbnails/{{ partial "article-image.html" . }}.png" height="{{ $image.Height }}" width="{{ $image.Width }}"/> + </picture> +</a> +{{ else }} +{{ $image := imageConfig "public/images/thumbnails/personal-portfolio.png" }} +<a href="{{ .Permalink }}"> + <img class="image__thumbnail" alt="{{ .Title }}" src="/images/thumbnails/personal-portfolio.png" height="{{ $image.Height }}" width="{{ $image.Width }}"/> +</a> +{{ end }} |