Add logo to ItemHero #160

This commit is contained in:
Prayag Prajapati committed 2023-09-13 23:53:53 +05:30
1 parent d7a6fc2dd0
commit 60bb53a5de
2 files changed
+24 -1

No files matched your search

+15 -1
View File
@@ -184,7 +184,21 @@ const Hero = ({
}}
>
<Typography variant="h2" fontWeight={300}>
{item.Name}
{!!item.ImageBlurHashes.Logo ? (
<img
src={
!!item.SeriesId
? `${window.api.basePath}/Items/${item.SeriesId}/Images/Logo`
: `${window.api.basePath}/Items/${item.Id}/Images/Logo`
}
className="hero-name-logo"
onLoad={(e) => {
e.target.style.opacity = 1;
}}
/>
) : (
item.Name
)}
</Typography>
</div>
{!disableInfoStrip && (
@@ -53,4 +53,13 @@ $maskPercentage: 40%;
width: 100%;
grid-template-columns: 1fr 85%;
}
&-name-logo {
width: 8.3em;
height: 2.3em;
object-fit: contain;
object-position: left;
opacity: 0;
transition: opacity $transition-time-fast;
}
}