-
-
Subscribe by adding the URL below to your feed reader of choice.
+
+
+
+
+ Subscribe by adding the URL below to your feed reader
+ of choice.
+
-
View more of the feeds from my site.
+
+ View more of the feeds from my site.
+
-
Published:
+
Published:
-
+
@@ -48,7 +62,10 @@
diff --git a/src/assets/styles/index.css b/src/assets/styles/index.css
index 0c5d0897..d021e587 100644
--- a/src/assets/styles/index.css
+++ b/src/assets/styles/index.css
@@ -1,40 +1,40 @@
@layer reset, defaults, base, page, components, plugins;
/* style resets */
-@import url('./reset.css') layer(reset);
+@import url("./reset.css") layer(reset);
/* core defaults */
-@import url('./defaults/fonts.css') layer(defaults);
-@import url('./defaults/vars.css') layer(defaults);
+@import url("./defaults/fonts.css") layer(defaults);
+@import url("./defaults/vars.css") layer(defaults);
- /* base styles */
-@import url('./base/index.css') layer(base);
+/* base styles */
+@import url("./base/index.css") layer(base);
/* plugins */
-@import url('./plugins/prism.css') layer(plugins);
+@import url("./plugins/prism.css") layer(plugins);
/* page styles */
-@import url('./pages/about.css') layer(page);
-@import url('./pages/books.css') layer(page);
-@import url('./pages/blogroll.css') layer(page);
-@import url('./pages/contact.css') layer(page);
-@import url('./pages/feeds.css') layer(page);
-@import url('./pages/links.css') layer(page);
-@import url('./pages/music.css') layer(page);
-@import url('./pages/articles.css') layer(page);
-@import url('./pages/watching.css') layer(page);
-@import url('./pages/webrings.css') layer(page);
+@import url("./pages/about.css") layer(page);
+@import url("./pages/books.css") layer(page);
+@import url("./pages/blogroll.css") layer(page);
+@import url("./pages/contact.css") layer(page);
+@import url("./pages/feeds.css") layer(page);
+@import url("./pages/links.css") layer(page);
+@import url("./pages/music.css") layer(page);
+@import url("./pages/articles.css") layer(page);
+@import url("./pages/watching.css") layer(page);
+@import url("./pages/webrings.css") layer(page);
/* component styles */
-@import url('./components/badge-grid.css') layer(components);
-@import url('./components/banners.css') layer(components);
-@import url('./components/buttons.css') layer(components);
-@import url('./components/forms.css') layer(components);
-@import url('./components/mastodon-post.css') layer(components);
-@import url('./components/media-grid.css') layer(components);
-@import url('./components/menu.css') layer(components);
-@import url('./components/modal.css') layer(components);
-@import url('./components/music-chart.css') layer(components);
-@import url('./components/paginator.css') layer(components);
-@import url('./components/progress-bar.css') layer(components);
-@import url('./components/theme-toggle.css') layer(components);
\ No newline at end of file
+@import url("./components/badge-grid.css") layer(components);
+@import url("./components/banners.css") layer(components);
+@import url("./components/buttons.css") layer(components);
+@import url("./components/forms.css") layer(components);
+@import url("./components/mastodon-post.css") layer(components);
+@import url("./components/media-grid.css") layer(components);
+@import url("./components/menu.css") layer(components);
+@import url("./components/modal.css") layer(components);
+@import url("./components/music-chart.css") layer(components);
+@import url("./components/paginator.css") layer(components);
+@import url("./components/progress-bar.css") layer(components);
+@import url("./components/theme-toggle.css") layer(components);
diff --git a/src/assets/styles/pages/about.css b/src/assets/styles/pages/about.css
index ccbafde9..5ad415d7 100644
--- a/src/assets/styles/pages/about.css
+++ b/src/assets/styles/pages/about.css
@@ -26,4 +26,4 @@
.about-title {
text-align: center;
-}
\ No newline at end of file
+}
diff --git a/src/assets/styles/pages/articles.css b/src/assets/styles/pages/articles.css
index f1affc46..8544955f 100644
--- a/src/assets/styles/pages/articles.css
+++ b/src/assets/styles/pages/articles.css
@@ -77,4 +77,4 @@ sup.footnote-ref {
sup.footnote-ref a,
.footnote-backref {
text-decoration: none;
-}
\ No newline at end of file
+}
diff --git a/src/assets/styles/pages/blogroll.css b/src/assets/styles/pages/blogroll.css
index 8ca3468c..37d43ba0 100644
--- a/src/assets/styles/pages/blogroll.css
+++ b/src/assets/styles/pages/blogroll.css
@@ -1,3 +1,3 @@
.blog-roll-icons {
display: flex;
-}
\ No newline at end of file
+}
diff --git a/src/assets/styles/pages/books.css b/src/assets/styles/pages/books.css
index 9ed9f1a0..65cfc74a 100644
--- a/src/assets/styles/pages/books.css
+++ b/src/assets/styles/pages/books.css
@@ -27,7 +27,8 @@
max-width: calc(var(--sizing-3xl) * 4);
height: auto;
aspect-ratio: var(--aspect-ratio-vertical);
- transition: border-color var(--transition-duration-default) var(--transition-ease-in-out);
+ transition: border-color var(--transition-duration-default)
+ var(--transition-ease-in-out);
}
& a:focus img,
@@ -136,4 +137,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/styles/pages/contact.css b/src/assets/styles/pages/contact.css
index de274219..63d00808 100644
--- a/src/assets/styles/pages/contact.css
+++ b/src/assets/styles/pages/contact.css
@@ -43,4 +43,4 @@
& h2 {
margin: 0;
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/styles/pages/feeds.css b/src/assets/styles/pages/feeds.css
index 9ea4bf05..2867323c 100644
--- a/src/assets/styles/pages/feeds.css
+++ b/src/assets/styles/pages/feeds.css
@@ -44,4 +44,4 @@
& footer {
padding-bottom: var(--spacing-3xl);
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/styles/pages/links.css b/src/assets/styles/pages/links.css
index 7ac97bec..67e56abb 100644
--- a/src/assets/styles/pages/links.css
+++ b/src/assets/styles/pages/links.css
@@ -13,4 +13,4 @@
border-radius: var(--border-radius-slight);
padding: var(--spacing-xs) var(--spacing-sm);
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/styles/pages/music.css b/src/assets/styles/pages/music.css
index 6e1c53d2..0329e8e6 100644
--- a/src/assets/styles/pages/music.css
+++ b/src/assets/styles/pages/music.css
@@ -81,4 +81,4 @@
p.concerts + ul + hr {
display: none;
-}
\ No newline at end of file
+}
diff --git a/src/assets/styles/pages/watching.css b/src/assets/styles/pages/watching.css
index 581998b6..05fcd8d1 100644
--- a/src/assets/styles/pages/watching.css
+++ b/src/assets/styles/pages/watching.css
@@ -45,7 +45,7 @@ a:active > .watching.hero::after {
&::after {
position: absolute;
z-index: 1;
- content: '';
+ content: "";
top: 0;
left: 0;
box-shadow: var(--box-shadow-media);
@@ -53,7 +53,8 @@ a:active > .watching.hero::after {
height: 100%;
border: var(--border-default);
border-radius: var(--border-radius-slight);
- transition: border-color var(--transition-duration-default) var(--transition-ease-in-out);
+ transition: border-color var(--transition-duration-default)
+ var(--transition-ease-in-out);
}
}
@@ -98,4 +99,4 @@ a:active > .watching.hero::after {
.icon-link + .poster.grid {
margin-top: var(--spacing-base);
-}
\ No newline at end of file
+}
diff --git a/src/assets/styles/pages/webrings.css b/src/assets/styles/pages/webrings.css
index cc23c248..e1588931 100644
--- a/src/assets/styles/pages/webrings.css
+++ b/src/assets/styles/pages/webrings.css
@@ -20,4 +20,4 @@
display: flex;
}
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/styles/plugins/prism.css b/src/assets/styles/plugins/prism.css
index e7a8219d..09da3995 100644
--- a/src/assets/styles/plugins/prism.css
+++ b/src/assets/styles/plugins/prism.css
@@ -20,7 +20,7 @@ pre {
margin: var(--sizing-xl) 0;
overflow: auto;
- & > code {
+ & > code {
padding: 0;
}
}
@@ -108,4 +108,4 @@ pre,
&.bold {
font-weight: var(--font-weight-bold);
}
-}
\ No newline at end of file
+}
diff --git a/src/assets/styles/reset.css b/src/assets/styles/reset.css
index 8ed94993..27f25b6d 100644
--- a/src/assets/styles/reset.css
+++ b/src/assets/styles/reset.css
@@ -1,4 +1,6 @@
-*, *::before, *::after {
+*,
+*::before,
+*::after {
box-sizing: border-box;
margin: 0;
}
@@ -9,10 +11,19 @@ body {
-webkit-text-size-adjust: none;
}
-input, button, textarea, select {
+input,
+button,
+textarea,
+select {
font: inherit;
}
-p, h1, h2, h3, h4, h5, h6 {
+p,
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
overflow-wrap: break-word;
-}
\ No newline at end of file
+}
diff --git a/src/assets/styles/styles.json b/src/assets/styles/styles.json
index 15680bcb..b8225347 100644
--- a/src/assets/styles/styles.json
+++ b/src/assets/styles/styles.json
@@ -1,3 +1,3 @@
{
"eleventyExcludeFromCollections": true
-}
\ No newline at end of file
+}
diff --git a/src/data/activity.js b/src/data/activity.js
index 55dabad4..e4caabae 100644
--- a/src/data/activity.js
+++ b/src/data/activity.js
@@ -1,20 +1,20 @@
-import { createClient } from '@supabase/supabase-js'
+import { createClient } from "@supabase/supabase-js";
-const SUPABASE_URL = process.env.SUPABASE_URL
-const SUPABASE_KEY = process.env.SUPABASE_KEY
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
+const SUPABASE_URL = process.env.SUPABASE_URL;
+const SUPABASE_KEY = process.env.SUPABASE_KEY;
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
export default async function fetchActivity() {
const { data, error } = await supabase
- .from('optimized_all_activity')
- .select('feed')
+ .from("optimized_all_activity")
+ .select("feed");
if (error) {
- console.error('Error fetching activity data:', error)
- return []
+ console.error("Error fetching activity data:", error);
+ return [];
}
- const [{ feed } = {}] = data
+ const [{ feed } = {}] = data;
- return feed?.filter(item => item['feed'] !== null) || []
-}
\ No newline at end of file
+ return feed?.filter((item) => item["feed"] !== null) || [];
+}
diff --git a/src/data/albumReleases.js b/src/data/albumReleases.js
index 94d3a8c4..464d9c3a 100644
--- a/src/data/albumReleases.js
+++ b/src/data/albumReleases.js
@@ -1,43 +1,47 @@
-import { createClient } from '@supabase/supabase-js'
-import { DateTime } from 'luxon'
+import { createClient } from "@supabase/supabase-js";
+import { DateTime } from "luxon";
-const SUPABASE_URL = process.env.SUPABASE_URL
-const SUPABASE_KEY = process.env.SUPABASE_KEY
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
+const SUPABASE_URL = process.env.SUPABASE_URL;
+const SUPABASE_KEY = process.env.SUPABASE_KEY;
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
const fetchAlbumReleases = async () => {
- const today = DateTime.utc().startOf('day').toSeconds()
+ const today = DateTime.utc().startOf("day").toSeconds();
const { data, error } = await supabase
- .from('optimized_album_releases')
- .select('*')
+ .from("optimized_album_releases")
+ .select("*");
if (error) {
- console.error('Error fetching data:', error)
- return []
+ console.error("Error fetching data:", error);
+ return [];
}
- const all = data.map(album => {
- const releaseDate = DateTime.fromSeconds(album['release_timestamp']).toUTC().startOf('day')
+ const all = data
+ .map((album) => {
+ const releaseDate = DateTime.fromSeconds(album["release_timestamp"])
+ .toUTC()
+ .startOf("day");
- return {
- ...album,
- description: album['artist']['description'],
- date: releaseDate.toLocaleString(DateTime.DATE_FULL),
- timestamp: releaseDate.toSeconds()
- }
- }).sort((a, b) => a['timestamp'] - b['timestamp'])
+ return {
+ ...album,
+ description: album["artist"]["description"],
+ date: releaseDate.toLocaleString(DateTime.DATE_FULL),
+ timestamp: releaseDate.toSeconds(),
+ };
+ })
+ .sort((a, b) => a["timestamp"] - b["timestamp"]);
- const upcoming = all.filter(album => album['release_timestamp'] > today)
+ const upcoming = all.filter((album) => album["release_timestamp"] > today);
- return { all, upcoming }
-}
+ return { all, upcoming };
+};
export default async function () {
try {
- return await fetchAlbumReleases()
+ return await fetchAlbumReleases();
} catch (error) {
- console.error('Error fetching and processing album releases:', error)
- return []
+ console.error("Error fetching and processing album releases:", error);
+ return [];
}
-}
\ No newline at end of file
+}
diff --git a/src/data/artists.js b/src/data/artists.js
index c8ba947a..fac0065f 100644
--- a/src/data/artists.js
+++ b/src/data/artists.js
@@ -1,47 +1,47 @@
-import { createClient } from '@supabase/supabase-js'
-import { parseCountryField } from '../../config/utilities/index.js'
+import { createClient } from "@supabase/supabase-js";
+import { parseCountryField } from "../../config/utilities/index.js";
-const SUPABASE_URL = process.env.SUPABASE_URL
-const SUPABASE_KEY = process.env.SUPABASE_KEY
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
-const PAGE_SIZE = 1000
+const SUPABASE_URL = process.env.SUPABASE_URL;
+const SUPABASE_KEY = process.env.SUPABASE_KEY;
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
+const PAGE_SIZE = 1000;
const fetchAllArtists = async () => {
- let artists = []
- let rangeStart = 0
+ let artists = [];
+ let rangeStart = 0;
while (true) {
const { data, error } = await supabase
- .from('optimized_artists')
- .select('*')
- .range(rangeStart, rangeStart + PAGE_SIZE - 1)
+ .from("optimized_artists")
+ .select("*")
+ .range(rangeStart, rangeStart + PAGE_SIZE - 1);
if (error) {
- console.error('Error fetching artists:', error)
- break
+ console.error("Error fetching artists:", error);
+ break;
}
- artists = artists.concat(data)
- if (data.length < PAGE_SIZE) break
- rangeStart += PAGE_SIZE
+ artists = artists.concat(data);
+ if (data.length < PAGE_SIZE) break;
+ rangeStart += PAGE_SIZE;
}
- return artists
-}
+ return artists;
+};
const processArtists = (artists) => {
- return artists.map(artist => ({
+ return artists.map((artist) => ({
...artist,
- country: parseCountryField(artist['country']),
- }))
-}
+ country: parseCountryField(artist["country"]),
+ }));
+};
export default async function () {
try {
- const artists = await fetchAllArtists()
- return processArtists(artists)
+ const artists = await fetchAllArtists();
+ return processArtists(artists);
} catch (error) {
- console.error('Error fetching and processing artists data:', error)
- return []
+ console.error("Error fetching and processing artists data:", error);
+ return [];
}
-}
\ No newline at end of file
+}
diff --git a/src/data/blogroll.js b/src/data/blogroll.js
index 61e460d2..d955392e 100644
--- a/src/data/blogroll.js
+++ b/src/data/blogroll.js
@@ -1,29 +1,31 @@
-import { createClient } from '@supabase/supabase-js'
+import { createClient } from "@supabase/supabase-js";
-const SUPABASE_URL = process.env.SUPABASE_URL
-const SUPABASE_KEY = process.env.SUPABASE_KEY
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
+const SUPABASE_URL = process.env.SUPABASE_URL;
+const SUPABASE_KEY = process.env.SUPABASE_KEY;
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
const fetchBlogroll = async () => {
const { data, error } = await supabase
- .from('authors')
- .select('*')
- .eq('blogroll', true)
- .order('name', { ascending: true })
+ .from("authors")
+ .select("*")
+ .eq("blogroll", true)
+ .order("name", { ascending: true });
if (error) {
- console.error('Error fetching authors for the blogroll:', error)
- return []
+ console.error("Error fetching authors for the blogroll:", error);
+ return [];
}
- return data.sort((a, b) => a['name'].toLowerCase().localeCompare(b['name'].toLowerCase()))
-}
+ return data.sort((a, b) =>
+ a["name"].toLowerCase().localeCompare(b["name"].toLowerCase())
+ );
+};
export default async function () {
try {
- return await fetchBlogroll()
+ return await fetchBlogroll();
} catch (error) {
- console.error('Error fetching and processing the blogroll:', error)
- return []
+ console.error("Error fetching and processing the blogroll:", error);
+ return [];
}
-}
\ No newline at end of file
+}
diff --git a/src/data/books.js b/src/data/books.js
index e4128157..e23f2c76 100644
--- a/src/data/books.js
+++ b/src/data/books.js
@@ -1,60 +1,60 @@
-import { createClient } from '@supabase/supabase-js'
+import { createClient } from "@supabase/supabase-js";
-const SUPABASE_URL = process.env.SUPABASE_URL
-const SUPABASE_KEY = process.env.SUPABASE_KEY
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
-const PAGE_SIZE = 1000
+const SUPABASE_URL = process.env.SUPABASE_URL;
+const SUPABASE_KEY = process.env.SUPABASE_KEY;
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
+const PAGE_SIZE = 1000;
const fetchAllBooks = async () => {
- let books = []
- let rangeStart = 0
+ let books = [];
+ let rangeStart = 0;
while (true) {
const { data, error } = await supabase
- .from('optimized_books')
- .select('*')
- .order('date_finished', { ascending: false })
- .range(rangeStart, rangeStart + PAGE_SIZE - 1)
+ .from("optimized_books")
+ .select("*")
+ .order("date_finished", { ascending: false })
+ .range(rangeStart, rangeStart + PAGE_SIZE - 1);
if (error) {
- console.error('Error fetching books:', error)
- break
+ console.error("Error fetching books:", error);
+ break;
}
- books = books.concat(data)
- if (data.length < PAGE_SIZE) break
- rangeStart += PAGE_SIZE
+ books = books.concat(data);
+ if (data.length < PAGE_SIZE) break;
+ rangeStart += PAGE_SIZE;
}
- return books
-}
+ return books;
+};
const sortBooksByYear = (books) => {
- const years = {}
- books.forEach(book => {
- const year = book['year']
+ const years = {};
+ books.forEach((book) => {
+ const year = book["year"];
if (!years[year]) {
- years[year] = { value: year, data: [book] }
+ years[year] = { value: year, data: [book] };
} else {
- years[year]['data'].push(book)
+ years[year]["data"].push(book);
}
- })
- return Object.values(years).filter(year => year['value'] > 2017)
-}
+ });
+ return Object.values(years).filter((year) => year["value"] > 2017);
+};
-const currentYear = new Date().getFullYear()
+const currentYear = new Date().getFullYear();
export default async function () {
- const books = await fetchAllBooks()
- const sortedByYear = sortBooksByYear(books)
- const booksForCurrentYear = sortedByYear.find(
- yearGroup => yearGroup.value === currentYear
- )?.data || []
+ const books = await fetchAllBooks();
+ const sortedByYear = sortBooksByYear(books);
+ const booksForCurrentYear =
+ sortedByYear.find((yearGroup) => yearGroup.value === currentYear)?.data ||
+ [];
return {
all: books,
years: sortedByYear,
currentYear: booksForCurrentYear,
- feed: books.filter(book => book['feed'])
- }
-}
\ No newline at end of file
+ feed: books.filter((book) => book["feed"]),
+ };
+}
diff --git a/src/data/concerts.js b/src/data/concerts.js
index 0d8dd3e1..831fb90a 100644
--- a/src/data/concerts.js
+++ b/src/data/concerts.js
@@ -1,46 +1,46 @@
-import { createClient } from '@supabase/supabase-js'
+import { createClient } from "@supabase/supabase-js";
-const SUPABASE_URL = process.env.SUPABASE_URL
-const SUPABASE_KEY = process.env.SUPABASE_KEY
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
-const PAGE_SIZE = 1000
+const SUPABASE_URL = process.env.SUPABASE_URL;
+const SUPABASE_KEY = process.env.SUPABASE_KEY;
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
+const PAGE_SIZE = 1000;
const fetchAllConcerts = async () => {
- let concerts = []
- let rangeStart = 0
+ let concerts = [];
+ let rangeStart = 0;
while (true) {
const { data, error } = await supabase
- .from('optimized_concerts')
- .select('*')
- .range(rangeStart, rangeStart + PAGE_SIZE - 1)
+ .from("optimized_concerts")
+ .select("*")
+ .range(rangeStart, rangeStart + PAGE_SIZE - 1);
if (error) {
- console.error('Error fetching concerts:', error)
- break
+ console.error("Error fetching concerts:", error);
+ break;
}
- concerts = concerts.concat(data)
- if (data.length < PAGE_SIZE) break
- rangeStart += PAGE_SIZE
+ concerts = concerts.concat(data);
+ if (data.length < PAGE_SIZE) break;
+ rangeStart += PAGE_SIZE;
}
- return concerts
-}
+ return concerts;
+};
const processConcerts = (concerts) => {
- return concerts.map(concert => ({
+ return concerts.map((concert) => ({
...concert,
artist: concert.artist || { name: concert.artist_name_string, url: null },
- }))
-}
+ }));
+};
export default async function () {
try {
- const concerts = await fetchAllConcerts()
- return processConcerts(concerts)
+ const concerts = await fetchAllConcerts();
+ return processConcerts(concerts);
} catch (error) {
- console.error('Error fetching and processing concerts data:', error)
- return []
+ console.error("Error fetching and processing concerts data:", error);
+ return [];
}
-}
\ No newline at end of file
+}
diff --git a/src/data/genres.js b/src/data/genres.js
index aa6f20a9..4ffdc641 100644
--- a/src/data/genres.js
+++ b/src/data/genres.js
@@ -1,27 +1,25 @@
-import { createClient } from '@supabase/supabase-js'
+import { createClient } from "@supabase/supabase-js";
-const SUPABASE_URL = process.env.SUPABASE_URL
-const SUPABASE_KEY = process.env.SUPABASE_KEY
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
+const SUPABASE_URL = process.env.SUPABASE_URL;
+const SUPABASE_KEY = process.env.SUPABASE_KEY;
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
const fetchGenres = async () => {
- const { data, error } = await supabase
- .from('optimized_genres')
- .select('*')
+ const { data, error } = await supabase.from("optimized_genres").select("*");
if (error) {
- console.error('Error fetching genres with artists:', error)
- return []
+ console.error("Error fetching genres with artists:", error);
+ return [];
}
- return data
-}
+ return data;
+};
export default async function () {
try {
- return await fetchGenres()
+ return await fetchGenres();
} catch (error) {
- console.error('Error fetching and processing genres:', error)
- return []
+ console.error("Error fetching and processing genres:", error);
+ return [];
}
-}
\ No newline at end of file
+}
diff --git a/src/data/globals.js b/src/data/globals.js
index a1b6bd1b..cc3da4d7 100644
--- a/src/data/globals.js
+++ b/src/data/globals.js
@@ -1,28 +1,28 @@
-import { createClient } from '@supabase/supabase-js'
+import { createClient } from "@supabase/supabase-js";
-const SUPABASE_URL = process.env.SUPABASE_URL
-const SUPABASE_KEY = process.env.SUPABASE_KEY
-const supabase = createClient(SUPABASE_URL, 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 () => {
const { data, error } = await supabase
- .from('optimized_globals')
- .select('*')
- .single()
+ .from("optimized_globals")
+ .select("*")
+ .single();
if (error) {
- console.error('Error fetching globals:', error)
- return {}
+ console.error("Error fetching globals:", error);
+ return {};
}
- return data
-}
+ return data;
+};
export default async function () {
try {
- return await fetchGlobals()
+ return await fetchGlobals();
} catch (error) {
- console.error('Error fetching and processing globals:', error)
- return {}
+ console.error("Error fetching and processing globals:", error);
+ return {};
}
-}
\ No newline at end of file
+}
diff --git a/src/data/links.js b/src/data/links.js
index e6d2a76a..62a33f5b 100644
--- a/src/data/links.js
+++ b/src/data/links.js
@@ -1,40 +1,40 @@
-import { createClient } from '@supabase/supabase-js'
+import { createClient } from "@supabase/supabase-js";
-const SUPABASE_URL = process.env.SUPABASE_URL
-const SUPABASE_KEY = process.env.SUPABASE_KEY
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
-const PAGE_SIZE = 1000
+const SUPABASE_URL = process.env.SUPABASE_URL;
+const SUPABASE_KEY = process.env.SUPABASE_KEY;
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
+const PAGE_SIZE = 1000;
const fetchAllLinks = async () => {
- let links = []
- let page = 0
- let fetchMore = true
+ let links = [];
+ let page = 0;
+ let fetchMore = true;
while (fetchMore) {
const { data, error } = await supabase
- .from('optimized_links')
- .select('*')
- .range(page * PAGE_SIZE, (page + 1) * PAGE_SIZE - 1)
+ .from("optimized_links")
+ .select("*")
+ .range(page * PAGE_SIZE, (page + 1) * PAGE_SIZE - 1);
if (error) {
- console.error('Error fetching links:', error)
- return links
+ console.error("Error fetching links:", error);
+ return links;
}
- if (data.length < PAGE_SIZE) fetchMore = false
+ if (data.length < PAGE_SIZE) fetchMore = false;
- links = links.concat(data)
- page++
+ links = links.concat(data);
+ page++;
}
- return links
-}
+ return links;
+};
export default async function () {
try {
- return await fetchAllLinks()
+ return await fetchAllLinks();
} catch (error) {
- console.error('Error fetching and processing links:', error)
- return []
+ console.error("Error fetching and processing links:", error);
+ return [];
}
-}
\ No newline at end of file
+}
diff --git a/src/data/movies.js b/src/data/movies.js
index a83e332e..d48a581f 100644
--- a/src/data/movies.js
+++ b/src/data/movies.js
@@ -1,62 +1,67 @@
-import { createClient } from '@supabase/supabase-js'
-import { DateTime } from 'luxon'
+import { createClient } from "@supabase/supabase-js";
+import { DateTime } from "luxon";
-const SUPABASE_URL = process.env.SUPABASE_URL
-const SUPABASE_KEY = process.env.SUPABASE_KEY
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
-const PAGE_SIZE = 1000
+const SUPABASE_URL = process.env.SUPABASE_URL;
+const SUPABASE_KEY = process.env.SUPABASE_KEY;
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
+const PAGE_SIZE = 1000;
const fetchAllMovies = async () => {
- let movies = []
- let rangeStart = 0
+ let movies = [];
+ let rangeStart = 0;
while (true) {
const { data, error } = await supabase
- .from('optimized_movies')
- .select('*')
- .range(rangeStart, rangeStart + PAGE_SIZE - 1)
+ .from("optimized_movies")
+ .select("*")
+ .range(rangeStart, rangeStart + PAGE_SIZE - 1);
if (error) {
- console.error('Error fetching movies:', error)
- break
+ console.error("Error fetching movies:", error);
+ break;
}
- movies = movies.concat(data)
+ movies = movies.concat(data);
- if (data.length < PAGE_SIZE) break
- rangeStart += PAGE_SIZE
+ if (data.length < PAGE_SIZE) break;
+ rangeStart += PAGE_SIZE;
}
- return movies
-}
+ return movies;
+};
export default async function () {
- const year = DateTime.now().year
+ const year = DateTime.now().year;
try {
- const movies = await fetchAllMovies()
- const favoriteMovies = movies.filter(movie => movie['favorite'])
+ const movies = await fetchAllMovies();
+ const favoriteMovies = movies.filter((movie) => movie["favorite"]);
const now = DateTime.now();
- const recentlyWatchedMovies = movies.filter(movie => {
- const lastWatched = movie['last_watched']
- return (lastWatched && now.diff(DateTime.fromISO(lastWatched), 'months').months <= 6)
- })
+ const recentlyWatchedMovies = movies.filter((movie) => {
+ const lastWatched = movie["last_watched"];
+ return (
+ lastWatched &&
+ now.diff(DateTime.fromISO(lastWatched), "months").months <= 6
+ );
+ });
return {
movies,
- watchHistory: movies.filter(movie => movie['last_watched']),
+ watchHistory: movies.filter((movie) => movie["last_watched"]),
recentlyWatched: recentlyWatchedMovies,
- favorites: favoriteMovies.sort((a, b) => a['title'].localeCompare(b['title'])),
- feed: movies.filter(movie => movie['feed']),
- }
+ favorites: favoriteMovies.sort((a, b) =>
+ a["title"].localeCompare(b["title"])
+ ),
+ feed: movies.filter((movie) => movie["feed"]),
+ };
} catch (error) {
- console.error('Error fetching and processing movies data:', error)
+ console.error("Error fetching and processing movies data:", error);
return {
movies: [],
watchHistory: [],
recentlyWatched: [],
favorites: [],
- feed: []
- }
+ feed: [],
+ };
}
-}
\ No newline at end of file
+}
diff --git a/src/data/music.js b/src/data/music.js
index 6ab2069e..e5938ab0 100644
--- a/src/data/music.js
+++ b/src/data/music.js
@@ -1,35 +1,35 @@
-import { createClient } from '@supabase/supabase-js'
+import { createClient } from "@supabase/supabase-js";
-const SUPABASE_URL = process.env.SUPABASE_URL
-const SUPABASE_KEY = process.env.SUPABASE_KEY
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
-const PAGE_SIZE = 1000
+const SUPABASE_URL = process.env.SUPABASE_URL;
+const SUPABASE_KEY = process.env.SUPABASE_KEY;
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
+const PAGE_SIZE = 1000;
const fetchDataFromView = async (viewName) => {
- let rows = []
- let rangeStart = 0
+ let rows = [];
+ let rangeStart = 0;
while (true) {
const { data, error } = await supabase
.from(viewName)
- .select('*')
- .range(rangeStart, rangeStart + PAGE_SIZE - 1)
+ .select("*")
+ .range(rangeStart, rangeStart + PAGE_SIZE - 1);
if (error) {
- console.error(`Error fetching data from view ${viewName}:`, error)
- break
+ console.error(`Error fetching data from view ${viewName}:`, error);
+ break;
}
- if (data.length === 0) break
+ if (data.length === 0) break;
- rows = [...rows, ...data]
+ rows = [...rows, ...data];
- if (data.length < PAGE_SIZE) break
- rangeStart += PAGE_SIZE
+ if (data.length < PAGE_SIZE) break;
+ rangeStart += PAGE_SIZE;
}
- return rows
-}
+ return rows;
+};
export default async function fetchMusicData() {
try {
@@ -44,16 +44,16 @@ export default async function fetchMusicData() {
monthAlbums,
monthGenres,
] = await Promise.all([
- fetchDataFromView('recent_tracks'),
- fetchDataFromView('week_tracks'),
- fetchDataFromView('week_artists'),
- fetchDataFromView('week_albums'),
- fetchDataFromView('week_genres'),
- fetchDataFromView('month_tracks'),
- fetchDataFromView('month_artists'),
- fetchDataFromView('month_albums'),
- fetchDataFromView('month_genres'),
- ])
+ fetchDataFromView("recent_tracks"),
+ fetchDataFromView("week_tracks"),
+ fetchDataFromView("week_artists"),
+ fetchDataFromView("week_albums"),
+ fetchDataFromView("week_genres"),
+ fetchDataFromView("month_tracks"),
+ fetchDataFromView("month_artists"),
+ fetchDataFromView("month_albums"),
+ fetchDataFromView("month_genres"),
+ ]);
return {
recent: recentTracks,
@@ -64,7 +64,7 @@ export default async function fetchMusicData() {
genres: weekGenres,
totalTracks: weekTracks
.reduce((acc, track) => acc + track.plays, 0)
- .toLocaleString('en-US'),
+ .toLocaleString("en-US"),
},
month: {
tracks: monthTracks,
@@ -73,11 +73,11 @@ export default async function fetchMusicData() {
genres: monthGenres,
totalTracks: monthTracks
.reduce((acc, track) => acc + track.plays, 0)
- .toLocaleString('en-US'),
+ .toLocaleString("en-US"),
},
- }
+ };
} catch (error) {
- console.error('Error fetching and processing music data:', error)
- return {}
+ console.error("Error fetching and processing music data:", error);
+ return {};
}
-}
\ No newline at end of file
+}
diff --git a/src/data/nav.js b/src/data/nav.js
index c52846c5..122d187b 100644
--- a/src/data/nav.js
+++ b/src/data/nav.js
@@ -1,48 +1,48 @@
-import { createClient } from '@supabase/supabase-js'
+import { createClient } from "@supabase/supabase-js";
-const SUPABASE_URL = process.env.SUPABASE_URL
-const SUPABASE_KEY = process.env.SUPABASE_KEY
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
+const SUPABASE_URL = process.env.SUPABASE_URL;
+const SUPABASE_KEY = process.env.SUPABASE_KEY;
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
const fetchAllNavigation = async () => {
const { data, error } = await supabase
- .from('optimized_navigation')
- .select('*')
+ .from("optimized_navigation")
+ .select("*");
if (error) {
- console.error('Error fetching navigation data:', error)
- return {}
+ console.error("Error fetching navigation data:", error);
+ return {};
}
const menu = data.reduce((acc, item) => {
const menuItem = {
- title: item['title'] || item['page_title'],
- permalink: item['permalink'] || item ['page_permalink'],
- icon: item['icon'],
- sort: item['sort']
- }
+ title: item["title"] || item["page_title"],
+ permalink: item["permalink"] || item["page_permalink"],
+ icon: item["icon"],
+ sort: item["sort"],
+ };
- if (!acc[item['menu_location']]) {
- acc[item['menu_location']] = [menuItem]
+ if (!acc[item["menu_location"]]) {
+ acc[item["menu_location"]] = [menuItem];
} else {
- acc[item['menu_location']].push(menuItem)
+ acc[item["menu_location"]].push(menuItem);
}
- return acc
- }, {})
+ return acc;
+ }, {});
- Object.keys(menu).forEach(location => {
- menu[location].sort((a, b) => a['sort'] - b['sort'])
- })
+ Object.keys(menu).forEach((location) => {
+ menu[location].sort((a, b) => a["sort"] - b["sort"]);
+ });
- return menu
-}
+ return menu;
+};
export default async function () {
try {
- return await fetchAllNavigation()
+ return await fetchAllNavigation();
} catch (error) {
- console.error('Error fetching and processing navigation data:', error)
- return {}
+ console.error("Error fetching and processing navigation data:", error);
+ return {};
}
-}
\ No newline at end of file
+}
diff --git a/src/data/nowPlaying.js b/src/data/nowPlaying.js
index 90559f1a..e865ebbf 100644
--- a/src/data/nowPlaying.js
+++ b/src/data/nowPlaying.js
@@ -1,33 +1,35 @@
-import { createClient } from '@supabase/supabase-js'
+import { createClient } from "@supabase/supabase-js";
-const SUPABASE_URL = process.env.SUPABASE_URL
-const SUPABASE_KEY = process.env.SUPABASE_KEY
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
+const SUPABASE_URL = process.env.SUPABASE_URL;
+const SUPABASE_KEY = process.env.SUPABASE_KEY;
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
const fetchNowPlaying = async () => {
const { data, error } = await supabase
- .from('optimized_latest_listen')
- .select('*')
- .single()
+ .from("optimized_latest_listen")
+ .select("*")
+ .single();
if (error) {
- console.error('Error fetching the latest track:', error)
- return {}
+ console.error("Error fetching the latest track:", error);
+ return {};
}
- const genreEmoji = data.genre_emoji
- const emoji = data.artist_emoji || genreEmoji
+ const genreEmoji = data.genre_emoji;
+ const emoji = data.artist_emoji || genreEmoji;
return {
- content: `${emoji || '🎧'} ${data.track_name} by ${data.artist_name}`,
- }
-}
+ content: `${emoji || "🎧"} ${
+ data.track_name
+ } by ${data.artist_name}`,
+ };
+};
export default async function () {
try {
- return await fetchNowPlaying()
+ return await fetchNowPlaying();
} catch (error) {
- console.error('Error fetching and processing now-playing data:', error)
- return {}
+ console.error("Error fetching and processing now-playing data:", error);
+ return {};
}
-}
\ No newline at end of file
+}
diff --git a/src/data/pages.js b/src/data/pages.js
index 6fb3e1d4..bfbae8cc 100644
--- a/src/data/pages.js
+++ b/src/data/pages.js
@@ -1,40 +1,40 @@
-import { createClient } from '@supabase/supabase-js'
+import { createClient } from "@supabase/supabase-js";
-const SUPABASE_URL = process.env['SUPABASE_URL']
-const SUPABASE_KEY = process.env['SUPABASE_KEY']
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
-const PAGE_SIZE = 250
+const SUPABASE_URL = process.env["SUPABASE_URL"];
+const SUPABASE_KEY = process.env["SUPABASE_KEY"];
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
+const PAGE_SIZE = 250;
const fetchAllPages = async () => {
- let pages = []
- let page = 0
- let fetchMore = true
+ let pages = [];
+ let page = 0;
+ let fetchMore = true;
while (fetchMore) {
const { data, error } = await supabase
- .from('optimized_pages')
- .select('*')
- .range(page * PAGE_SIZE, (page + 1) * PAGE_SIZE - 1)
+ .from("optimized_pages")
+ .select("*")
+ .range(page * PAGE_SIZE, (page + 1) * PAGE_SIZE - 1);
if (error) {
- console.error('Error fetching pages:', error)
- return pages
+ console.error("Error fetching pages:", error);
+ return pages;
}
- if (data.length < PAGE_SIZE) fetchMore = false
+ if (data.length < PAGE_SIZE) fetchMore = false;
- pages = pages.concat(data)
- page++
+ pages = pages.concat(data);
+ page++;
}
- return pages
-}
+ return pages;
+};
export default async function () {
try {
- return await fetchAllPages()
+ return await fetchAllPages();
} catch (error) {
- console.error('Error fetching and processing pages:', error)
- return []
+ console.error("Error fetching and processing pages:", error);
+ return [];
}
-}
\ No newline at end of file
+}
diff --git a/src/data/posts.js b/src/data/posts.js
index 0574dd74..ddb01a08 100644
--- a/src/data/posts.js
+++ b/src/data/posts.js
@@ -1,41 +1,41 @@
-import { createClient } from '@supabase/supabase-js'
+import { createClient } from "@supabase/supabase-js";
-const SUPABASE_URL = process.env['SUPABASE_URL']
-const SUPABASE_KEY = process.env['SUPABASE_KEY']
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
-const PAGE_SIZE = 1000
+const SUPABASE_URL = process.env["SUPABASE_URL"];
+const SUPABASE_KEY = process.env["SUPABASE_KEY"];
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
+const PAGE_SIZE = 1000;
const fetchAllPosts = async () => {
- let posts = []
- let page = 0
- let fetchMore = true
+ let posts = [];
+ let page = 0;
+ let fetchMore = true;
while (fetchMore) {
const { data, error } = await supabase
- .from('optimized_posts')
- .select('*')
- .order('date', { ascending: false })
- .range(page * PAGE_SIZE, (page + 1) * PAGE_SIZE - 1)
+ .from("optimized_posts")
+ .select("*")
+ .order("date", { ascending: false })
+ .range(page * PAGE_SIZE, (page + 1) * PAGE_SIZE - 1);
if (error) {
- console.error('Error fetching posts:', error)
- return posts
+ console.error("Error fetching posts:", error);
+ return posts;
}
- if (data.length < PAGE_SIZE) fetchMore = false
+ if (data.length < PAGE_SIZE) fetchMore = false;
- posts = posts.concat(data)
- page++
+ posts = posts.concat(data);
+ page++;
}
- return posts
-}
+ return posts;
+};
export default async function () {
try {
- return await fetchAllPosts()
+ return await fetchAllPosts();
} catch (error) {
- console.error('Error fetching and processing posts:', error)
- return []
+ console.error("Error fetching and processing posts:", error);
+ return [];
}
-}
\ No newline at end of file
+}
diff --git a/src/data/robots.js b/src/data/robots.js
index 5e17b110..be453d73 100644
--- a/src/data/robots.js
+++ b/src/data/robots.js
@@ -1,38 +1,40 @@
-import { createClient } from '@supabase/supabase-js'
+import { createClient } from "@supabase/supabase-js";
-const SUPABASE_URL = process.env.SUPABASE_URL
-const SUPABASE_KEY = process.env.SUPABASE_KEY
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
-const PAGE_SIZE = 500
+const SUPABASE_URL = process.env.SUPABASE_URL;
+const SUPABASE_KEY = process.env.SUPABASE_KEY;
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
+const PAGE_SIZE = 500;
const fetchAllRobots = async () => {
- let robots = []
- let from = 0
+ let robots = [];
+ let from = 0;
while (true) {
const { data, error } = await supabase
- .from('robots')
- .select('user_agent')
- .range(from, from + PAGE_SIZE - 1)
+ .from("robots")
+ .select("user_agent")
+ .range(from, from + PAGE_SIZE - 1);
if (error) {
- console.error('Error fetching robot data:', error)
- return []
+ console.error("Error fetching robot data:", error);
+ return [];
}
- robots = robots.concat(data)
- if (data.length < PAGE_SIZE) break
- from += PAGE_SIZE
+ robots = robots.concat(data);
+ if (data.length < PAGE_SIZE) break;
+ from += PAGE_SIZE;
}
- return robots.map(robot => robot['user_agent']).sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()))
-}
+ return robots
+ .map((robot) => robot["user_agent"])
+ .sort((a, b) => a.toLowerCase().localeCompare(b.toLowerCase()));
+};
export default async function () {
try {
- return await fetchAllRobots()
+ return await fetchAllRobots();
} catch (error) {
- console.error('Error fetching and processing robot data:', error)
- return []
+ console.error("Error fetching and processing robot data:", error);
+ return [];
}
-}
\ No newline at end of file
+}
diff --git a/src/data/syndication.js b/src/data/syndication.js
index 63d3834d..8e92334d 100644
--- a/src/data/syndication.js
+++ b/src/data/syndication.js
@@ -1,20 +1,20 @@
-import { createClient } from '@supabase/supabase-js'
+import { createClient } from "@supabase/supabase-js";
-const SUPABASE_URL = process.env.SUPABASE_URL
-const SUPABASE_KEY = process.env.SUPABASE_KEY
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
+const SUPABASE_URL = process.env.SUPABASE_URL;
+const SUPABASE_KEY = process.env.SUPABASE_KEY;
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
export default async function fetchSyndication() {
const { data, error } = await supabase
- .from('optimized_syndication')
- .select('syndication')
+ .from("optimized_syndication")
+ .select("syndication");
if (error) {
- console.error('Error fetching search index data:', error)
- return []
+ console.error("Error fetching search index data:", error);
+ return [];
}
- const [{ syndication } = {}] = data
+ const [{ syndication } = {}] = data;
- return syndication?.filter(item => item['syndication'] !== null) || []
-}
\ No newline at end of file
+ return syndication?.filter((item) => item["syndication"] !== null) || [];
+}
diff --git a/src/data/tv.js b/src/data/tv.js
index ccc1f48a..598bca74 100644
--- a/src/data/tv.js
+++ b/src/data/tv.js
@@ -1,61 +1,65 @@
-import { createClient } from '@supabase/supabase-js'
+import { createClient } from "@supabase/supabase-js";
-const SUPABASE_URL = process.env.SUPABASE_URL
-const SUPABASE_KEY = process.env.SUPABASE_KEY
-const supabase = createClient(SUPABASE_URL, SUPABASE_KEY)
-const PAGE_SIZE = 1000
+const SUPABASE_URL = process.env.SUPABASE_URL;
+const SUPABASE_KEY = process.env.SUPABASE_KEY;
+const supabase = createClient(SUPABASE_URL, SUPABASE_KEY);
+const PAGE_SIZE = 1000;
const fetchAllShows = async () => {
- let shows = []
- let rangeStart = 0
+ let shows = [];
+ let rangeStart = 0;
while (true) {
const { data, error } = await supabase
- .from('optimized_shows')
- .select('*')
- .range(rangeStart, rangeStart + PAGE_SIZE - 1)
+ .from("optimized_shows")
+ .select("*")
+ .range(rangeStart, rangeStart + PAGE_SIZE - 1);
if (error) {
- console.error('Error fetching shows:', error)
- break
+ console.error("Error fetching shows:", error);
+ break;
}
- shows = shows.concat(data)
- if (data.length < PAGE_SIZE) break
- rangeStart += PAGE_SIZE
+ shows = shows.concat(data);
+ if (data.length < PAGE_SIZE) break;
+ rangeStart += PAGE_SIZE;
}
- return shows
-}
+ return shows;
+};
export default async function () {
try {
- const shows = await fetchAllShows()
- const watchedShows = shows.filter(show => show['last_watched_at'] !== null)
- const episodes = watchedShows.map(show => ({
- title: show['episode']['title'],
- year: show['year'],
- formatted_episode: show['episode']['formatted_episode'],
- url: show['episode']['url'],
- image: show['episode']['image'],
- backdrop: show['episode']['backdrop'],
- last_watched_at: show['episode']['last_watched_at'],
- grid: show['grid'],
- type: 'tv'
- }))
+ const shows = await fetchAllShows();
+ const watchedShows = shows.filter(
+ (show) => show["last_watched_at"] !== null
+ );
+ const episodes = watchedShows.map((show) => ({
+ title: show["episode"]["title"],
+ year: show["year"],
+ formatted_episode: show["episode"]["formatted_episode"],
+ url: show["episode"]["url"],
+ image: show["episode"]["image"],
+ backdrop: show["episode"]["backdrop"],
+ last_watched_at: show["episode"]["last_watched_at"],
+ grid: show["grid"],
+ type: "tv",
+ }));
return {
shows,
recentlyWatched: episodes.slice(0, 125),
- favorites: shows.filter(show => show.favorite).sort((a, b) => a.title.localeCompare(b.title)),
- }
+ favorites: shows
+ .filter((show) => show.favorite)
+ .sort((a, b) => a.title.localeCompare(b.title)),
+ };
} catch (error) {
- console.error('Error fetching and processing shows data:', error)
+ console.error("Error fetching and processing shows data:", error);
return {
shows: [],
recentlyWatched: [],
favorites: [],
- }
+ };
}
-}
\ No newline at end of file
+}