forked from Bunteshaus/bunteshaus.de
small fixes
This commit is contained in:
parent
18ad44e5e2
commit
9fdd7448e9
|
@ -118,7 +118,7 @@ article {
|
|||
}
|
||||
|
||||
#articletext img {
|
||||
margin: 1.5rem 1.5rem 3rem 2rem;
|
||||
|
||||
border-radius: 15px;
|
||||
width: 80%;
|
||||
}
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
{{- if strings.HasPrefix .Destination "http" -}}
|
||||
<img loading="lazy"
|
||||
src="{{ .Destination | safeURL }}"
|
||||
alt="{{ .Text }}"
|
||||
{{ with .Title}} title="{{ . }}"{{ end }} />
|
||||
<a href="{{- .Destination -}}">
|
||||
<img loading="lazy"
|
||||
src="{{ .Destination | safeURL }}"
|
||||
alt="{{ .Text }}"
|
||||
{{ with .Title}} title="{{ . }}"{{ end }} />
|
||||
<div style="display: flex; justify-content: center;">{{ .Text }}</div>
|
||||
</a>
|
||||
{{- else -}}
|
||||
{{ if .Page.Resources.ByType "image" }}
|
||||
{{ $nr := .Destination }}
|
||||
{{- $pic := index (.Page.Resources.ByType "image") (int $nr) -}}
|
||||
{{- $image := .Page.Resources.GetMatch (printf "%s" ($pic | safeURL)) -}}
|
||||
<div>
|
||||
<a href="{{- $image.Permalink -}}">
|
||||
{{- $permalink := "" -}}
|
||||
|
||||
|
@ -18,12 +22,14 @@
|
|||
{{- $permalink = (printf "/%s" (.Destination | safeURL)) -}}
|
||||
{{- end -}}
|
||||
|
||||
<img loading="lazy"
|
||||
src="{{ $permalink }}"
|
||||
alt="{{ .Text }}"
|
||||
{{ with .Title}} title="{{ . }}"{{ end }}
|
||||
width={{ $image.Width }}
|
||||
height="{{ $image.Height }}" />
|
||||
<div style="display: flex; justify-content: center;"><img loading="lazy"
|
||||
src="{{ $permalink }}"
|
||||
alt="{{ .Text }}"
|
||||
{{ with .Title}} title="{{ . }}"{{ end }}
|
||||
width={{ $image.Width }}
|
||||
height="{{ $image.Height }}" /></div>
|
||||
<div style="display: flex; justify-content: center;">{{ .Text }}</div>
|
||||
</a>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{- end -}}
|
||||
|
|
Loading…
Reference in New Issue
Block a user