11import { Link } from "react-router-dom" ;
2+ import "./HomePage.css" ;
23
34function HomePage ( ) {
45 const examples = [
@@ -33,28 +34,15 @@ function HomePage() {
3334 ] ;
3435
3536 return (
36- < div
37- style = { {
38- backgroundColor : "#efebe7" ,
39- minHeight : "100vh" ,
40- padding : "2rem 0" ,
41- } }
42- >
43- < div
44- style = { {
45- maxWidth : "1200px" ,
46- margin : "0 auto" ,
47- padding : "0 2rem" ,
48- } }
49- >
50- < div style = { { textAlign : "center" , marginBottom : "2rem" } } >
37+ < div className = "homepage" >
38+ < div className = "homepage-container" >
39+ < div className = "homepage-logo" >
5140 < svg
5241 width = "100%"
5342 height = "36"
5443 viewBox = "0 0 208 36"
5544 fill = "none"
5645 xmlns = "http://www.w3.org/2000/svg"
57- style = { { maxWidth : "208px" , margin : "0 auto" } }
5846 role = "img"
5947 aria-label = "Nutrient logo"
6048 >
@@ -68,27 +56,10 @@ function HomePage() {
6856 />
6957 </ svg >
7058 </ div >
71- < header style = { { textAlign : "center" , marginBottom : "3rem" } } >
72- < h1
73- style = { {
74- fontSize : "2.5rem" ,
75- fontWeight : "600" ,
76- margin : "0 0 2rem 0" ,
77- color : "#1A1414" ,
78- } }
79- >
80- JavaScript Examples
81- </ h1 >
82- < div style = { { marginBottom : "2rem" } } >
83- < div
84- style = { {
85- display : "flex" ,
86- alignItems : "center" ,
87- justifyContent : "center" ,
88- gap : "0.75rem" ,
89- marginBottom : "1rem" ,
90- } }
91- >
59+ < header className = "homepage-header" >
60+ < h1 className = "homepage-title" > JavaScript Examples</ h1 >
61+ < div className = "homepage-tech-stack" >
62+ < div className = "tech-item" >
9263 < svg
9364 width = "40"
9465 height = "40"
@@ -103,38 +74,14 @@ function HomePage() {
10374 < ellipse rx = "11" ry = "4.2" transform = "rotate(120)" />
10475 </ g >
10576 </ svg >
106- < h2 style = { { margin : 0 , fontSize : "1.8rem" , color : "#61dafb" } } >
107- React
108- </ h2 >
77+ < h2 className = "react-title" > React</ h2 >
10978 </ div >
11079
111- < div
112- style = { {
113- display : "flex" ,
114- justifyContent : "center" ,
115- alignItems : "center" ,
116- margin : "1.5rem 0" ,
117- } }
118- >
119- < div
120- style = { {
121- fontSize : "2rem" ,
122- fontWeight : "300" ,
123- color : "#888" ,
124- } }
125- >
126- +
127- </ div >
80+ < div className = "tech-plus-container" >
81+ < div className = "tech-plus" > +</ div >
12882 </ div >
12983
130- < div
131- style = { {
132- display : "flex" ,
133- alignItems : "center" ,
134- justifyContent : "center" ,
135- gap : "0.75rem" ,
136- } }
137- >
84+ < div className = "tech-item" >
13885 < svg
13986 width = "60"
14087 height = "45"
@@ -153,98 +100,35 @@ function HomePage() {
153100 fill = "#1A1414"
154101 />
155102 </ svg >
156- < h2 style = { { margin : 0 , fontSize : "1.8rem" , color : "#1A1414" } } >
157- Nutrient
158- </ h2 >
103+ < h2 className = "nutrient-title" > Nutrient</ h2 >
159104 </ div >
160105 </ div >
161- < p
162- style = { { fontSize : "1.1rem" , color : "#666" , marginBottom : "3rem" } }
163- >
164- Select an example to get started
165- </ p >
106+ < p className = "homepage-subtitle" > Select an example to get started</ p >
166107 </ header >
167108
168- < div
169- style = { {
170- display : "grid" ,
171- gridTemplateColumns : "repeat(auto-fit, minmax(350px, 1fr))" ,
172- gap : "2rem" ,
173- } }
174- >
109+ < div className = "examples-grid" >
175110 { examples . map ( ( example ) => (
176- < div
177- key = { example . path }
178- style = { {
179- border : "1px solid #ddd" ,
180- borderRadius : "12px" ,
181- padding : "2rem" ,
182- backgroundColor : "white" ,
183- boxShadow : "0 4px 20px rgba(0,0,0,0.08)" ,
184- transition : "all 0.3s ease" ,
185- display : "flex" ,
186- flexDirection : "column" ,
187- height : "100%" ,
188- } }
189- onMouseEnter = { ( e ) => {
190- e . currentTarget . style . transform = "translateY(-4px)" ;
191- e . currentTarget . style . boxShadow = "0 8px 30px rgba(0,0,0,0.12)" ;
192- } }
193- onMouseLeave = { ( e ) => {
194- e . currentTarget . style . transform = "translateY(0)" ;
195- e . currentTarget . style . boxShadow = "0 4px 20px rgba(0,0,0,0.08)" ;
196- } }
197- >
198- < h3 style = { { margin : "0 0 1rem 0" } } > { example . title } </ h3 >
199- < p style = { { color : "#666" , marginBottom : "1rem" } } >
200- { example . description }
201- </ p >
111+ < div key = { example . path } className = "example-card" >
112+ < h3 className = "example-title" > { example . title } </ h3 >
113+ < p className = "example-description" > { example . description } </ p >
202114
203- < h4 style = { { fontSize : "0.9rem" , margin : "1rem 0 0.5rem 0" } } >
204- Features:
205- </ h4 >
206- < ul style = { { fontSize : "0.9rem" , color : "#555" } } >
115+ < h4 className = "features-title" > Features:</ h4 >
116+ < ul className = "features-list" >
207117 { example . features . map ( ( feature ) => (
208118 < li key = { feature } > { feature } </ li >
209119 ) ) }
210120 </ ul >
211121
212- < div style = { { marginTop : "auto" , paddingTop : "1rem" } } >
213- < Link
214- to = { example . path }
215- style = { {
216- display : "inline-block" ,
217- width : "100%" ,
218- padding : "0.75rem 1rem" ,
219- backgroundColor : "#c2b8ae" ,
220- color : "white" ,
221- textDecoration : "none" ,
222- borderRadius : "8px" ,
223- fontSize : "0.9rem" ,
224- fontWeight : "500" ,
225- textAlign : "center" ,
226- transition : "all 0.2s ease" ,
227- border : "none" ,
228- } }
229- onMouseEnter = { ( e ) => {
230- e . currentTarget . style . backgroundColor = "#d4cbc4" ;
231- e . currentTarget . style . transform = "translateY(-1px)" ;
232- } }
233- onMouseLeave = { ( e ) => {
234- e . currentTarget . style . backgroundColor = "#c2b8ae" ;
235- e . currentTarget . style . transform = "translateY(0)" ;
236- } }
237- >
122+ < div className = "button-container" >
123+ < Link to = { example . path } className = "view-button" >
238124 View
239125 </ Link >
240126 </ div >
241127 </ div >
242128 ) ) }
243129 </ div >
244130
245- < footer
246- style = { { textAlign : "center" , marginTop : "3rem" , color : "#666" } }
247- >
131+ < footer className = "homepage-footer" >
248132 < p >
249133 Learn more:{ " " }
250134 < a
0 commit comments