chore: image improvements
This commit is contained in:
parent
9c3d8e213a
commit
7dde72d1cb
15 changed files with 138 additions and 164 deletions
|
@ -16,18 +16,17 @@ schema: book
|
|||
<div class="book-display">
|
||||
<img
|
||||
srcset="
|
||||
https://cdn.coryd.dev{{ book.image }}?class=verticalsm 200w,
|
||||
https://cdn.coryd.dev{{ book.image }}?class=verticalmd 400w,
|
||||
https://cdn.coryd.dev{{ book.image }}?class=verticalbase 800w,
|
||||
https://cdn.coryd.dev{{ book.image }}?class=verticallg 1200w
|
||||
https://cdn.coryd.dev{{ book.image }}?class=verticalsm&type=webp 200w,
|
||||
https://cdn.coryd.dev{{ book.image }}?class=verticalmd&type=webp 400w,
|
||||
https://cdn.coryd.dev{{ book.image }}?class=verticalbase&type=webp 800w
|
||||
"
|
||||
sizes="(max-width: 450px) 203px,
|
||||
(max-width: 850px) 406px,
|
||||
(max-width: 1000px) 812px,
|
||||
1624px"
|
||||
src="https://cdn.coryd.dev{{ book.image }}?class=verticallg"
|
||||
812px"
|
||||
src="https://cdn.coryd.dev{{ book.image }}?class=verticalsm&type=webp"
|
||||
alt="{{ alt }}"
|
||||
loading="eager"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
width="200"
|
||||
height="307"
|
||||
|
|
|
@ -14,40 +14,36 @@ schema: books
|
|||
{% render "partials/blocks/banners/rss.liquid", url: "/feeds/books", text: "Subscribe to my books feed or follow along on this page" %}
|
||||
<hr />
|
||||
{% for book in bookData %}
|
||||
{% capture alt %}{{ book.title }} by {{ book.authors }}{% endcapture %}
|
||||
<article class="book-entry">
|
||||
<a href="{{ book.url }}">
|
||||
<img
|
||||
srcset="
|
||||
https://cdn.coryd.dev{{ book.image }}?class=verticalsm 200w,
|
||||
https://cdn.coryd.dev{{ book.image }}?class=verticalmd 400w,
|
||||
https://cdn.coryd.dev{{ book.image }}?class=verticalbase 800w,
|
||||
https://cdn.coryd.dev{{ book.image }}?class=verticallg 1200w
|
||||
"
|
||||
sizes="(max-width: 450px) 200px,
|
||||
(max-width: 850px) 400px,
|
||||
(max-width: 1000px) 800px,
|
||||
1200px"
|
||||
src="https://cdn.coryd.dev{{ book.image }}?class=verticallg 1200w"
|
||||
alt="{{ alt }}"
|
||||
loading="eager"
|
||||
decoding="async"
|
||||
width="200"
|
||||
height="307"
|
||||
/>
|
||||
</a>
|
||||
<div class="book-meta">
|
||||
{% capture alt %}{{ book.title }} by {{ book.authors }}{% endcapture %}
|
||||
<article class="book-entry">
|
||||
<a href="{{ book.url }}">
|
||||
<p class="title"><strong>{{ book.title }}</strong></p>
|
||||
<img
|
||||
srcset="
|
||||
https://cdn.coryd.dev{{ book.image }}?class=verticalsm&type=webp 200w,
|
||||
https://cdn.coryd.dev{{ book.image }}?class=verticalmd&type=webp 400w
|
||||
"
|
||||
sizes="(max-width: 450px) 200px,
|
||||
400px"
|
||||
src="https://cdn.coryd.dev{{ book.image }}?class=verticalsm&type=webp"
|
||||
alt="{{ alt }}"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
width="200"
|
||||
height="307"
|
||||
/>
|
||||
</a>
|
||||
{% if book.author %}
|
||||
<p class="sub-meta">By {{ book.author }}</p>
|
||||
{% endif %}
|
||||
{% if book.progress %}
|
||||
{%- assign percentage = book.progress | append: '%' -%}
|
||||
{% render "partials/media/progress-bar.liquid", percentage:percentage %}
|
||||
{% endif %}
|
||||
{% if book.description %}<div class="description">{{ book.description | normalize_whitespace | markdown | truncatewords: 50 }}</div>{% endif %}
|
||||
</div>
|
||||
</article>
|
||||
<div class="book-meta">
|
||||
<a href="{{ book.url }}">
|
||||
<p class="title"><strong>{{ book.title }}</strong></p>
|
||||
</a>
|
||||
{% if book.author %}
|
||||
<p class="sub-meta">By {{ book.author }}</p>
|
||||
{% endif %}
|
||||
{% if book.progress %}
|
||||
{%- assign percentage = book.progress | append: '%' -%}
|
||||
{% render "partials/media/progress-bar.liquid", percentage:percentage %}
|
||||
{% endif %}
|
||||
{% if book.description %}<div class="description">{{ book.description | normalize_whitespace | markdown | truncatewords: 50 }}</div>{% endif %}
|
||||
</div>
|
||||
</article>
|
||||
{% endfor %}
|
|
@ -24,21 +24,19 @@ schema: artist
|
|||
<div class="artist-display">
|
||||
<img
|
||||
srcset="
|
||||
https://cdn.coryd.dev{{ artist.image }}?class=w200 200w,
|
||||
https://cdn.coryd.dev{{ artist.image }}?class=w600 400w,
|
||||
https://cdn.coryd.dev{{ artist.image }}?class=w800 800w,
|
||||
https://cdn.coryd.dev{{ artist.image }}?class=w1600 1200w
|
||||
https://cdn.coryd.dev{{ artist.image }}?class=w200&type=webp 200w,
|
||||
https://cdn.coryd.dev{{ artist.image }}?class=w600&type=webp 400w,
|
||||
https://cdn.coryd.dev{{ artist.image }}?class=w800&type=webp 800w
|
||||
"
|
||||
sizes="(max-width: 450px) 200px,
|
||||
(max-width: 850px) 400px,
|
||||
(max-width: 1000px) 800px,
|
||||
1200px"
|
||||
src="https://cdn.coryd.dev{{ artist.image }}?class=w1600"
|
||||
800px"
|
||||
src="https://cdn.coryd.dev{{ artist.image }}?class=w200&type=webp"
|
||||
alt="{{ alt }}"
|
||||
loading="eager"
|
||||
decoding="async"
|
||||
width="480"
|
||||
height="480"
|
||||
width="200"
|
||||
height="200"
|
||||
/>
|
||||
<div class="artist-meta">
|
||||
<p class="title"><strong>{{ artist.name }}</strong></p>
|
||||
|
|
|
@ -15,20 +15,22 @@ schema: blog
|
|||
{%- if post.image -%}
|
||||
<img
|
||||
srcset="
|
||||
https://cdn.coryd.dev/{{ post.image }}?class=w200 200w,
|
||||
https://cdn.coryd.dev/{{ post.image }}?class=w400 400w,
|
||||
https://cdn.coryd.dev/{{ post.image }}?class=w800 800w,
|
||||
https://cdn.coryd.dev/{{ post.image }}?class=w1600 1600w
|
||||
https://cdn.coryd.dev/{{ post.image }}?class=w200&type=webp 200w,
|
||||
https://cdn.coryd.dev/{{ post.image }}?class=w400&type=webp 400w,
|
||||
https://cdn.coryd.dev/{{ post.image }}?class=w800&type=webp 800w,
|
||||
https://cdn.coryd.dev/{{ post.image }}?class=w1600&type=webp 1600w
|
||||
"
|
||||
sizes="(max-width: 450px) 200px,
|
||||
(max-width: 850px) 400px,
|
||||
(max-width: 1000px) 800px,
|
||||
1600px"
|
||||
src="https://cdn.coryd.dev/{{ post.image }}?class=w1600"
|
||||
1200px"
|
||||
src="https://cdn.coryd.dev/{{ post.image }}?class=w200"
|
||||
alt="{{ post.image_alt }}"
|
||||
class="image-banner"
|
||||
loading="lazy"
|
||||
loading="eager"
|
||||
decoding="async"
|
||||
width="200"
|
||||
height="auto"
|
||||
/>
|
||||
{%- endif -%}
|
||||
{{ post.content | markdown }}
|
||||
|
|
|
@ -14,22 +14,20 @@ schema: movie
|
|||
<article class="watching-focus">
|
||||
<img
|
||||
srcset="
|
||||
https://cdn.coryd.dev{{ movie.backdrop }}?class=bannersm 256w,
|
||||
https://cdn.coryd.dev{{ movie.backdrop }}?class=bannermd 512w,
|
||||
https://cdn.coryd.dev{{ movie.backdrop }}?class=bannerbase 1024w,
|
||||
https://cdn.coryd.dev{{ movie.backdrop }}?class=bannerlg 2048w
|
||||
https://cdn.coryd.dev{{ movie.backdrop }}?class=bannersm&type=webp 256w,
|
||||
https://cdn.coryd.dev{{ movie.backdrop }}?class=bannermd&type=webp 512w,
|
||||
https://cdn.coryd.dev{{ movie.backdrop }}?class=bannerbase&type=webp 1024w
|
||||
"
|
||||
sizes="(max-width: 450px) 256px,
|
||||
(max-width: 850px) 512px,
|
||||
(max-width: 1000px) 1024px,
|
||||
2048px"
|
||||
src="https://cdn.coryd.dev{{ movie.backdrop }}?class=bannerlg"
|
||||
1024px"
|
||||
src="https://cdn.coryd.dev{{ movie.backdrop }}?class=bannersm&type=webp"
|
||||
alt="{{ alt }}"
|
||||
class="image-banner"
|
||||
loading="eager"
|
||||
decoding="async"
|
||||
width="1080"
|
||||
height="720"
|
||||
width="256"
|
||||
height="180"
|
||||
/>
|
||||
<div class="watching-meta">
|
||||
<p class="title"><strong>{{ movie.title }}</strong>{%- if movie.year and not movie.rating %} ({{ movie.year }}){%- endif -%}</p>
|
||||
|
|
|
@ -15,22 +15,20 @@ schema: show
|
|||
<article class="watching-focus">
|
||||
<img
|
||||
srcset="
|
||||
https://cdn.coryd.dev{{ show.backdrop }}?class=bannersm 256w,
|
||||
https://cdn.coryd.dev{{ show.backdrop }}?class=bannermd 512w,
|
||||
https://cdn.coryd.dev{{ show.backdrop }}?class=bannerbase 1024w,
|
||||
https://cdn.coryd.dev{{ show.backdrop }}?class=bannerlg 2048w
|
||||
https://cdn.coryd.dev{{ show.backdrop }}?class=bannersm&type=webp 256w,
|
||||
https://cdn.coryd.dev{{ show.backdrop }}?class=bannermd&type=webp 512w,
|
||||
https://cdn.coryd.dev{{ show.backdrop }}?class=bannerbase&type=webp 1024w
|
||||
"
|
||||
sizes="(max-width: 450px) 256px,
|
||||
(max-width: 850px) 512px,
|
||||
(max-width: 1000px) 1024px,
|
||||
2048px"
|
||||
src="https://cdn.coryd.dev/{{ show.backdrop }}?class=bannerlg"
|
||||
1024px"
|
||||
src="https://cdn.coryd.dev{{ show.backdrop }}?class=bannersm&type=webp"
|
||||
alt="{{ alt }}"
|
||||
class="image-banner"
|
||||
loading="eager"
|
||||
decoding="async"
|
||||
width="1080"
|
||||
height="720"
|
||||
width="256"
|
||||
height="180"
|
||||
/>
|
||||
<div class="watching-meta">
|
||||
<p class="title"><strong>{{ show.title }}</strong>{%- if show.year %} ({{ show.year }}){%- endif -%}</p>
|
||||
|
|
|
@ -8,25 +8,21 @@ permalink: /about.html
|
|||
{%- assign show = tv.recentlyWatched | first -%}
|
||||
<div class="avatar-wrapper flex-centered">
|
||||
<div class="interior">
|
||||
{%- capture about_alt -%}{{ globals.site_name }} - image by @joel@fosstodon.org{%- endcapture -%}
|
||||
<img
|
||||
srcset="
|
||||
https://cdn.coryd.dev/{{ globals.about }}?class=squaresm 200w,
|
||||
https://cdn.coryd.dev/{{ globals.about }}?class=squaremd 400w,
|
||||
https://cdn.coryd.dev/{{ globals.about }}?class=squarebase 800w,
|
||||
https://cdn.coryd.dev/{{ globals.about }}?class=squarelg 1200w
|
||||
"
|
||||
sizes="(max-width: 450px) 200px,
|
||||
(max-width: 850px) 400px,
|
||||
(max-width: 1000px) 800px,
|
||||
1200px"
|
||||
src="https://cdn.coryd.dev/{{ globals.about }}?class=squarelg"
|
||||
alt="{{ about_alt }}"
|
||||
loading="eager"
|
||||
decoding="async"
|
||||
width="600"
|
||||
height="600"
|
||||
/>
|
||||
{%- capture about_alt -%}{{ globals.site_name }} - image by @joel@fosstodon.org{%- endcapture -%}
|
||||
<img
|
||||
srcset="
|
||||
https://cdn.coryd.dev/{{ globals.about }}?class=squaresm&type=webp 200w,
|
||||
https://cdn.coryd.dev/{{ globals.about }}?class=squaremd&type=webp 400w,
|
||||
https://cdn.coryd.dev/{{ globals.about }}?class=squarebase&type=webp 800w
|
||||
"
|
||||
sizes="(max-width: 450px) 200px, (max-width: 850px) 400px, 800px"
|
||||
src="https://cdn.coryd.dev/{{ globals.about }}?class=squaresm&type=webp"
|
||||
alt="{{ about_alt }}"
|
||||
loading="eager"
|
||||
decoding="async"
|
||||
width="200"
|
||||
height="200"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="text-centered">Hi, I'm Cory</h2>
|
||||
|
|
Reference in a new issue