ensure spoiler black overlay covers iframe, thumbnail isn't showed on feed

This commit is contained in:
plebeius.eth
2024-02-16 20:41:26 +01:00
parent d993e3e452
commit 965e896291
3 changed files with 5 additions and 3 deletions

View File

@@ -60,6 +60,7 @@
border: 1px solid var(--text-primary);
background-color: black;
color: black;
z-index: 1;
cursor: pointer;
}
@@ -67,6 +68,7 @@
color: white;
text-transform: lowercase;
position: absolute;
z-index: 1;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);

View File

@@ -47,7 +47,8 @@ const Expando = ({ commentMediaInfo, content, expanded, link, reason, removed, s
spoiler && !showSpoiler && setShowSpoiler(true);
}}
>
{link && !removed && !(spoiler && !showSpoiler) && (
<div className={spoiler && !showSpoiler ? styles.hideSpoiler : ''} />
{link && !removed && (
<div className={styles.mediaPreview}>
<Link
to={link}
@@ -64,7 +65,6 @@ const Expando = ({ commentMediaInfo, content, expanded, link, reason, removed, s
)}
{content && showContent && (
<div className={styles.usertext}>
<div className={spoiler && !showSpoiler ? styles.hideSpoiler : ''} />
<div className={styles.markdown}>
{spoiler && !showSpoiler && <div className={styles.showSpoilerButton}>{t('view_spoiler')}</div>}
<Markdown content={content} />

View File

@@ -184,7 +184,7 @@ const Post = ({ index, post = {} }: PostProps) => {
<div className={`${styles.arrowCommon} ${downvoted ? styles.downvoted : styles.arrowDown}`} onClick={() => cid && downvote()} />
</div>
</div>
{hasThumbnail && !isInPostView && (
{hasThumbnail && !isInPostView && !spoiler && (
<span className={removed ? styles.blur : ''}>
<Thumbnail
cid={cid}