feat: massive refactor
This commit is contained in:
parent
d424082c95
commit
1880790c05
38 changed files with 245 additions and 761 deletions
|
@ -47,7 +47,7 @@
|
|||
{%- assign pageDescription = description -%}
|
||||
{%- endif -%}
|
||||
|
||||
{%- assign ogImage = 'https://cdn.coryd.dev/' | append: globals.opengraph_default -%}
|
||||
{%- assign ogImage = 'https://cdn.coryd.dev/' | append: globals.avatar | append: "?class=w800" -%}
|
||||
{%- case schema -%}
|
||||
{%- when 'music' -%}
|
||||
{%- assign ogImage = 'https://cdn.coryd.dev' | append: page.image -%}
|
||||
|
@ -61,11 +61,20 @@
|
|||
{%- when 'watching' -%}
|
||||
{%- assign featuredMovie = movies.recentlyWatched | first -%}
|
||||
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredMovie.backdrop -%}
|
||||
{%- when 'watching-shows' -%}
|
||||
{%- assign featuredShow = tv.recentlyWatched | first -%}
|
||||
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredShow.backdrop -%}
|
||||
{%- when 'favorite-movies' -%}
|
||||
{%- assign featuredMovie = movies.favorites| shuffleArray | first -%}
|
||||
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredMovie.backdrop -%}
|
||||
{%- when 'favorite-shows' -%}
|
||||
{%- assign featuredShow = tv.favorites | shuffleArray | first -%}
|
||||
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredShow.backdrop -%}
|
||||
{%- when 'books' -%}
|
||||
{%- assign featuredBook = books.all | bookStatus: 'started' | reverse | first -%}
|
||||
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredBook.image -%}
|
||||
{%- when 'books-year' -%}
|
||||
{%- assign featuredBook = books.all | bookStatus: 'finished' | bookFinishedYear: year.value | bookSortDescending | first -%}
|
||||
{%- assign featuredBook = books.all | bookStatus: 'finished' | bookFinishedYear: year.value | first -%}
|
||||
{%- assign ogImage = 'https://cdn.coryd.dev' | append: featuredBook.image -%}
|
||||
{%- when 'book' -%}
|
||||
{%- assign ogImage = 'https://cdn.coryd.dev' | append: book.image -%}
|
||||
|
@ -95,12 +104,12 @@
|
|||
<meta property="og:url" content="{{ fullUrl }}" />
|
||||
<meta property="og:image" content="{{ ogImage }}?class=w800" />
|
||||
<meta name="theme-color" content="{{ globals.theme_color }}" />
|
||||
<meta name="fediverse:creator" content="@cory@follow.coryd.dev" />
|
||||
<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.favicon_ico }}?class=w50&v={% appVersion %}" rel="icon" sizes="any">
|
||||
<link href="https://cdn.coryd.dev/{{ globals.favicon_svg }}?class=w50&v={% appVersion %}" rel="icon" type="image/svg+xml">
|
||||
<link href="https://cdn.coryd.dev/{{ globals.apple_touch_icon }}?class=w200&v={% appVersion %}" rel="apple-touch-icon">
|
||||
<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_transparent }}?class=w200&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">
|
||||
|
|
|
@ -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
|
||||
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
|
||||
"
|
||||
sizes="(max-width: 450px) 256px,
|
||||
(max-width: 850px) 512px
|
||||
1024px"
|
||||
src="https://cdn.coryd.dev/{{ image }}?class=bannersm&type=webp"
|
||||
src="https://cdn.coryd.dev{{ image }}?class=bannersm&type=webp"
|
||||
alt="{{ alt }}"
|
||||
class="image-banner"
|
||||
loading="lazy"
|
||||
|
|
|
@ -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.filename_disk, alt:block.alt_text %}
|
||||
{% render "partials/blocks/hero.liquid", image:block.image, alt:block.alt %}
|
||||
{%- elsif block.type == 'markdown' -%}
|
||||
{{ block.text | markdown }}
|
||||
{%- elsif block.type == 'divider' -%}
|
||||
|
|
|
@ -4,12 +4,12 @@
|
|||
"home_page_url": "{{ permalink | absoluteUrl | escape }}",
|
||||
"feed_url": "{{ permalink | absoluteUrl | escape }}.json",
|
||||
"description": "{{ globals.site_description | escape }}",
|
||||
"icon": "https://cdn.coryd.dev/{{ globals.feed_image | escape }}?class=w200&v={% appVersion %}",
|
||||
"favicon": "https://cdn.coryd.dev/{{ globals.favicon_ico | escape }}?class=w50&v={% appVersion %}",
|
||||
"icon": "https://cdn.coryd.dev{{ globals.avatar | escape }}?class=w200&v={% appVersion %}",
|
||||
"favicon": "https://cdn.coryd.dev{{ globals.avatar | escape }}?class=w50&v={% appVersion %}",
|
||||
"authors": [{
|
||||
"name": "{{ globals.site_name }}",
|
||||
"url": "{{ globals.url | escape }}",
|
||||
"avatar": "https://cdn.coryd.dev/{{ globals.avatar | escape }}?class=w200&v={% appVersion %}"
|
||||
"avatar": "https://cdn.coryd.dev{{ globals.avatar | escape }}?class=w200&v={% appVersion %}"
|
||||
}],
|
||||
"items": [
|
||||
{%- assign entries = data | normalizeEntries: 20 -%}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<image>
|
||||
<title><![CDATA[{{ title }}]]></title>
|
||||
<link>{{ permalink | absoluteUrl }}</link>
|
||||
<url>{{ "https://cdn.coryd.dev/" | append: globals.feed_image | append: "?class=w200" }}</url>
|
||||
<url>{{ "https://cdn.coryd.dev" | append: globals.avatar | append: "?class=w200" }}</url>
|
||||
<width>144</width>
|
||||
<height>144</height>
|
||||
</image>
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{%- assign currentYear = 'now' | date: "%Y" -%}
|
||||
{%- assign track = music.week.tracks | first -%}
|
||||
{%- assign show = tv.recentlyWatched | first -%}
|
||||
{%- assign movie = movies.recentlyWatched | first -%}
|
||||
{%- assign book = books | bookStatus: 'finished' | bookSortDescending | first -%}
|
||||
{%- assign book = books | bookFinishedYear: currentYear | first -%}
|
||||
{%- assign link = links | first -%}
|
||||
<article>
|
||||
<h2>
|
||||
|
@ -10,10 +11,10 @@
|
|||
</h2>
|
||||
<ul>
|
||||
<li><span class="music">Top track this week:</span> <a href="{{ track.url }}">{{ track.title }} by {{ track.artist }}</a></li>
|
||||
<li><span class="tv">Last episode watched:</span> <strong class="highlight-text">S{{ show.season }}E{{ show.episode }}</strong> of <a href="{{ show.url }}">{{ show.name }}</a></li>
|
||||
<li><span class="tv">Last episode watched:</span> <strong class="highlight-text">{{ show.formatted_episode }}</strong> of <a href="{{ show.url }}">{{ show.title }}</a></li>
|
||||
<li><span class="movies">Last movie watched:</span> <a href="{{ movie.url }}">{{ movie.title }}</a>{%- if movie.rating %} ({{ movie.rating }}){%- endif -%}</li>
|
||||
<li><span class="books">Last book finished:</span> <a href="{{ book.url }}">{{ book.title }}</a> by {{ book.author }}{%- if book.rating %} ({{ book.rating }}){%- endif -%}</li>
|
||||
<li><span class="link">Last link shared:</span> <a href="{{ link.link }}">{{ link.title }}</a>{% if link.authors %} via <a href="{{ link.authors.url }}">{{ link.authors.name }}</a>{% endif %}</li>
|
||||
<li><span class="link">Last link shared:</span> <a href="{{ link.link }}">{{ link.title }}</a>{% if link.author %} via <a href="{{ link.author.url }}">{{ link.author.name }}</a>{% endif %}</li>
|
||||
</ul>
|
||||
{% render "partials/blocks/banners/rss.liquid", url: "/feeds", text: "Subscribe to my movies, books, links or activity feed(s)" %}
|
||||
</article>
|
|
@ -15,7 +15,7 @@
|
|||
({{ item.year }})
|
||||
</div>
|
||||
{%- else -%}
|
||||
<div class="header">{{ item.name }}</div>
|
||||
<div class="header">{{ item.title }}</div>
|
||||
<div class="subheader">({{ item.year }})</div>
|
||||
{%- endif -%}
|
||||
</div>
|
||||
|
|
Reference in a new issue