Compare commits
No commits in common. "d35fec4c78101c4303b85f7b99fb6e5c251387da" and "4e4e64d5b269990d7fb617b593c8ceec28f7ea94" have entirely different histories.
d35fec4c78
...
4e4e64d5b2
2 changed files with 10 additions and 21 deletions
|
@ -1,27 +1,16 @@
|
||||||
{{ $img := $.Page.Resources.GetMatch (.Get "src")}}
|
{{ $img := $.Page.Resources.GetMatch (.Get "src")}}
|
||||||
{{ $name_splitted := split $img.RelPermalink "." }}
|
|
||||||
{{ $name_base := index $name_splitted 0 }}
|
|
||||||
{{ $ext_base := index $name_splitted 1 }}
|
|
||||||
<figure {{ with .Get "class" }} class="{{ . }}"{{ end }}>
|
<figure {{ with .Get "class" }} class="{{ . }}"{{ end }}>
|
||||||
{{ with .Get "link" }}
|
{{ with .Get "link" }}
|
||||||
<a href="{{ . | absURL }}">
|
<a href="{{ . | absURL }}">
|
||||||
{{ else }}
|
|
||||||
<a href="{{ $img.RelPermalink }}">
|
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<picture>
|
|
||||||
{{ if ( in "svg ico gif" $ext_base ) }}
|
|
||||||
<img src="{{ $img.RelPermalink }}"
|
<img src="{{ $img.RelPermalink }}"
|
||||||
{{ with .Get "alt"}} alt="{{ . }}"{{ end }}
|
{{ with .Get "alt"}} alt="{{ . }}"{{ end }}
|
||||||
{{ with .Get "title"}} title="{{ . }}"{{ end }}/>
|
{{ with .Get "title"}} title="{{ . }}"{{ end }}
|
||||||
{{ else }}
|
{{ with .Get "height"}} height="{{ . }}"{{ end }}
|
||||||
<source srcset="{{ $name_base }}.thumb.avif" type="image/avif"/>
|
{{ with .Get "width"}} width="{{ . }}"{{ end }} />
|
||||||
<source srcset="{{ $name_base }}.thumb.webp" type="image/webp"/>
|
{{ with .Get "link" }}
|
||||||
<img src="{{ $name_base }}.thumb.{{ $ext_base }}"
|
|
||||||
{{ with .Get "alt"}} alt="{{ . }}"{{ end }}
|
|
||||||
{{ with .Get "title"}} title="{{ . }}"{{ end }}/>
|
|
||||||
{{ end }}
|
|
||||||
</picture>
|
|
||||||
</a>
|
</a>
|
||||||
|
{{ end }}
|
||||||
{{ if .Get "caption" }}
|
{{ if .Get "caption" }}
|
||||||
<figcaption>
|
<figcaption>
|
||||||
<p>{{ .Get "caption" }}
|
<p>{{ .Get "caption" }}
|
||||||
|
|
|
@ -547,11 +547,11 @@ a:focus {
|
||||||
}
|
}
|
||||||
.article-body figure.half {
|
.article-body figure.half {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 45%;
|
max-width: 50%;
|
||||||
}
|
}
|
||||||
.article-body figure.third {
|
.article-body figure.third {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-width: 30%;
|
max-width: 33.33%;
|
||||||
}
|
}
|
||||||
.article-body figure.logo img {
|
.article-body figure.logo img {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|
Loading…
Reference in a new issue