feat: leverage bunny.net transform classes

This commit is contained in:
Cory Dransfeldt 2024-07-02 11:24:38 -07:00
parent 6a6f2d95fe
commit e6e1777296
No known key found for this signature in database
15 changed files with 88 additions and 89 deletions

View file

@ -1,6 +1,6 @@
{ {
"name": "coryd.dev", "name": "coryd.dev",
"version": "19.8.5", "version": "19.9.0",
"description": "The source for my personal site. Built using 11ty.", "description": "The source for my personal site. Built using 11ty.",
"type": "module", "type": "module",
"scripts": { "scripts": {

View file

@ -99,7 +99,6 @@
<link rel="alternate" href="https://feedpress.me/coryd-movies" title="{{ meta.siteName }}'s movies feed" type="application/rss+xml"> <link rel="alternate" href="https://feedpress.me/coryd-movies" title="{{ meta.siteName }}'s movies feed" type="application/rss+xml">
<link rel="alternate" href="https://feedpress.me/coryd-books" title="{{ meta.siteName }}'s books feed" type="application/rss+xml"> <link rel="alternate" href="https://feedpress.me/coryd-books" title="{{ meta.siteName }}'s books feed" type="application/rss+xml">
<link rel="alternate" href="https://feedpress.me/coryd-all" title="{{ meta.siteName }}'s activity feed" type="application/rss+xml"> <link rel="alternate" href="https://feedpress.me/coryd-all" title="{{ meta.siteName }}'s activity feed" type="application/rss+xml">
<link type="text/plain" rel="author" href="/humans.txt" />
<script defer data-domain="coryd.dev" src="/js/script.outbound-links.tagged-events.js"></script> <script defer data-domain="coryd.dev" src="/js/script.outbound-links.tagged-events.js"></script>
<script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script> <script>window.plausible = window.plausible || function() { (window.plausible.q = window.plausible.q || []).push(arguments) }</script>
<script type="application/ld+json"> <script type="application/ld+json">

View file

@ -19,16 +19,16 @@
{% if shape == 'square' %} {% if shape == 'square' %}
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ item.image }}?width=200&h=200&aspect_ratio=1:1 200w, https://cdn.coryd.dev{{ item.image }}?class=squaresm 200w,
https://cdn.coryd.dev{{ item.image }}?width=400&h=400&aspect_ratio=1:1 400w, https://cdn.coryd.dev{{ item.image }}?class=squaremd 400w,
https://cdn.coryd.dev{{ item.image }}?width=800&h=800&aspect_ratio=1:1 800w, https://cdn.coryd.dev{{ item.image }}?class=squarebase 800w,
https://cdn.coryd.dev{{ item.image }}?width=1200&h=1200&aspect_ratio=1:1 1200w https://cdn.coryd.dev{{ item.image }}?class=squarelg 1200w
" "
sizes="(max-width: 450px) 200px, sizes="(max-width: 450px) 200px,
(max-width: 850px) 400px, (max-width: 850px) 400px,
(max-width: 100px) 800px, (max-width: 100px) 800px,
1200px" 1200px"
src="https://cdn.coryd.dev{{ item.image }}?width=1200&h=1200&aspect_ratio=1:1" src="https://cdn.coryd.dev{{ item.image }}?class=squarelg"
alt="{{ alt }}" alt="{{ alt }}"
loading="{{ loadingStrategy }}" loading="{{ loadingStrategy }}"
decoding="async" decoding="async"
@ -38,16 +38,16 @@
{% else %} {% else %}
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ item.image }}?w=200&aspect_ratio=2:3 200w, https://cdn.coryd.dev{{ item.image }}?class=verticalsm 200w,
https://cdn.coryd.dev{{ item.image }}?w=400&aspect_ratio=2:3 400w, https://cdn.coryd.dev{{ item.image }}?class=verticalmd 400w,
https://cdn.coryd.dev{{ item.image }}?w=800&aspect_ratio=2:3 800w, https://cdn.coryd.dev{{ item.image }}?class=verticalbase 800w,
https://cdn.coryd.dev{{ item.image }}?w=1200&aspect_ratio=2:3 1200w https://cdn.coryd.dev{{ item.image }}?class=verticallg 1200w
" "
sizes="(max-width: 450px) 200px, sizes="(max-width: 450px) 200px,
(max-width: 850px) 400px, (max-width: 850px) 400px,
(max-width: 1000px) 800px, (max-width: 1000px) 800px,
1200px" 1200px"
src="https://cdn.coryd.dev{{ item.image }}?w=1200&aspect_ratio=2:3" src="https://cdn.coryd.dev{{ item.image }}?class=verticallg"
alt="{{ alt }}" alt="{{ alt }}"
loading="{{ loadingStrategy }}" loading="{{ loadingStrategy }}"
decoding="async" decoding="async"

View file

@ -25,21 +25,21 @@
{%- endcapture -%} {%- endcapture -%}
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ item.backdrop }}?aspect_ratio=1:.5625&width=256 256w, https://cdn.coryd.dev{{ item.backdrop }}?class=bannersm 256w,
https://cdn.coryd.dev{{ item.backdrop }}?aspect_ratio=1:.5625&width=512 512w, https://cdn.coryd.dev{{ item.backdrop }}?class=bannermd 512w,
https://cdn.coryd.dev{{ item.backdrop }}?aspect_ratio=1:.5625&width=1024 1024w, https://cdn.coryd.dev{{ item.backdrop }}?class=bannerbase 1024w,
https://cdn.coryd.dev{{ item.backdrop }}?aspect_ratio=1:.5625&width=2048 2048w https://cdn.coryd.dev{{ item.backdrop }}?class=bannerlg 2048w
" "
sizes="(max-width: 450px) 256px, sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px, (max-width: 850px) 512px,
(max-width: 1000px) 1024px, (max-width: 1000px) 1024px,
2048px" 2048px"
src="https://cdn.coryd.dev{{ item.backdrop }}?aspect_ratio=1:.5625&width=2048" src="https://cdn.coryd.dev{{ item.backdrop }}?class=bannerlg"
alt="{{ alt }}" alt="{{ alt }}"
loading="{{ loadingStrategy }}" loading="{{ loadingStrategy }}"
decoding="async" decoding="async"
width="256" width="256"
height="144" height="170"
/> />
</div> </div>
</a> </a>

View file

@ -12,21 +12,21 @@
</div> </div>
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ movie.backdrop }}?aspect_ratio=1:.5625&width=256 256w, https://cdn.coryd.dev{{ movie.backdrop }}?class=bannersm 256w,
https://cdn.coryd.dev{{ movie.backdrop }}?aspect_ratio=1:.5625&width=512 512w, https://cdn.coryd.dev{{ movie.backdrop }}?class=bannermd 512w,
https://cdn.coryd.dev{{ movie.backdrop }}?aspect_ratio=1:.5625&width=1024 1024w, https://cdn.coryd.dev{{ movie.backdrop }}?class=bannerbase 1024w,
https://cdn.coryd.dev{{ movie.backdrop }}?aspect_ratio=1:.5625&width=2048 2048w https://cdn.coryd.dev{{ movie.backdrop }}?class=bannerlg 2048w
" "
sizes="(max-width: 450px) 256px, sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px, (max-width: 850px) 512px,
(max-width: 1000px) 1024px, (max-width: 1000px) 1024px,
2048px" 2048px"
src="https://cdn.coryd.dev{{ movie.backdrop }}?aspect_ratio=1:.5625&width=2048" src="https://cdn.coryd.dev{{ movie.backdrop }}?class=bannerlg"
alt="{{ alt }}" alt="{{ alt }}"
loading="eager" loading="eager"
decoding="async" decoding="async"
width="768" width="1080"
height="432" height="720"
/> />
</div> </div>
</a> </a>

View file

@ -2,16 +2,16 @@
<div class="flex-centered justify-centered"> <div class="flex-centered justify-centered">
<img <img
srcset=" srcset="
https://cdn.coryd.dev/assets/webrings/theclaw.png?width=200 200w, https://cdn.coryd.dev/assets/webrings/theclaw.png?class=w200 200w,
https://cdn.coryd.dev/assets/webrings/theclaw.png?width=400 400w, https://cdn.coryd.dev/assets/webrings/theclaw.png?class=w400 400w,
https://cdn.coryd.dev/assets/webrings/theclaw.png?width=800 800w, https://cdn.coryd.dev/assets/webrings/theclaw.png?class=w800 800w,
https://cdn.coryd.dev/assets/webrings/theclaw.png?width=1600 1600w https://cdn.coryd.dev/assets/webrings/theclaw.png?class=w1600 1600w
" "
sizes="(max-width: 450px) 200px, sizes="(max-width: 450px) 200px,
(max-width: 850px) 400px, (max-width: 850px) 400px,
(max-width: 1000px) 800px, (max-width: 1000px) 800px,
1600px" 1600px"
src="https://cdn.coryd.dev/assets/webrings/theclaw.png?width=1600" src="https://cdn.coryd.dev/assets/webrings/theclaw.png?class=1600"
alt="The Claw Webring" alt="The Claw Webring"
loading="lazy" loading="lazy"
decoding="async" decoding="async"

View file

@ -110,7 +110,7 @@
/* aspect ratios */ /* aspect ratios */
--aspect-ratio-square: 1/1; --aspect-ratio-square: 1/1;
--aspect-ratio-vertical: 2/3; --aspect-ratio-vertical: 2/3;
--aspect-ratio-banner: 1 / 0.5625; --aspect-ratio-banner: 3/2;
/* transitions */ /* transitions */
--transition-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1); --transition-ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);

View file

@ -7,23 +7,23 @@ image: https://cdn.coryd.dev/assets/404.jpg
--- ---
<img <img
srcset=" srcset="
https://cdn.coryd.dev/assets/404.jpg?aspect_ratio=1:.5625&width=256 256w, https://cdn.coryd.dev/assets/404.jpg?class=bannersm 256w,
https://cdn.coryd.dev/assets/404.jpg?aspect_ratio=1:.5625&width=512 512w, https://cdn.coryd.dev/assets/404.jpg?class=bannermd 512w,
https://cdn.coryd.dev/assets/404.jpg?aspect_ratio=1:.5625&width=1024 1024w, https://cdn.coryd.dev/assets/404.jpg?class=bannerbase 1024w,
https://cdn.coryd.dev/assets/404.jpg?aspect_ratio=1:.5625&width=2048 2048w https://cdn.coryd.dev/assets/404.jpg?class=bannerlg 2048w
" "
sizes="(max-width: 450px) 256px, sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px, (max-width: 850px) 512px,
(max-width: 1000px) 1024px, (max-width: 1000px) 1024px,
2048px" 2048px"
src="https://cdn.coryd.dev/assets/404.jpg?aspect_ratio=1:.5625&width=2048" src="https://cdn.coryd.dev/assets/404.jpg?class=bannerlg"
alt="{{ alt }}" alt="{{ alt }}"
class="image-banner" class="image-banner"
style="aspect-ratio:1/0.5625" style="aspect-ratio:1/0.5625"
loading="eager" loading="eager"
decoding="async" decoding="async"
width="768" width="1080"
height="432" height="720"
/> />
<div class="text-centered"> <div class="text-centered">
<h2>{{ title }}</h2> <h2>{{ title }}</h2>

View file

@ -7,23 +7,23 @@ image: https://cdn.coryd.dev/assets/broken.jpg
--- ---
<img <img
srcset=" srcset="
https://cdn.coryd.dev/assets/broken.jpg?aspect_ratio=1:.5625&width=256 256w, https://cdn.coryd.dev/assets/broken.jpg?class=bannersm 256w,
https://cdn.coryd.dev/assets/broken.jpg?aspect_ratio=1:.5625&width=512 512w, https://cdn.coryd.dev/assets/broken.jpg?class=bannermd 512w,
https://cdn.coryd.dev/assets/broken.jpg?aspect_ratio=1:.5625&width=1024 1024w, https://cdn.coryd.dev/assets/broken.jpg?class=bannerbase 1024w,
https://cdn.coryd.dev/assets/broken.jpg?aspect_ratio=1:.5625&width=2048 2048w https://cdn.coryd.dev/assets/broken.jpg?class=bannerlg 2048w
" "
sizes="(max-width: 450px) 256px, sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px, (max-width: 850px) 512px,
(max-width: 1000px) 1024px, (max-width: 1000px) 1024px,
2048px" 2048px"
src="https://cdn.coryd.dev/assets/broken.jpg?aspect_ratio=1:.5625&width=2048" src="https://cdn.coryd.dev/assets/broken.jpg?class=bannerlg"
alt="{{ alt }}" alt="{{ alt }}"
class="image-banner" class="image-banner"
style="aspect-ratio:1/0.5625" style="aspect-ratio:1/0.5625"
loading="eager" loading="eager"
decoding="async" decoding="async"
width="768" width="1080"
height="432" height="720"
/> />
<div class="text-centered"> <div class="text-centered">
<h2>{{ title }}</h2> <h2>{{ title }}</h2>

View file

@ -7,23 +7,23 @@ image: https://cdn.coryd.dev/assets/not-allowed.jpg
--- ---
<img <img
srcset=" srcset="
https://cdn.coryd.dev/assets/not-allowed.jpg?aspect_ratio=1:.5625&width=256 256w, https://cdn.coryd.dev/assets/not-allowed.jpg?class=bannersm 256w,
https://cdn.coryd.dev/assets/not-allowed.jpg?aspect_ratio=1:.5625&width=512 512w, https://cdn.coryd.dev/assets/not-allowed.jpg?class=bannermd 512w,
https://cdn.coryd.dev/assets/not-allowed.jpg?aspect_ratio=1:.5625&width=1024 1024w, https://cdn.coryd.dev/assets/not-allowed.jpg?class=bannerbase 1024w,
https://cdn.coryd.dev/assets/not-allowed.jpg?aspect_ratio=1:.5625&width=2048 2048w https://cdn.coryd.dev/assets/not-allowed.jpg?class=bannerlg 2048w
" "
sizes="(max-width: 450px) 256px, sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px, (max-width: 850px) 512px,
(max-width: 1000px) 1024px, (max-width: 1000px) 1024px,
2048px" 2048px"
src="https://cdn.coryd.dev/assets/not-allowed.jpg?aspect_ratio=1:.5625&width=2048" src="https://cdn.coryd.dev/assets/not-allowed.jpg?class=bannerlg"
alt="{{ alt }}" alt="{{ alt }}"
class="image-banner" class="image-banner"
style="aspect-ratio:1/0.5625" style="aspect-ratio:1/0.5625"
loading="eager" loading="eager"
decoding="async" decoding="async"
width="768" width="1080"
height="432" height="720"
/> />
<div class="text-centered"> <div class="text-centered">
<h2>{{ title }}</h2> <h2>{{ title }}</h2>

View file

@ -7,23 +7,23 @@ image: https://cdn.coryd.dev/assets/stop.jpg
--- ---
<img <img
srcset=" srcset="
https://cdn.coryd.dev/assets/stop.jpg?aspect_ratio=1:.5625&width=256 256w, https://cdn.coryd.dev/assets/stop.jpg?class=bannersm 256w,
https://cdn.coryd.dev/assets/stop.jpg?aspect_ratio=1:.5625&width=512 512w, https://cdn.coryd.dev/assets/stop.jpg?class=bannermd 512w,
https://cdn.coryd.dev/assets/stop.jpg?aspect_ratio=1:.5625&width=1024 1024w, https://cdn.coryd.dev/assets/stop.jpg?class=bannerbase 1024w,
https://cdn.coryd.dev/assets/stop.jpg?aspect_ratio=1:.5625&width=2048 2048w https://cdn.coryd.dev/assets/stop.jpg?class=bannerlg 2048w
" "
sizes="(max-width: 450px) 256px, sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px, (max-width: 850px) 512px,
(max-width: 1000px) 1024px, (max-width: 1000px) 1024px,
2048px" 2048px"
src="https://cdn.coryd.dev/assets/stop.jpg?aspect_ratio=1:.5625&width=2048" src="https://cdn.coryd.dev/assets/stop.jpg?class=bannerlg"
alt="{{ alt }}" alt="{{ alt }}"
class="image-banner" class="image-banner"
style="aspect-ratio:1/0.5625" style="aspect-ratio:1/0.5625"
loading="eager" loading="eager"
decoding="async" decoding="async"
width="768" width="1080"
height="432" height="720"
/> />
<div class="text-centered"> <div class="text-centered">
<h2>{{ title }}</h2> <h2>{{ title }}</h2>

View file

@ -11,16 +11,16 @@ permalink: /about.html
{%- capture about_alt -%}{{ meta.siteName }} - image by David Neal / @reverentgeek{%- endcapture -%} {%- capture about_alt -%}{{ meta.siteName }} - image by David Neal / @reverentgeek{%- endcapture -%}
<img <img
srcset=" srcset="
https://cdn.coryd.dev/assets/avatar-transparent.png?width=200&h=200&aspect_ratio=1:1 200w, https://cdn.coryd.dev/assets/avatar-transparent.png?class=squaresm 200w,
https://cdn.coryd.dev/assets/avatar-transparent.png?width=400&h=400&aspect_ratio=1:1 400w, https://cdn.coryd.dev/assets/avatar-transparent.png?class=squaremd 400w,
https://cdn.coryd.dev/assets/avatar-transparent.png?width=800&h=800&aspect_ratio=1:1 800w, https://cdn.coryd.dev/assets/avatar-transparent.png?class=squarebase 800w,
https://cdn.coryd.dev/assets/avatar-transparent.png?width=1200&h=1200&aspect_ratio=1:1 1200w https://cdn.coryd.dev/assets/avatar-transparent.png?class=squarelg 1200w
" "
sizes="(max-width: 450px) 200px, sizes="(max-width: 450px) 200px,
(max-width: 850px) 400px, (max-width: 850px) 400px,
(max-width: 1000px) 800px, (max-width: 1000px) 800px,
1200px" 1200px"
src="https://cdn.coryd.dev/assets/avatar-transparent.png?width=1200&h=1200&aspect_ratio=1:1" src="https://cdn.coryd.dev/assets/avatar-transparent.png?class=squarelg"
alt="{{ about_alt }}" alt="{{ about_alt }}"
loading="eager" loading="eager"
decoding="async" decoding="async"

View file

@ -19,21 +19,21 @@ schema: books
<a href="{{ book.url }}"> <a href="{{ book.url }}">
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ book.image }}?width=203&aspect_ratio=.65:1 203w, https://cdn.coryd.dev{{ book.image }}?class=verticalsm 200w,
https://cdn.coryd.dev{{ book.image }}?width=406&aspect_ratio=.65:1 406w, https://cdn.coryd.dev{{ book.image }}?class=verticalmd 400w,
https://cdn.coryd.dev{{ book.image }}?width=812&aspect_ratio=.65:1 812w, https://cdn.coryd.dev{{ book.image }}?class=verticalbase 800w,
https://cdn.coryd.dev{{ book.image }}?width=1624&aspect_ratio=.65:1 1624w https://cdn.coryd.dev{{ book.image }}?class=verticallg 1200w
" "
sizes="(max-width: 450px) 203px, sizes="(max-width: 450px) 200px,
(max-width: 850px) 406px, (max-width: 850px) 400px,
(max-width: 1000px) 812px, (max-width: 1000px) 800px,
1624px" 1200px"
src="https://cdn.coryd.dev{{ book.image }}?width=1624&aspect_ratio=.65:1" src="https://cdn.coryd.dev{{ book.image }}?class=verticallg 1200w"
alt="{{ alt }}" alt="{{ alt }}"
loading="eager" loading="eager"
decoding="async" decoding="async"
width="203" width="200"
height="309" height="307"
/> />
</a> </a>
<div class="book-meta"> <div class="book-meta">

View file

@ -14,22 +14,22 @@ schema: movie
<article class="watching-focus"> <article class="watching-focus">
<img <img
srcset=" srcset="
https://cdn.coryd.dev{{ movie.backdrop }}?aspect_ratio=1:.5625&width=256 256w, https://cdn.coryd.dev{{ movie.backdrop }}?class=bannersm 256w,
https://cdn.coryd.dev{{ movie.backdrop }}?aspect_ratio=1:.5625&width=512 512w, https://cdn.coryd.dev{{ movie.backdrop }}?class=bannermd 512w,
https://cdn.coryd.dev{{ movie.backdrop }}?aspect_ratio=1:.5625&width=1024 1024w, https://cdn.coryd.dev{{ movie.backdrop }}?class=bannerbase 1024w,
https://cdn.coryd.dev{{ movie.backdrop }}?aspect_ratio=1:.5625&width=2048 2048w https://cdn.coryd.dev{{ movie.backdrop }}?class=bannerlg 2048w
" "
sizes="(max-width: 450px) 256px, sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px, (max-width: 850px) 512px,
(max-width: 1000px) 1024px, (max-width: 1000px) 1024px,
2048px" 2048px"
src="https://cdn.coryd.dev{{ movie.backdrop }}?aspect_ratio=1:.5625&width=2048" src="https://cdn.coryd.dev{{ movie.backdrop }}?class=bannerlg"
alt="{{ alt }}" alt="{{ alt }}"
class="image-banner" class="image-banner"
loading="eager" loading="eager"
decoding="async" decoding="async"
width="768" width="1080"
height="432" height="720"
/> />
<div class="watching-meta"> <div class="watching-meta">
<p class="title"><strong>{{ movie.title }}</strong></p> <p class="title"><strong>{{ movie.title }}</strong></p>

View file

@ -15,22 +15,22 @@ schema: show
<article class="watching-focus"> <article class="watching-focus">
<img <img
srcset=" srcset="
https://cdn.coryd.dev/shows/backdrops/backdrop-{{ show.tmdb_id }}.jpg?aspect_ratio=1:.5625&width=256 256w, https://cdn.coryd.dev/shows/backdrops/backdrop-{{ show.tmdb_id }}.jpg?class=bannersm 256w,
https://cdn.coryd.dev/shows/backdrops/backdrop-{{ show.tmdb_id }}.jpg?aspect_ratio=1:.5625&width=512 512w, https://cdn.coryd.dev/shows/backdrops/backdrop-{{ show.tmdb_id }}.jpg?class=bannermd 512w,
https://cdn.coryd.dev/shows/backdrops/backdrop-{{ show.tmdb_id }}.jpg?aspect_ratio=1:.5625&width=1024 1024w, https://cdn.coryd.dev/shows/backdrops/backdrop-{{ show.tmdb_id }}.jpg?class=bannerbase 1024w,
https://cdn.coryd.dev/shows/backdrops/backdrop-{{ show.tmdb_id }}.jpg?aspect_ratio=1:.5625&width=2048 2048w https://cdn.coryd.dev/shows/backdrops/backdrop-{{ show.tmdb_id }}.jpg?class=bannerlg 2048w
" "
sizes="(max-width: 450px) 256px, sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px, (max-width: 850px) 512px,
(max-width: 1000px) 1024px, (max-width: 1000px) 1024px,
2048px" 2048px"
src="https://cdn.coryd.dev/shows/backdrops/backdrop-{{ show.tmdb_id }}.jpg?aspect_ratio=1:.5625&width=2048" src="https://cdn.coryd.dev/shows/backdrops/backdrop-{{ show.tmdb_id }}.jpg?class=bannerlg"
alt="{{ alt }}" alt="{{ alt }}"
class="image-banner" class="image-banner"
loading="eager" loading="eager"
decoding="async" decoding="async"
width="768" width="1080"
height="432" height="720"
/> />
<div class="watching-meta"> <div class="watching-meta">
<p class="title"><strong>{{ show.title }}</strong></p> <p class="title"><strong>{{ show.title }}</strong></p>