feat: initial commit

This commit is contained in:
Cory Dransfeldt 2025-03-27 16:46:02 -07:00
commit e214116e40
No known key found for this signature in database
253 changed files with 17406 additions and 0 deletions

View file

@ -0,0 +1,135 @@
---
permalink: /music/artists/index.php
type: dynamic
schema: artist
---
<a class="back-link" href="/music" title="Go back to the music index page">{% tablericon "arrow-left" %} Back to music</a>
<article class="artist-focus">
<div class="artist-display">
<img
class="image-media"
srcset="
{{ globals.cdn_url }}<?= htmlspecialchars($artist["image"]) ?>?class=w200&type=webp 200w,
{{ globals.cdn_url }}<?= htmlspecialchars($artist["image"]) ?>?class=w600&type=webp 400w,
{{ globals.cdn_url }}<?= htmlspecialchars($artist["image"]) ?>?class=w800&type=webp 800w
"
sizes="(max-width: 450px) 200px,
(max-width: 850px) 400px,
800px"
src="{{ globals.cdn_url }}<?= htmlspecialchars($artist["image"]) ?>?class=w200&type=webp"
alt="<?= htmlspecialchars($artist["name"]) ?> • <?= htmlspecialchars(parseCountryField($artist["country"])) ?>"
decoding="async"
width="200"
height="200"
/>
<div class="media-meta">
<h2><?= htmlspecialchars($artist["name"]) ?></h2>
<span class="sub-meta country">{% tablericon "map-pin" %} <?= htmlspecialchars(
parseCountryField($artist["country"])
) ?></span>
<?php if ($artist["favorite"]): ?>
<span class="sub-meta favorite">{% tablericon "heart" %} This is one of my favorite artists!</span>
<?php endif; ?>
<?php if ($artist["tattoo"]): ?>
<span class="sub-meta tattoo">{% tablericon "needle" %} I have a tattoo inspired by this artist!</span>
<?php endif; ?>
<?php if ($artist["total_plays"] > 0): ?>
<span class="sub-meta">
<mark>
<?= $artist["total_plays"] . ' ' . pluralize($artist["total_plays"], "play") ?>
</mark>
</span>
<?php endif; ?>
<span class="sub-meta">
<?= htmlspecialchars($artist["emoji"] ?? $artist["genre"]["emoji"]) ?>
<a href="<?= htmlspecialchars($artist["genre"]["url"]) ?>">
<?= htmlspecialchars($artist["genre"]["name"]) ?>
</a>
</span>
</div>
</div>
<?php
renderAssociatedMedia(
$artist["related_artists"] ?? [],
$artist["books"] ?? [],
$artist["genres"] ?? [],
$artist["movies"] ?? [],
$artist["posts"] ?? [],
$artist["shows"] ?? []
);
?>
<?php if (!empty($artist["description"])): ?>
<h2>Overview</h2>
<div data-toggle-content class="text-toggle-hidden">
<?= parseMarkdown($artist["description"]) ?>
</div>
<button data-toggle-button>Show more</button>
<?php endif; ?>
<?php if (!empty($artist["concerts"])): ?>
<p id="concerts" class="concerts">
{% tablericon "device-speaker" %}
I've seen this artist live!
</p>
<ul>
<?php foreach ($artist["concerts"] as $concert): ?>
<?php
$venue = "";
if (!empty($concert["venue_name"])) {
if (!empty($concert["venue_latitude"]) && !empty($concert["venue_longitude"])) {
$venue = '<a href="https://www.openstreetmap.org/?mlat=' . htmlspecialchars($concert["venue_latitude"]) . '&mlon=' . htmlspecialchars($concert["venue_longitude"]) . '#map=18/' . htmlspecialchars($concert["venue_latitude"]) . '/' . htmlspecialchars($concert["venue_longitude"]) . '">' . htmlspecialchars($concert["venue_name_short"]) . '</a>';
} else {
$venue = htmlspecialchars($concert["venue_name_short"]);
}
}
$modalId = "modal-" . htmlspecialchars($concert["id"]);
?>
<li class="concerts">
On <mark><?php echo date("F j, Y", strtotime($concert["date"])); ?></mark>
<?php if (!empty($venue)): ?>
at <?php echo $venue; ?>
<?php endif; ?>
<?php if (!empty($concert["notes"])): ?>
<?php $notes = "### Notes\n" . htmlspecialchars($concert["notes"]); ?>
<noscript>
<input class="modal-input" id="<?php echo $modalId; ?>" type="checkbox" tabindex="0" />
<label class="modal-open" for="<?php echo $modalId; ?>">
{% tablericon "info-circle" %}
</label>
<div class="modal-wrapper">
<div class="modal-body">
<label class="modal-close" for="<?php echo $modalId; ?>">
{% tablericon "circle-x" %}
</label>
<?php echo parseMarkdown($notes); ?>
</div>
</div>
</noscript>
<button class="modal-open client-side" data-modal-trigger="<?php echo $modalId; ?>" data-modal-button>
{% tablericon "info-circle" %}
</button>
<dialog id="dialog-<?php echo $modalId; ?>" class="client-side">
<button class="modal-close" data-modal-button>
{% tablericon "circle-x" %}
</button>
<?php echo parseMarkdown($notes); ?>
</dialog>
<?php endif; ?>
</li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
<table>
<tr>
<th>Album</th>
<th>Plays</th>
<th>Year</th>
</tr>
<?php foreach ($artist["albums"] as $album): ?>
<tr>
<td><?= htmlspecialchars($album["name"]) ?></td>
<td><?= $album["total_plays"] > 0 ? $album["total_plays"] : "-" ?></td>
<td><?= $album["release_year"] ?></td>
</tr>
<?php endforeach; ?>
</table>
</article>

View file

@ -0,0 +1,66 @@
---
permalink: /books/index.php
type: dynamic
schema: book
---
<a class="back-link" href="/books" title="Go back to the books index page">{% tablericon "arrow-left" %} Back to books</a>
<article class="book-focus">
<div class="book-display">
<img
class="image-media"
srcset="
{{ globals.cdn_url }}<?= htmlspecialchars($book["image"]) ?>?class=verticalsm&type=webp 200w,
{{ globals.cdn_url }}<?= htmlspecialchars($book["image"]) ?>?class=verticalmd&type=webp 400w,
{{ globals.cdn_url }}<?= htmlspecialchars($book["image"]) ?>?class=verticalbase&type=webp 800w
"
sizes="(max-width: 450px) 203px,
(max-width: 850px) 406px,
(max-width: 1000px) 812px,
812px"
src="{{ globals.cdn_url }}<?= htmlspecialchars($book["image"]) ?>?class=verticalsm&type=webp"
alt="<?= htmlspecialchars($book["title"]) ?> by <?= htmlspecialchars($book["author"]) ?>"
decoding="async"
width="200"
height="307"
/>
<div class="media-meta">
<h2><?= htmlspecialchars($book["title"]) ?></h2>
<?php if (!empty($book["rating"])): ?>
<span><?= htmlspecialchars($book["rating"]) ?></span>
<?php endif; ?>
<?php if (!empty($book["author"])): ?>
<span class="sub-meta">By <?= htmlspecialchars($book["author"]) ?></span>
<?php endif; ?>
<?php if ($book["favorite"]): ?>
<span class="sub-meta favorite">{% tablericon "heart" %} This is one of my favorite books!</span>
<?php endif; ?>
<?php if ($book["tattoo"]): ?>
<span class="sub-meta tattoo">{% tablericon "needle" %} I have a tattoo inspired by this book!</span>
<?php endif; ?>
<?php if ($book["status"] == 'finished'): ?>
<span class="sub-meta">Finished on: <mark><?= date('F j, Y', strtotime($book["date_finished"])) ?></mark></span>
<?php elseif ($book["status"] == 'started'): ?>
<progress value="<?= htmlspecialchars($book["progress"]) ?>" max="100"><?php $book["progress"] . '%'; ?></progress>
<?php endif; ?>
</div>
</div>
<?php if (!empty($book["review"])): ?>
{% render "blocks/banners/warning.liquid", text: "There are probably spoilers after this banner — this is a warning about them." %}
<h2>My thoughts</h2>
<?= parseMarkdown($book["review"]) ?>
<?php endif; ?>
<?php
renderAssociatedMedia(
$book["artists"] ?? [],
$book["related_books"] ?? [],
$book["genres"] ?? [],
$book["movies"] ?? [],
$book["posts"] ?? [],
$book["shows"] ?? []
);
?>
<?php if (!empty($book["description"])): ?>
<h2>Overview</h2>
<?= parseMarkdown($book["description"]) ?>
<?php endif; ?>
</article>

View file

@ -0,0 +1,42 @@
---
permalink: /music/genres/index.php
type: dynamic
schema: genre
---
<a class="back-link" href="/music" title="Go back to the music index page">{% tablericon "arrow-left" %} Back to music</a>
<h2><?= htmlspecialchars($genre["emoji"]) ?> <?= htmlspecialchars($genre["name"]) ?></h2>
<article class="genre-focus">
<?php $artistCount = count($genre["artists"]); ?>
<?php if ($artistCount > 0): ?>
<p>My top <mark><?= htmlspecialchars($genre["name"]) ?></mark> artists are
<?php
$artists = array_slice($genre["artists"], 0, 5);
$artistLinks = [];
foreach ($artists as $artist) {
$artistLinks[] = '<a href="' . htmlspecialchars($artist["url"]) . '">' . htmlspecialchars($artist["name"]) . '</a>';
}
echo implode(', ', $artistLinks);
?>. I've listened to <mark><?= $genre["total_plays"] . ' ' . pluralize($genre["total_plays"], "play") ?></mark> tracks from this genre.</p>
<hr />
<?php endif; ?>
<?php
renderAssociatedMedia(
[],
$genre["books"] ?? [],
[],
$genre["movies"] ?? [],
$genre["posts"] ?? [],
[]
);
?>
<?php if (!empty($genre["description"])): ?>
<h3>Overview</h3>
<div data-toggle-content class="text-toggle-hidden">
<?= parseMarkdown($genre["description"]) ?>
<p><a href="<?= htmlspecialchars($genre["wiki_link"]) ?>">Continue reading at Wikipedia.</a></p>
<p><em>Wikipedia content provided under the terms of the
<a href="https://creativecommons.org/licenses/by-sa/3.0/">Creative Commons BY-SA license</a></em></p>
</div>
<button data-toggle-button>Show more</button>
<?php endif; ?>
</article>

View file

@ -0,0 +1,58 @@
---
permalink: /watching/movies/index.php
type: dynamic
schema: movie
---
<a class="back-link" href="/watching" title="Go back to the watching index page">{% tablericon "arrow-left" %} Back to watching</a>
<article class="movie-focus">
<img
srcset="
{{ globals.cdn_url }}<?= htmlspecialchars($movie["backdrop"]) ?>?class=bannersm&type=webp 256w,
{{ globals.cdn_url }}<?= htmlspecialchars($movie["backdrop"]) ?>?class=bannermd&type=webp 512w,
{{ globals.cdn_url }}<?= htmlspecialchars($movie["backdrop"]) ?>?class=bannerbase&type=webp 1024w
"
sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px,
1024px"
src="{{ globals.cdn_url }}<?= htmlspecialchars($movie["backdrop"]) ?>?class=bannersm&type=webp"
alt="<?= htmlspecialchars($movie["title"]) ?> (<?= htmlspecialchars($movie["year"]) ?>)"
class="image-banner"
decoding="async"
width="256"
height="180"
/>
<div class="media-meta">
<h2><?= htmlspecialchars($movie["title"]) ?> (<?= htmlspecialchars($movie["year"]) ?>)</h2>
<?php if (!empty($movie["rating"])): ?>
<span><?= htmlspecialchars($movie["rating"]) ?></span>
<?php endif; ?>
<?php if ($movie["favorite"]): ?>
<span class="sub-meta favorite">{% tablericon "heart" %} This is one of my favorite movies!</span>
<?php endif; ?>
<?php if ($movie["tattoo"]): ?>
<span class="sub-meta tattoo">{% tablericon "needle" %} I have a tattoo inspired by this movie!</span>
<?php endif; ?>
<?php if (!empty($movie["last_watched"])): ?>
<span class="sub-meta">Last watched on <?= date('F j, Y', strtotime($movie["last_watched"])) ?>.</span>
<?php endif; ?>
</div>
<?php if (!empty($movie["review"])): ?>
{% render "blocks/banners/warning.liquid", text: "There are probably spoilers after this banner — this is a warning about them." %}
<h2>My thoughts</h2>
<?= parseMarkdown($movie["review"]) ?>
<?php endif; ?>
<?php
renderAssociatedMedia(
$movie["artists"] ?? [],
$movie["books"] ?? [],
$movie["genres"] ?? [],
$movie["related_movies"] ?? [],
$movie["posts"] ?? [],
$movie["shows"] ?? []
);
?>
<?php if (!empty($movie["description"])): ?>
<h2>Overview</h2>
<?= $movie["description"] ?>
<?php endif; ?>
</article>

View file

@ -0,0 +1,58 @@
---
permalink: /watching/shows/index.php
type: dynamic
schema: show
---
<a class="back-link" href="/watching" title="Go back to the watching index page">{% tablericon "arrow-left" %} Back to watching</a>
<article class="watching focus">
<img
srcset="
{{ globals.cdn_url }}<?= htmlspecialchars($show["backdrop"]) ?>?class=bannersm&type=webp 256w,
{{ globals.cdn_url }}<?= htmlspecialchars($show["backdrop"]) ?>?class=bannermd&type=webp 512w,
{{ globals.cdn_url }}<?= htmlspecialchars($show["backdrop"]) ?>?class=bannerbase&type=webp 1024w
"
sizes="(max-width: 450px) 256px,
(max-width: 850px) 512px,
1024px"
src="{{ globals.cdn_url }}<?= htmlspecialchars($show["backdrop"]) ?>?class=bannersm&type=webp"
alt="<?= htmlspecialchars($show["title"]) ?> (<?= htmlspecialchars($show["year"]) ?>)"
class="image-banner"
decoding="async"
width="256"
height="180"
/>
<div class="media-meta">
<h2><?= htmlspecialchars($show["title"]) ?> (<?= htmlspecialchars($show["year"]) ?>)</h2>
<?php if (!empty($show["favorite"])): ?>
<span class="sub-meta favorite">{% tablericon "heart" %} This is one of my favorite shows!</span>
<?php endif; ?>
<?php if (!empty($show["tattoo"])): ?>
<span class="sub-meta tattoo">{% tablericon "needle" %} I have a tattoo inspired by this show!</span>
<?php endif; ?>
<?php if (!empty($show["episode"]["formatted_episode"])): ?>
<span class="sub-meta">I last watched
<mark><?= htmlspecialchars($show["episode"]["formatted_episode"]) ?></mark>
on <?= date('F j, Y', strtotime($show["episode"]["last_watched_at"])) ?>.
</span>
<?php endif; ?>
</div>
<?php if (!empty($show["review"])): ?>
{% render "blocks/banners/warning.liquid", text: "There are probably spoilers after this banner — this is a warning about them." %}
<h2>My thoughts</h2>
<?= parseMarkdown($show["review"]) ?>
<?php endif; ?>
<?php
renderAssociatedMedia(
$show["artists"] ?? [],
$show["books"] ?? [],
$show["genres"] ?? [],
$show["movies"] ?? [],
$show["posts"] ?? [],
$show["related_shows"] ?? []
);
?>
<?php if (!empty($show["description"])): ?>
<h2>Overview</h2>
<?= parseMarkdown($show["description"]) ?>
<?php endif; ?>
</article>