2022-12-27 22:34:31 -05:00
|
|
|
<div class="gallery-con">
|
|
|
|
{{ with .Site.GetPage "/art" }}
|
|
|
|
{{ range .Param "featured" }}
|
|
|
|
<figure class="gallery-fig">
|
|
|
|
{{ $full := resources.Get (printf "art/%s" .filename) }}
|
|
|
|
{{ if $full }}
|
|
|
|
|
|
|
|
{{ $filename_without_ext := strings.TrimSuffix (path.Ext .filename) .filename }}
|
|
|
|
|
|
|
|
{{ $month := 1 }}
|
2023-03-26 13:47:22 -04:00
|
|
|
{{ $year := 1 }}
|
2022-12-27 22:34:31 -05:00
|
|
|
|
|
|
|
{{ if .date }}
|
|
|
|
{{ $split := split .date "-" }}
|
2023-03-26 13:47:22 -04:00
|
|
|
{{ $month = index $split 1 }}
|
|
|
|
{{ $year = index $split 0 }}
|
2022-12-27 22:34:31 -05:00
|
|
|
{{ end }}
|
|
|
|
|
2023-03-26 13:47:22 -04:00
|
|
|
{{ $path := printf "/art/%d/%.2d/%s" (int $year) (int $month) $filename_without_ext}}
|
2022-12-27 22:34:31 -05:00
|
|
|
|
2023-04-03 17:20:42 -04:00
|
|
|
<a href="{{ $path }}" aria-label="Click to view details" class="no-decoration">
|
2022-12-27 22:34:31 -05:00
|
|
|
{{ $title := .title }}
|
2023-02-23 17:57:46 -05:00
|
|
|
{{ with resources.Get (printf "art/%s" .filename) }}
|
2023-03-08 10:34:54 -05:00
|
|
|
{{ $image := .Resize "500x" }}
|
2023-04-17 14:18:02 -04:00
|
|
|
<img class="gallery-img featured-art" alt="{{ $title }}" width="{{ $image.Width }}" height="{{ $image.Height }}" src="{{ $image.RelPermalink }}">
|
2022-12-27 22:34:31 -05:00
|
|
|
{{ else }}
|
|
|
|
<p>Thumbnail not found!</p>
|
|
|
|
{{ end }}
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<figcaption>
|
|
|
|
{{ with .title }}
|
2023-04-13 17:19:53 -04:00
|
|
|
<i>"{{ . }}"</i>
|
2022-12-27 22:34:31 -05:00
|
|
|
{{ end }}
|
|
|
|
</figcaption>
|
|
|
|
|
|
|
|
{{ else }}
|
2023-04-13 17:19:53 -04:00
|
|
|
<em>CANNOT FIND {{ .filename }}</em>
|
2022-12-27 22:34:31 -05:00
|
|
|
{{ end }}
|
|
|
|
</figure>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
</div>
|