@@ -28,6 +28,7 @@ import {
28
28
drawQuarterCircle ,
29
29
drawLetterBlock ,
30
30
} from "../src/blockDesign" ;
31
+ import Link from '@mui/material/Link' ;
31
32
32
33
// Define variables with strict types
33
34
export let draw : Svg ;
@@ -221,103 +222,128 @@ const Home: NextPage = () => {
221
222
} ;
222
223
223
224
return (
224
- < div className = "wrapper" >
225
+ < div >
225
226
< Head >
226
227
< title > Grid Art Designer</ title >
227
- < meta
228
- name = "description"
229
- content = "Inspired from [Creating Generative SVG Grids](https://frontend.horse/articles/generative-grids/) by Alex Trost"
230
- />
228
+ < meta name = "description" content = "Create stunning generative SVG grids with customizable designs and color palettes. Download your creations in SVG and PNG formats. Perfect for digital art, prints, and web design. Start creating with just one click!" > </ meta >
231
229
< link rel = "icon" href = "./favicon.ico" />
232
230
< link rel = "manifest" href = "./manifest.json" />
233
231
</ Head >
234
232
< AppBar position = "static" sx = { { backgroundColor : "#dd8d0e" } } >
235
233
< Toolbar >
236
- < Typography >
237
- < img
238
- src = "./icon.svg"
239
- alt = { "Logo Digitalwarenkombinat!" }
240
- width = { 300 }
241
- style = { {
242
- width : "20vw" ,
243
- height : "auto" ,
244
- maxHeight : "100px" ,
245
- } }
246
- />
247
- </ Typography >
234
+ < Link href = "https://digitalwarenkombinat.de/" >
235
+ < Typography >
236
+ < img
237
+ src = "./icon.svg"
238
+ alt = { "Logo Digitalwarenkombinat!" }
239
+ width = { 300 }
240
+ style = { {
241
+ width : "20vw" ,
242
+ height : "auto" ,
243
+ maxHeight : "100px" ,
244
+ } }
245
+ />
246
+ </ Typography >
247
+ </ Link >
248
248
< Typography
249
- variant = "h2 "
249
+ variant = "h5 "
250
250
component = "h1"
251
251
color = "white"
252
- sx = { { flexGrow : 1 , ml : 4 } }
252
+ sx = { { flexGrow : 1 , ml : 2 , fontSize : { xs : "1.5rem" , md : "2rem" } } }
253
253
>
254
254
Grid Art Designer
255
255
</ Typography >
256
256
</ Toolbar >
257
257
</ AppBar >
258
- < Button
259
- variant = "contained"
260
- size = "large"
261
- sx = { { color : "#fff" , backgroundColor : "#dd8d0e" } }
262
- onClick = { generateNewGrid }
258
+ < Container
259
+ sx = { {
260
+ display : "flex" ,
261
+ flexDirection : { xs : "column" , md : "row" } ,
262
+ alignItems : "center" ,
263
+ justifyContent : "center" ,
264
+ py : 4 ,
265
+ gap : 2
266
+ } }
263
267
>
264
- Generate your own grid
265
- </ Button >
266
- { init ? (
267
- < >
268
- < Container
269
- sx = { {
270
- display : "flex" ,
271
- flexDirection : "column" ,
272
- justifyContent : "space-evenly" ,
273
- } }
268
+ < Typography
269
+ variant = "h5"
270
+ component = "h1"
271
+ sx = { { flexGrow : 1 , textAlign : 'center' , fontSize : { xs : "1.5rem" , md : "2rem" } } }
274
272
>
275
- < Stack direction = "row" spacing = { 1 } sx = { { justifyContent : "center" } } >
276
- { colors . map ( ( color , index ) => (
277
- < Chip
278
- key = { index }
279
- label = { color }
280
- sx = { {
281
- backgroundColor : color ,
282
- color : ( theme ) =>
283
- theme . palette . getContrastText ( color || "#fff" ) ,
284
- } }
273
+ Create beautiful generative SVG grids with customizable designs—start designing and download your artwork in SVG or PNG with a single click!
274
+ </ Typography >
275
+ < Button
276
+ variant = "contained"
277
+ size = "large"
278
+ sx = { {
279
+ color : "#fff" ,
280
+ backgroundColor : "#dd8d0e" ,
281
+ mb : 2 ,
282
+ width : { xs : "100%" , sm : "auto" } ,
283
+ } }
284
+ onClick = { generateNewGrid }
285
+ >
286
+ Generate Your Own Grid Art
287
+ </ Button >
288
+
289
+ { init ? (
290
+ < >
291
+ < Stack
292
+ direction = "column"
293
+ spacing = { 2 }
294
+ sx = { {
295
+ justifyContent : "center" ,
296
+ width : "100%" ,
297
+ alignItems : "center" ,
298
+ } }
299
+ >
300
+ < Stack direction = "row" spacing = { 1 } sx = { { justifyContent : "center" } } >
301
+ { colors . map ( ( color , index ) => (
302
+ < Chip
303
+ key = { index }
304
+ label = { color }
305
+ sx = { {
306
+ backgroundColor : color ,
307
+ color : ( theme ) =>
308
+ theme . palette . getContrastText ( color || "#fff" ) ,
309
+ } }
310
+ />
311
+ ) ) }
312
+ </ Stack >
313
+ < FormGroup sx = { { alignItems : "center" } } >
314
+ < FormControlLabel
315
+ control = {
316
+ < Switch
317
+ color = "warning"
318
+ checked = { diwakoStyle }
319
+ onChange = { ( ) => setDiwakoStyle ( ! diwakoStyle ) }
320
+ inputProps = { { "aria-label" : "controlled" } }
321
+ />
322
+ }
323
+ label = "Set Digitalwarenkombinat Style"
285
324
/>
286
- ) ) }
325
+ </ FormGroup >
326
+ < div className = "container" ref = { svgContainerRef } />
327
+ < Button onClick = { downloadSVG } sx = { { mt : 2 } } variant = "outlined" >
328
+ Download SVG
329
+ </ Button >
330
+ < Button onClick = { downloadPNG } sx = { { mt : 1 } } variant = "outlined" >
331
+ Download PNG
332
+ </ Button >
287
333
</ Stack >
288
- < FormGroup sx = { { alignItems : "center" } } >
289
- < FormControlLabel
290
- control = {
291
- < Switch
292
- color = "warning"
293
- checked = { diwakoStyle }
294
- onChange = { ( ) => setDiwakoStyle ( ! diwakoStyle ) }
295
- inputProps = { { "aria-label" : "controlled" } }
296
- />
297
- }
298
- label = "Set Digitalwarenkombinat style"
299
- />
300
- </ FormGroup >
301
- < div className = "container" ref = { svgContainerRef } />
302
- < Button onClick = { downloadSVG } sx = { { mt : 2 } } variant = "outlined" >
303
- Download SVG
304
- </ Button >
305
- < Button onClick = { downloadPNG } sx = { { mt : 1 } } variant = "outlined" >
306
- Download PNG
307
- </ Button >
308
- </ Container >
309
- </ >
310
- ) : (
311
- < img
312
- src = "./about.svg"
313
- alt = { "Logo Digitalwarenkombinat" }
314
- style = { {
315
- width : "100vw" ,
316
- height : "auto" ,
317
- maxHeight : "800px" ,
318
- } }
319
- />
320
- ) }
334
+ </ >
335
+ ) : (
336
+ < img
337
+ src = "./about.svg"
338
+ alt = { "Logo Digitalwarenkombinat" }
339
+ style = { {
340
+ width : "100%" ,
341
+ height : "auto" ,
342
+ maxHeight : "800px" ,
343
+ } }
344
+ />
345
+ ) }
346
+ </ Container >
321
347
</ div >
322
348
) ;
323
349
} ;
0 commit comments