-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathquickstart.bat
More file actions
797 lines (765 loc) · 18.9 KB
/
quickstart.bat
File metadata and controls
797 lines (765 loc) · 18.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
@echo off
setlocal enabledelayedexpansion
REM Leaf Quickstart Script for Windows
REM Interactive site generator
echo.
echo ==========================================
echo Leaf Site Generator v1.0
echo Lightning-fast static sites
echo ==========================================
echo.
REM Check if leaf is installed
where leaf >nul 2>&1
if %ERRORLEVEL% neq 0 (
echo [WARNING] Leaf is not installed. Installing now...
cargo install --path .
)
echo Let's create your site!
echo.
REM Prompt for site information
set /p site_type="What type of site do you want? (portfolio/blog/docs/landing): "
if "!site_type!"=="" set site_type=portfolio
set /p project_name="Project name (e.g., my-awesome-site): "
if "!project_name!"=="" set project_name=my-site
set /p site_title="Site title: "
if "!site_title!"=="" set site_title=My Site
set /p site_description="Site description: "
if "!site_description!"=="" set site_description=A beautiful site built with Leaf
set /p author_name="Your name: "
if "!author_name!"=="" set author_name=Anonymous
set /p site_url="Site URL (e.g., https://mysite.com): "
if "!site_url!"=="" set site_url=https://example.com
echo.
echo Creating your !site_type! site...
echo.
REM Create the project
call leaf new "!project_name!"
cd "!project_name!"
REM Update leaf.json
(
echo {
echo "title": "!site_title!",
echo "description": "!site_description!",
echo "url": "!site_url!",
echo "author": "!author_name!"
echo }
) > leaf.json
REM Create content based on site type
if /i "!site_type!"=="portfolio" (
echo Setting up portfolio site...
call :create_portfolio
) else if /i "!site_type!"=="blog" (
echo Setting up blog site...
call :create_blog
) else if /i "!site_type!"=="docs" (
echo Setting up documentation site...
call :create_docs
) else if /i "!site_type!"=="landing" (
echo Setting up landing page site...
call :create_landing
) else (
echo Setting up default site...
call :create_portfolio
)
REM Create enhanced templates
call :create_templates
REM Create enhanced CSS
call :create_css
echo.
echo [SUCCESS] Your !site_type! site is ready!
echo.
echo Quick commands:
echo leaf dev - Start dev server
echo leaf build - Build for production
echo leaf create page ^<n^> - Create new page
echo.
echo Next steps:
echo 1. Run: leaf dev
echo 2. Open: http://localhost:3000
echo 3. Edit: http://localhost:3000/editor
echo.
echo Happy building!
goto :eof
:create_portfolio
(
echo ---
echo {
echo "title": "About Me",
echo "layout": "page"
echo }
echo ---
echo.
echo # About Me
echo.
echo Welcome! I'm a creative professional passionate about design and technology.
echo.
echo ## What I Do
echo.
echo - User Interface Design
echo - User Experience Research
echo - Frontend Development
echo - Creative Direction
echo.
echo ## Get in Touch
echo.
echo Feel free to reach out if you'd like to collaborate!
) > content\about.md
(
echo ---
echo {
echo "title": "Projects",
echo "layout": "page"
echo }
echo ---
echo.
echo # My Projects
echo.
echo ## Project One
echo.
echo A stunning web application that showcases modern design principles.
echo.
echo **Technologies:** React, TypeScript, Tailwind CSS
echo.
echo ## Project Two
echo.
echo An innovative mobile experience focused on user delight.
echo.
echo **Technologies:** React Native, Node.js, PostgreSQL
echo.
echo ## Project Three
echo.
echo A comprehensive design system used across multiple products.
echo.
echo **Technologies:** Figma, Storybook, Design Tokens
) > content\projects.md
(
echo ---
echo {
echo "title": "Contact",
echo "layout": "page"
echo }
echo ---
echo.
echo # Get in Touch
echo.
echo I'd love to hear from you! Whether it's a project inquiry, collaboration opportunity, or just to say hello.
echo.
echo **Email:** hello@example.com
echo **Twitter:** @yourhandle
echo **LinkedIn:** linkedin.com/in/yourprofile
echo.
echo Let's create something amazing together!
) > content\contact.md
goto :eof
:create_blog
(
echo ---
echo {
echo "title": "Getting Started with Blogging",
echo "date": "2025-01-15",
echo "author": "Blog Author",
echo "tags": ["writing", "blogging"],
echo "description": "My first blog post"
echo }
echo ---
echo.
echo # Getting Started with Blogging
echo.
echo Welcome to my blog! This is where I'll share my thoughts, experiences, and insights.
echo.
echo ## Why I'm Blogging
echo.
echo Writing helps me organize my thoughts and share knowledge with others. I'm excited to document my journey.
echo.
echo ## What to Expect
echo.
echo - Regular updates on my projects
echo - Tutorials and how-tos
echo - Personal reflections
echo - Industry insights
echo.
echo Stay tuned for more content!
) > content\getting-started.md
(
echo ---
echo {
echo "title": "5 Design Tips for Beginners",
echo "date": "2025-01-14",
echo "author": "Blog Author",
echo "tags": ["design", "tips"],
echo "description": "Essential design principles"
echo }
echo ---
echo.
echo # 5 Design Tips for Beginners
echo.
echo If you're just starting out in design, these tips will help you create better work.
echo.
echo ## 1. Less is More
echo.
echo Simplicity often leads to better design. Remove unnecessary elements.
echo.
echo ## 2. Consistency Matters
echo.
echo Use consistent spacing, colors, and typography throughout your design.
echo.
echo ## 3. White Space is Your Friend
echo.
echo Don't be afraid of empty space. It helps content breathe.
echo.
echo ## 4. Typography is Key
echo.
echo Choose fonts carefully and limit yourself to 2-3 typefaces maximum.
echo.
echo ## 5. Get Feedback Early
echo.
echo Share your work and iterate based on feedback.
echo.
echo Happy designing!
) > content\5-design-tips.md
goto :eof
:create_docs
(
echo ---
echo {
echo "title": "Introduction",
echo "layout": "page"
echo }
echo ---
echo.
echo # Introduction
echo.
echo Welcome to the documentation! This guide will help you get started quickly.
echo.
echo ## Overview
echo.
echo This documentation covers everything you need to know about using our product effectively.
echo.
echo ## Quick Start
echo.
echo Follow these steps to get up and running:
echo.
echo 1. Install the required dependencies
echo 2. Configure your environment
echo 3. Run the application
echo 4. Explore the features
echo.
echo ## Need Help?
echo.
echo If you run into any issues, check our FAQ or reach out to support.
) > content\introduction.md
(
echo ---
echo {
echo "title": "Installation Guide",
echo "layout": "page"
echo }
echo ---
echo.
echo # Installation Guide
echo.
echo ## Prerequisites
echo.
echo Before you begin, ensure you have:
echo.
echo - Node.js 18+ installed
echo - npm or yarn package manager
echo - Git for version control
echo.
echo ## Installation Steps
echo.
echo ### Step 1: Clone the Repository
echo.
echo ```bash
echo git clone https://github.com/yourusername/yourproject.git
echo cd yourproject
echo ```
echo.
echo ### Step 2: Install Dependencies
echo.
echo ```bash
echo npm install
echo ```
echo.
echo ### Step 3: Run the Application
echo.
echo ```bash
echo npm run dev
echo ```
) > content\installation.md
(
echo ---
echo {
echo "title": "API Reference",
echo "layout": "page"
echo }
echo ---
echo.
echo # API Reference
echo.
echo Complete reference for all API endpoints.
echo.
echo ## Authentication
echo.
echo All API requests require authentication using an API key.
echo.
echo ## Endpoints
echo.
echo ### GET /users
echo.
echo Retrieve a list of users.
echo.
echo **Parameters:**
echo - `page` ^(optional^): Page number
echo - `limit` ^(optional^): Results per page
) > content\api-reference.md
goto :eof
:create_landing
(
echo ---
echo {
echo "title": "Welcome",
echo "layout": "page"
echo }
echo ---
echo.
echo # Transform Your Ideas Into Reality
echo.
echo We help businesses create stunning digital experiences that users love.
echo.
echo ## Why Choose Us
echo.
echo **Fast ^& Reliable**
echo Lightning-fast performance that scales with your business.
echo.
echo **Beautiful Design**
echo Pixel-perfect interfaces that delight your users.
echo.
echo **Easy to Use**
echo Intuitive workflows that save you time and effort.
echo.
echo ## Ready to Get Started?
echo.
echo Join thousands of satisfied customers and transform your business today.
) > content\home.md
(
echo ---
echo {
echo "title": "Features",
echo "layout": "page"
echo }
echo ---
echo.
echo # Powerful Features
echo.
echo Everything you need to succeed, all in one place.
echo.
echo ## Lightning Fast
echo.
echo Optimized for performance, your site loads in milliseconds.
echo.
echo ## Fully Responsive
echo.
echo Perfect on desktop, tablet, and mobile devices.
echo.
echo ## SEO Optimized
echo.
echo Built with best practices to help you rank higher.
echo.
echo ## Easy Customization
echo.
echo No coding required. Customize everything with our visual editor.
echo.
echo ## 24/7 Support
echo.
echo Our team is always here to help you succeed.
) > content\features.md
(
echo ---
echo {
echo "title": "Pricing",
echo "layout": "page"
echo }
echo ---
echo.
echo # Simple, Transparent Pricing
echo.
echo Choose the plan that's right for you.
echo.
echo ## Starter - $9/month
echo.
echo Perfect for personal projects and small sites.
echo.
echo - 5 pages
echo - 1GB storage
echo - Basic support
echo - SSL included
echo.
echo ## Professional - $29/month
echo.
echo Great for growing businesses.
echo.
echo - Unlimited pages
echo - 10GB storage
echo - Priority support
echo - Custom domain
echo.
echo ## Enterprise - Custom
echo.
echo For large organizations with specific needs.
echo.
echo - Everything in Professional
echo - Dedicated support
echo - Custom integrations
) > content\pricing.md
goto :eof
:create_templates
if not exist templates mkdir templates
(
echo ^<!DOCTYPE html^>
echo ^<html lang="en"^>
echo ^<head^>
echo ^<meta charset="UTF-8"^>
echo ^<meta name="viewport" content="width=device-width, initial-scale=1.0"^>
echo ^<title^>{{ site.title }}^</title^>
echo ^<meta name="description" content="{{ site.description }}"^>
echo ^<link rel="stylesheet" href="/style.css"^>
echo ^</head^>
echo ^<body^>
echo ^<nav class="navbar"^>
echo ^<div class="container"^>
echo ^<h1 class="logo"^>{{ site.title }}^</h1^>
echo ^<ul class="nav-links"^>
echo {%% for page in pages %%}
echo ^<li^>^<a href="{{ page.url }}"^>{{ page.frontmatter.title }}^</a^>^</li^>
echo {%% endfor %%}
echo ^</ul^>
echo ^</div^>
echo ^</nav^>
echo.
echo ^<header class="hero"^>
echo ^<div class="container"^>
echo ^<h1^>{{ site.title }}^</h1^>
echo ^<p class="subtitle"^>{{ site.description }}^</p^>
echo ^</div^>
echo ^</header^>
echo.
echo ^<main class="container"^>
echo ^<section class="pages-grid"^>
echo {%% for page in pages %%}
echo ^<article class="page-card"^>
echo ^<h2^>^<a href="{{ page.url }}"^>{{ page.frontmatter.title }}^</a^>^</h2^>
echo {%% if page.frontmatter.description %%}
echo ^<p^>{{ page.frontmatter.description }}^</p^>
echo {%% endif %%}
echo {%% if page.frontmatter.date %%}
echo ^<time^>{{ page.frontmatter.date }}^</time^>
echo {%% endif %%}
echo ^</article^>
echo {%% endfor %%}
echo ^</section^>
echo ^</main^>
echo.
echo ^<footer^>
echo ^<div class="container"^>
echo ^<p^>^© 2025 {{ site.author }}. Built with Leaf.^</p^>
echo ^</div^>
echo ^</footer^>
echo ^</body^>
echo ^</html^>
) > templates\index.html
(
echo ^<!DOCTYPE html^>
echo ^<html lang="en"^>
echo ^<head^>
echo ^<meta charset="UTF-8"^>
echo ^<meta name="viewport" content="width=device-width, initial-scale=1.0"^>
echo ^<title^>{{ page.frontmatter.title }} - {{ site.title }}^</title^>
echo ^<meta name="description" content="{{ page.frontmatter.description }}"^>
echo ^<link rel="stylesheet" href="/style.css"^>
echo ^</head^>
echo ^<body^>
echo ^<nav class="navbar"^>
echo ^<div class="container"^>
echo ^<a href="/" class="logo"^>{{ site.title }}^</a^>
echo ^</div^>
echo ^</nav^>
echo.
echo ^<main class="container"^>
echo ^<article class="content-page"^>
echo ^<header^>
echo ^<h1^>{{ page.frontmatter.title }}^</h1^>
echo {%% if page.frontmatter.date %%}
echo ^<time^>{{ page.frontmatter.date }}^</time^>
echo {%% endif %%}
echo {%% if page.frontmatter.author %%}
echo ^<span class="author"^>by {{ page.frontmatter.author }}^</span^>
echo {%% endif %%}
echo ^</header^>
echo.
echo ^<div class="content"^>
echo {{ page.content ^| safe }}
echo ^</div^>
echo.
echo {%% if page.frontmatter.tags %%}
echo ^<div class="tags"^>
echo {%% for tag in page.frontmatter.tags %%}
echo ^<span class="tag"^>{{ tag }}^</span^>
echo {%% endfor %%}
echo ^</div^>
echo {%% endif %%}
echo ^</article^>
echo ^</main^>
echo.
echo ^<footer^>
echo ^<div class="container"^>
echo ^<p^>^© 2025 {{ site.author }}. Built with Leaf.^</p^>
echo ^</div^>
echo ^</footer^>
echo ^</body^>
echo ^</html^>
) > templates\page.html
goto :eof
:create_css
(
echo * {
echo margin: 0;
echo padding: 0;
echo box-sizing: border-box;
echo }
echo.
echo :root {
echo --primary: #2d5016;
echo --primary-dark: #1a3009;
echo --text: #1a1a1a;
echo --text-light: #666;
echo --bg: #ffffff;
echo --bg-alt: #f8f9fa;
echo --border: #e0e0e0;
echo --shadow: rgba^(0, 0, 0, 0.1^);
echo }
echo.
echo body {
echo font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
echo line-height: 1.6;
echo color: var^(--text^);
echo background: var^(--bg-alt^);
echo }
echo.
echo .container {
echo max-width: 1200px;
echo margin: 0 auto;
echo padding: 0 2rem;
echo }
echo.
echo /* Navigation */
echo .navbar {
echo background: var^(--bg^);
echo border-bottom: 1px solid var^(--border^);
echo padding: 1rem 0;
echo position: sticky;
echo top: 0;
echo z-index: 100;
echo }
echo.
echo .navbar .container {
echo display: flex;
echo justify-content: space-between;
echo align-items: center;
echo }
echo.
echo .logo {
echo font-size: 1.5rem;
echo font-weight: 600;
echo color: var^(--primary^);
echo text-decoration: none;
echo }
echo.
echo .nav-links {
echo display: flex;
echo list-style: none;
echo gap: 2rem;
echo }
echo.
echo .nav-links a {
echo color: var^(--text^);
echo text-decoration: none;
echo font-weight: 500;
echo transition: color 0.2s;
echo }
echo.
echo .nav-links a:hover {
echo color: var^(--primary^);
echo }
echo.
echo /* Hero */
echo .hero {
echo background: linear-gradient^(135deg, var^(--primary^) 0%%, var^(--primary-dark^) 100%%^);
echo color: white;
echo padding: 6rem 0;
echo text-align: center;
echo }
echo.
echo .hero h1 {
echo font-size: 3rem;
echo font-weight: 700;
echo margin-bottom: 1rem;
echo }
echo.
echo .subtitle {
echo font-size: 1.25rem;
echo opacity: 0.9;
echo }
echo.
echo /* Main Content */
echo main {
echo padding: 4rem 0;
echo }
echo.
echo .pages-grid {
echo display: grid;
echo grid-template-columns: repeat^(auto-fill, minmax^(300px, 1fr^)^);
echo gap: 2rem;
echo margin-top: 2rem;
echo }
echo.
echo .page-card {
echo background: var^(--bg^);
echo padding: 2rem;
echo border-radius: 8px;
echo box-shadow: 0 2px 8px var^(--shadow^);
echo transition: transform 0.2s, box-shadow 0.2s;
echo }
echo.
echo .page-card:hover {
echo transform: translateY^(-4px^);
echo box-shadow: 0 4px 16px var^(--shadow^);
echo }
echo.
echo .page-card h2 {
echo margin-bottom: 0.5rem;
echo }
echo.
echo .page-card a {
echo color: var^(--primary^);
echo text-decoration: none;
echo }
echo.
echo .page-card a:hover {
echo text-decoration: underline;
echo }
echo.
echo .page-card time {
echo color: var^(--text-light^);
echo font-size: 0.875rem;
echo }
echo.
echo /* Content Page */
echo .content-page {
echo background: var^(--bg^);
echo padding: 3rem;
echo border-radius: 8px;
echo box-shadow: 0 2px 8px var^(--shadow^);
echo max-width: 800px;
echo margin: 0 auto;
echo }
echo.
echo .content-page header {
echo margin-bottom: 2rem;
echo padding-bottom: 1rem;
echo border-bottom: 2px solid var^(--border^);
echo }
echo.
echo .content-page h1 {
echo color: var^(--primary^);
echo margin-bottom: 0.5rem;
echo }
echo.
echo .content h2 {
echo margin-top: 2rem;
echo margin-bottom: 1rem;
echo }
echo.
echo .content p {
echo margin-bottom: 1rem;
echo }
echo.
echo .content ul,
echo .content ol {
echo margin-bottom: 1rem;
echo padding-left: 2rem;
echo }
echo.
echo .content a {
echo color: var^(--primary^);
echo text-decoration: none;
echo }
echo.
echo .content a:hover {
echo text-decoration: underline;
echo }
echo.
echo .content code {
echo background: var^(--bg-alt^);
echo padding: 0.2rem 0.4rem;
echo border-radius: 3px;
echo font-family: 'Monaco', 'Courier New', monospace;
echo font-size: 0.9em;
echo }
echo.
echo .content pre {
echo background: #1a1a1a;
echo color: #f5f5f5;
echo padding: 1.5rem;
echo border-radius: 8px;
echo overflow-x: auto;
echo margin: 1.5rem 0;
echo }
echo.
echo /* Tags */
echo .tags {
echo display: flex;
echo gap: 0.5rem;
echo margin-top: 2rem;
echo padding-top: 1rem;
echo border-top: 1px solid var^(--border^);
echo }
echo.
echo .tag {
echo background: var^(--bg-alt^);
echo padding: 0.25rem 0.75rem;
echo border-radius: 16px;
echo font-size: 0.875rem;
echo color: var^(--primary^);
echo border: 1px solid var^(--primary^);
echo }
echo.
echo /* Footer */
echo footer {
echo background: var^(--primary-dark^);
echo color: white;
echo padding: 2rem 0;
echo margin-top: 4rem;
echo text-align: center;
echo }
echo.
echo /* Responsive */
echo @media ^(max-width: 768px^) {
echo .hero h1 {
echo font-size: 2rem;
echo }
echo.
echo .nav-links {
echo gap: 1rem;
echo }
echo.
echo .pages-grid {
echo grid-template-columns: 1fr;
echo }
echo.
echo .content-page {
echo padding: 1.5rem;
echo }
echo }
) > static\style.css
goto :eof