Add render-image template
This commit is contained in:
parent
a42000fe63
commit
7c1f5f900f
3 changed files with 18 additions and 0 deletions
|
@ -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";
|
||||||
|
|
10
assets/scss/markup/render-image.scss
Normal file
10
assets/scss/markup/render-image.scss
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
4
layouts/_default/_markup/render-image.html
Normal file
4
layouts/_default/_markup/render-image.html
Normal 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 }}
|
Loading…
Reference in a new issue