mirror of
https://github.com/bitsocialnet/5chan.git
synced 2026-08-03 07:41:04 +02:00
@@ -13,7 +13,11 @@
|
|||||||
padding: 10px 0 3px 0;
|
padding: 10px 0 3px 0;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.postContent {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
max-height: 155px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.large {
|
.large {
|
||||||
@@ -146,3 +150,14 @@
|
|||||||
.postPreview .capcode {
|
.postPreview .capcode {
|
||||||
color: var(--catalog-post-preview-author-capcode-color);
|
color: var(--catalog-post-preview-author-capcode-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.xmasHat {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100px;
|
||||||
|
left: -10px;
|
||||||
|
margin-top: -55px;
|
||||||
|
z-index: 999;
|
||||||
|
box-shadow: none !important;
|
||||||
|
}
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ import styles from './catalog-row.module.css';
|
|||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { ContentPreview } from '../../views/home/popular-threads-box';
|
import { ContentPreview } from '../../views/home/popular-threads-box';
|
||||||
import { useCommentMediaInfo } from '../../hooks/use-comment-media-info';
|
import { useCommentMediaInfo } from '../../hooks/use-comment-media-info';
|
||||||
|
import { shouldShowSnow } from '../../lib/snow';
|
||||||
|
|
||||||
interface CatalogPostMediaProps {
|
interface CatalogPostMediaProps {
|
||||||
commentMediaInfo: any;
|
commentMediaInfo: any;
|
||||||
@@ -228,6 +229,8 @@ const CatalogPost = ({ post }: { post: Comment }) => {
|
|||||||
<span className={styles.hiddenThumbnail} />
|
<span className={styles.hiddenThumbnail} />
|
||||||
</Link>
|
</Link>
|
||||||
) : hasThumbnail ? (
|
) : hasThumbnail ? (
|
||||||
|
<>
|
||||||
|
{shouldShowSnow() && hasThumbnail && <img src={`${process.env.PUBLIC_URL}/assets/xmashat.gif`} className={styles.xmasHat} alt='' />}
|
||||||
<Link to={postLink}>
|
<Link to={postLink}>
|
||||||
<div
|
<div
|
||||||
className={`${styles.mediaPaddingWrapper} ${hidden && styles.hidden}`}
|
className={`${styles.mediaPaddingWrapper} ${hidden && styles.hidden}`}
|
||||||
@@ -249,6 +252,7 @@ const CatalogPost = ({ post }: { post: Comment }) => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
|
</>
|
||||||
) : (
|
) : (
|
||||||
threadIcons
|
threadIcons
|
||||||
)}
|
)}
|
||||||
@@ -264,7 +268,7 @@ const CatalogPost = ({ post }: { post: Comment }) => {
|
|||||||
<PostMenuDesktop post={post} />
|
<PostMenuDesktop post={post} />
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{(showOPComment || isTextOnlyThread) && (hasThumbnail ? postContent : <Link to={postLink}>{postContent}</Link>)}
|
<div className={styles.postContent}>{(showOPComment || isTextOnlyThread) && (hasThumbnail ? postContent : <Link to={postLink}>{postContent}</Link>)}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{(hoveredCid === cid || isDescription) &&
|
{(hoveredCid === cid || isDescription) &&
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ const Style = () => {
|
|||||||
const today = new Date();
|
const today = new Date();
|
||||||
const month = today.getMonth();
|
const month = today.getMonth();
|
||||||
const day = today.getDate();
|
const day = today.getDate();
|
||||||
const isChristmas = month === 11 && (day === 24 || day === 25);
|
const isChristmas = (month === 11 && day >= 24) || (month === 0 && day <= 5);
|
||||||
|
|
||||||
const handleThemeChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
|
const handleThemeChange = (e: React.ChangeEvent<HTMLSelectElement>) => {
|
||||||
const newTheme = e.target.value;
|
const newTheme = e.target.value;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ const useTheme = (): [string, (theme: string) => void] => {
|
|||||||
const today = new Date();
|
const today = new Date();
|
||||||
const month = today.getMonth();
|
const month = today.getMonth();
|
||||||
const day = today.getDate();
|
const day = today.getDate();
|
||||||
const isChristmas = month === 11 && (day === 24 || day === 25);
|
const isChristmas = (month === 11 && day >= 24) || (month === 0 && day <= 5);
|
||||||
const subplebbitAddress = params?.subplebbitAddress || pendingPostSubplebbitAddress;
|
const subplebbitAddress = params?.subplebbitAddress || pendingPostSubplebbitAddress;
|
||||||
|
|
||||||
if (isChristmas && isEnabled === null && subplebbitAddress && !isInAllView && !isInSubscriptionsView) {
|
if (isChristmas && isEnabled === null && subplebbitAddress && !isInAllView && !isInSubscriptionsView) {
|
||||||
|
|||||||
+1
-1
@@ -102,5 +102,5 @@ export const shouldShowSnow = (): boolean => {
|
|||||||
const today = new Date();
|
const today = new Date();
|
||||||
const month = today.getMonth();
|
const month = today.getMonth();
|
||||||
const day = today.getDate();
|
const day = today.getDate();
|
||||||
return month === 11 && (day === 24 || day === 25);
|
return (month === 11 && day >= 24) || (month === 0 && day <= 5);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
.content {
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
color: var(--post-mobile-abbr-text-color);
|
color: var(--post-mobile-abbr-text-color);
|
||||||
padding: 15px 0 20px 5px;
|
padding: 15px 0 20px 5px;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
.content {
|
.content {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
overflow-x: hidden;
|
overflow: visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
.error {
|
.error {
|
||||||
|
|||||||
Reference in New Issue
Block a user