Fix homepage image sizes, add archive.org bot and more
This commit is contained in:
parent
628c969dfe
commit
83890cf33d
5 changed files with 16 additions and 26 deletions
File diff suppressed because one or more lines are too long
|
@ -4,8 +4,9 @@
|
||||||
|
|
||||||
<div class="gallery-con">
|
<div class="gallery-con">
|
||||||
<div style="display: flex; flex-wrap: wrap;">
|
<div style="display: flex; flex-wrap: wrap;">
|
||||||
{{ with .Site.GetPage "/art" }}
|
{{ $art := .Site.GetPage "/art" }}
|
||||||
{{ range (where (where .RegularPagesRecursive "Type" "art") "Params.slug" "in" $art_config.featured) }}
|
{{ range (where (where $art.RegularPagesRecursive "Type" "art") "Params.slug" "in" $art_config.featured) }}
|
||||||
|
{{ with ($art.GetPage .Params.slug) }}
|
||||||
<figure class="gallery-fig">
|
<figure class="gallery-fig">
|
||||||
{{ $filename_without_ext := .Params.slug }}
|
{{ $filename_without_ext := .Params.slug }}
|
||||||
|
|
||||||
|
@ -18,32 +19,18 @@
|
||||||
{{ $year = index $split 0 }}
|
{{ $year = index $split 0 }}
|
||||||
{{ end }}
|
{{ 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">
|
<a href="{{ $path }}" aria-label="Click to view details {{ $year }}" class="no-decoration">
|
||||||
{{ $title := .Title }}
|
{{ $title := .Title }}
|
||||||
|
|
||||||
{{ if $use_newformat }}
|
|
||||||
{{ $full := printf "%s/thumb/%s.avif" $.Site.Params.image_host $filename_without_ext }}
|
{{ $full := printf "%s/thumb/%s.avif" $.Site.Params.image_host $filename_without_ext }}
|
||||||
{{ $jpeg := printf "%s/thumb/%s.jpg" $.Site.Params.image_host $filename_without_ext }}
|
{{ $jpeg := printf "%s/thumb/%s.jpg" $.Site.Params.image_host $filename_without_ext }}
|
||||||
|
|
||||||
<picture>
|
<picture>
|
||||||
<source srcset="{{ $full }}" type="image/avif"/>
|
<source srcset="{{ $full }}" width="{{ .Params.thumb_width }}" height="{{ .Params.thumb_height }}" type="image/avif"/>
|
||||||
<img class="gallery-img featured-art" alt="{{ $title }}" src="{{ $jpeg }}">
|
<img class="gallery-img featured-art" width="{{ .Params.thumb_width }}" height="{{ .Params.thumb_height }}" alt="{{ $title }}" src="{{ $jpeg }}">
|
||||||
</picture>
|
</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 }}">
|
|
||||||
{{ else }}
|
|
||||||
<p>Thumbnail not found!</p>
|
|
||||||
{{ end }}
|
|
||||||
{{ end }}
|
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<figcaption>
|
<figcaption>
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<area shape="rect" coords="23,3,63,28" href="https://geekring.net/" alt="Geekring">
|
<area shape="rect" coords="23,3,63,28" href="https://geekring.net/" alt="Geekring">
|
||||||
</map>
|
</map>
|
||||||
{{ with resources.Get "geek_2.gif" }}
|
{{ with resources.Get "geek_2.gif" }}
|
||||||
<img usemap="#badge-geekring" src="{{ .RelPermalink }}" alt="The Geekring">
|
<img width="88" height="31" usemap="#badge-geekring" src="{{ .RelPermalink }}" alt="The Geekring">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
{{ range .Site.Menus.main }}
|
{{ range .Site.Menus.main }}
|
||||||
<div class="site-menu">
|
<div class="site-menu">
|
||||||
{{ with resources.Get .Params.img }}
|
{{ with resources.Get .Params.img }}
|
||||||
<img class="symbolic-icon" style="image-rendering: pixelated;" width="16" height="16" src="{{ .RelPermalink }}">
|
<img alt="" class="symbolic-icon" style="image-rendering: pixelated;" width="16" height="16" src="{{ .RelPermalink }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a href="{{ .URL }}">{{ .Name }}{{ if strings.HasPrefix .URL "http" }}<img class="external-link" aria-hidden="true" alt="External link" width="16" height="16" src="{{ $icon.RelPermalink }}">{{- end -}}</a>
|
<a href="{{ .URL }}">{{ .Name }}{{ if strings.HasPrefix .URL "http" }}<img class="external-link" aria-hidden="true" alt="External link" width="16" height="16" src="{{ $icon.RelPermalink }}">{{- end -}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
{{ range .Site.Menus.socials }}
|
{{ range .Site.Menus.socials }}
|
||||||
<div class="site-menu">
|
<div class="site-menu">
|
||||||
{{ with resources.Get .Params.img }}
|
{{ with resources.Get .Params.img }}
|
||||||
<img style="image-rendering: pixelated;" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
|
<img alt="" style="image-rendering: pixelated;" width="{{ .Width }}" height="{{ .Height }}" src="{{ .RelPermalink }}">
|
||||||
{{ end }}
|
{{ end }}
|
||||||
<a rel="me" href="{{ .URL }}">{{ .Name }}{{ if strings.HasPrefix .URL "http" }}<img class="external-link" aria-hidden="true" alt="External link" width="16" height="16" src="{{ $icon.RelPermalink }}">{{- end -}}</a>
|
<a rel="me" href="{{ .URL }}">{{ .Name }}{{ if strings.HasPrefix .URL "http" }}<img class="external-link" aria-hidden="true" alt="External link" width="16" height="16" src="{{ $icon.RelPermalink }}">{{- end -}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -12,6 +12,9 @@ User-agent: DuckDuckBot
|
||||||
User-agent: Synapse
|
User-agent: Synapse
|
||||||
User-agent: Mastodon
|
User-agent: Mastodon
|
||||||
|
|
||||||
|
# Allow archive.org
|
||||||
|
User-agent: archive.org_bot
|
||||||
|
|
||||||
# Non-important pages I don't want indexed or one reason or another
|
# Non-important pages I don't want indexed or one reason or another
|
||||||
Disallow: /shrines/
|
Disallow: /shrines/
|
||||||
Disallow: /layout-archive/
|
Disallow: /layout-archive/
|
||||||
|
|
Loading…
Add table
Reference in a new issue