summaryrefslogtreecommitdiff
path: root/layouts/shortcodes
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/shortcodes')
-rw-r--r--layouts/shortcodes/img-center.html17
-rw-r--r--layouts/shortcodes/youtube.html14
2 files changed, 14 insertions, 17 deletions
diff --git a/layouts/shortcodes/img-center.html b/layouts/shortcodes/img-center.html
index c247cc6..e3e3a4b 100644
--- a/layouts/shortcodes/img-center.html
+++ b/layouts/shortcodes/img-center.html
@@ -5,24 +5,23 @@
{{- $source := .Get 2 }}
{{- $img1x := $img.Resize "450x webp q90"}}
{{- $img2x := $img.Resize "900x webp q90"}}
-<center>
<figure>
<img
class="center"
alt="{{ $caption }}"
src="{{ $img1x.RelPermalink }}"
srcset="
- {{ $img1x.RelPermalink }} 1x,
- {{ $img2x.RelPermalink }} 2x,
- "
+ {{ $img1x.RelPermalink }} 1x,
+ {{ $img2x.RelPermalink }} 2x
+ "
width="{{ $img1x.Width }}"
- height="{{ $img1x.Height }}">
- <figcaption>
+ height="{{ $img1x.Height }}"
+ >
+ <figcaption>
{{ $caption }}
{{- if $source }}
- <a href="{{ $source }}" target="_blank" title="source">[source]</a>
+ <a href="{{ $source }}" target="_blank" title="source">[source]</a>
{{ end }}
- </figcaption>
+ </figcaption>
</figure>
-</center>
diff --git a/layouts/shortcodes/youtube.html b/layouts/shortcodes/youtube.html
index c29eed1..7e175c5 100644
--- a/layouts/shortcodes/youtube.html
+++ b/layouts/shortcodes/youtube.html
@@ -5,20 +5,18 @@
{{- $img1x := $img.Resize "x300 webp q90" }}
{{- $img2x := $img.Resize "x600 webp q90" }}
-<center>
+<figure>
<a href="https://www.youtube.com/watch?v={{$id}}" target="_blank">
<img
class="center"
src="{{ $img1x.Permalink }}"
srcset="
- {{ $img1x.RelPermalink }} 1x,
- {{ $img2x.RelPermalink }} 2x,
- "
+ {{ $img1x.RelPermalink }} 1x,
+ {{ $img2x.RelPermalink }} 2x
+ "
width="{{ $img1x.Width }}"
height="{{ $img1x.Height }}"
alt="{{$title}} on Youtube"
- width="{{$img.Width}}"
- height="{{$img.Height}}"
- />
+ >
</a>
-</center>
+</figure>