Skip to content

Commit

Permalink
finally very smart and added image resizing to minimize load time
Browse files Browse the repository at this point in the history
  • Loading branch information
dhonus committed Jan 1, 2024
1 parent bc47ee0 commit 70afa02
Show file tree
Hide file tree
Showing 25 changed files with 13 additions and 10 deletions.
Binary file added content/posts/oatmeal/berry/cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed content/posts/oatmeal/berry/cover.webp
Binary file not shown.
Binary file added content/posts/oatmeal/kiwi/cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed content/posts/oatmeal/kiwi/cover.webp
Binary file not shown.
Binary file added content/posts/savory/broccoli-soup/cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed content/posts/savory/broccoli-soup/cover.webp
Binary file not shown.
Binary file added content/posts/savory/cauliflower-curry/cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed content/posts/savory/cauliflower-curry/cover.webp
Binary file not shown.
Binary file added content/posts/savory/farfalle-soup/cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed content/posts/savory/farfalle-soup/cover.webp
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed content/posts/savory/puff-pastry-snails/cover.webp
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added content/posts/sweet/bundt cake/cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed content/posts/sweet/bundt cake/cover.webp
Binary file not shown.
Binary file added content/posts/sweet/cinnamon-rolls/cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed content/posts/sweet/cinnamon-rolls/cover.webp
Binary file not shown.
Binary file added content/posts/sweet/cookies/cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed content/posts/sweet/cookies/cover.webp
Binary file not shown.
Binary file added content/posts/sweet/pancakes/cover.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed content/posts/sweet/pancakes/cover.webp
Binary file not shown.
9 changes: 5 additions & 4 deletions themes/bean/layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ <h2>Recent recipes</h2>
{{ end }}
<div class="vertical"><a href="{{ .RelPermalink }}">
{{ with .Resources }}
{{ with .GetMatch "{cover.*,*.jpg,*.webp,*.png,*.jpeg}" }}

<div class="cover_image"
style="background-image: url({{ .RelPermalink }});"></div>
{{ $image := .GetMatch "{cover.*,*.jpg,*.webp,*.png,*.jpeg}" }}
{{ $image := $image.Process "resize 250x" }}
{{ if $image }}
<div class="cover_image"
style="background-image: url({{ $image.RelPermalink }});"></div>
{{ end }}
{{ end }}
</a>
Expand Down
7 changes: 4 additions & 3 deletions themes/bean/layouts/_default/taxonomy.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ <h1>{{ .Title }}</h1>
{{ end }}
<span><a href="{{ .RelPermalink }}">
{{ with .Resources }}
{{ with .GetMatch "{cover.*,*.jpg,*.webp,*.png,*.jpeg}" }}
<div class="cover_image"
style="background-image: url({{ .RelPermalink }});"></div>
{{ $image := .GetMatch "{cover.*,*.jpg,*.webp,*.png,*.jpeg}" }}
{{ $image := $image.Process "resize 800x" }}
{{ if $image }}
<div class="cover_image" style="background-image: url({{ $image.RelPermalink }});"></div>
{{ end }}
{{ end }}
</a>
Expand Down
7 changes: 4 additions & 3 deletions themes/bean/layouts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ <h2>{{ .Title }}</h2>
{{ end }}
<span><a href="{{ .RelPermalink }}">
{{ with .Resources }}
{{ with .GetMatch "{cover.*,*.jpg,*.webp,*.png,*.jpeg}" }}
<div class="cover_image"
style="background-image: url({{ .RelPermalink }});"></div>
{{ $image := .GetMatch "{cover.*,*.jpg,*.webp,*.png,*.jpeg}" }}
{{ $image := $image.Process "resize 800x" }}
{{ if $image }}
<div class="cover_image" style="background-image: url({{ $image.RelPermalink }});"></div>
{{ end }}
{{ end }}
</a>
Expand Down

0 comments on commit 70afa02

Please sign in to comment.