Skip to content

Commit

Permalink
Use Get instead of GetMatch
Browse files Browse the repository at this point in the history
  • Loading branch information
pindab0ter committed Oct 21, 2023
1 parent 326d89b commit 755b3cd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion layouts/_default/section.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div>
{{ range .Paginator.Pages }}

{{ with .Resources.GetMatch "photo" }}
{{ with (.Resources.Get "photo").Process "webp" }}
<img src="{{ .RelPermalink }}" alt="{{ .Title }}" />
{{ end }}

Expand Down
10 changes: 5 additions & 5 deletions layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{ .Content }}
<article class="-mb-1 flex justify-center bg-beige pb-1">
<div class="max-w-screen-xl lg:mb-24">
{{ with (resources.GetMatch "photos/yuki-basking-bed-ginny-washing-in-bg.jpg").Process "webp" }}
{{ with (resources.Get "photos/yuki-basking-bed-ginny-washing-in-bg.jpg").Process "webp" }}
<img
src="{{ .RelPermalink }}"
alt="Yuki basking in the sun on bed"
Expand Down Expand Up @@ -36,7 +36,7 @@ <h1 class="mb-8 text-start">Over ons</h1>
</div>

<div class="hidden content-center bg-white lg:flex">
{{ with (resources.GetMatch "logo-text.png").Process "webp drawing" }}
{{ with (resources.Get "logo-text.png").Process "webp drawing" }}
<img
src="{{ .RelPermalink }}"
alt="Cattery Hamana"
Expand All @@ -49,7 +49,7 @@ <h1 class="mb-8 text-start">Over ons</h1>
<div class="grid grid-cols-1 lg:grid-cols-3">
<div
class="bg-[position-x:40%] aspect-video bg-cover bg-right lg:aspect-square"
{{ with (resources.GetMatch "photos/yuki-ginny-balcony.png").Process "webp" }}
{{ with (resources.Get "photos/yuki-ginny-balcony.png").Process "webp" }}
style="background-image: url('{{ .RelPermalink }}');
background-position-x: 40%;"
{{ end }}
Expand All @@ -67,7 +67,7 @@ <h1 class="mb-8 text-start">Over ons</h1>

<div
class="aspect-video bg-cover lg:aspect-square"
{{ with (resources.GetMatch "photos/ginny-kitten.jpg").Process "webp" }}
{{ with (resources.Get "photos/ginny-kitten.jpg").Process "webp" }}
style="background-image: url('{{ .RelPermalink }}');"
{{ end }}
>
Expand All @@ -84,7 +84,7 @@ <h1 class="mb-8 text-start">Over ons</h1>

<div
class="aspect-video bg-cover bg-[center_top_50%] lg:aspect-square"
{{ with (resources.GetMatch "photos/yuki-ginny-together-on-bed.jpg").Process "webp" }}
{{ with (resources.Get "photos/yuki-ginny-together-on-bed.jpg").Process "webp" }}
style="background-image: url('{{ .RelPermalink }}');"
{{ end }}
>
Expand Down
2 changes: 1 addition & 1 deletion layouts/kittens/section.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h1 class="mt-0">De kittens van Hamana</h1>
{{ range .Paginator.Pages }}
<div class="flex justify-center">
<div class="flex flex-col">
{{ with .Resources.GetMatch "photo" }}
{{ with .Resources.Get "photo" }}
<img
src="{{ (.Process "webp drawing").RelPermalink }}"
alt="{{ .Title }}"
Expand Down
4 changes: 2 additions & 2 deletions layouts/nieuws/section.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1>Nieuws</h1>
{{ range .Paginator.Pages }}

<div class="bg-white lg:hidden">
{{ with .Resources.GetMatch "photo" }}
{{ with .Resources.Get "photo" }}
<img
src="{{ (.Process "webp").RelPermalink }}"
alt="{{ .Title }}"
Expand Down Expand Up @@ -44,7 +44,7 @@ <h2 class="text-center">
</div>
</div>

{{ with .Resources.GetMatch "photo" }}
{{ with .Resources.Get "photo" }}
<img
src="{{ .RelPermalink }}"
alt="{{ .Title }}"
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/contact-form.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="grid grid-cols-1 bg-white lg:grid-cols-2">
{{ if .showPictureMobile }}
{{ with (resources.GetMatch "photos/yuki-ginny-balcony-looking-outside-together.jpg").Process "webp drawing" }}
{{ with (resources.Get "photos/yuki-ginny-balcony-looking-outside-together.jpg").Process "webp" }}
<div class="mb-16 mt-8 flex content-center bg-white lg:hidden">
<img
src="{{ .RelPermalink }}"
Expand Down Expand Up @@ -87,7 +87,7 @@ <h1 class="mt-0 text-center">Contact</h1>
</div>

<div class="hidden content-center bg-white lg:flex">
{{ with (resources.GetMatch "photos/yuki-ginny-balcony-looking-outside-together.jpg").Process "webp drawing" }}
{{ with (resources.Get "photos/yuki-ginny-balcony-looking-outside-together.jpg").Process "webp" }}
<img
src="{{ .RelPermalink }}"
alt="Yuki and Ginny looking outside from the balcony together"
Expand Down

0 comments on commit 755b3cd

Please sign in to comment.