feat: artist hero redesign — album art banner + circular pfp on left

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-06-07 21:31:54 +02:00
1 parent 79a4aa352f
commit 64aec78a43
3 files changed
+33 -22

No files matched your search

+1 -1
View File
@@ -153,7 +153,7 @@
<!-- ARTIST DETAIL -->
<div class="page" id="page-artist-detail">
<button class="back-btn" id="artist-back-btn"><svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="15 18 9 12 15 6"/></svg>Alle Künstler</button>
<div class="artist-hero" id="artist-detail-hero"><div class="artist-hero-overlay"><div class="artist-hero-name" id="artist-detail-name"></div></div></div>
<div class="artist-hero" id="artist-detail-hero"><div class="artist-hero-bg" id="artist-hero-bg"></div><div class="artist-hero-overlay"><div class="artist-hero-pfp-wrap" id="artist-hero-pfp-wrap"><span class="artist-hero-pfp-initial" id="artist-hero-pfp-initial"></span></div><div class="artist-hero-info"><div class="artist-hero-name" id="artist-detail-name"></div></div></div></div>
<div id="artist-action-bar" class="artist-action-bar"></div>
<div id="artist-bio-section"></div>
<div id="artist-similar-section"></div>
+21 -12
View File
@@ -71,7 +71,11 @@ export async function loadArtistDetail(artist) {
const albEl = document.getElementById('artist-albums-section');
hero.style.background = 'linear-gradient(135deg, var(--surface2), var(--surface))';
hero.querySelector('.artist-hero-img')?.remove();
hero.querySelector('.artist-hero-bg')?.remove();
const heroBgEl = document.getElementById('artist-hero-bg');
if(heroBgEl) heroBgEl.style.backgroundImage = '';
document.getElementById('artist-hero-pfp-wrap')?.querySelector('.artist-hero-pfp')?.remove();
const pfpInitial = document.getElementById('artist-hero-pfp-initial');
if(pfpInitial) pfpInitial.textContent = artist.name?.[0]?.toUpperCase() || '?';
const overlay = hero.querySelector('.artist-hero-overlay');
if(overlay) overlay.style.background = '';
[bioEl, simEl, tsEl, albEl].forEach(el => { if(el) el.innerHTML = ''; });
@@ -109,18 +113,23 @@ export async function loadArtistDetail(artist) {
// ── Hero ──
const img = imgRes.status === 'fulfilled' ? imgRes.value : null;
if(img) {
const _firstAlbums = albumRes.status === 'fulfilled' ? (albumRes.value?.artist?.album || []) : [];
const _bgCover = _firstAlbums[0] ? coverUrl(_firstAlbums[0].coverArt, 512) : null;
if(_bgCover || img) {
hero.style.background = '';
const bgEl = document.createElement('div');
bgEl.className = 'artist-hero-bg';
bgEl.style.backgroundImage = `url('${img}')`;
hero.insertBefore(bgEl, overlay);
const heroImg = document.createElement('img');
heroImg.className = 'artist-hero-img';
heroImg.alt = '';
heroImg.src = img;
hero.insertBefore(heroImg, overlay);
if(overlay) overlay.style.background = 'linear-gradient(to right,rgba(7,7,15,.95) 0%,rgba(7,7,15,.35) 55%,rgba(7,7,15,.75) 100%)';
const bgEl = document.getElementById('artist-hero-bg');
if(bgEl) bgEl.style.backgroundImage = `url('${_bgCover || img}')`;
if(overlay) overlay.style.background = 'linear-gradient(to top,rgba(7,7,15,.92) 0%,rgba(7,7,15,.35) 100%)';
}
if(img) {
const pfpWrap = document.getElementById('artist-hero-pfp-wrap');
if(pfpWrap) {
const pfpImg = document.createElement('img');
pfpImg.className = 'artist-hero-pfp';
pfpImg.alt = '';
pfpImg.src = img;
pfpWrap.prepend(pfpImg);
}
}
// ── Bio ──
+11 -9
View File
@@ -822,17 +822,19 @@ button:focus{outline:none}
.artist-action-btn{display:flex;align-items:center;gap:6px;padding:9px 18px;border-radius:20px;border:1px solid var(--border2);background:var(--surface);color:var(--text);font-family:var(--font);font-size:13px;font-weight:600;cursor:pointer;transition:background .15s,border-color .15s}
.artist-action-btn:hover{background:var(--surface2);border-color:var(--accent);color:var(--accent)}
.artist-hero{height:220px;border-radius:14px;overflow:hidden;position:relative;margin-bottom:24px;background:linear-gradient(135deg,var(--surface2),var(--surface))}
.artist-hero-overlay{position:absolute;inset:0;background:linear-gradient(to right,rgba(7,7,15,.85) 0%,transparent 100%);display:flex;align-items:flex-end;padding:20px 28px}
.artist-hero-name{font-size:32px;font-weight:800;letter-spacing:-1px}
.artist-hero-bg{display:none}
.artist-hero-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center center;display:block}
.artist-hero-bg{position:absolute;inset:0;background-size:cover;background-position:center;filter:blur(26px) brightness(0.22) saturate(0.5);transform:scale(1.1)}
.artist-hero-overlay{position:absolute;inset:0;display:flex;align-items:flex-end;padding:20px 22px;gap:14px}
.artist-hero-pfp-wrap{width:72px;height:72px;border-radius:50%;overflow:hidden;flex-shrink:0;border:2px solid rgba(255,255,255,.15);background:linear-gradient(135deg,var(--surface2),var(--surface3,var(--surface)));display:flex;align-items:center;justify-content:center;position:relative}
.artist-hero-pfp{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.artist-hero-pfp-initial{font-size:26px;font-weight:700;color:var(--text2);line-height:1;pointer-events:none}
.artist-hero-info{min-width:0;flex:1;padding-bottom:2px}
.artist-hero-name{font-size:26px;font-weight:800;letter-spacing:-0.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media(min-width:769px){
.artist-hero{height:320px;border-radius:16px}
.artist-hero-overlay{padding:28px 36px}
.artist-hero-name{font-size:46px;letter-spacing:-2px}
/* Desktop: blurred backdrop fills width, sharp portrait sits at natural proportions on the right */
.artist-hero-bg{display:block;position:absolute;inset:0;background-size:cover;background-position:center;filter:blur(28px) brightness(0.3) saturate(0.7);transform:scale(1.08)}
.artist-hero-img{top:0;right:0;bottom:0;left:auto;width:auto;height:100%;object-fit:unset}
.artist-hero-overlay{padding:32px 36px;gap:22px}
.artist-hero-pfp-wrap{width:108px;height:108px}
.artist-hero-pfp-initial{font-size:42px}
.artist-hero-name{font-size:44px;letter-spacing:-2px}
}
/* ── MISC ── */