mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-04-04 15:49:51 +00:00
title rendered in the meta item
This commit is contained in:
parent
fcf4457047
commit
ecb38d61c3
2 changed files with 28 additions and 0 deletions
|
|
@ -31,10 +31,23 @@ class MetaItem extends PureComponent {
|
|||
);
|
||||
}
|
||||
|
||||
renderTitleBar() {
|
||||
if (this.props.title.length === 0) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles['title-bar-container']}>
|
||||
<div className={styles['title']}>{this.props.title}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className={classnames(styles['meta-item-container'], styles[`relative-size-${this.props.relativeSize}`], styles[`poster-shape-${this.props.posterShape}`], this.props.className)}>
|
||||
{this.renderPoster()}
|
||||
{this.renderTitleBar()}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
z-index: 0;
|
||||
|
||||
.placeholder-image {
|
||||
|
|
@ -46,6 +47,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
.title-bar-container {
|
||||
height: calc(var(--poster-relative-size) * 0.14);
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
|
||||
.title {
|
||||
flex: 1;
|
||||
font-size: 1.4em;
|
||||
padding: 0 0.5em;
|
||||
color: var(--color-surfacelighter);
|
||||
}
|
||||
}
|
||||
|
||||
&.poster-shape-square {
|
||||
.poster-image-container {
|
||||
width: var(--poster-relative-size);
|
||||
|
|
|
|||
Loading…
Reference in a new issue