aboutsummaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authortdro <tdro@noreply.example.com>2022-05-04 19:16:15 -0400
committertdro <tdro@noreply.example.com>2022-05-04 19:16:15 -0400
commitc27e990f86f3f5c3565ba7a7eb18024a220ee363 (patch)
tree65c06c2bee88ff5dd45ebcdc6b6c6592310a8595 /themes
parentd5e971bbab049fc5afc632041b2f0066d0e56d6c (diff)
downloadcanory-c27e990f86f3f5c3565ba7a7eb18024a220ee363.tar.gz
canory-c27e990f86f3f5c3565ba7a7eb18024a220ee363.tar.bz2
canory-c27e990f86f3f5c3565ba7a7eb18024a220ee363.zip
themes/default/layouts/partials: Set dimensions images
Diffstat (limited to 'themes')
-rw-r--r--themes/default/layouts/partials/author-header.html10
-rw-r--r--themes/default/layouts/partials/author-picture.html10
-rw-r--r--themes/default/layouts/partials/gallery-walk.html2
-rw-r--r--themes/default/layouts/partials/profile-picture.html2
-rw-r--r--themes/default/layouts/partials/profile.html4
5 files changed, 25 insertions, 3 deletions
diff --git a/themes/default/layouts/partials/author-header.html b/themes/default/layouts/partials/author-header.html
new file mode 100644
index 0000000..f987560
--- /dev/null
+++ b/themes/default/layouts/partials/author-header.html
@@ -0,0 +1,10 @@
+{{- $file := "/profile/header.jpg" -}}
+{{- $image := imageConfig (print "content/" (partial "author-media-path.html" .) $file) -}}
+
+<img
+ loading="lazy"
+ width="{{ $image.Width }}"
+ height="{{ $image.Height }}"
+ alt="{{ partial "author-name.html" . }}"
+ src="{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}{{ $file }}"
+/>
diff --git a/themes/default/layouts/partials/author-picture.html b/themes/default/layouts/partials/author-picture.html
new file mode 100644
index 0000000..b8e5489
--- /dev/null
+++ b/themes/default/layouts/partials/author-picture.html
@@ -0,0 +1,10 @@
+{{- $file := "/profile/picture.png" -}}
+{{- $image := imageConfig (print "content/" (partial "author-media-path.html" .) $file) -}}
+
+<img
+ loading="lazy"
+ width="{{ $image.Width }}"
+ height="{{ $image.Height }}"
+ alt="{{ partial "author-name.html" . }}"
+ src="{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}{{ $file }}"
+/>
diff --git a/themes/default/layouts/partials/gallery-walk.html b/themes/default/layouts/partials/gallery-walk.html
index 11eba52..d6d988a 100644
--- a/themes/default/layouts/partials/gallery-walk.html
+++ b/themes/default/layouts/partials/gallery-walk.html
@@ -24,6 +24,8 @@
}}
<img
+ width="100"
+ height="100"
title="{{- .Name }}"
alt="{{- .Name }}"
src="{{ "" | absURL }}/{{- strings.TrimPrefix "content/" (trim $folder "/") }}/{{- .Name }}"
diff --git a/themes/default/layouts/partials/profile-picture.html b/themes/default/layouts/partials/profile-picture.html
index 1c6757e..8e75769 100644
--- a/themes/default/layouts/partials/profile-picture.html
+++ b/themes/default/layouts/partials/profile-picture.html
@@ -3,7 +3,7 @@
<source srcset="{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}/profile/picture.png" type="image/png" />
<source srcset="{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}/profile/picture.jpg" type="image/jpeg" />
<source srcset="{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}/profile/picture.webp" type="image/webp" />
- <img alt="{{ .Title }}" src="{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}/profile/picture.png" />
+ {{ partial "author-picture.html" . }}
</picture>
{{ partial "context-profile.html" . }}
</figure>
diff --git a/themes/default/layouts/partials/profile.html b/themes/default/layouts/partials/profile.html
index 417af56..ee9efe6 100644
--- a/themes/default/layouts/partials/profile.html
+++ b/themes/default/layouts/partials/profile.html
@@ -4,13 +4,13 @@
<micro-header-image>
<picture>
- <img alt="{{ .Title }}" src="{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}/profile/header.jpg" />
+ {{ partial "author-header.html" . }}
</picture>
</micro-header-image>
<micro-header-picture>
<picture>
- <img src="{{ .Site.BaseURL }}/{{ partial "author-media-path.html" . }}/profile/picture.png"/>
+ {{ partial "author-picture.html" . }}
</picture>
</micro-header-picture>