Add more links, changes

This commit is contained in:
Joshua Goins 2024-02-19 15:29:36 -05:00
parent e66df967a4
commit 8326ba2b2e
5 changed files with 47 additions and 42 deletions

View file

@ -1,5 +1,6 @@
{
"changes": [
"2024-02-19: Further site improvements, started a FFXIV shrine.",
"2024-01-27: Added new artwork!",
"2023-09-24: Added new Sakura artwork, changed profile pic.",
"2023-09-21: Added some more art to the gallery!",

View file

@ -271,11 +271,10 @@ figure figcaption {
}
.gallery-con {
display: flex;
flex-wrap: wrap;
border: 1px dashed gray;
border-radius: 5px;
background-color: var(--background-tertiary);
padding: 20px;
}
.generic-con {

View file

@ -1,52 +1,55 @@
<div class="gallery-con">
{{ with .Site.GetPage "/art" }}
{{ range .Param "featured" }}
<figure class="gallery-fig">
{{ $filename_without_ext := strings.TrimSuffix (path.Ext .filename) .filename }}
<div style="display: flex; flex-wrap: wrap;">
{{ with .Site.GetPage "/art" }}
{{ range .Param "featured" }}
<figure class="gallery-fig">
{{ $filename_without_ext := strings.TrimSuffix (path.Ext .filename) .filename }}
{{ $month := "1" }}
{{ $year := "1" }}
{{ $month := "1" }}
{{ $year := "1" }}
{{ if .date }}
{{ $split := split .date "-" }}
{{ $month = index $split 1 }}
{{ $year = index $split 0 }}
{{ end }}
{{ if .date }}
{{ $split := split .date "-" }}
{{ $month = index $split 1 }}
{{ $year = index $split 0 }}
{{ end }}
{{ $use_newformat := false }}
{{ if ge (int $year) 2023 }}
{{ $use_newformat = true }}
{{ end }}
{{ $use_newformat := false }}
{{ if ge (int $year) 2023 }}
{{ $use_newformat = true }}
{{ end }}
{{ $path := printf "/art/%s/%s/%s" $year $month $filename_without_ext}}
{{ $path := printf "/art/%s/%s/%s" $year $month $filename_without_ext}}
<a href="{{ $path }}" aria-label="Click to view details {{ $year }}" class="no-decoration">
{{ $title := .title }}
<a href="{{ $path }}" aria-label="Click to view details {{ $year }}" class="no-decoration">
{{ $title := .title }}
{{ if $use_newformat }}
{{ $full := printf "https://images.redstrate.com/thumb/%s.avif" $filename_without_ext }}
{{ $jpeg := printf "https://images.redstrate.com/thumb/%s.jpg" $filename_without_ext }}
{{ if $use_newformat }}
{{ $full := printf "https://images.redstrate.com/thumb/%s.avif" $filename_without_ext }}
{{ $jpeg := printf "https://images.redstrate.com/thumb/%s.jpg" $filename_without_ext }}
<picture>
<source srcset="{{ $full }}" type="image/avif"/>
<img class="gallery-img featured-art" alt="{{ $title }}" src="{{ $jpeg }}">
</picture>
{{ else }}
{{ with resources.Get (printf "art/%s" .filename) }}
{{ $image := .Resize "500x" }}
<img class="gallery-img featured-art" alt="{{ $title }}" width="{{ $image.Width }}" height="{{ $image.Height }}" src="{{ $image.RelPermalink }}">
<picture>
<source srcset="{{ $full }}" type="image/avif"/>
<img class="gallery-img featured-art" alt="{{ $title }}" src="{{ $jpeg }}">
</picture>
{{ else }}
<p>Thumbnail not found!</p>
{{ with resources.Get (printf "art/%s" .filename) }}
{{ $image := .Resize "500x" }}
<img class="gallery-img featured-art" alt="{{ $title }}" width="{{ $image.Width }}" height="{{ $image.Height }}" src="{{ $image.RelPermalink }}">
{{ else }}
<p>Thumbnail not found!</p>
{{ end }}
{{ end }}
{{ end }}
</a>
</a>
<figcaption>
{{ with .title }}
<i>"{{ . }}"</i>
{{ end }}
</figcaption>
</figure>
<figcaption>
{{ with .title }}
<i>"{{ . }}"</i>
{{ end }}
</figcaption>
</figure>
{{ end }}
{{ end }}
{{ end }}
</div>
<a href="/art">View all art</a>
</div>

View file

@ -1,7 +1,7 @@
<div class="generic-con">
<ul style="padding: 0">
{{ $changes := (index site.Data "recent-changes") }}
{{ range $changes.changes }}
{{ range $changes.changes | last 5 }}
<li style="margin-left: 10px; list-style-type: square;">
<p>{{ . }}</p>
</li>

View file

@ -7,4 +7,6 @@
</li>
{{ end }}
</ul>
<a href="/blog">View all blog posts</a>
</div>