Skip to content

Commit d4e282c

Browse files
committed
finished basic card slider need to add styling to match rest of app and added basic blog
1 parent 73e2825 commit d4e282c

File tree

5 files changed

+497
-408
lines changed

5 files changed

+497
-408
lines changed

www/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"react": "18.2.0",
2323
"react-dom": "18.2.0",
2424
"superjson": "1.9.1",
25+
"swiper": "^8.4.5",
2526
"tiny-slider": "^2.9.4",
2627
"tiny-slider-react": "^0.5.6",
2728
"zod": "^3.18.0"
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
import { Swiper, SwiperSlide } from 'swiper/react'
2+
import { Navigation, Pagination, Scrollbar, A11y } from 'swiper'
3+
import FeatureSliderCard from "./FeatureSliderCard"
4+
5+
import 'swiper/css';
6+
import 'swiper/css/navigation';
7+
import 'swiper/css/pagination';
8+
import 'swiper/css/scrollbar';
9+
10+
export default function FeatureSlider() {
11+
const features = [
12+
{
13+
title: "State Snapshot Text Display",
14+
desc: "See your application state in stylized, interactive JSON format",
15+
},
16+
{
17+
title: "Time Travel Live Render",
18+
desc: "Simulate any state change from history in the DOM with a click of a button",
19+
},
20+
{
21+
title: "Save Snapshot Series",
22+
desc: "Save a series of recorded state snapshots for analysis later on",
23+
},
24+
{
25+
title: "Web Metrics",
26+
desc: "Improve user experience with insight into Web Metrics such as LCP, FCP, FID, TTFB",
27+
},
28+
{
29+
title: "Snapshot History Display",
30+
desc: "Monitor history as you time-travel or make new changes to state"
31+
},
32+
{
33+
title: "Components Map Display",
34+
desc: "Visualize relationships between components in a collapsible tree for a given snapshot",
35+
},
36+
{
37+
title: "Atom and Selector Relationships",
38+
desc: "Visualize the mapping of Atoms and Selectors to components in Recoil Apps",
39+
},
40+
{
41+
title: "Components Performance Display",
42+
desc: "Visualize the relative latency trends introduced by re-rendering each component on state change",
43+
},
44+
{
45+
title: "Download, Upload, and Persist",
46+
desc: "Save your state history for future tests",
47+
add1: "Keep your state changes on app reload{' '}"
48+
},
49+
{
50+
title: "Re-render Optimization",
51+
desc: "Improve performance by preventing unnecessary render cycles",
52+
},
53+
{
54+
title: "Gatsby Support",
55+
desc: "Reactime offers full support for Gatsby applications",
56+
},
57+
{
58+
title: "Next.js Support",
59+
desc: "Reactime offers debugging and performance tools for Next.js apps",
60+
},
61+
62+
]
63+
return (
64+
<Swiper
65+
modules = {[Navigation, Pagination, Scrollbar, A11y]}
66+
spaceBetween = {50}
67+
slidesPerView = {3}
68+
onSlideChange = {() => console.log('slide change')}
69+
onSwiper = {(swiper) => console.log(swiper)}
70+
navigation
71+
scrollbar = {{draggable: true }}
72+
pagination = {{ clickable: true }}
73+
>
74+
{features.map((el, index) => {
75+
return (
76+
<SwiperSlide key = {index}>
77+
<div className ="flex justify-center">
78+
<div className ="rounded-lg shadow-lg bg-white max-w-sm min-w-fit">
79+
<div className ="p-6">
80+
<h5 className ="text-gray-900 text-xl font-medium mb-2">
81+
{el.title}
82+
</h5>
83+
<p className ="text-gray-700 text-base mb-4">
84+
{el.desc}
85+
</p>
86+
</div>
87+
</div>
88+
</div>
89+
</SwiperSlide>
90+
);
91+
})}
92+
</Swiper>
93+
)
94+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
export default function FeatureSliderCard(props:any) {
3+
4+
return (
5+
<div className ="flex justify-center w-80%">
6+
<div className ="rounded-lg shadow-lg bg-white max-w-sm">
7+
<div className ="p-6">
8+
<h5 className ="text-gray-900 text-xl font-medium mb-2">
9+
{props.title}
10+
</h5>
11+
<p className ="text-gray-700 text-base mb-4">
12+
{props.desc}
13+
</p>
14+
</div>
15+
</div>
16+
</div>
17+
)
18+
}

www/src/pages/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ import Link from "next/link";
44
import LandingPage from "./components/LandingPage";
55
import NavBar from "./components/NavBar";
66
import Blogs from "./components/Blogs";
7-
7+
import FeatureSlider from './components/FeatureSlider'
88
import { trpc } from "../utils/trpc";
99

1010
const Home: NextPage = () => {
1111
const hello = trpc.example.hello.useQuery({ text: "from tRPC" });
1212

1313
return (
1414
<>
15+
<FeatureSlider/>
1516
<NavBar />
1617
<LandingPage />
1718
<Blogs />

0 commit comments

Comments
 (0)