chore: cdn url in cms + og images

This commit is contained in:
Cory Dransfeldt 2024-10-13 10:35:48 -07:00
parent 35b56b75f2
commit c23ef6bd0d
No known key found for this signature in database
36 changed files with 102 additions and 101 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "coryd.dev",
"version": "1.0.7",
"version": "1.0.8",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "coryd.dev",
"version": "1.0.7",
"version": "1.0.8",
"license": "MIT",
"dependencies": {
"@cdransf/api-text": "^1.5.0",

View file

@ -1,6 +1,6 @@
{
"name": "coryd.dev",
"version": "1.0.7",
"version": "1.0.8",
"description": "The source for my personal site. Built using 11ty (and other tools).",
"type": "module",
"scripts": {

View file

@ -1,7 +1,7 @@
import { createClient } from '@supabase/supabase-js'
const SUPABASE_URL = process.env['SUPABASE_URL']
const SUPABASE_KEY = process.env['SUPABASE_KEY']
const SUPABASE_URL = process.env.SUPABASE_URL
const SUPABASE_KEY = process.env.SUPABASE_KEY
const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
const fetchGlobals = async () => {

View file

@ -47,44 +47,44 @@
{%- assign pageDescription = description -%}
{%- endif -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: globals.avatar | append: "?class=w800" -%}
{%- assign ogImage = globals.cdn_url | append: globals.avatar -%}
{%- case schema -%}
{%- when 'music' -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: page.image -%}
{%- assign ogImage = globals.cdn_url | append: page.image -%}
{%- when 'music-index' -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: music.week.artists[0].image -%}
{%- assign ogImage = globals.cdn_url | append: music.week.artists[0].grid.image -%}
{%- when 'artist' -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: artist.image -%}
{%- assign ogImage = globals.cdn_url | append: artist.grid.image -%}
{%- when 'genre' -%}
{%- assign sortedGenreArtists = genre.artists | sortByPlaysDescending: "total_plays" -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: sortedGenreArtists[0].image -%}
{%- assign ogImage = globals.cdn_url | append: sortedGenreArtists[0].grid.image -%}
{%- when 'watching' -%}
{%- assign featuredMovie = movies.recentlyWatched | first -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredMovie.backdrop -%}
{%- assign ogImage = globals.cdn_url | append: featuredMovie.grid.backdrop -%}
{%- when 'watching-shows' -%}
{%- assign featuredShow = tv.recentlyWatched | first -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredShow.backdrop -%}
{%- assign ogImage = globals.cdn_url | append: featuredShow.grid.backdrop -%}
{%- when 'favorite-movies' -%}
{%- assign featuredMovie = movies.favorites| shuffleArray | first -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredMovie.backdrop -%}
{%- assign ogImage = globals.cdn_url | append: featuredMovie.grid.backdrop -%}
{%- when 'favorite-shows' -%}
{%- assign featuredShow = tv.favorites | shuffleArray | first -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredShow.backdrop -%}
{%- assign ogImage = globals.cdn_url | append: featuredShow.grid.backdrop -%}
{%- when 'books' -%}
{%- assign featuredBook = books.all | bookStatus: 'started' | reverse | first -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredBook.image -%}
{%- assign ogImage = globals.cdn_url | append: featuredBook.grid.image -%}
{%- when 'books-year' -%}
{%- assign featuredBook = books.all | bookStatus: 'finished' | bookFinishedYear: year.value | first -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredBook.image -%}
{%- assign ogImage = globals.cdn_url | append: featuredBook.grid.image -%}
{%- when 'book' -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: book.image -%}
{%- assign ogImage = globals.cdn_url | append: book.grid.image -%}
{%- when 'movie' -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: movie.backdrop -%}
{%- assign ogImage = globals.cdn_url | append: movie.grid.backdrop -%}
{%- when 'show' -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: show.backdrop -%}
{%- assign ogImage = globals.cdn_url | append: show.grid.backdrop -%}
{%- when 'genre' -%}
{%- assign genreArtist = genre.artists | shuffleArray | first -%}
{%- assign ogImage = 'https://cdn.coryd.dev' | append: genreArtist.image -%}
{%- assign ogImage = globals.cdn_url | append: genreArtist.grid.image -%}
{%- endcase -%}
<!doctype html>
@ -107,9 +107,9 @@
<meta name="fediverse:creator" content="{{ globals.mastodon }}" />
<meta name="generator" content="Eleventy">
<meta name="robots" content="noai, noimageai">
<link href="https://cdn.coryd.dev{{ globals.avatar_transparent }}?class=w50&v={% appVersion %}" rel="icon" sizes="any">
<link href="https://cdn.coryd.dev{{ globals.avatar_transparent }}?class=w50&v={% appVersion %}&type=svg" rel="icon" type="image/svg+xml">
<link href="https://cdn.coryd.dev{{ globals.avatar }}?class=w800&v={% appVersion %}" rel="apple-touch-icon">
<link href="{{ globals.cdn_url }}{{ globals.avatar_transparent }}?class=w50&v={% appVersion %}" rel="icon" sizes="any">
<link href="{{ globals.cdn_url }}{{ globals.avatar_transparent }}?class=w50&v={% appVersion %}&type=svg" rel="icon" type="image/svg+xml">
<link href="{{ globals.cdn_url }}{{ globals.avatar }}?class=w800&v={% appVersion %}" rel="apple-touch-icon">
<link type="application/atom+xml" rel="alternate" title="Posts / {{ globals.site_name }}" href="https://coryd.dev/feeds/posts">
<link rel="alternate" href="https://coryd.dev/feeds/links" title="Links / {{ globals.site_name }}" type="application/rss+xml">
<link rel="alternate" href="https://coryd.dev/feeds/movies" title="Movies / {{ globals.site_name }}'s movies feed" type="application/rss+xml">

View file

@ -1,13 +1,13 @@
<img
srcset="
https://cdn.coryd.dev{{ image }}?class=bannersm&type=webp 256w,
https://cdn.coryd.dev{{ image }}?class=bannermd&type=webp 512w,
https://cdn.coryd.dev{{ image }}?class=bannerbase&type=webp 1024w
{{ globals.cdn_url }}{{ image }}?class=bannersm&type=webp 256w,
{{ globals.cdn_url }}{{ image }}?class=bannermd&type=webp 512w,
{{ globals.cdn_url }}{{ image }}?class=bannerbase&type=webp 1024w
"
sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px
1024px"
src="https://cdn.coryd.dev{{ image }}?class=bannersm&type=webp"
src="{{ globals.cdn_url }}{{ image }}?class=bannersm&type=webp"
alt="{{ alt }}"
class="image-banner"
loading="lazy"

View file

@ -8,7 +8,7 @@
{%- elsif block.type == 'rss_banner' -%}
{% render "partials/blocks/banners/rss.liquid", url:block.url, text:block.text %}
{%- elsif block.type == 'hero' -%}
{% render "partials/blocks/hero.liquid", image:block.image, alt:block.alt %}
{% render "partials/blocks/hero.liquid", globals:globals, image:block.image, alt:block.alt %}
{%- elsif block.type == 'markdown' -%}
{{ block.text | markdown }}
{%- elsif block.type == 'divider' -%}

View file

@ -4,11 +4,11 @@
"home_page_url": "{{ globals.url }}",
"feed_url": "{{ permalink | absoluteUrl }}",
"description": "{{ globals.site_description }}",
"icon": "https://cdn.coryd.dev{{ globals.avatar }}?class=w200",
"icon": "{{ globals.cdn_url }}{{ globals.avatar }}?class=w200",
"author": {
"name": "{{ globals.site_name }}",
"url": "{{ globals.url }}",
"avatar": "https://cdn.coryd.dev{{ globals.avatar }}?class=w200"
"avatar": "{{ globals.cdn_url }}{{ globals.avatar }}?class=w200"
},
"items": [
{%- assign entries = data -%}

View file

@ -11,7 +11,7 @@
<image>
<title><![CDATA[{{ title }}]]></title>
<link>{{ permalink | absoluteUrl }}</link>
<url>{{ "https://cdn.coryd.dev" | append: globals.avatar | append: "?class=w200" }}</url>
<url>{{ globals.cdn_url }}{{ globals.avatar }}?class=w200</url>
<width>144</width>
<height>144</height>
</image>
@ -34,7 +34,7 @@
<pubDate>{{ entryFeed.date | stringToRFC822Date }}</pubDate>
<guid isPermaLink="false">{{ entryFeed.url | encodeAmp }}</guid>
{%- if entryFeed.image -%}
<enclosure url="https://cdn.coryd.dev{{ entryFeed.image }}?class=w800" type="image/jpeg" />
<enclosure url="{{ globals.cdn_url }}{{ entryFeed.image }}?class=w800&type=jpg" type="image/jpeg" />
{%- endif -%}
<description><![CDATA[{{ entryFeed.description | markdown }}]]></description>
</item>

View file

@ -11,7 +11,7 @@
<image>
<title><![CDATA[{{ title }}]]></title>
<link>{{ permalink | absoluteUrl }}</link>
<url>{{ "https://cdn.coryd.dev" | append: globals.avatar | append: "?class=w200" }}</url>
<url>{{ globals.cdn_url }}{{ globals.avatar }}?class=w200</url>
<width>144</width>
<height>144</height>
</image>

View file

@ -13,11 +13,11 @@
{%- if shape == 'poster' -%}
<img
srcset="
https://cdn.coryd.dev{{ item.grid.backdrop }}?class=bannersm&type=webp 256w,
https://cdn.coryd.dev{{ item.grid.backdrop }}?class=bannermd&type=webp 512w
{{ globals.cdn_url }}{{ item.grid.backdrop }}?class=bannersm&type=webp 256w,
{{ globals.cdn_url }}{{ item.grid.backdrop }}?class=bannermd&type=webp 512w
"
sizes="(max-width: 450px) 256px, 512px"
src="https://cdn.coryd.dev{{ item.grid.backdrop }}?class=bannersm&type=webp"
src="{{ globals.cdn_url }}{{ item.grid.backdrop }}?class=bannersm&type=webp"
alt="{{ alt }}"
loading="{{ loadingStrategy }}"
decoding="async"
@ -27,11 +27,11 @@
{%- elsif shape == 'square' -%}
<img
srcset="
https://cdn.coryd.dev{{ item.grid.image }}?class=squaresm&type=webp 200w,
https://cdn.coryd.dev{{ item.grid.image }}?class=squaremd&type=webp 400w
{{ globals.cdn_url }}{{ item.grid.image }}?class=squaresm&type=webp 200w,
{{ globals.cdn_url }}{{ item.grid.image }}?class=squaremd&type=webp 400w
"
sizes="(max-width: 450px) 200px, 400px"
src="https://cdn.coryd.dev{{ item.grid.image }}?class=squaresm&type=webp"
src="{{ globals.cdn_url }}{{ item.grid.image }}?class=squaresm&type=webp"
alt="{{ alt }}"
loading="{{ loadingStrategy }}"
decoding="async"
@ -41,11 +41,11 @@
{%- elsif shape == 'vertical' -%}
<img
srcset="
https://cdn.coryd.dev{{ item.grid.image }}?class=verticalsm&type=webp 200w,
https://cdn.coryd.dev{{ item.grid.image }}?class=verticalmd&type=webp 400w
{{ globals.cdn_url }}{{ item.grid.image }}?class=verticalsm&type=webp 200w,
{{ globals.cdn_url }}{{ item.grid.image }}?class=verticalmd&type=webp 400w
"
sizes="(max-width: 450px) 200px, 400px"
src="https://cdn.coryd.dev{{ item.grid.image }}?class=verticalsm&type=webp"
src="{{ globals.cdn_url }}{{ item.grid.image }}?class=verticalsm&type=webp"
alt="{{ alt }}"
loading="{{ loadingStrategy }}"
decoding="async"

View file

@ -5,11 +5,11 @@
<a href="{{ item.chart.url }}">
<img
srcset="
https://cdn.coryd.dev{{ item.chart.image }}?class=w50&type=webp 50w,
https://cdn.coryd.dev{{ item.chart.image }}?class=w100&type=webp 100w
{{ globals.cdn_url }}{{ item.chart.image }}?class=w50&type=webp 50w,
{{ globals.cdn_url }}{{ item.chart.image }}?class=w100&type=webp 100w
"
sizes="(max-width: 450px) 50px, 100px"
src="https://cdn.coryd.dev{{ item.chart.image }}?class=w50&type=webp"
src="{{ globals.cdn_url }}{{ item.chart.image }}?class=w50&type=webp"
alt="{{ item.chart.alt }}"
loading="lazy"
decoding="async"

View file

@ -11,16 +11,16 @@
</div>
<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
{{ globals.cdn_url }}{{ movie.backdrop }}?class=bannersm 256w,
{{ globals.cdn_url }}{{ movie.backdrop }}?class=bannermd 512w,
{{ globals.cdn_url }}{{ movie.backdrop }}?class=bannerbase 1024w,
{{ globals.cdn_url }}{{ movie.backdrop }}?class=bannerlg 2048w
"
sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px,
(max-width: 1000px) 1024px,
2048px"
src="https://cdn.coryd.dev{{ movie.backdrop }}?class=bannerlg"
src="{{ globals.cdn_url }}{{ movie.backdrop }}?class=bannerlg"
loading="eager"
decoding="async"
width="1080"

View file

@ -15,15 +15,15 @@ schema: book
<div class="book-display">
<img
srcset="
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
{{ globals.cdn_url }}{{ book.image }}?class=verticalsm&type=webp 200w,
{{ globals.cdn_url }}{{ book.image }}?class=verticalmd&type=webp 400w,
{{ globals.cdn_url }}{{ book.image }}?class=verticalbase&type=webp 800w
"
sizes="(max-width: 450px) 203px,
(max-width: 850px) 406px,
(max-width: 1000px) 812px,
812px"
src="https://cdn.coryd.dev{{ book.image }}?class=verticalsm&type=webp"
src="{{ globals.cdn_url }}{{ book.image }}?class=verticalsm&type=webp"
alt="{{ alt }}"
loading="lazy"
decoding="async"

View file

@ -20,12 +20,12 @@ schema: books
<a href="{{ book.url }}">
<img
srcset="
https://cdn.coryd.dev{{ book.image }}?class=verticalsm&type=webp 200w,
https://cdn.coryd.dev{{ book.image }}?class=verticalmd&type=webp 400w
{{ globals.cdn_url }}{{ book.image }}?class=verticalsm&type=webp 200w,
{{ globals.cdn_url }}{{ book.image }}?class=verticalmd&type=webp 400w
"
sizes="(max-width: 450px) 200px,
400px"
src="https://cdn.coryd.dev{{ book.image }}?class=verticalsm&type=webp"
src="{{ globals.cdn_url }}{{ book.image }}?class=verticalsm&type=webp"
alt="{{ alt }}"
loading="lazy"
decoding="async"

View file

@ -21,4 +21,4 @@ schema: books-year
<p>I finished <strong class="highlight-text">{{ bookData.size }} books</strong> in <strong class="highlight-text">{{ year.value }}</strong>.{%- if favoriteBooks %} Among my favorites were {{ favoriteBooks }}.{%- endif -%}</p>
{% endif %}
<hr />
{% render "partials/media/grid.liquid", data:bookData, shape:"vertical", count: 200, loading: "eager" %}
{% render "partials/media/grid.liquid", globals:globals, data:bookData, shape:"vertical", count: 200, loading: "eager" %}

View file

@ -17,4 +17,4 @@ schema: music
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />
{% endif %}
{% render "partials/media/grid.liquid" data:pagination.items, pagination:pagination shape:"square" %}
{% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination shape:"square" %}

View file

@ -17,4 +17,4 @@ schema: music
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />
{% endif %}
{% render "partials/media/grid.liquid" data:pagination.items, pagination:pagination shape:"square" %}
{% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination shape:"square" %}

View file

@ -17,4 +17,4 @@ schema: music
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />
{% endif %}
{% render "partials/media/grid.liquid" data:pagination.items, pagination:pagination shape:"square" %}
{% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination shape:"square" %}

View file

@ -17,4 +17,4 @@ schema: music
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />
{% endif %}
{% render "partials/media/grid.liquid" data:pagination.items, pagination:pagination shape:"square" %}
{% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination shape:"square" %}

View file

@ -24,14 +24,14 @@ schema: artist
<div class="artist-display">
<img
srcset="
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
{{ globals.cdn_url }}{{ artist.image }}?class=w200&type=webp 200w,
{{ globals.cdn_url }}{{ artist.image }}?class=w600&type=webp 400w,
{{ globals.cdn_url }}{{ artist.image }}?class=w800&type=webp 800w
"
sizes="(max-width: 450px) 200px,
(max-width: 850px) 400px,
800px"
src="https://cdn.coryd.dev{{ artist.image }}?class=w200&type=webp"
src="{{ globals.cdn_url }}{{ artist.image }}?class=w200&type=webp"
alt="{{ alt }}"
loading="eager"
decoding="async"

View file

@ -17,4 +17,4 @@ schema: music
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />
{% endif %}
{% render "partials/media/grid.liquid" data:pagination.items, pagination:pagination shape:"square" %}
{% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination shape:"square" %}

View file

@ -17,4 +17,4 @@ schema: music
<p><a href="/music/concerts">You can also take a look at the concerts I've been to.</a></p>
<hr />
{% endif %}
{% render "partials/media/grid.liquid" data:pagination.items, pagination:pagination shape:"square" %}
{% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination shape:"square" %}

View file

@ -18,14 +18,14 @@ schema: music-index
Artists
</a>
</h3>
{% render "partials/media/grid.liquid", data:music.week.artists, shape:"square", count: 8, loading: "eager" %}
{% render "partials/media/grid.liquid", globals:globals, data:music.week.artists, shape:"square", count: 8, loading: "eager" %}
<h3 id="albums">
<a class="icon-link" href="/music/albums/this-week">
{% tablericon "vinyl" %}
Albums
</a>
</h3>
{% render "partials/media/grid.liquid", data:music.week.albums, shape:"square", count: 8 %}
{% render "partials/media/grid.liquid", globals:globals, data:music.week.albums, shape:"square", count: 8 %}
<h3 id="tracks">
<a class="icon-link" href="/music/tracks/this-week">
{% tablericon "playlist" %}
@ -38,7 +38,7 @@ schema: music-index
<label for="tracks-recent" class="button" data-toggle="tracks-recent">Recent</label>
<label for="tracks-chart" class="button" data-toggle="tracks-chart">This week</label>
<div class="tracks-recent">
{% render "partials/media/music/recent", data:music.recent %}
{% render "partials/media/music/recent", globals:globals, data:music.recent %}
</div>
<div class="tracks-chart">
{% render "partials/media/music/chart.liquid", data:music.week.tracks, count: 10 %}
@ -49,5 +49,5 @@ schema: music-index
{% tablericon "calendar-time" %}
Anticipated albums
</h3>
{% render "partials/media/grid.liquid", data:albumReleases.upcoming, shape:"square", count: 8 %}
{% render "partials/media/grid.liquid", globals:globals, data:albumReleases.upcoming, shape:"square", count: 8 %}
{% endif %}

View file

@ -18,14 +18,14 @@ schema: music-period
Artists
</a>
</h3>
{% render "partials/media/grid.liquid", data:music.threeMonth.artists, shape:"square", count: 8, loading: "eager" %}
{% render "partials/media/grid.liquid", globals:globals, data:music.threeMonth.artists, shape:"square", count: 8, loading: "eager" %}
<h3 id="albums">
<a class="icon-link" href="/music/albums/three-months">
{% tablericon "vinyl" %}
Albums
</a>
</h3>
{% render "partials/media/grid.liquid", data:music.threeMonth.albums, shape:"square", count: 8 %}
{% render "partials/media/grid.liquid", globals:globals, data:music.threeMonth.albums, shape:"square", count: 8 %}
<h3 id="tracks">
<a class="icon-link" href="/music/tracks/three-months">
{% tablericon "playlist" %}

View file

@ -18,14 +18,14 @@ schema: music-period
Artists
</a>
</h3>
{% render "partials/media/grid.liquid", data:music.month.artists, shape:"square", count: 8, loading: "eager" %}
{% render "partials/media/grid.liquid", globals:globals, data:music.month.artists, shape:"square", count: 8, loading: "eager" %}
<h3 id="albums">
<a class="icon-link" href="/music/albums/this-month">
{% tablericon "vinyl" %}
Albums
</a>
</h3>
{% render "partials/media/grid.liquid", data:music.month.albums, shape:"square", count: 8 %}
{% render "partials/media/grid.liquid", globals:globals, data:music.month.albums, shape:"square", count: 8 %}
<h3 id="tracks">
<a class="icon-link" href="/music/tracks/this-month">
{% tablericon "playlist" %}

View file

@ -6,7 +6,7 @@ pagination:
alias: page
description: "{{ page.description }}"
permalink: "{{ page.permalink }}/index.html"
image: "{{ page.open_graph_image | prepend: 'https://cdn.coryd.dev' | default: globals.avatar }}"
image: "{{ page.open_graph_image | prepend: globals.cdn_url | default: globals.avatar }}"
updated: {{ page.updated | default: null }}
---
{% render "partials/blocks/index.liquid", blocks:page.blocks %}

View file

@ -22,16 +22,16 @@ schema: blog
{%- if post.image -%}
<img
srcset="
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
{{ globals.cdn_url }}{{ post.image }}?class=w200&type=webp 200w,
{{ globals.cdn_url }}{{ post.image }}?class=w400&type=webp 400w,
{{ globals.cdn_url }}{{ post.image }}?class=w800&type=webp 800w,
{{ globals.cdn_url }}{{ post.image }}?class=w1600&type=webp 1600w
"
sizes="(max-width: 450px) 200px,
(max-width: 850px) 400px,
(max-width: 1000px) 800px,
1200px"
src="https://cdn.coryd.dev{{ post.image }}?class=w200"
src="{{ globals.cdn_url }}{{ post.image }}?class=w200"
alt="{{ post.image_alt }}"
class="image-banner"
loading="eager"

View file

@ -14,4 +14,4 @@ schema: favorite-movies
<p>These are my favorite movies. There are many like them, but these are mine.</p>
<hr />
{% endif %}
{% render "partials/media/grid.liquid", data:pagination.items, pagination:pagination, shape:"poster" %}
{% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination, shape:"poster" %}

View file

@ -14,4 +14,4 @@ schema: favorite-shows
<p>These are my favorite shows. There are many like them, but these are mine.</p>
<hr />
{% endif %}
{% render "partials/media/grid.liquid", data:pagination.items, pagination:pagination, shape:"poster" %}
{% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination, shape:"poster" %}

View file

@ -8,7 +8,7 @@ schema: watching
---
{%- assign featuredMovie = movies.recentlyWatched | shuffleArray | first -%}
<h2 class="watching">{{ title }}</h2>
{% render "partials/media/watching/hero.liquid" movie:featuredMovie %}
{% render "partials/media/watching/hero.liquid", globals:globals, movie:featuredMovie %}
<p>Here's all of the TV and movies I've been watching presented in what is (hopefully) an organized fashion.</p>
{% render "partials/blocks/banners/rss.liquid", url: "/feeds/movies", text: "Subscribe to my movies feed or follow along on this page" %}
<hr />
@ -18,14 +18,14 @@ schema: watching
Recent movies
</a>
</h3>
{% render "partials/media/grid.liquid", data:movies.recentlyWatched, shape:"vertical", count: 6 %}
{% render "partials/media/grid.liquid", globals:globals, data:movies.recentlyWatched, shape:"vertical", count: 6 %}
<h3 id="tv">
<a class="icon-link" href="/watching/recent/shows">
{% tablericon "device-tv-old" %}
Recent shows
</a>
</h3>
{% render "partials/media/grid.liquid", data:tv.recentlyWatched, shape:"vertical", count: 6 %}
{% render "partials/media/grid.liquid", globals:globals, data:tv.recentlyWatched, shape:"vertical", count: 6 %}
<h3 id="favorite-movies">
<a class="icon-link" href="/watching/favorite-movies">
{% tablericon "star" %}
@ -33,7 +33,7 @@ schema: watching
</a>
</h3>
{% assign favoriteMovies = movies.favorites | shuffleArray %}
{% render "partials/media/grid.liquid", data:favoriteMovies, shape:"vertical", count: 6 %}
{% render "partials/media/grid.liquid", globals:globals, data:favoriteMovies, shape:"vertical", count: 6 %}
<h3 id="favorite-shows">
<a class="icon-link" href="/watching/favorite-shows">
{% tablericon "star" %}
@ -41,4 +41,4 @@ schema: watching
</a>
</h3>
{% assign favoriteShows = tv.favorites | shuffleArray %}
{% render "partials/media/grid.liquid", data:favoriteShows, shape:"vertical", count: 6 %}
{% render "partials/media/grid.liquid", globals:globals, data:favoriteShows, shape:"vertical", count: 6 %}

View file

@ -14,14 +14,14 @@ schema: movie
<article class="watching focus">
<img
srcset="
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
{{ globals.cdn_url }}{{ movie.backdrop }}?class=bannersm&type=webp 256w,
{{ globals.cdn_url }}{{ movie.backdrop }}?class=bannermd&type=webp 512w,
{{ globals.cdn_url }}{{ movie.backdrop }}?class=bannerbase&type=webp 1024w
"
sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px,
1024px"
src="https://cdn.coryd.dev{{ movie.backdrop }}?class=bannersm&type=webp"
src="{{ globals.cdn_url }}{{ movie.backdrop }}?class=bannersm&type=webp"
alt="{{ alt }}"
class="image-banner"
loading="eager"

View file

@ -14,4 +14,4 @@ schema: watching
<p>These are the movies I've watched recently. There are many like them, but these are mine. (Or well, all the movies I've watched — they're ordered latest watched, descending, hence the recent part).</p>
<hr />
{% endif %}
{% render "partials/media/grid.liquid", data:pagination.items, pagination:pagination, shape:"poster" %}
{% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination, shape:"poster" %}

View file

@ -14,4 +14,4 @@ schema: watching-shows
<p>These are the shows I've watched recently. There are many like them, but these are mine. (Or well, all the movies I've watched — they're ordered latest watched, descending, hence the recent part).</p>
<hr />
{% endif %}
{% render "partials/media/grid.liquid", data:pagination.items, pagination:pagination, shape:"poster" %}
{% render "partials/media/grid.liquid", globals:globals, data:pagination.items, pagination:pagination, shape:"poster" %}

View file

@ -14,14 +14,14 @@ schema: show
<article class="watching focus">
<img
srcset="
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
{{ globals.cdn_url }}{{ show.backdrop }}?class=bannersm&type=webp 256w,
{{ globals.cdn_url }}{{ show.backdrop }}?class=bannermd&type=webp 512w,
{{ globals.cdn_url }}{{ show.backdrop }}?class=bannerbase&type=webp 1024w
"
sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px,
1024px"
src="https://cdn.coryd.dev{{ show.backdrop }}?class=bannersm&type=webp"
src="{{ globals.cdn_url }}{{ show.backdrop }}?class=bannersm&type=webp"
alt="{{ alt }}"
class="image-banner"
loading="eager"

View file

@ -27,7 +27,7 @@ eleventyExcludeFromCollections: true
{
"rel":"http://webfinger.net/rel/avatar",
"type":"image/png",
"href":"https://cdn.coryd.dev/f7516bb2-d914-479f-91c6-1bf96f3968bf.png?class=squarebase"
"href":"{{ globals.cdn_url }}/f7516bb2-d914-479f-91c6-1bf96f3968bf.png?class=squarebase"
}
]
}

View file

@ -1,12 +1,13 @@
CREATE OR REPLACE VIEW optimized_globals AS
SELECT
g.id,
g.site_name,
g.site_description,
g.intro,
g.author,
g.email,
g.mastodon,
g.url,
g.cdn_url,
g.theme_color,
g.site_type,
g.locale,