mirror of
https://github.com/yuzu-emu/shared-bulma-theme.git
synced 2024-11-21 22:35:41 +01:00
layouts: use Hugo to process thumbnails
This commit is contained in:
parent
e625f3336e
commit
a94bfba031
@ -3,8 +3,9 @@
|
||||
{{ $rating := index .Site.Data.compatibility .Params.compatibility }}
|
||||
<section class="section content pt-sm">
|
||||
<div class="has-text-centered py-md">
|
||||
{{ if (fileExists (print "static/images/game/boxart/" .File.BaseFileName ".png")) }}
|
||||
<img src="{{ .Site.BaseURL }}/images/game/boxart/{{ .File.BaseFileName }}.png" />
|
||||
{{ $boxart := resources.Get (printf "/images/game/boxart/%s.png" $gameId) }}
|
||||
{{ if $boxart }} {{ $boxart_thumb := $boxart.Fill "328x300" }}
|
||||
<img src="{{ $boxart_thumb.Permalink }}" />
|
||||
{{ else }}
|
||||
<img src="{{ .Site.BaseURL }}/images/boxart.png" />
|
||||
{{ end }}
|
||||
@ -187,8 +188,6 @@
|
||||
<div class="tile is-ancestor">
|
||||
{{ $files := readDir (printf "/static/images/screenshots0/%s/" .File.BaseFileName) }}
|
||||
{{ range $index, $element := $files }}
|
||||
{{ $fileTitle := (index (split .Name "-") 1) }}
|
||||
{{ $fileTitle := (index (split $fileTitle ".") 0) }}
|
||||
<div class="tile is-parent">
|
||||
<div class="tile is-child is-boxed">
|
||||
<a href="/images/screenshots0/{{ $gameId }}/{{ .Name }}">
|
||||
|
@ -13,7 +13,9 @@
|
||||
<div class="tile is-parent">
|
||||
<div class="tile is-child is-boxed">
|
||||
<a href="/images/screenshots/{{ .Name }}" title="{{ $fileTitle }}">
|
||||
<img src="/images/screenshots/thumbs/{{ .Name }}" alt="{{ $fileTitle }}">
|
||||
{{ $screenshot := resources.Get (printf "/images/screenshots/%s" .Name) }}
|
||||
{{ $thumb := $screenshot.Fit "640x360 jpg" }}
|
||||
<img src="{{ $thumb.Permalink }}" alt="{{ $fileTitle }}">
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user