chore: more responsive track display; remove unused data calculations

This commit is contained in:
Cory Dransfeldt 2024-06-12 18:22:38 -07:00
parent dbf2700462
commit c7bf949098
No known key found for this signature in database
5 changed files with 13 additions and 14 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "coryd.dev",
"version": "19.2.2",
"version": "19.2.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "coryd.dev",
"version": "19.2.2",
"version": "19.2.3",
"license": "MIT",
"dependencies": {
"@cdransf/api-text": "^1.4.0",

View file

@ -1,6 +1,6 @@
{
"name": "coryd.dev",
"version": "19.2.2",
"version": "19.2.3",
"description": "The source for my personal site. Built using 11ty.",
"type": "module",
"scripts": {

View file

@ -145,14 +145,7 @@ export default async function() {
const recentData = await fetchDataForPeriod(DateTime.now().minus({ days: 7 }), selectFields, 'listens')
results['recent'] = {
artists: await aggregateData(recentData, 'artist_name', 'artists'),
albums: await aggregateData(recentData, 'album_name', 'albums'),
tracks: await aggregateData(recentData, 'track_name', 'track'),
tracksChronological: (await buildRecents(recentData)).sort((a, b) => b.timestamp - a.timestamp),
genres: await aggregateGenres(recentData),
totalTracks: recentData?.length?.toLocaleString('en-US')
}
results['recent'] = (await buildRecents(recentData)).sort((a, b) => b.timestamp - a.timestamp)
return results
}

View file

@ -116,8 +116,14 @@
width: calc(80% - var(--sizing-lg));
}
& .item .meta-text {
max-width: 85%;
& .item {
& .meta {
width: calc(75% - var(--sizing-lg));
}
& .meta-text {
max-width: 85%;
}
}
&.grid {

View file

@ -70,7 +70,7 @@ schema: music-index
</div>
</div>
<div id="tracks-recent">
{% render "partials/media/music/recent", data:music.recent.tracksChronological %}
{% render "partials/media/music/recent", data:music.recent %}
</div>
<div class="hidden" id="tracks-window">
{% render "partials/media/music/chart.liquid", data:music.week.tracks, mostPlayed:music.week.tracks[0].plays, count: 10 %}