setto.basspistol.com/layouts/_default/index.html
2026-01-29 21:20:57 +01:00

52 lines
963 B
HTML

{{ define "navigation" }}
{{ end }}
{{ define "hero" }}
{{ end }}
{{ define "main" }}
{{ $pictures := .Site.Data.pictures }}
{{ range $item := $pictures }}
<div style="border: 3px solid red; padding: 20px; margin: 20px 0;">
<!-- Always show kind -->
<h2>{{ $item.content }}</h2>
<!-- Always show content if it exists -->
{{ range $tag := $item.tags }}
{{ if eq (index $tag 0) "imeta" }}
<div style="border: 1px solid blue; margin: 5px; padding: 5px;">
<!-- Extract URL -->
{{ $imetaText := index $tag 1 }}
{{ $words := split $imetaText " " }}
{{ range $word := $words }}
{{ if hasPrefix $word "http" }}
<img src="{{ $word }}" width="200">
{{ end }}
{{ end }}
</div>
{{ end }}
{{ end }}
</div>
{{ end }}
<pre>{{ debug.Dump $pictures }}</pre>
{{ end }}
{{ define "footer"}}
{{ end }}