mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-16 14:52:31 +00:00
featured voices side scroll on mobile (#706)
This commit is contained in:
1 parent
fb4b3e1692
commit
c148447f57
5 files changed
+39
-10
No files matched your search
+1
-4
@@ -19,11 +19,8 @@
|
||||
width: 84%;
|
||||
}
|
||||
|
||||
/* Adjust the width for larger screens */
|
||||
@media (min-width: 768px) {
|
||||
.featured-video-scroll-container > div {
|
||||
width: calc(
|
||||
(100% / 3) - (1.75rem * 2 / 3)
|
||||
); /* Adjust the width for larger screens */
|
||||
width: calc((100% / 3) - (1.75rem * 2 / 3));
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,39 @@
|
||||
.fy-featured-voices-section {
|
||||
background-color: rgba($action, 0.25);
|
||||
border-radius: 0.5rem;
|
||||
padding: 20px;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.fy-featured-voices-scroll-container {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
overflow-x: auto;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
.fy-featured-voices-scroll-container::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.fy-featured-voices-scroll-container {
|
||||
-ms-overflow-style: none;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.fy-featured-voices-scroll-container > div {
|
||||
flex: 0 0 auto;
|
||||
width: 84%;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.fy-featured-voices-scroll-container {
|
||||
overflow-x: hidden;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.fy-featured-voices-scroll-container > div {
|
||||
width: calc((100% / 4) - (1rem * 3 / 4));
|
||||
}
|
||||
}
|
||||
|
||||
.fy-featured-voices {
|
||||
|
||||
@@ -37,7 +37,7 @@ export const FeaturedVoice = ({ token, onClick }: FeaturedVoiceProps) => {
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
|
||||
return (
|
||||
<div className="col-12 col-lg-6 col-xl-3">
|
||||
<div>
|
||||
<div
|
||||
className="fy-featured-voices d-flex align-items-center position-relative"
|
||||
onClick={() => onClick && weight && onClick(weight)}
|
||||
|
||||
@@ -173,9 +173,9 @@ export default function NewTTS() {
|
||||
<p className="mb-4 opacity-75 fw-medium">{t("subtitle.tts")}</p>
|
||||
|
||||
<div className="d-flex flex-column gap-3">
|
||||
<div className="fy-featured-voices-section d-none d-lg-block">
|
||||
<div className="fy-featured-voices-section">
|
||||
<h5 className="fw-bold">{t("title.featuredVoices")}</h5>
|
||||
<div className="row g-3">
|
||||
<div className="fy-featured-voices-scroll-container">
|
||||
{featuredTtsVoiceTokens.map(token => (
|
||||
<FeaturedVoice
|
||||
key={token}
|
||||
|
||||
@@ -226,9 +226,9 @@ export default function NewVC() {
|
||||
<p className="mb-4 opacity-75 fw-medium">{t("subtitle.vc")}</p>
|
||||
|
||||
<div className="d-flex flex-column gap-3">
|
||||
<div className="fy-featured-voices-section d-none d-lg-block">
|
||||
<div className="fy-featured-voices-section">
|
||||
<h5 className="fw-bold">{t("title.featuredVoices")}</h5>
|
||||
<div className="row g-3">
|
||||
<div className="fy-featured-voices-scroll-container">
|
||||
{featuredVoiceTokens.map(token => (
|
||||
<FeaturedVoice
|
||||
key={token}
|
||||
|
||||
Reference in new issue
Block a user