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>
23 lines
654 B
JavaScript
23 lines
654 B
JavaScript
/**
|
|
* Last.fm 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,
|
|
scrobbles: [],
|
|
loved: [],
|
|
stats: null,
|
|
username: process.env.LASTFM_USERNAME || "",
|
|
profileUrl: process.env.LASTFM_USERNAME
|
|
? `https://www.last.fm/user/${process.env.LASTFM_USERNAME}`
|
|
: null,
|
|
};
|
|
}
|