feat: massive refactor
This commit is contained in:
parent
d424082c95
commit
1880790c05
38 changed files with 245 additions and 761 deletions
|
@ -6,8 +6,9 @@ permalink: "/books/index.html"
|
|||
updated: "now"
|
||||
schema: books
|
||||
---
|
||||
{%- assign currentYear = 'now' | date: "%Y" -%}
|
||||
{%- assign bookData = books.all | bookStatus: 'started' | reverse -%}
|
||||
{%- assign currentBookCount = books.all | currentBookCount -%}
|
||||
{%- assign currentBookCount = books.all | bookFinishedYear: currentYear | size -%}
|
||||
<h2>Currently reading</h2>
|
||||
<p>Here's what I'm reading at the moment. I've finished <strong class="highlight-text">{{ currentBookCount }} books</strong> this year.</p>
|
||||
<p>{{ books.years | bookYearLinks }}</p>
|
||||
|
|
|
@ -7,7 +7,7 @@ pagination:
|
|||
permalink: "/books/years/{{ year.value }}.html"
|
||||
schema: books-year
|
||||
---
|
||||
{%- assign bookData = year.data | bookStatus: 'finished' | bookSortDescending -%}
|
||||
{%- assign bookData = year.data | bookStatus: 'finished' -%}
|
||||
{%- assign bookDataFavorites = bookData | bookFavorites -%}
|
||||
{%- capture favoriteBooks -%}{{ bookDataFavorites | shuffleArray | mediaLinks: "book", 5 }}{%- endcapture -%}
|
||||
{%- capture currentYear -%}{% currentYear %}{%- endcapture -%}
|
||||
|
|
|
@ -19,7 +19,7 @@ permalink: "/links/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}
|
|||
<a href="{{ link.link }}" title="{{ link.title | escape }}">
|
||||
<strong>{{ link.title }}</strong>
|
||||
</a>
|
||||
{% if link.authors %} via <a href="{{ link.authors.url }}">{{ link.authors.name }}</a>{% endif %}
|
||||
{% if link.author %} via <a href="{{ link.author.url }}">{{ link.author.name }}</a>{% endif %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
|
@ -34,13 +34,13 @@ schema: music-index
|
|||
</h3>
|
||||
<div class="track-display">
|
||||
<input id="tracks-recent" name="track-options" type="radio" aria-hidden="true" checked />
|
||||
<input id="tracks-window" name="track-options" type="radio" aria-hidden="true" />
|
||||
<input id="tracks-chart" name="track-options" type="radio" aria-hidden="true" />
|
||||
<label for="tracks-recent" class="button" data-toggle="tracks-recent">Recent</label>
|
||||
<label for="tracks-window" class="button" data-toggle="tracks-window">This week</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 %}
|
||||
</div>
|
||||
<div class="tracks-window">
|
||||
<div class="tracks-chart">
|
||||
{% render "partials/media/music/chart.liquid", data:music.week.tracks, mostPlayed:music.week.tracks[0].plays, count: 10 %}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -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.meta_data.opengraph_default }}"
|
||||
image: "{{ page.open_graph_image | prepend: 'https://cdn.coryd.dev' | default: globals.avatar }}"
|
||||
updated: {{ page.updated | default: null }}
|
||||
---
|
||||
{% render "partials/blocks/index.liquid", blocks:page.blocks, collections:collections, links:links %}
|
||||
{% render "partials/blocks/index.liquid", blocks:page.blocks %}
|
|
@ -6,7 +6,7 @@ pagination:
|
|||
data: movies.favorites
|
||||
size: 24
|
||||
permalink: "/watching/favorite-movies/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}/{% endif %}index.html"
|
||||
schema: watching
|
||||
schema: favorite-movies
|
||||
---
|
||||
<a class="icon-link" href="/watching" title="Go back to the watching index page">{% tablericon "arrow-left" %} Back to watching</a>
|
||||
{% if pagination.pageNumber == 0 %}
|
||||
|
|
|
@ -6,7 +6,7 @@ pagination:
|
|||
data: tv.favorites
|
||||
size: 24
|
||||
permalink: "/watching/favorite-shows/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}/{% endif %}index.html"
|
||||
schema: watching
|
||||
schema: favorite-shows
|
||||
---
|
||||
<a class="icon-link" href="/watching" title="Go back to the watching index page">{% tablericon "arrow-left" %} Back to watching</a>
|
||||
{% if pagination.pageNumber == 0 %}
|
||||
|
|
|
@ -32,7 +32,7 @@ schema: watching
|
|||
Favorite movies
|
||||
</a>
|
||||
</h3>
|
||||
{% assign favoriteMovies = movies.favorites | featuredWatching: 6 %}
|
||||
{% assign favoriteMovies = movies.favorites | shuffleArray | featuredWatching: 6 %}
|
||||
{% render "partials/media/watching/grid.liquid", mediaItems:favoriteMovies, count: 6 %}
|
||||
<h3 id="favorite-shows">
|
||||
<a class="icon-link" href="/watching/favorite-shows">
|
||||
|
@ -40,5 +40,5 @@ schema: watching
|
|||
Favorite shows
|
||||
</a>
|
||||
</h3>
|
||||
{% assign favoriteShows = tv.favorites | featuredWatching: 6 %}
|
||||
{% assign favoriteShows = tv.favorites | shuffleArray | featuredWatching: 6 %}
|
||||
{% render "partials/media/watching/grid.liquid", mediaItems:favoriteShows, count: 6 %}
|
|
@ -6,7 +6,7 @@ pagination:
|
|||
data: tv.recentlyWatched
|
||||
size: 24
|
||||
permalink: "/watching/recent/shows/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}/{% endif %}index.html"
|
||||
schema: watching
|
||||
schema: watching-shows
|
||||
---
|
||||
<a class="icon-link" href="/watching" title="Go back to the watching index page">{% tablericon "arrow-left" %} Back to watching</a>
|
||||
{% if pagination.pageNumber == 0 %}
|
||||
|
|
|
@ -10,7 +10,6 @@ schema: show
|
|||
{%- capture alt -%}
|
||||
{{ show.title }} / {{ show.year }}
|
||||
{%- endcapture -%}
|
||||
{% assign lastWatched = show | getLastWatched %}
|
||||
<a class="icon-link" href="/watching" title="Go back to the watching index page">{% tablericon "arrow-left" %} Back to watching</a>
|
||||
<article class="watching-focus">
|
||||
<img
|
||||
|
@ -41,13 +40,9 @@ schema: show
|
|||
{%- if show.collected -%}
|
||||
<p class="sub-meta collected">{% tablericon "circle-check" %} This show is in my collection!</p>
|
||||
{%- endif -%}
|
||||
{%- if lastWatched -%}
|
||||
{%- if show.episode.formatted_episode -%}
|
||||
{%- capture lastWatchedText -%}
|
||||
{%- if show.episodes -%}
|
||||
I last watched <strong class="highlight-text">{{ show.episodes | lastWatchedEpisode }}</strong> on {{ lastWatched | date: "%B %e, %Y" }}.
|
||||
{%- else -%}
|
||||
Last watched on {{ lastWatched | date: "%B %e, %Y" }}.
|
||||
{%- endif -%}
|
||||
I last watched <strong class="highlight-text">{{ show.episode.formatted_episode }}</strong> on {{ show.episode.last_watched_at | date: "%B %e, %Y" }}.
|
||||
{%- endcapture -%}
|
||||
<p class="sub-meta">{{ lastWatchedText }}</p>
|
||||
{%- endif -%}
|
||||
|
|
Reference in a new issue