Add logo to ItemHero #160
This commit is contained in:
2 files changed
+24
-1
No files matched your search
@@ -184,7 +184,21 @@ const Hero = ({
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography variant="h2" fontWeight={300}>
|
<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>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
{!disableInfoStrip && (
|
{!disableInfoStrip && (
|
||||||
|
|||||||
@@ -53,4 +53,13 @@ $maskPercentage: 40%;
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
grid-template-columns: 1fr 85%;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user