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", "name": "coryd.dev",
"version": "19.2.2", "version": "19.2.3",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "coryd.dev", "name": "coryd.dev",
"version": "19.2.2", "version": "19.2.3",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@cdransf/api-text": "^1.4.0", "@cdransf/api-text": "^1.4.0",

View file

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

View file

@ -145,14 +145,7 @@ export default async function() {
const recentData = await fetchDataForPeriod(DateTime.now().minus({ days: 7 }), selectFields, 'listens') const recentData = await fetchDataForPeriod(DateTime.now().minus({ days: 7 }), selectFields, 'listens')
results['recent'] = { results['recent'] = (await buildRecents(recentData)).sort((a, b) => b.timestamp - a.timestamp)
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')
}
return results return results
} }

View file

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

View file

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