Skip to content

Commit a3cf0c5

Browse files
Paebakclaude
andcommitted
Full-bleed album art in Now Playing, matched to Email card size
- Album art fills the tile edge-to-edge as a background image - Gradient overlay keeps header and track info readable - Tile wrapper uses img-tile + p-0 so it matches Email Me card height and has no padding fighting the art Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 61c0257 commit a3cf0c5

3 files changed

Lines changed: 39 additions & 29 deletions

File tree

src/components/NowPlaying.jsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,25 @@ export default function NowPlaying() {
4343
rel="noopener noreferrer"
4444
className="now-playing text-decoration-none"
4545
>
46+
{/* Full-bleed album art */}
47+
{track?.image && (
48+
<img src={track.image} alt={track?.album} className="now-playing__bg" />
49+
)}
50+
<div className="now-playing__overlay" />
51+
52+
{/* Label pinned to top */}
4653
<div className="now-playing__header">
4754
<svg width="14" height="14" viewBox="0 0 24 24" fill="currentColor">
4855
<path d="M12 3v10.55A4 4 0 1 0 14 17V7h4V3h-6z"/>
4956
</svg>
5057
<span>{loading ? "Loading…" : track?.isPlaying ? "Now Playing" : "Last Played"}</span>
5158
</div>
5259

60+
{/* Track info pinned to bottom */}
5361
{track && !loading && (
54-
<div className="now-playing__body">
55-
{track.image && (
56-
<img src={track.image} alt={track.album} className="now-playing__art" />
57-
)}
58-
<div className="now-playing__info">
59-
<span className="now-playing__track">{track.name}</span>
60-
<span className="now-playing__artist">{track.artist}</span>
61-
</div>
62+
<div className="now-playing__footer">
63+
<span className="now-playing__track">{track.name}</span>
64+
<span className="now-playing__artist">{track.artist}</span>
6265
</div>
6366
)}
6467

src/pages/Home.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default function Home() {
120120
</a>
121121

122122
{/* NOW PLAYING */}
123-
<div className="tile bento-sm">
123+
<div className="tile bento-sm img-tile p-0">
124124
<NowPlaying />
125125
</div>
126126

src/theme.css

Lines changed: 27 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -704,17 +704,34 @@ body { margin: 0; }
704704

705705
/* Now Playing */
706706
.now-playing {
707+
position: relative;
708+
overflow: hidden;
707709
display: flex;
708710
flex-direction: column;
709-
justify-content: center;
710-
gap: 10px;
711+
justify-content: space-between;
711712
width: 100%;
712713
height: 100%;
713-
padding: 16px;
714+
padding: 14px;
714715
color: inherit;
715716
}
716717

718+
.now-playing__bg {
719+
position: absolute;
720+
inset: 0;
721+
width: 100%;
722+
height: 100%;
723+
object-fit: cover;
724+
}
725+
726+
.now-playing__overlay {
727+
position: absolute;
728+
inset: 0;
729+
background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.72) 100%);
730+
}
731+
717732
.now-playing__header {
733+
position: relative;
734+
z-index: 1;
718735
display: flex;
719736
align-items: center;
720737
gap: 6px;
@@ -725,24 +742,12 @@ body { margin: 0; }
725742
color: var(--nf-green);
726743
}
727744

728-
.now-playing__body {
729-
display: flex;
730-
align-items: center;
731-
gap: 12px;
732-
}
733-
734-
.now-playing__art {
735-
width: 56px;
736-
height: 56px;
737-
border-radius: 6px;
738-
object-fit: cover;
739-
flex-shrink: 0;
740-
}
741-
742-
.now-playing__info {
745+
.now-playing__footer {
746+
position: relative;
747+
z-index: 1;
743748
display: flex;
744749
flex-direction: column;
745-
gap: 3px;
750+
gap: 2px;
746751
min-width: 0;
747752
}
748753

@@ -757,13 +762,15 @@ body { margin: 0; }
757762

758763
.now-playing__artist {
759764
font-size: 0.75rem;
760-
color: rgba(255,255,255,0.6);
765+
color: rgba(255,255,255,0.7);
761766
white-space: nowrap;
762767
overflow: hidden;
763768
text-overflow: ellipsis;
764769
}
765770

766771
.now-playing__bars {
772+
position: relative;
773+
z-index: 1;
767774
display: flex;
768775
align-items: flex-end;
769776
gap: 3px;

0 commit comments

Comments
 (0)