forked from Bunteshaus/bunteshaus.de
small fixes
This commit is contained in:
parent
3bec9cb8a7
commit
980d591294
|
@ -0,0 +1 @@
|
|||
|
|
@ -57,19 +57,28 @@
|
|||
{{- if .Content -}}
|
||||
{{- $content -}}
|
||||
{{ end }}
|
||||
{{ if .Resources.ByType "image" }}
|
||||
{{ range .Resources.ByType "image" }}
|
||||
{{ $picname := . }}
|
||||
{{ if not (or (in $content $picname ) (hasPrefix $picname "banner") )}}
|
||||
<a href="{{- $picname.Permalink -}}" class="article_image no_underline">
|
||||
<img loading="lazy"
|
||||
src="{{ .Permalink }}"
|
||||
alt="{{ . }}"
|
||||
{{ with .Title}} title="{{ . }}"{{ end }}
|
||||
width={{ $picname.Width }}
|
||||
height="{{ $picname.Height }}" /><br>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ $ignore := slice (.Page.Resources.GetMatch "banner*") }}
|
||||
{{ $i := .Page.Resources }}
|
||||
{{ $files := complement $ignore $i }}
|
||||
{{ if $files }}
|
||||
<h3>Addendum</h3>
|
||||
{{ range $files }}
|
||||
{{ if not (in $content .) }}
|
||||
{{ if eq .MediaType.MainType "image" }}
|
||||
{{ $picname := . }}
|
||||
<a href="{{- $picname.Permalink -}}" class="no_underline">
|
||||
<img loading="lazy"
|
||||
src="{{ .Permalink }}"
|
||||
alt="{{ . }}"
|
||||
{{ with .Title}} title="{{ . }}"{{ end }}
|
||||
width={{ $picname.Width }}
|
||||
height="{{ $picname.Height }}" /><br>
|
||||
</a>
|
||||
{{ else }}
|
||||
{{ $fname := . }}
|
||||
<div>🗀 <a href="{{ $fname.Permalink }}" class="underline">{{ $fname }}</a></div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue