improve streaming list style

This commit is contained in:
SrGooglo 2025-04-10 18:22:30 +00:00
parent 9512a6ccb2
commit 4e663733fb
2 changed files with 147 additions and 87 deletions

View File

@ -1,6 +1,7 @@
import React from "react"
import * as antd from "antd"
import { FastAverageColor } from "fast-average-color"
import { Icons } from "@components/Icons"
import UserPreview from "@components/UserPreview"
@ -69,17 +70,26 @@ const LivestreamItem = (props) => {
<div className="livestream_info">
<div className="livestream_titles">
<antd.Tag className="livestream_category">
{livestream.info?.category}
</antd.Tag>
<div className="livestream_title">
<h1>{livestream.info?.title}</h1>
</div>
<div className="livestream_description">
<h2>
<span className="livestream_description-text">
{livestream.info?.description ?? "No description"}
</h2>
</span>
</div>
</div>
<div className="livestream_views">
<Icons.FiEye />
<h4>{livestream.info?.viewers ?? 0}</h4>
</div>
<UserPreview user={livestream.user} small />
</div>
</div>

View File

@ -33,8 +33,9 @@
align-items: center;
justify-content: center;
}
}
.livestream_item {
.livestream_item {
display: flex;
flex-direction: column;
@ -58,7 +59,6 @@
}
&.white_background {
h1,
h2,
span {
@ -95,26 +95,76 @@
}
.livestream_titles {
position: relative;
display: flex;
flex-direction: column;
gap: 7px;
padding: 10px 0;
color: var(--text-color);
.livestream_title {
margin-top: 10px;
font-size: 1rem;
height: fit-content;
max-height: 200px;
overflow: hidden;
white-space: wrap;
text-overflow: ellipsis;
h1 {
font-size: 1.4rem;
font-family: "Space Grotesk", sans-serif;
text-overflow: ellipsis;
}
}
.livestream_description {
font-size: 0.6rem;
display: flex;
flex-direction: row;
align-items: center;
max-height: 200px;
overflow: hidden;
white-space: wrap;
text-overflow: ellipsis;
.livestream_description-text {
font-size: 0.7rem;
font-weight: 400;
height: fit-content;
}
}
.livestream_category {
position: absolute;
top: 0;
right: 0;
margin-top: 13px;
margin-left: 0;
margin-right: 0;
}
}
.livestream_views {
position: absolute;
bottom: 0;
right: 0;
display: flex;
flex-direction: row;
align-items: center;
gap: 6px;
padding: 5px 10px;
background-color: var(--background-color-primary);
border-radius: 12px;
font-family: "DM Mono", monospace;
}
}
}