Add render-image template

This commit is contained in:
Vri 🌈 2023-01-15 01:59:37 +01:00
parent a42000fe63
commit 7c1f5f900f
Signed by: vrifox
GPG key ID: D40098E5B60B2197
3 changed files with 18 additions and 0 deletions

View file

@ -2,6 +2,10 @@
@import "variables"; @import "variables";
@import "main"; @import "main";
// markup
@import "markup/render-image";
// partials // partials
@import "partials/sidebar"; @import "partials/sidebar";
@import "partials/footer"; @import "partials/footer";

View file

@ -0,0 +1,10 @@
.md-img {
margin: 3em;
&.with-text { margin-bottom: .5em; }
&-text {
font-size: .8em;
font-weight: 300;
margin: 0 0 3em 0;
text-align: center;
}
}

View file

@ -0,0 +1,4 @@
<p class="md-img {{ with .Text }}with-text{{ end }}">
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title }} title="{{ . }}"{{ end }} loading="lazy" />
</p>
{{ with .Text }}<p class="md-img-text">{{ . }}</p>{{ end }}