02f13db22c
Replaces build-time Eleventy data fetches with live client-side fetches so listening data is always current without requiring a blog rebuild. - Add js/listening.js with three Alpine.data components: listeningWidget, funkwhalePage, listeningPage - Replace _data/funkwhaleActivity.js and lastfmActivity.js with sync stubs (source: 'indiekit') — keeps slashes.njk links and widget guard working at build time - Rewrite widgets/funkwhale.njk, funkwhale.njk, listening.njk as Alpine-driven templates with loading skeletons and error states - Load listening.js globally in base.njk before Alpine core Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
543 B
JavaScript
20 lines
543 B
JavaScript
/**
|
|
* Funkwhale Activity Data — build-time stub
|
|
*
|
|
* Data is now fetched client-side via Alpine.js (js/listening.js).
|
|
* This stub returns the minimal shape needed so Nunjucks templates
|
|
* (slashes.njk, widget guard) continue to render the listening sections,
|
|
* while the actual data is populated by the browser after page load.
|
|
*/
|
|
|
|
export default function () {
|
|
return {
|
|
source: "indiekit",
|
|
nowPlaying: null,
|
|
listenings: [],
|
|
favorites: [],
|
|
stats: null,
|
|
instanceUrl: process.env.FUNKWHALE_INSTANCE || "",
|
|
};
|
|
}
|