feat(*): refactor dynamic vs. static structure and distinctions; make additional elements dynamic
This commit is contained in:
parent
7a0b808f24
commit
b1309908e5
126 changed files with 983 additions and 955 deletions
|
@ -1,41 +0,0 @@
|
|||
class NowPlaying extends HTMLElement {
|
||||
static tagName = "now-playing";
|
||||
|
||||
static register(tagName = this.tagName, registry = globalThis.customElements) {
|
||||
registry.define(tagName, this);
|
||||
}
|
||||
|
||||
async connectedCallback() {
|
||||
this.contentElement = this.querySelector(".content");
|
||||
if (!this.contentElement) return;
|
||||
|
||||
const cache = localStorage.getItem("now-playing-cache");
|
||||
if (cache) this.updateHTML(JSON.parse(cache));
|
||||
|
||||
await this.fetchAndUpdate();
|
||||
}
|
||||
|
||||
async fetchAndUpdate() {
|
||||
try {
|
||||
const data = await this.fetchData();
|
||||
const newHTML = data?.content;
|
||||
|
||||
if (newHTML && newHTML !== this.contentElement.innerHTML) {
|
||||
this.updateHTML(newHTML);
|
||||
localStorage.setItem("now-playing-cache", JSON.stringify(newHTML));
|
||||
}
|
||||
} catch {}
|
||||
}
|
||||
|
||||
updateHTML(value) {
|
||||
this.contentElement.innerHTML = value;
|
||||
}
|
||||
|
||||
async fetchData() {
|
||||
return fetch(`/api/playing.php?nocache=${Date.now()}`)
|
||||
.then(response => response.json())
|
||||
.catch(() => ({}));
|
||||
}
|
||||
}
|
||||
|
||||
NowPlaying.register();
|
|
@ -7,7 +7,6 @@ const staticAssets = [
|
|||
'/assets/fonts/dmi.woff2',
|
||||
'/assets/fonts/ml.woff2',
|
||||
'/assets/scripts/index.js',
|
||||
'/assets/scripts/components/now-playing.js',
|
||||
'/assets/scripts/components/select-pagination.js',
|
||||
];
|
||||
|
||||
|
|
|
@ -501,10 +501,4 @@ footer {
|
|||
|
||||
footer {
|
||||
margin: var(--sizing-3xl) auto 0;
|
||||
|
||||
.updated {
|
||||
font-size: var(--font-size-sm);
|
||||
text-align: center;
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
import EleventyFetch from "@11ty/eleventy-fetch";
|
||||
|
||||
const { POSTGREST_URL, POSTGREST_API_KEY } = process.env;
|
||||
|
||||
const fetchLatestListen = async () => {
|
||||
try {
|
||||
const data = await EleventyFetch(
|
||||
`${POSTGREST_URL}/optimized_latest_listen?select=*`,
|
||||
{
|
||||
duration: "1h",
|
||||
type: "json",
|
||||
fetchOptions: {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${POSTGREST_API_KEY}`,
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
const trackData = data[0];
|
||||
if (!trackData) {
|
||||
return { content: "🎧 No recent listens found" };
|
||||
}
|
||||
|
||||
const emoji = trackData.artist_emoji || trackData.genre_emoji || "🎧";
|
||||
|
||||
return {
|
||||
content: `${emoji} ${
|
||||
trackData.track_name
|
||||
} by <a href="https://www.coryd.dev${trackData.url}">${trackData.artist_name}</a>`,
|
||||
};
|
||||
} catch (error) {
|
||||
console.error("Error fetching the latest listen:", error);
|
||||
return {};
|
||||
}
|
||||
};
|
||||
|
||||
export default async function () {
|
||||
return await fetchLatestListen();
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
import EleventyFetch from "@11ty/eleventy-fetch";
|
||||
|
||||
const { POSTGREST_URL, POSTGREST_API_KEY } = process.env;
|
||||
|
||||
const fetchRecentMedia = async () => {
|
||||
try {
|
||||
const data = await EleventyFetch(
|
||||
`${POSTGREST_URL}/optimized_recent_media?select=*`,
|
||||
{
|
||||
duration: "1h",
|
||||
type: "json",
|
||||
fetchOptions: {
|
||||
method: "GET",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: `Bearer ${POSTGREST_API_KEY}`,
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
const [{ recent_activity } = {}] = data;
|
||||
|
||||
return recent_activity || [];
|
||||
} catch (error) {
|
||||
console.error("Error fetching recent media data:", error);
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
export default async function () {
|
||||
return await fetchRecentMedia();
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
<script type="module" src="/assets/scripts/components/now-playing.js?v={% appVersion %}"></script>
|
||||
<p class="{{ section }}">
|
||||
<mark>Now playing</mark> 
|
||||
<now-playing>
|
||||
<span class="content">{{ nowPlaying }}</span>
|
||||
</now-playing>
|
||||
</p>
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
require __DIR__ . "/../../vendor/autoload.php";
|
||||
require __DIR__ . "/../../server/utils/init.php";
|
||||
require __DIR__ . "/../../../vendor/autoload.php";
|
||||
require __DIR__ . "/../../../config/dynamic/init.php";
|
||||
|
||||
use App\Classes\ArtistFetcher;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
require __DIR__ . "/../../vendor/autoload.php";
|
||||
require __DIR__ . "/../../server/utils/init.php";
|
||||
require __DIR__ . "/../../../vendor/autoload.php";
|
||||
require __DIR__ . "/../../../config/dynamic/init.php";
|
||||
|
||||
use App\Classes\BookFetcher;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
require __DIR__ . "/../../vendor/autoload.php";
|
||||
require __DIR__ . "/../../server/utils/init.php";
|
||||
require __DIR__ . "/../../../vendor/autoload.php";
|
||||
require __DIR__ . "/../../../config/dynamic/init.php";
|
||||
|
||||
use App\Classes\GenreFetcher;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
require __DIR__ . "/../../vendor/autoload.php";
|
||||
require __DIR__ . "/../../server/utils/init.php";
|
||||
require __DIR__ . "/../../../vendor/autoload.php";
|
||||
require __DIR__ . "/../../../config/dynamic/init.php";
|
||||
|
||||
use App\Classes\MovieFetcher;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
require __DIR__ . "/../../vendor/autoload.php";
|
||||
require __DIR__ . "/../../server/utils/init.php";
|
||||
require __DIR__ . "/../../../vendor/autoload.php";
|
||||
require __DIR__ . "/../../../config/dynamic/init.php";
|
||||
|
||||
use App\Classes\ShowFetcher;
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
require __DIR__ . "/../vendor/autoload.php";
|
||||
require __DIR__ . "/../server/utils/init.php";
|
||||
require __DIR__ . "/../../vendor/autoload.php";
|
||||
require __DIR__ . "/../../config/dynamic/init.php";
|
||||
|
||||
use App\Classes\TagFetcher;
|
||||
use App\Classes\GlobalsFetcher;
|
15
src/includes/dynamic/media/now-playing.php.liquid
Normal file
15
src/includes/dynamic/media/now-playing.php.liquid
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
use App\Classes\LatestListenHandler;
|
||||
|
||||
$handler = new LatestListenHandler();
|
||||
$data = $handler->getLatestListen();
|
||||
|
||||
if (!empty($data['content'])):
|
||||
|
||||
?>
|
||||
<p class="now-playing">
|
||||
<mark>Now playing</mark> 
|
||||
<span class="content"><?= $data['content'] ?></span>
|
||||
</p>
|
||||
<?php endif; ?>
|
15
src/includes/dynamic/media/recent-media.php.liquid
Normal file
15
src/includes/dynamic/media/recent-media.php.liquid
Normal file
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
use App\Classes\RecentMediaHandler;
|
||||
|
||||
$handler = new RecentMediaHandler();
|
||||
$media = $handler->getRecentMedia();
|
||||
|
||||
if (!empty($media['recentMusic'])) echo renderMediaGrid($media['recentMusic'], 0, 'eager');
|
||||
if (!empty($media['recentWatchedRead'])) echo renderMediaGrid($media['recentWatchedRead'], 0, 'eager');
|
||||
|
||||
?>
|
||||
{% render "static/blocks/banners/rss.liquid",
|
||||
url:"/feeds",
|
||||
text:"Subscribe to my posts, movies, books, links or activity feed(s)"
|
||||
%}
|
41
src/includes/dynamic/media/recent-tracks.php.liquid
Normal file
41
src/includes/dynamic/media/recent-tracks.php.liquid
Normal file
|
@ -0,0 +1,41 @@
|
|||
<?php if (!empty($music['recent_tracks'])): ?>
|
||||
<div class="music-chart">
|
||||
<?php foreach (array_slice($music['recent_tracks'], 0, 10) as $item): ?>
|
||||
<?php $chart = $item['chart'] ?? []; ?>
|
||||
<div class="chart-item">
|
||||
<div class="meta">
|
||||
<a href="<?= htmlspecialchars($chart['url'] ?? '#') ?>">
|
||||
<img
|
||||
srcset="
|
||||
<?= htmlspecialchars($chart['image']) ?>?class=w50&type=webp 50w,
|
||||
<?= htmlspecialchars($chart['image']) ?>?class=w100&type=webp 100w
|
||||
"
|
||||
sizes="(max-width: 450px) 50px, 100px"
|
||||
src="<?= htmlspecialchars($chart['image']) ?>?class=w50&type=webp"
|
||||
alt="<?= htmlspecialchars($chart['alt'] ?? '') ?>"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
width="64"
|
||||
height="64"
|
||||
>
|
||||
</a>
|
||||
<div class="meta-text">
|
||||
<a class="title" href="<?= htmlspecialchars($chart['url'] ?? '#') ?>">
|
||||
<?= htmlspecialchars($chart['title'] ?? '') ?>
|
||||
</a>
|
||||
<span class="subheader"><?= htmlspecialchars($chart['subtext'] ?? '') ?></span>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (!empty($chart['played_at'])): ?>
|
||||
<?php
|
||||
$timestamp = (int) $chart['played_at'];
|
||||
$playedAt = (new DateTime("@$timestamp"))->setTimezone(new DateTimeZone('America/Los_Angeles'));
|
||||
?>
|
||||
<time datetime="<?= $playedAt->format('c') ?>">
|
||||
<?= $playedAt->format('F j, g:ia') ?>
|
||||
</time>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
|
@ -1,15 +0,0 @@
|
|||
{% render "media/grid.liquid",
|
||||
globals:globals,
|
||||
data:media.recentMusic,
|
||||
loading:"eager"
|
||||
%}
|
||||
{% render "media/grid.liquid",
|
||||
globals:globals,
|
||||
data:media.recentWatchedRead,
|
||||
shape:"vertical",
|
||||
loading:"eager"
|
||||
%}
|
||||
{% render "blocks/banners/rss.liquid",
|
||||
url:"/feeds",
|
||||
text:"Subscribe to my posts, movies, books, links or activity feed(s)"
|
||||
%}
|
|
@ -1,22 +0,0 @@
|
|||
{%- assign updateTime = "" -%}
|
||||
{%- if updated == "now" -%}
|
||||
{%- assign updateTime = "now" | date:"%B %-d, %l:%M %P", "America/Los_Angeles" -%}
|
||||
{%- elsif pageUpdated -%}
|
||||
{%- assign updateTime = page.updated | date:"%B %-d, %l:%M %P", "America/Los_Angeles" -%}
|
||||
{%- endif -%}
|
||||
<footer>
|
||||
{%- if updateTime -%}
|
||||
<p class="updated"><em>This page was last updated on {{ updateTime | strip }}.</em></p>
|
||||
{%- endif -%}
|
||||
{% render "nav/menu.liquid",
|
||||
page:page,
|
||||
nav:nav.footer_icons
|
||||
class:"social"
|
||||
%}
|
||||
{% render "nav/menu.liquid",
|
||||
page:page,
|
||||
nav:nav.footer_text
|
||||
class:"sub-pages"
|
||||
separator:true
|
||||
%}
|
||||
</footer>
|
|
@ -1,30 +0,0 @@
|
|||
<div class="music-chart">
|
||||
{%- for item in data limit:10 -%}
|
||||
<div class="chart-item">
|
||||
<div class="meta">
|
||||
<a href="{{ item.chart.url }}">
|
||||
<img
|
||||
srcset="
|
||||
{{ item.chart.image }}?class=w50&type=webp 50w,
|
||||
{{ item.chart.image }}?class=w100&type=webp 100w
|
||||
"
|
||||
sizes="(max-width: 450px) 50px, 100px"
|
||||
src="{{ item.chart.image }}?class=w50&type=webp"
|
||||
alt="{{ item.chart.alt | replaceQuotes }}"
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
width="64"
|
||||
height="64"
|
||||
>
|
||||
</a>
|
||||
<div class="meta-text">
|
||||
<a class="title" href="{{ item.chart.url }}">{{ item.chart.title }}</a>
|
||||
<span class="subheader">{{ item.chart.subtext }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<time datetime="{{ item.chart.played_at | date: "%Y-%m-%dT%H:%M:%S%:z", "America/Los_Angeles" }}">
|
||||
{{ item.chart.played_at | date:"%B %-d, %-I:%M%p", "America/Los_Angeles" }}
|
||||
</time>
|
||||
</div>
|
||||
{%- endfor -%}
|
||||
</div>
|
|
@ -35,7 +35,7 @@
|
|||
{% if key == "books" or key == "movies" or key == "shows" %}
|
||||
{% assign shape = "vertical" %}
|
||||
{% endif %}
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
data:items,
|
||||
shape:shape
|
||||
%}
|
|
@ -1,22 +1,22 @@
|
|||
{%- for block in blocks -%}
|
||||
{%- case block.type -%}
|
||||
{%- when "calendar_banner" -%}
|
||||
{% render "blocks/banners/calendar.liquid",
|
||||
{% render "static/blocks/banners/calendar.liquid",
|
||||
url:block.url,
|
||||
text:block.text
|
||||
%}
|
||||
{%- when "divider" -%}
|
||||
{{ block.markup | markdown }}
|
||||
{%- when "forgejo_banner" -%}
|
||||
{% render "blocks/banners/forgejo.liquid",
|
||||
{% render "static/blocks/banners/forgejo.liquid",
|
||||
url:block.url
|
||||
%}
|
||||
{%- when "github_banner" -%}
|
||||
{% render "blocks/banners/github.liquid",
|
||||
{% render "static/blocks/banners/github.liquid",
|
||||
url:block.url
|
||||
%}
|
||||
{%- when "hero" -%}
|
||||
{% render "blocks/hero.liquid",
|
||||
{% render "static/blocks/hero.liquid",
|
||||
globals:globals,
|
||||
image:block.image,
|
||||
alt:block.alt
|
||||
|
@ -24,17 +24,17 @@
|
|||
{%- when "markdown" -%}
|
||||
{{ block.text | markdown }}
|
||||
{%- when "npm_banner" -%}
|
||||
{% render "blocks/banners/npm.liquid",
|
||||
{% render "static/blocks/banners/npm.liquid",
|
||||
url:block.url,
|
||||
command:block.command
|
||||
%}
|
||||
{%- when "rss_banner" -%}
|
||||
{% render "blocks/banners/rss.liquid",
|
||||
{% render "static/blocks/banners/rss.liquid",
|
||||
url:block.url,
|
||||
text:block.text
|
||||
%}
|
||||
{%- when "youtube_player" -%}
|
||||
{% render "blocks/youtube-player.liquid",
|
||||
{% render "static/blocks/youtube-player.liquid",
|
||||
url:block.url
|
||||
%}
|
||||
{%- endcase -%}
|
|
@ -1,7 +1,6 @@
|
|||
<article class="intro">
|
||||
{{ intro }}
|
||||
{% render "blocks/now-playing.liquid",
|
||||
nowPlaying:nowPlaying
|
||||
{% render "dynamic/media/now-playing.php.liquid",
|
||||
section:"music"
|
||||
%}
|
||||
<hr />
|
|
@ -10,7 +10,7 @@
|
|||
• {{ item.label }}
|
||||
{%- if item.notes -%}
|
||||
{% assign notes = item.notes | markdown %}
|
||||
{% render "blocks/dialog.liquid",
|
||||
{% render "static/blocks/dialog.liquid",
|
||||
icon:"info-circle",
|
||||
label:"View info about this concert"
|
||||
dynamic:"optimized_concerts",
|
||||
|
@ -49,7 +49,7 @@
|
|||
{%- endif -%}
|
||||
{%- endif -%}
|
||||
</h3>
|
||||
{% render "blocks/tags.liquid",
|
||||
{% render "static/blocks/tags.liquid",
|
||||
tags:item.tags
|
||||
%}
|
||||
</article>
|
13
src/includes/static/layout/footer.liquid
Normal file
13
src/includes/static/layout/footer.liquid
Normal file
|
@ -0,0 +1,13 @@
|
|||
<footer>
|
||||
{% render "static/nav/menu.liquid",
|
||||
page:page,
|
||||
nav:nav.footer_icons
|
||||
class:"social"
|
||||
%}
|
||||
{% render "static/nav/menu.liquid",
|
||||
page:page,
|
||||
nav:nav.footer_text
|
||||
class:"sub-pages"
|
||||
separator:true
|
||||
%}
|
||||
</footer>
|
|
@ -20,13 +20,13 @@
|
|||
<a href="/" tabindex="0">{{ headerContent }}</a>
|
||||
{%- endif -%}
|
||||
</h1>
|
||||
{% render "nav/menu.liquid",
|
||||
{% render "static/nav/menu.liquid",
|
||||
page:page,
|
||||
nav:nav.primary_icons
|
||||
class:"icons"
|
||||
%}
|
||||
</section>
|
||||
{% render "nav/menu.liquid",
|
||||
{% render "static/nav/menu.liquid",
|
||||
page:page,
|
||||
nav:nav.primary
|
||||
class:"primary"
|
|
@ -42,6 +42,6 @@
|
|||
</a>
|
||||
{%- endfor -%}
|
||||
</div>
|
||||
{% render "nav/paginator.liquid",
|
||||
{% render "static/nav/paginator.liquid",
|
||||
pagination:pagination
|
||||
%}
|
|
@ -6,7 +6,7 @@
|
|||
<span class="subheader">{{ item.chart.plays }} {{ playsLabel }}</span>
|
||||
</div>
|
||||
<div class="chart-item-progress">
|
||||
{% render "media/progress-bar.liquid",
|
||||
{% render "static/media/progress-bar.liquid",
|
||||
percentage:item.chart.percentage
|
||||
%}
|
||||
</div>
|
|
@ -3,7 +3,7 @@
|
|||
{%- if count -%}
|
||||
{%- for item in data limit:count -%}
|
||||
<li value="{{ item.chart.rank }}">
|
||||
{% render "media/music/charts/item.liquid",
|
||||
{% render "static/media/music/charts/item.liquid",
|
||||
item:item
|
||||
%}
|
||||
</li>
|
||||
|
@ -11,7 +11,7 @@
|
|||
{%- else -%}
|
||||
{%- for item in pagination.items -%}
|
||||
<li value="{{ item.chart.rank }}">
|
||||
{% render "media/music/charts/item.liquid",
|
||||
{% render "static/media/music/charts/item.liquid",
|
||||
item:item
|
||||
%}
|
||||
</li>
|
||||
|
@ -19,6 +19,6 @@
|
|||
{%- endif -%}
|
||||
</ol>
|
||||
</div>
|
||||
{% render "nav/paginator.liquid",
|
||||
{% render "static/nav/paginator.liquid",
|
||||
pagination:pagination
|
||||
%}
|
|
@ -9,7 +9,7 @@
|
|||
({{ movie.year }})
|
||||
</div>
|
||||
</div>
|
||||
{% render "blocks/hero.liquid",
|
||||
{% render "static/blocks/hero.liquid",
|
||||
globals:globals,
|
||||
image:movie.backdrop,
|
||||
alt:movie.title
|
|
@ -2,7 +2,7 @@
|
|||
{%- assign source = page -%}
|
||||
{%- case schema -%}
|
||||
{%- when 'artist', 'genre', 'book', 'movie', 'show', 'tags' -%}
|
||||
{% render "fetchers/{{ schema }}.php.liquid" %}
|
||||
{% render "dynamic/fetchers/{{ schema }}.php.liquid" %}
|
||||
{%- when 'blog' -%}
|
||||
{%- assign source = post -%}
|
||||
{%- when 'music-index', 'music-week-artists' -%}
|
||||
|
@ -37,7 +37,7 @@
|
|||
{%- assign fullUrl = meta.url -%}
|
||||
{%- assign oembedUrl = globals.url | append: "/oembed" | append: page.url -%}
|
||||
{%- if type == 'dynamic' -%}
|
||||
{% render "metadata/dynamic.php.liquid"
|
||||
{% render "dynamic/metadata/index.php.liquid"
|
||||
fullUrl: fullUrl,
|
||||
oembedUrl: oembedUrl,
|
||||
pageTitle: meta.title,
|
||||
|
@ -46,7 +46,7 @@
|
|||
globals: globals,
|
||||
%}
|
||||
{%- else -%}
|
||||
{% render "metadata/static.liquid"
|
||||
{% render "static/metadata/static.liquid"
|
||||
fullUrl: fullUrl,
|
||||
oembedUrl: oembedUrl,
|
||||
pageTitle: meta.title,
|
||||
|
@ -55,7 +55,7 @@
|
|||
globals: globals,
|
||||
%}
|
||||
{%- endif %}
|
||||
{% render "metadata/base.liquid"
|
||||
{% render "static/metadata/base.liquid"
|
||||
pageTitle: meta.title,
|
||||
globals: globals,
|
||||
eleventy: eleventy,
|
|
@ -1,6 +1,7 @@
|
|||
{%- assign categoryUrl = link.permalink | downcase -%}
|
||||
{%- assign isHttp = categoryUrl contains "http" -%}
|
||||
{%- if categoryUrl | isLinkActive:page.url -%}
|
||||
{%- assign url = page.activeUrl | default: page.url -%}
|
||||
{%- if categoryUrl | isLinkActive:url -%}
|
||||
{%- capture linkClass -%}
|
||||
{%- if link.section -%}button{%- endif -%}
|
||||
{%- if link.icon -%}icon{%- endif -%}
|
|
@ -1,6 +1,6 @@
|
|||
<nav class="{{ class }}">
|
||||
{%- for link in nav -%}
|
||||
{% render "nav/link.liquid",
|
||||
{% render "static/nav/link.liquid",
|
||||
page:page,
|
||||
link:link
|
||||
%}
|
|
@ -9,7 +9,7 @@
|
|||
<link rel="stylesheet" href="/assets/styles/noscript.css?v={% appVersion %}" type="text/css" />
|
||||
</noscript>
|
||||
<link rel="stylesheet" href="/assets/styles/index.css?v={% appVersion %}" type="text/css" />
|
||||
{% render "metadata/index.liquid",
|
||||
{% render "static/metadata/index.liquid",
|
||||
schema:schema,
|
||||
type:type,
|
||||
page:page,
|
||||
|
@ -32,7 +32,7 @@
|
|||
<body>
|
||||
<div class="main-wrapper">
|
||||
<main>
|
||||
{% render "layout/header.liquid",
|
||||
{% render "static/layout/header.liquid",
|
||||
globals:globals,
|
||||
page:page,
|
||||
nav:nav
|
||||
|
@ -41,7 +41,7 @@
|
|||
{{ content }}
|
||||
</div>
|
||||
</main>
|
||||
{% render "layout/footer.liquid",
|
||||
{% render "static/layout/footer.liquid",
|
||||
page:page,
|
||||
nav:nav,
|
||||
updated:updated,
|
||||
|
|
7
src/meta/vendor.htaccess.liquid
Normal file
7
src/meta/vendor.htaccess.liquid
Normal file
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
permalink: "/vendor/.htaccess"
|
||||
layout: null
|
||||
eleventyExcludeFromCollections: true
|
||||
excludeFromSitemap: true
|
||||
---
|
||||
Require all denied
|
20
src/pages/dynamic/index.php.liquid
Normal file
20
src/pages/dynamic/index.php.liquid
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
permalink: /index.php
|
||||
---
|
||||
<?php
|
||||
require_once __DIR__ . '/../vendor/autoload.php';
|
||||
require_once __DIR__ . "/config/dynamic/init.php";
|
||||
?>
|
||||
{% render "static/home/intro.liquid"
|
||||
intro:globals.intro
|
||||
%}
|
||||
<article>
|
||||
<h2>
|
||||
{% tablericon "activity" %}
|
||||
Recent activity
|
||||
</h2>
|
||||
{% render "dynamic/media/recent-media.php.liquid" %}
|
||||
{% render "static/home/recent-activity.liquid"
|
||||
items:recentActivity
|
||||
%}
|
||||
</article>
|
|
@ -48,7 +48,7 @@ schema: book
|
|||
</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." %}
|
||||
{% render "static/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; ?>
|
|
@ -44,7 +44,7 @@ schema: movie
|
|||
<?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." %}
|
||||
{% render "static/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; ?>
|
77
src/pages/dynamic/media/music/index.php.liquid
Normal file
77
src/pages/dynamic/media/music/index.php.liquid
Normal file
|
@ -0,0 +1,77 @@
|
|||
---
|
||||
title: Music
|
||||
description: This is everything I've been listening to recently — it's collected in a database as I listen to it and displayed here.
|
||||
permalink: "/music/index.php"
|
||||
schema: music-index
|
||||
eleventyComputed:
|
||||
page:
|
||||
activeUrl: "/music"
|
||||
---
|
||||
<?php
|
||||
require_once __DIR__ . '/../../vendor/autoload.php';
|
||||
require_once __DIR__ . "/../config/dynamic/init.php";
|
||||
|
||||
use App\Classes\MusicDataHandler;
|
||||
|
||||
$handler = new MusicDataHandler();
|
||||
$music = $handler->getThisWeekData();
|
||||
?>
|
||||
<h2 class="page-title">{{ title }}</h2>
|
||||
<p>I've listened to <mark><?= number_format($music['total_artists']) ?> artists</mark>, <mark><?= number_format($music['total_albums']) ?> albums</mark> and <mark><?= number_format($music['total_tracks']) ?> tracks</mark> this week. Most of that has been <?= renderMediaLinks($music['week_genres'], 'genre', 5) ?>.</p>
|
||||
<p><mark>Take a look at what I've listened to</mark> <a href="/music/this-month">this month</a> or <a href="/music/concerts" class="concerts">check out the concerts I've been to</a>.</p>
|
||||
{% render "dynamic/media/now-playing.php.liquid" %}
|
||||
<hr />
|
||||
<?php if (!empty($music['week_artists'])): ?>
|
||||
<h3 id="artists">
|
||||
<a href="/music/this-week/artists">
|
||||
{% tablericon "microphone-2" %} Artists
|
||||
</a>
|
||||
</h3>
|
||||
<?php echo renderMediaGrid($music['week_artists'], 8, 'eager'); ?>
|
||||
<?php endif; ?>
|
||||
{% render "static/media/music/tables/all-time/artists.liquid",
|
||||
globals:globals,
|
||||
topArtists:topArtists
|
||||
%}
|
||||
<?php if (!empty($music['week_albums'])): ?>
|
||||
<h3 id="albums">
|
||||
<a href="/music/this-week/albums">
|
||||
{% tablericon "vinyl" %} Albums
|
||||
</a>
|
||||
</h3>
|
||||
<?php echo renderMediaGrid($music['week_albums'], 8, 'eager'); ?>
|
||||
<?php endif; ?>
|
||||
{% render "static/media/music/tables/all-time/albums.liquid",
|
||||
globals:globals,
|
||||
topAlbums:topAlbums
|
||||
%}
|
||||
<h3 id="tracks">
|
||||
<a href="/music/this-week/tracks/">
|
||||
{% tablericon "playlist" %}
|
||||
Tracks
|
||||
</a>
|
||||
</h3>
|
||||
<details open>
|
||||
<summary>Recent</summary>
|
||||
{% render "dynamic/media/recent-tracks.php.liquid" %}
|
||||
</details>
|
||||
<details>
|
||||
<summary>This week</summary>
|
||||
{% render "static/media/music/charts/rank.liquid",
|
||||
data:music.week.tracks,
|
||||
count:10
|
||||
%}
|
||||
</details>
|
||||
{%- if albumReleases.upcoming.size > 0 -%}
|
||||
<h3 id="album-releases">
|
||||
<a href="/music/album-releases/">
|
||||
{% tablericon "calendar-time" %}
|
||||
Anticipated albums
|
||||
</a>
|
||||
</h3>
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:albumReleases.upcoming,
|
||||
count:8
|
||||
%}
|
||||
{%- endif -%}
|
|
@ -41,7 +41,7 @@ schema: show
|
|||
<?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." %}
|
||||
{% render "static/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; ?>
|
|
@ -1,21 +0,0 @@
|
|||
---
|
||||
permalink: /
|
||||
updated: "now"
|
||||
---
|
||||
{% render "home/intro.liquid"
|
||||
intro:globals.intro,
|
||||
nowPlaying:nowPlaying.content
|
||||
%}
|
||||
<article>
|
||||
<h2>
|
||||
{% tablericon "activity" %}
|
||||
Recent activity
|
||||
</h2>
|
||||
{% render "home/recent-media.liquid"
|
||||
media:recentMedia,
|
||||
globals:globals
|
||||
%}
|
||||
{% render "home/recent-activity.liquid"
|
||||
items:recentActivity
|
||||
%}
|
||||
</article>
|
|
@ -1,76 +0,0 @@
|
|||
---
|
||||
title: Music
|
||||
description: This is everything I've been listening to recently — it's collected in a database as I listen to it and displayed here.
|
||||
permalink: "/music/index.html"
|
||||
schema: music-index
|
||||
updated: "now"
|
||||
---
|
||||
<h2 class="page-title">{{ title }}</h2>
|
||||
<p>I've listened to <mark>{{ music.week.artists.size }} artists</mark>, <mark>{{ music.week.albums.size }} albums</mark> and <mark>{{ music.week.totalTracks }} tracks</mark> this week. Most of that has been {{ music.week.genres | mediaLinks: "genre", 5 }}.</p>
|
||||
<p><mark>Take a look at what I've listened to</mark> <a href="/music/this-month">this month</a> or <a href="/music/concerts" class="concerts">check out the concerts I've been to</a>.</p>
|
||||
{% render "blocks/now-playing.liquid",
|
||||
nowPlaying:nowPlaying.content
|
||||
%}
|
||||
<hr />
|
||||
<h3 id="artists">
|
||||
<a href="/music/this-week/artists">
|
||||
{% tablericon "microphone-2" %} Artists
|
||||
</a>
|
||||
</h3>
|
||||
{% render "media/grid.liquid",
|
||||
globals:globals,
|
||||
data:music.week.artists,
|
||||
count:8,
|
||||
loading:"eager"
|
||||
%}
|
||||
{% render "media/music/tables/all-time/artists.liquid",
|
||||
globals:globals,
|
||||
topArtists:topArtists
|
||||
%}
|
||||
<h3 id="albums">
|
||||
<a href="/music/this-week/albums">
|
||||
{% tablericon "vinyl" %} Albums
|
||||
</a>
|
||||
</h3>
|
||||
{% render "media/grid.liquid",
|
||||
globals:globals,
|
||||
data:music.week.albums,
|
||||
count:8
|
||||
%}
|
||||
{% render "media/music/tables/all-time/albums.liquid",
|
||||
globals:globals,
|
||||
topAlbums:topAlbums
|
||||
%}
|
||||
<h3 id="tracks">
|
||||
<a href="/music/this-week/tracks/">
|
||||
{% tablericon "playlist" %}
|
||||
Tracks
|
||||
</a>
|
||||
</h3>
|
||||
<details open>
|
||||
<summary>Recent</summary>
|
||||
{% render "media/music/charts/recent.liquid",
|
||||
globals:globals,
|
||||
data:music.recent
|
||||
%}
|
||||
</details>
|
||||
<details>
|
||||
<summary>This week</summary>
|
||||
{% render "media/music/charts/rank.liquid",
|
||||
data:music.week.tracks,
|
||||
count:10
|
||||
%}
|
||||
</details>
|
||||
{%- if albumReleases.upcoming.size > 0 -%}
|
||||
<h3 id="album-releases">
|
||||
<a href="/music/album-releases/">
|
||||
{% tablericon "calendar-time" %}
|
||||
Anticipated albums
|
||||
</a>
|
||||
</h3>
|
||||
{% render "media/grid.liquid",
|
||||
globals:globals,
|
||||
data:albumReleases.upcoming,
|
||||
count:8
|
||||
%}
|
||||
{%- endif -%}
|
|
@ -35,7 +35,7 @@ permalink: "/music/concerts/{% if pagination.pageNumber > 0 %}{{ pagination.page
|
|||
<span class="client-side" style="display:inline">
|
||||
{%- if concert.concert_notes -%}
|
||||
{% assign notes = concert.concert_notes | markdown %}
|
||||
{% render "blocks/dialog.liquid",
|
||||
{% render "static/blocks/dialog.liquid",
|
||||
icon:"info-circle",
|
||||
label:"View info about this concert"
|
||||
dynamic:"optimized_concerts",
|
||||
|
@ -47,6 +47,6 @@ permalink: "/music/concerts/{% if pagination.pageNumber > 0 %}{{ pagination.page
|
|||
</li>
|
||||
{%- endfor -%}
|
||||
</ul>
|
||||
{% render "nav/paginator.liquid",
|
||||
{% render "static/nav/paginator.liquid",
|
||||
pagination:pagination
|
||||
%}
|
|
@ -3,18 +3,17 @@ title: Anticipated albums
|
|||
description: These are the album releases I'm currently looking forward to.
|
||||
permalink: "/music/album-releases/index.html"
|
||||
schema: music-releases
|
||||
updated: "now"
|
||||
---
|
||||
<h2 class="page-title">{{ title }}</h2>
|
||||
<p>These are all albums I'm looking forward to (this year — next year?).</p>
|
||||
<p><mark>Take a look at what I'm listening to</mark> <a href="/music/">now</a> or <a href="/music/concerts" class="concerts">check out the concerts I've been to</a>.</p>
|
||||
{% render "blocks/banners/calendar.liquid",
|
||||
{% render "static/blocks/banners/calendar.liquid",
|
||||
url:"/music/releases.ics",
|
||||
text:"Subscribe to my album releases calendar"
|
||||
%}
|
||||
<hr />
|
||||
{%- if albumReleases.upcoming.size > 0 -%}
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:albumReleases.upcoming,
|
||||
%}
|
|
@ -6,7 +6,6 @@ pagination:
|
|||
size: 24
|
||||
permalink: "/music/this-month/albums/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}/{% endif %}index.html"
|
||||
schema: music-month-albums
|
||||
updated: "now"
|
||||
---
|
||||
{% if pagination.pageNumber == 0 %}
|
||||
<h2 class="page-title">Albums this month</h2>
|
||||
|
@ -14,7 +13,7 @@ updated: "now"
|
|||
<p><mark>You can also take a look at</mark> the <a href="/music/this-month/artists">artists I've listened to this month</a>, <a href="/music/this-week/artists">the artists I've listened to this week</a> or <a href="/music/this-week/albums">the albums I've listened to this week</a>. <a href="/music/concerts" class="concerts">I also keep track of the concerts I've been to</a>.</p>
|
||||
<hr />
|
||||
{% endif %}
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:pagination.items,
|
||||
pagination:pagination
|
|
@ -6,7 +6,6 @@ pagination:
|
|||
size: 24
|
||||
permalink: "/music/this-month/artists/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}/{% endif %}index.html"
|
||||
schema: music-month-artists
|
||||
updated: "now"
|
||||
---
|
||||
{% if pagination.pageNumber == 0 %}
|
||||
<h2 class="page-title">Artists this month</h2>
|
||||
|
@ -14,7 +13,7 @@ updated: "now"
|
|||
<p><mark>You can also take a look at</mark> the <a href="/music/this-week/albums">the albums I've listened to this week</a>, <a href="/music/this-month/albums">albums I've listened to this month</a> or <a href="/music/this-week/artists">the artists I've listened to this week</a>. <a href="/music/concerts" class="concerts">I also keep track of the concerts I've been to</a>.</p>
|
||||
<hr />
|
||||
{% endif %}
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:pagination.items,
|
||||
pagination:pagination
|
|
@ -2,7 +2,6 @@
|
|||
title: Music this month
|
||||
description: This is everything I've been listening to this month — it's collected in a database as I listen to it and displayed here.
|
||||
permalink: "/music/this-month/index.html"
|
||||
updated: "now"
|
||||
---
|
||||
<h2 class="page-title">{{ title }}</h2>
|
||||
<p>I've listened to <mark>{{ music.month.artists.size }} artists</mark>, <mark>{{ music.month.albums.size }} albums</mark> and <mark>{{ music.month.totalTracks }} tracks</mark> this month. Most of that has been {{ music.month.genres | mediaLinks: "genre", 5 }}.</p>
|
||||
|
@ -13,7 +12,7 @@ updated: "now"
|
|||
{% tablericon "microphone-2" %} Artists
|
||||
</a>
|
||||
</h3>
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:music.month.artists,
|
||||
count:8,
|
||||
|
@ -24,13 +23,13 @@ updated: "now"
|
|||
{% tablericon "vinyl" %} Albums
|
||||
</a>
|
||||
</h3>
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:music.month.albums,
|
||||
count:8
|
||||
%}
|
||||
<h3 id="tracks">{% tablericon "playlist" %} Tracks</h3>
|
||||
{% render "media/music/charts/rank.liquid",
|
||||
{% render "static/media/music/charts/rank.liquid",
|
||||
data:music.month.tracks,
|
||||
count:10
|
||||
%}
|
|
@ -6,7 +6,6 @@ pagination:
|
|||
size: 24
|
||||
permalink: "/music/this-week/albums/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}/{% endif %}index.html"
|
||||
schema: music-week-albums
|
||||
updated: "now"
|
||||
---
|
||||
{% if pagination.pageNumber == 0 %}
|
||||
<h2 class="page-title">Albums this week</h2>
|
||||
|
@ -14,7 +13,7 @@ updated: "now"
|
|||
<p><mark>You can also take a look at</mark> the <a href="/music/this-month/artists">artists I've listened to this month</a>, <a href="/music/this-week/artists">the artists I've listened to this week</a> or <a href="/music/this-month/albums">the albums I've listened to this month</a>. <a href="/music/concerts" class="concerts">I also keep track of the concerts I've been to</a>.</p>
|
||||
<hr />
|
||||
{% endif %}
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:pagination.items,
|
||||
pagination:pagination
|
|
@ -6,7 +6,6 @@ pagination:
|
|||
size: 24
|
||||
permalink: "/music/this-week/artists/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}/{% endif %}index.html"
|
||||
schema: music-week-artists
|
||||
updated: "now"
|
||||
---
|
||||
{% if pagination.pageNumber == 0 %}
|
||||
<h2 class="page-title">Artists this week</h2>
|
||||
|
@ -14,7 +13,7 @@ updated: "now"
|
|||
<p><mark>You can also take a look at</mark> the <a href="/music/this-week/albums">albums I've listened to this week</a>, <a href="/music/this-month/albums">the albums I've listened to this month</a> or <a href="/music/this-month/artists">the artists I've listened to this month</a>. <a href="/music/concerts" class="concerts">I also keep track of the concerts I've been to</a>.</p>
|
||||
<hr />
|
||||
{% endif %}
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:pagination.items,
|
||||
pagination:pagination
|
|
@ -6,7 +6,6 @@ pagination:
|
|||
size: 30
|
||||
permalink: "/music/this-week/tracks/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}/{% endif %}index.html"
|
||||
schema: music-week-tracks
|
||||
updated: "now"
|
||||
---
|
||||
{% if pagination.pageNumber == 0 %}
|
||||
<h2 class="page-title">Artists this week</h2>
|
||||
|
@ -14,7 +13,7 @@ updated: "now"
|
|||
<p><mark>You can also take a look at</mark> the <a href="/music/this-week/albums">albums I've listened to this week</a>, <a href="/music/this-month/albums">the albums I've listened to this month</a>, <a href="/music/this-week/artists">the artists I've listened to this week</a> or the <a href="/music/this-month/artists">the artists I've listened to this month</a>. <a href="/music/concerts" class="concerts">I also keep track of the concerts I've been to</a>.</p>
|
||||
<hr />
|
||||
{% endif %}
|
||||
{% render "media/music/charts/rank.liquid",
|
||||
{% render "static/media/music/charts/rank.liquid",
|
||||
data:pagination.items,
|
||||
pagination:pagination
|
||||
%}
|
|
@ -3,19 +3,18 @@ title: Reading
|
|||
description: Here's what I'm reading at the moment.
|
||||
permalink: "/reading/index.html"
|
||||
schema: books
|
||||
updated: "now"
|
||||
---
|
||||
{%- assign currentYear = 'now' | date: "%Y" -%}
|
||||
{%- assign bookData = books.all | filterBooksByStatus: 'started' | reverse -%}
|
||||
{%- assign currentBookCount = books.currentYear | size -%}
|
||||
<h2 class="page-title">Reading</h2>
|
||||
<p>Here's what I'm reading at the moment. I've finished <mark>{{ currentBookCount }} books</mark> this year. I've read <mark>{{ books.daysRead }}</mark> days in a row and counting.</p>
|
||||
{% render "blocks/top-tags.liquid"
|
||||
{% render "static/blocks/top-tags.liquid"
|
||||
label:"Top genres"
|
||||
tags:topTags.books_genres
|
||||
%}
|
||||
<p class="book-years">{{ books.years | bookYearLinks }}</p>
|
||||
{% render "blocks/banners/rss.liquid",
|
||||
{% render "static/blocks/banners/rss.liquid",
|
||||
url: "/feeds/books.xml",
|
||||
text: "Subscribe to my books feed or follow along on this page"
|
||||
%}
|
||||
|
@ -47,7 +46,7 @@ updated: "now"
|
|||
<span class="sub-meta">By {{ book.author }}</span>
|
||||
{% endif %}
|
||||
{% if book.progress %}
|
||||
{% render "media/progress-bar.liquid",
|
||||
{% render "static/media/progress-bar.liquid",
|
||||
percentage:book.progress
|
||||
%}
|
||||
{% endif %}
|
|
@ -20,7 +20,7 @@ schema: reading-year
|
|||
<p>I finished <mark>{{ bookData.size }} book{% unless bookData.size == 1 %}s{% endunless %}</mark> in <mark>{{ year.value }}</mark>.{%- if favoriteBooks %} Among my favorites were {{ favoriteBooks }}.{%- endif -%}</p>
|
||||
{% endif %}
|
||||
<hr />
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:bookData,
|
||||
shape:"vertical",
|
|
@ -11,14 +11,14 @@ schema: favorite-movies
|
|||
<a href="/watching" class="back-link">{% tablericon "arrow-left" %} Back to watching</a>
|
||||
{% if pagination.pageNumber == 0 %}
|
||||
<h2 class="page-title">{{ title }}</h2>
|
||||
{% render "media/watching/hero.liquid",
|
||||
{% render "static/media/watching/hero.liquid",
|
||||
globals:globals,
|
||||
movie:randomFavoriteMovie
|
||||
%}
|
||||
<p>These are my favorite movies. You can also see the <a href="/watching/recent/shows/">shows I've watched recently</a>, <a href="/watching/recent/movies/">the movies I've watched recently</a>, <a href="/watching/favorites/shows/">my favorite shows</a> and the <a href="/watching/shows/upcoming/">shows I've got queued up to watch next</a>.</p>
|
||||
<hr />
|
||||
{% endif %}
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:pagination.items,
|
||||
pagination:pagination,
|
|
@ -11,14 +11,14 @@ schema: favorite-shows
|
|||
<a href="/watching" class="back-link">{% tablericon "arrow-left" %} Back to watching</a>
|
||||
{% if pagination.pageNumber == 0 %}
|
||||
<h2 class="page-title">{{ title }}</h2>
|
||||
{% render "media/watching/hero.liquid",
|
||||
{% render "static/media/watching/hero.liquid",
|
||||
globals:globals,
|
||||
movie:randomFavoriteShow
|
||||
%}
|
||||
<p>These are my favorite shows. You can also see the <a href="/watching/recent/movies/">movies I've watched recently</a>, <a href="/watching/recent/shows/">the shows I've watched recently</a>, <a href="/watching/favorites/movies/">my favorite movies</a> and the <a href="/watching/shows/upcoming/">shows I've got queued up to watch next</a>.</p>
|
||||
<hr />
|
||||
{% endif %}
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:pagination.items,
|
||||
pagination:pagination,
|
|
@ -3,22 +3,21 @@ title: Watching
|
|||
description: Here's all of the TV and movies I've been watching presented in what is (hopefully) an organized fashion.
|
||||
permalink: "/watching/index.html"
|
||||
schema: watching
|
||||
updated: "now"
|
||||
---
|
||||
{%- assign mergedMovies = movies.recentlyWatched | mergeArray: movies.favorites %}
|
||||
{%- assign mergedShows = tv.recentlyWatched | mergeArray: tv.favorites %}
|
||||
{%- assign overviewWatched = mergedMovies | mergeArray: mergedShows | shuffleArray | first -%}
|
||||
<h2 class="page-title">{{ title }}</h2>
|
||||
{% render "media/watching/hero.liquid",
|
||||
{% render "static/media/watching/hero.liquid",
|
||||
globals:globals,
|
||||
movie:overviewWatched
|
||||
%}
|
||||
<p>Here's all of the TV and movies I've been watching presented in what is (hopefully) an organized fashion. Recents, favorites — all of it. <a href="/watching/shows/upcoming">You can see all of the shows I've got queued up here</a>.</p>
|
||||
{% render "blocks/top-tags.liquid"
|
||||
{% render "static/blocks/top-tags.liquid"
|
||||
label:"Top genres"
|
||||
tags:topTags.watching_genres
|
||||
%}
|
||||
{% render "blocks/banners/rss.liquid",
|
||||
{% render "static/blocks/banners/rss.liquid",
|
||||
url: "/feeds/movies.xml",
|
||||
text: "Subscribe to my movies feed or follow along on this page"
|
||||
%}
|
||||
|
@ -28,7 +27,7 @@ updated: "now"
|
|||
{% tablericon "movie" %} Recent movies
|
||||
</a>
|
||||
</h3>
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:movies.recentlyWatched,
|
||||
shape:"vertical",
|
||||
|
@ -39,7 +38,7 @@ updated: "now"
|
|||
{% tablericon "device-tv-old" %} Recent shows
|
||||
</a>
|
||||
</h3>
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:tv.recentlyWatched,
|
||||
shape:"vertical",
|
||||
|
@ -51,7 +50,7 @@ updated: "now"
|
|||
</a>
|
||||
</h3>
|
||||
{% assign favoriteMovies = movies.favorites | shuffleArray %}
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:favoriteMovies,
|
||||
shape:"vertical",
|
||||
|
@ -63,7 +62,7 @@ updated: "now"
|
|||
</a>
|
||||
</h3>
|
||||
{% assign favoriteShows = tv.favorites | shuffleArray %}
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:favoriteShows,
|
||||
shape:"vertical",
|
|
@ -11,14 +11,14 @@ schema: favorite-movies
|
|||
<a href="/watching" class="back-link">{% tablericon "arrow-left" %} Back to watching</a>
|
||||
{% if pagination.pageNumber == 0 %}
|
||||
<h2 class="page-title">{{ title }}</h2>
|
||||
{% render "media/watching/hero.liquid",
|
||||
{% render "static/media/watching/hero.liquid",
|
||||
globals:globals,
|
||||
movie:randomRecentMovie
|
||||
%}
|
||||
<p>These are all of the movies I've watched recently. You can also see the <a href="/watching/recent/shows/">shows I've watched recently</a>, <a href="/watching/favorites/movies/">my favorite movies</a>, <a href="/watching/favorites/shows/">my favorite shows</a> and the <a href="/watching/shows/upcoming/">shows I've got queued up to watch next</a>.</p>
|
||||
<hr />
|
||||
{% endif %}
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:pagination.items,
|
||||
pagination:pagination,
|
|
@ -11,14 +11,14 @@ schema: favorite-shows
|
|||
<a href="/watching" class="back-link">{% tablericon "arrow-left" %} Back to watching</a>
|
||||
{% if pagination.pageNumber == 0 %}
|
||||
<h2 class="page-title">{{ title }}</h2>
|
||||
{% render "media/watching/hero.liquid",
|
||||
{% render "static/media/watching/hero.liquid",
|
||||
globals:globals,
|
||||
movie:randomRecentShow
|
||||
%}
|
||||
<p>These are all of the shows I've watched recently. You can also see the <a href="/watching/recent/movies/">movies I've watched recently</a>, <a href="/watching/favorites/shows/">my favorite shows</a>, <a href="/watching/favorites/movies/">my favorite movies</a> and the <a href="/watching/shows/upcoming/">shows I've got queued up to watch next</a>.</p>
|
||||
<hr />
|
||||
{% endif %}
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:pagination.items,
|
||||
pagination:pagination,
|
|
@ -3,12 +3,11 @@ title: Upcoming shows
|
|||
description: Here are all of the episodes I've got queued up from the shows I'm watching.
|
||||
permalink: "/watching/shows/upcoming/index.html"
|
||||
schema: upcoming-shows
|
||||
updated: "now"
|
||||
---
|
||||
{%- assign featuredMovie = upcomingShows.watching | shuffleArray | first -%}
|
||||
<a href="/watching" class="back-link">{% tablericon "arrow-left" %} Back to watching</a>
|
||||
<h2 class="page-title">{{ title }}</h2>
|
||||
{% render "media/watching/hero.liquid",
|
||||
{% render "static/media/watching/hero.liquid",
|
||||
globals:globals,
|
||||
movie:featuredMovie
|
||||
%}
|
||||
|
@ -16,13 +15,13 @@ updated: "now"
|
|||
<p>You can also see the <a href="/watching/recent/movies/">movies</a> and <a href="/watching/recent/shows/">shows</a> I've watched recently, <a href="/watching/favorites/shows/">my favorite shows</a> and <a href="/watching/favorites/movies/">my favorite movies</a>.</p>
|
||||
<hr />
|
||||
<h3>Watching</h3>
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:upcomingShows.watching,
|
||||
shape:"vertical"
|
||||
%}
|
||||
<h3>Not started</h3>
|
||||
{% render "media/grid.liquid",
|
||||
{% render "static/media/grid.liquid",
|
||||
globals:globals,
|
||||
data:upcomingShows.unstarted,
|
||||
shape:"vertical"
|
|
@ -5,10 +5,9 @@ pagination:
|
|||
alias: page
|
||||
permalink: "{{ page.permalink }}/index.html"
|
||||
image: "{{ page.metadata.open_graph_image | default: globals.avatar }}"
|
||||
updated: "{{ page.updated | default: null }}"
|
||||
schema: page
|
||||
---
|
||||
{% render "blocks/index.liquid",
|
||||
{% render "static/blocks/index.liquid",
|
||||
blocks:page.blocks,
|
||||
globals:globals,
|
||||
collections:collections,
|
|
@ -5,7 +5,7 @@ description: Search through posts and other content on my site.
|
|||
---
|
||||
<h2 class="page-title">Search</h2>
|
||||
<p>You can find <a href="/posts">posts</a>, <a href="/links">links</a>, <a href="/music/#artists">artists</a>, genres, <a href="/watching#movies">movies</a>, <a href="/watching#tv">shows</a> and <a href="/reading">books</a> via the field below (though it only surfaces movies and shows I've watched and books I've written something about). <a href="/tags">You can also browse my tags list</a>.</p>
|
||||
{% render "blocks/top-tags.liquid"
|
||||
{% render "static/blocks/top-tags.liquid"
|
||||
label:"Top tags"
|
||||
tags:topTags.tags
|
||||
%}
|
||||
|
|
|
@ -9,11 +9,11 @@ permalink: "/links/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}
|
|||
{% if pagination.pageNumber == 0 %}
|
||||
<h2 class="page-title">Links</h2>
|
||||
<p>These are links I've liked or otherwise found interesting. They're all added manually, after having been read and, I suppose, properly considered.</p>
|
||||
{% render "blocks/top-tags.liquid"
|
||||
{% render "static/blocks/top-tags.liquid"
|
||||
label:"Top tags"
|
||||
tags:topTags.tags
|
||||
%}
|
||||
{% render "blocks/banners/rss.liquid",
|
||||
{% render "static/blocks/banners/rss.liquid",
|
||||
url: "/feeds/links.xml",
|
||||
text: "Subscribe to my links feed or follow along on this page"
|
||||
%}
|
||||
|
@ -25,12 +25,12 @@ permalink: "/links/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}
|
|||
<time datetime="{{ link.date }}">{{ link.date | date: "%B %e, %Y" }}</time>
|
||||
<a href="{{ link.link }}" title="{{ link.title | escape }}"><h3>{{ link.title }}</h3></a>
|
||||
{% if link.author %} via <a href="{{ link.author.url }}">{{ link.author.name }}</a>{% endif %}
|
||||
{% render "blocks/tags.liquid",
|
||||
{% render "static/blocks/tags.liquid",
|
||||
tags:link.tags
|
||||
%}
|
||||
</article>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% render "nav/paginator.liquid",
|
||||
{% render "static/nav/paginator.liquid",
|
||||
pagination:pagination
|
||||
%}
|
|
@ -9,11 +9,11 @@ permalink: "/posts/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}
|
|||
<h2 class="page-title">Posts</h2>
|
||||
<p>These are all of my blog posts on this site (I like some more than others).</p>
|
||||
<p>I tend to write about whatever strikes me, with a focus on development, technology, automation or issues I run into with these things. This is all typically light on editing with and heavy on spur of the moment thoughts.</p>
|
||||
{% render "blocks/top-tags.liquid"
|
||||
{% render "static/blocks/top-tags.liquid"
|
||||
label:"Top tags"
|
||||
tags:topTags.tags
|
||||
%}
|
||||
{% render "blocks/banners/rss.liquid",
|
||||
{% render "static/blocks/banners/rss.liquid",
|
||||
url: "/feeds/posts.xml",
|
||||
text: "Subscribe to my posts feed or follow along on this page"
|
||||
%}
|
||||
|
@ -30,7 +30,7 @@ permalink: "/posts/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}
|
|||
<h3>
|
||||
<a href="{{ post.url }}">{{ post.title }}</a>
|
||||
</h3>
|
||||
{% render "blocks/tags.liquid",
|
||||
{% render "static/blocks/tags.liquid",
|
||||
tags:post.tags
|
||||
%}
|
||||
{% assign description = post.description | strip_newlines | strip %}
|
||||
|
@ -39,6 +39,6 @@ permalink: "/posts/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}
|
|||
{% endif %}
|
||||
</article>
|
||||
{% endfor %}
|
||||
{% render "nav/paginator.liquid",
|
||||
{% render "static/nav/paginator.liquid",
|
||||
pagination:pagination
|
||||
%}
|
|
@ -14,11 +14,11 @@ schema: blog
|
|||
</time>
|
||||
</aside>
|
||||
<h3>{{ post.title }}</h3>
|
||||
{% render "blocks/tags.liquid",
|
||||
{% render "static/blocks/tags.liquid",
|
||||
tags:post.tags
|
||||
%}
|
||||
<div>
|
||||
{% render "blocks/banners/old-post.liquid",
|
||||
{% render "static/blocks/banners/old-post.liquid",
|
||||
isOldPost:post.old_post
|
||||
%}
|
||||
{%- if post.image -%}
|
||||
|
@ -43,10 +43,10 @@ schema: blog
|
|||
>
|
||||
{%- endif -%}
|
||||
{{ post.content | markdown }}
|
||||
{% render "blocks/index.liquid",
|
||||
{% render "static/blocks/index.liquid",
|
||||
blocks:post.blocks
|
||||
%}
|
||||
{% render "blocks/associated-media.liquid",
|
||||
{% render "static/blocks/associated-media.liquid",
|
||||
artists: post.artists,
|
||||
books: post.books,
|
||||
genres: post.genres,
|
|
@ -2,7 +2,6 @@
|
|||
title: Stats
|
||||
permalink: /stats/index.html
|
||||
description: Some basic stats about my activity on this site.
|
||||
updated: "now"
|
||||
---
|
||||
<h2 class="page-title">Stats</h2>
|
||||
<p>I share the <a href="/music" class="music">music I listen to</a>, <a href="/music/concerts" class="concerts">concerts I attend</a>, <a href="/watching" class="tv">shows and movies I watch</a>, <a href="/reading" class="books">books I read</a>, <a href="/posts" class="article">posts I write</a>, and <a href="/links" class="link">links I enjoy</a> on this site. I have some basic counts of each below.</p>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue