Skip to content

Commit 80cbf2b

Browse files
committed
feat: add responsive testimonial grid and tweet card styles
1 parent 6da44ab commit 80cbf2b

2 files changed

Lines changed: 74 additions & 41 deletions

File tree

website/src/pages/index.css

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
.testimonial-grid {
2+
max-width: 1200px;
3+
margin: 0 auto;
4+
padding: 0 16px;
5+
}
6+
7+
.tweet-card {
8+
backdrop-filter: blur(10px);
9+
border-radius: 16px;
10+
border: 1px solid rgba(255, 255, 255, 0.2);
11+
background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
12+
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
13+
overflow: hidden;
14+
transition: all 0.3s ease;
15+
}
16+
17+
.tweet-card:hover {
18+
transform: scale(1.03);
19+
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
20+
}
21+
22+
/* Small screen devices - Single column */
23+
.testimonial-grid {
24+
display: grid;
25+
grid-template-columns: 1fr;
26+
grid-auto-rows: minmax(100px, auto);
27+
grid-gap: 20px;
28+
}
29+
30+
/* Medium screen devices - Two columns */
31+
@media (min-width: 768px) {
32+
.testimonial-grid {
33+
grid-template-columns: repeat(2, 1fr);
34+
}
35+
}
36+
37+
/* Large screen devices - Three columns (maximum) */
38+
@media (min-width: 1024px) {
39+
.testimonial-grid {
40+
grid-template-columns: repeat(3, 1fr);
41+
}
42+
43+
/* Staggered effect in three-column layout */
44+
.testimonial-grid > div:nth-child(3n+1) {
45+
grid-row: span 1;
46+
}
47+
48+
.testimonial-grid > div:nth-child(3n+2) {
49+
grid-row: span 2;
50+
}
51+
52+
.testimonial-grid > div:nth-child(3n+3) {
53+
grid-row: span 1;
54+
}
55+
}
56+
57+
/* Extra large screen devices - Keep three columns but increase max width */
58+
@media (min-width: 1280px) {
59+
.testimonial-grid {
60+
max-width: 1400px;
61+
}
62+
}

website/src/pages/index.tsx

Lines changed: 12 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { InteractiveHoverButton } from '@/components/ui/interactive-hover-button
1515
import { ClientTweetCard } from '../components/ui/client-tweet-card';
1616

1717
import 'react-responsive-carousel/lib/styles/carousel.min.css';
18+
import './index.css';
1819

1920
function HomepageHeader() {
2021
const { siteConfig } = useDocusaurusContext();
@@ -215,47 +216,17 @@ function HomepageFooter() {
215216
And connect with Tianji's real user from all over the world
216217
</div>
217218

218-
<div className="mt-8 flex flex-wrap justify-center gap-2">
219-
<ClientTweetCard
220-
id="1876982441312751667"
221-
className="border border-solid border-white border-opacity-20 bg-white bg-opacity-10"
222-
/>
223-
<ClientTweetCard
224-
id="1877547135442329726"
225-
className="border border-solid border-white border-opacity-20 bg-white bg-opacity-10"
226-
/>
227-
<ClientTweetCard
228-
id="1788136586380771781"
229-
className="border border-solid border-white border-opacity-20 bg-white bg-opacity-10"
230-
/>
231-
<ClientTweetCard
232-
id="1877744903255462173"
233-
className="border border-solid border-white border-opacity-20 bg-white bg-opacity-10"
234-
/>
235-
<ClientTweetCard
236-
id="1876346601326649665"
237-
className="border border-solid border-white border-opacity-20 bg-white bg-opacity-10"
238-
/>
239-
<ClientTweetCard
240-
id="1844763816619294808"
241-
className="border border-solid border-white border-opacity-20 bg-white bg-opacity-10"
242-
/>
243-
<ClientTweetCard
244-
id="1842367065375617205"
245-
className="border border-solid border-white border-opacity-20 bg-white bg-opacity-10"
246-
/>
247-
<ClientTweetCard
248-
id="1843381313933656116"
249-
className="border border-solid border-white border-opacity-20 bg-white bg-opacity-10"
250-
/>
251-
<ClientTweetCard
252-
id="1743323947377041806"
253-
className="border border-solid border-white border-opacity-20 bg-white bg-opacity-10"
254-
/>
255-
<ClientTweetCard
256-
id="1852357169175318932"
257-
className="border border-solid border-white border-opacity-20 bg-white bg-opacity-10"
258-
/>
219+
<div className="testimonial-grid mt-8 grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">
220+
<ClientTweetCard id="1876982441312751667" className="tweet-card" />
221+
<ClientTweetCard id="1788136586380771781" className="tweet-card" />
222+
<ClientTweetCard id="1877547135442329726" className="tweet-card" />
223+
<ClientTweetCard id="1876346601326649665" className="tweet-card" />
224+
<ClientTweetCard id="1877744903255462173" className="tweet-card" />
225+
<ClientTweetCard id="1844763816619294808" className="tweet-card" />
226+
<ClientTweetCard id="1842367065375617205" className="tweet-card" />
227+
<ClientTweetCard id="1843381313933656116" className="tweet-card" />
228+
<ClientTweetCard id="1743323947377041806" className="tweet-card" />
229+
<ClientTweetCard id="1852357169175318932" className="tweet-card" />
259230
</div>
260231
</div>
261232
);

0 commit comments

Comments
 (0)