mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
improve streaming list style
This commit is contained in:
parent
9512a6ccb2
commit
4e663733fb
@ -1,6 +1,7 @@
|
|||||||
import React from "react"
|
import React from "react"
|
||||||
import * as antd from "antd"
|
import * as antd from "antd"
|
||||||
import { FastAverageColor } from "fast-average-color"
|
import { FastAverageColor } from "fast-average-color"
|
||||||
|
import { Icons } from "@components/Icons"
|
||||||
|
|
||||||
import UserPreview from "@components/UserPreview"
|
import UserPreview from "@components/UserPreview"
|
||||||
|
|
||||||
@ -69,17 +70,26 @@ const LivestreamItem = (props) => {
|
|||||||
|
|
||||||
<div className="livestream_info">
|
<div className="livestream_info">
|
||||||
<div className="livestream_titles">
|
<div className="livestream_titles">
|
||||||
|
<antd.Tag className="livestream_category">
|
||||||
|
{livestream.info?.category}
|
||||||
|
</antd.Tag>
|
||||||
|
|
||||||
<div className="livestream_title">
|
<div className="livestream_title">
|
||||||
<h1>{livestream.info?.title}</h1>
|
<h1>{livestream.info?.title}</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="livestream_description">
|
<div className="livestream_description">
|
||||||
<h2>
|
<span className="livestream_description-text">
|
||||||
{livestream.info?.description ?? "No description"}
|
{livestream.info?.description ?? "No description"}
|
||||||
</h2>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="livestream_views">
|
||||||
|
<Icons.FiEye />
|
||||||
|
<h4>{livestream.info?.viewers ?? 0}</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
<UserPreview user={livestream.user} small />
|
<UserPreview user={livestream.user} small />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,120 +1,170 @@
|
|||||||
@item_border_radius: 10px;
|
@item_border_radius: 10px;
|
||||||
|
|
||||||
.livestream_list {
|
.livestream_list {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|
||||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
grid-column-gap: 15px;
|
grid-column-gap: 15px;
|
||||||
grid-row-gap: 15px;
|
grid-row-gap: 15px;
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
@media not screen and (max-width: 1900px) {
|
@media not screen and (max-width: 1900px) {
|
||||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||||
}
|
}
|
||||||
|
|
||||||
@media not screen and (max-width: 2300px) {
|
@media not screen and (max-width: 2300px) {
|
||||||
grid-template-columns: repeat(5, minmax(0, 1fr));
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||||
}
|
}
|
||||||
|
|
||||||
@media not screen and (max-width: 2600px) {
|
@media not screen and (max-width: 2600px) {
|
||||||
grid-template-columns: repeat(6, minmax(0, 1fr));
|
grid-template-columns: repeat(6, minmax(0, 1fr));
|
||||||
}
|
}
|
||||||
|
|
||||||
@media not screen and (max-width: 2900px) {
|
@media not screen and (max-width: 2900px) {
|
||||||
grid-template-columns: repeat(7, minmax(0, 1fr));
|
grid-template-columns: repeat(7, minmax(0, 1fr));
|
||||||
}
|
}
|
||||||
|
|
||||||
&.empty {
|
&.empty {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.livestream_item {
|
.livestream_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
|
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
transition: all 150ms ease-in-out;
|
transition: all 150ms ease-in-out;
|
||||||
|
|
||||||
background-color: var(--background-color-primary-2);
|
background-color: var(--background-color-primary-2);
|
||||||
|
|
||||||
border: 1px solid var(--border-color);
|
border: 1px solid var(--border-color);
|
||||||
border-radius: @item_border_radius;
|
border-radius: @item_border_radius;
|
||||||
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: var(--background-color-accent);
|
background-color: var(--background-color-accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.white_background {
|
&.white_background {
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
span {
|
||||||
|
color: var(--text-color-black) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
h1,
|
.livestream_thumbnail {
|
||||||
h2,
|
width: 100%;
|
||||||
span {
|
|
||||||
color: var(--text-color-black) !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.livestream_thumbnail {
|
img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
img {
|
border-radius: @item_border_radius;
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
|
|
||||||
border-radius: @item_border_radius;
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
object-fit: cover;
|
.livestream_info {
|
||||||
}
|
position: relative;
|
||||||
}
|
|
||||||
|
|
||||||
.livestream_info {
|
display: flex;
|
||||||
position: relative;
|
flex-direction: column;
|
||||||
|
|
||||||
display: flex;
|
width: 100%;
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
width: 100%;
|
gap: 10px;
|
||||||
|
|
||||||
gap: 10px;
|
h1,
|
||||||
|
h2 {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
h1,
|
.livestream_titles {
|
||||||
h2 {
|
position: relative;
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.livestream_titles {
|
display: flex;
|
||||||
display: flex;
|
flex-direction: column;
|
||||||
flex-direction: column;
|
|
||||||
|
|
||||||
gap: 7px;
|
padding: 10px 0;
|
||||||
|
|
||||||
color: var(--text-color);
|
color: var(--text-color);
|
||||||
|
|
||||||
.livestream_title {
|
.livestream_title {
|
||||||
margin-top: 10px;
|
max-height: 200px;
|
||||||
font-size: 1rem;
|
|
||||||
height: fit-content;
|
|
||||||
font-family: "Space Grotesk", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
.livestream_description {
|
overflow: hidden;
|
||||||
font-size: 0.6rem;
|
white-space: wrap;
|
||||||
font-weight: 400;
|
text-overflow: ellipsis;
|
||||||
height: fit-content;
|
|
||||||
}
|
h1 {
|
||||||
}
|
font-size: 1.4rem;
|
||||||
}
|
font-family: "Space Grotesk", sans-serif;
|
||||||
}
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.livestream_description {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user