chuni: add links to jacket images

This commit is contained in:
sk1982 2024-04-07 03:35:40 -04:00
parent 91dbf5d7d5
commit 8f61811cd2
2 changed files with 8 additions and 6 deletions

View File

@ -17,10 +17,10 @@ export const ChuniTopRating = ({ rating, className }: ChuniTopRatingProps) => {
return (<div className={`flex flex-col ${className ?? ''}`}> return (<div className={`flex flex-col ${className ?? ''}`}>
{rating.map((music, i) => <div key={i} className="flex py-2 h-28 border-b border-gray-500"> {rating.map((music, i) => <div key={i} className="flex py-2 h-28 border-b border-gray-500">
<ChuniDifficultyContainer difficulty={music.chartId ?? 0} className="flex-shrink-0 w-20 mr-2 self-center"> <ChuniDifficultyContainer difficulty={music.chartId ?? 0} className="flex-shrink-0 w-20 mr-2 self-center">
<div className="p-1"> <Link className="p-1 block" href={`/chuni/music/${music.songId}`}>
<img className="aspect-square rounded overflow-hidden" src={getJacketUrl(`chuni/jacket/${music.jacketPath}`)} <img className="aspect-square rounded overflow-hidden" src={getJacketUrl(`chuni/jacket/${music.jacketPath}`)}
alt={music.title ?? ''} /> alt={music.title ?? ''} />
</div> </Link>
<ChuniLevelBadge className="w-11 absolute -right-0.5 -bottom-0.5" music={music} /> <ChuniLevelBadge className="w-11 absolute -right-0.5 -bottom-0.5" music={music} />
</ChuniDifficultyContainer> </ChuniDifficultyContainer>

View File

@ -37,9 +37,11 @@ export const ChuniPlaylogCard = ({ playlog, className, badgeClass, showDetails }
<div className="flex-shrink-0 mr-2 mt-2"> <div className="flex-shrink-0 mr-2 mt-2">
<ChuniDifficultyContainer difficulty={playlog.chartId ?? 0} className="w-28 aspect-square relative p-1"> <ChuniDifficultyContainer difficulty={playlog.chartId ?? 0} className="w-28 aspect-square relative p-1">
<ChuniLevelBadge className="absolute -bottom-1.5 -right-1.5 w-12" music={playlog} /> <ChuniLevelBadge className="absolute -bottom-1.5 -right-1.5 w-12" music={playlog} />
<Link href={`/chuni/music/${playlog.songId}`}>
<img className="aspect-square w-full rounded overflow-hidden" <img className="aspect-square w-full rounded overflow-hidden"
src={getJacketUrl(`chuni/jacket/${playlog.jacketPath}`)} src={getJacketUrl(`chuni/jacket/${playlog.jacketPath}`)}
alt={playlog.title ?? ''} /> alt={playlog.title ?? ''} />
</Link>
</ChuniDifficultyContainer> </ChuniDifficultyContainer>
</div> </div>