feat(detail): medium release cover thumbnails on mix and session detail pages
This commit is contained in:
@@ -37,6 +37,10 @@ else
|
||||
var heroKey = release.SessionMetadata?.HeroImageEntryKey;
|
||||
// Hero image precedence: the session's dedicated hero, then the release cover, then a placeholder.
|
||||
var heroImage = !string.IsNullOrEmpty(heroKey) ? heroKey : release.ImagePath;
|
||||
// Show the cover thumbnail only when it differs from what the hero displays. When there is no
|
||||
// dedicated hero, the hero already falls back to release.ImagePath — rendering the cover too
|
||||
// would duplicate the same image.
|
||||
var showCover = !string.IsNullOrEmpty(release.ImagePath) && release.ImagePath != heroImage;
|
||||
var hasGenre = release.Genre is not null;
|
||||
var hasDate = release.ReleaseDate is not null;
|
||||
|
||||
@@ -60,6 +64,13 @@ else
|
||||
</MudPaper>
|
||||
}
|
||||
</div>
|
||||
@if (showCover)
|
||||
{
|
||||
<div class="session-detail-cover">
|
||||
<MudPaper Elevation="2" Class="deepdrft-track-detail-cover-art"
|
||||
Style="@($"background-image: url('api/image/{Uri.EscapeDataString(release.ImagePath!)}');")" />
|
||||
</div>
|
||||
}
|
||||
</Hero>
|
||||
<MetaContent>
|
||||
@if (hasGenre)
|
||||
|
||||
Reference in New Issue
Block a user