create-gardener 2.0.3 → 2.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/template/jsconfig.json +6 -12
- package/template/src/backend/controllers/gardener/addPage.ts +40 -3
- package/template/src/backend/controllers/gardener/index.ts +1 -0
- package/template/src/backend/controllers/gardener/saveTemplate.ts +60 -0
- package/template/src/backend/routes/gardener.route.ts +2 -10
- package/template/src/frontend/static/gardenerDev.js +98 -5
- package/template/src/frontend/static/pages/{_get-started.js → pages._al.js} +1 -4
- package/template/src/frontend/static/pages/pages._new.js +2 -0
- package/template/src/frontend/static/style.css +1069 -1
- package/template/src/frontend/static/style2.css +4 -0
- package/template/src/frontend/template/template._.ejs +120 -0
- package/template/src/frontend/views/_.ejs +9 -3
- package/template/src/frontend/frontendtemplate.ejs +0 -24
- package/template/src/frontend/views/_get-started.ejs +0 -25
- /package/template/src/frontend/static/pages/{_.js → pages._.js} +0 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<link rel="icon" type="image/svg+xml" href="/static/cache/favicon_50x50.webp" />
|
|
7
|
+
<link href="/static/style.css" rel="stylesheet"/>
|
|
8
|
+
<link href="/static/style2.css" rel="stylesheet"/>
|
|
9
|
+
<title>Gardener: The Mini Web Framework</title>
|
|
10
|
+
</head>
|
|
11
|
+
<body class="bg-slate-50 text-slate-900 font-sans">
|
|
12
|
+
|
|
13
|
+
<div class='loader w-screen h-screen bg-white fixed z-2'> </div>
|
|
14
|
+
<div class='notification'></div>
|
|
15
|
+
|
|
16
|
+
<div id='main'>
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
<!-- hero -->
|
|
20
|
+
<div class='hero flex-wrap w-full h-screen bg-green-200 flex justify-center items-center px-10'>
|
|
21
|
+
<div class='w-200'>
|
|
22
|
+
<a href="https://ritish.site">Home</a> > <a href="https://ritish.site/projects">Projects</a> > <a href="/">Gardener</a>
|
|
23
|
+
<h1 class='text-6xl my-10 font-bold text-green-900'>Gardener</h1>
|
|
24
|
+
<h2 class='text-2xl font-bold text-green-800 mb-4'>Develop With No Bloat</h2>
|
|
25
|
+
<p class="text-lg mb-6 max-w-md">Gardener is a lightweight, DOM-first front-end library. No virtual DOM, no JSX, and no compilation step. Just the real DOM.</p>
|
|
26
|
+
<div class='flex gap-2 m-2'>
|
|
27
|
+
<a class="block bg-green-700 text-white px-8 py-3 rounded-lg font-bold hover:bg-green-800 transition" href='/get-started'>Get Started</a>
|
|
28
|
+
<a class="block border border-green-700 text-black px-8 py-3 rounded-lg font-bold hover:text-white hover:bg-green-800 transition" href='/documentation/#introduction'>Documentation</a>
|
|
29
|
+
</div>
|
|
30
|
+
<div class='flex gap-2 m-2'>
|
|
31
|
+
<a class="block border border-green-700 text-black px-8 py-3 rounded-lg font-bold hover:text-white hover:bg-green-800 transition" href='https://github.com/ritishDas/Gardener'>View On Github</a>
|
|
32
|
+
<a class="block border border-green-700 text-black px-8 py-3 rounded-lg font-bold hover:text-white hover:bg-green-800 transition" href='https://www.npmjs.com/package/create-gardener'>View On npm</a>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
<img src="/static/cache/gardener_500x500.webp" alt="Gardener Logo" class="w-96 h-96 object-contain ml-10">
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<!-- Copy command -->
|
|
39
|
+
<div class="flex w-1/4 items-center mx-auto my-15 justify-between gap-4 bg-[#1e1e1e] border border-gray-700 rounded-lg px-4 py-3 font-mono shadow-sm group">
|
|
40
|
+
<span class="text-sm md:text-base text-gray-300 select-all">
|
|
41
|
+
<span class="text-emerald-400 mr-2">$</span><span class='initCommand'>pnpm create gardener app</span>
|
|
42
|
+
</span>
|
|
43
|
+
|
|
44
|
+
<button class="copybtn flex items-center justify-center p-2 text-gray-400 hover:text-white hover:bg-white/10 rounded transition-all duration-200 active:scale-95" title="Copy to clipboard">
|
|
45
|
+
<span class="w-5 h-5" >
|
|
46
|
+
<%- include('partials/icons/clipboard') %>
|
|
47
|
+
</span>
|
|
48
|
+
</button>
|
|
49
|
+
</div>
|
|
50
|
+
<!-- Philosophy -->
|
|
51
|
+
<div class="max-w-5xl mx-auto py-20 px-6 grid md:grid-cols-2 gap-12">
|
|
52
|
+
<div>
|
|
53
|
+
<h3 class="text-3xl font-bold mb-4 text-green-900">✨ Philosophy</h3>
|
|
54
|
+
<ul class="space-y-3 text-slate-700">
|
|
55
|
+
<li><strong>DOM-First:</strong> Renders directly to the real DOM.</li>
|
|
56
|
+
<li><strong>Deterministic:</strong> If you can inspect it, you can understand it.</li>
|
|
57
|
+
<li><strong>Native:</strong> Works in the browser via ES modules.</li>
|
|
58
|
+
<li><strong>Zero Build:</strong> No bundlers or magic required.</li>
|
|
59
|
+
</ul>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<!-- Features -->
|
|
63
|
+
<div>
|
|
64
|
+
<h3 class="text-3xl font-bold mb-4 text-green-900">🚀 Features</h3>
|
|
65
|
+
<div class="grid grid-cols-2 gap-4">
|
|
66
|
+
<div class="p-4 bg-white shadow-sm border border-green-100 rounded">Declarative UI</div>
|
|
67
|
+
<div class="p-4 bg-white shadow-sm border border-green-100 rounded">SVG Namespace Support</div>
|
|
68
|
+
<div class="p-4 bg-white shadow-sm border border-green-100 rounded">Hot Reload</div>
|
|
69
|
+
<div class="p-4 bg-white shadow-sm border border-green-100 rounded">Image Optimization</div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
|
|
74
|
+
<!-- Api Example -->
|
|
75
|
+
<div class="bg-slate-900 py-20 text-white">
|
|
76
|
+
<div class="max-w-5xl mx-auto px-6">
|
|
77
|
+
<h3 class="text-3xl font-bold mb-8 text-center text-green-400">The Core API</h3>
|
|
78
|
+
<div class="bg-slate-800 p-6 rounded-xl border border-slate-700 font-mono text-sm overflow-x-auto">
|
|
79
|
+
<pre class="text-blue-300">
|
|
80
|
+
gardener({
|
|
81
|
+
t: <span class="text-green-300">'div'</span>,
|
|
82
|
+
cn: [<span class="text-green-300">'p-6'</span>, <span class="text-green-300">'flex'</span>],
|
|
83
|
+
attr: { id: <span class="text-green-300">'hero'</span> },
|
|
84
|
+
txt: <span class="text-green-300">'Welcome to the Garden'</span>,
|
|
85
|
+
events: {
|
|
86
|
+
click: () => console.log(<span class="text-green-300">'Growth!'</span>)
|
|
87
|
+
},
|
|
88
|
+
children: [
|
|
89
|
+
{ t: <span class="text-green-300">'span'</span>, txt: <span class="text-green-300">'Pure DOM nodes.'</span> }
|
|
90
|
+
]
|
|
91
|
+
})
|
|
92
|
+
</pre>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<div class="max-w-5xl mx-auto py-20 px-6 text-center">
|
|
98
|
+
<h3 class="text-3xl font-bold mb-4 text-green-900">🧠 Simple State</h3>
|
|
99
|
+
<p class="mb-8 text-slate-600">No proxies. No diffing. Just clean, reactive callbacks.</p>
|
|
100
|
+
<div class="inline-block text-left bg-white p-6 rounded shadow-lg border-t-4 border-green-500 font-mono text-sm">
|
|
101
|
+
<p class="text-slate-500">// Initialize</p>
|
|
102
|
+
<p>const count = new State(0);</p>
|
|
103
|
+
<p class="text-slate-500 mt-2">// React</p>
|
|
104
|
+
<p>count.registerCb(val => updateUI(val));</p>
|
|
105
|
+
</div>
|
|
106
|
+
</div>
|
|
107
|
+
|
|
108
|
+
<!-- Footer -->
|
|
109
|
+
<footer class="bg-green-900 text-green-100 py-12 text-center">
|
|
110
|
+
<p class="text-xl italic">"Because sometimes you don't need a forest. Just a garden."</p>
|
|
111
|
+
<div class="mt-6 text-sm opacity-70">
|
|
112
|
+
MIT Licensed | Built on Express & EJS
|
|
113
|
+
</div>
|
|
114
|
+
</footer>
|
|
115
|
+
</div>
|
|
116
|
+
|
|
117
|
+
</body>
|
|
118
|
+
<script type='module' src='/static/global.js'> </script>
|
|
119
|
+
|
|
120
|
+
</html>
|
|
@@ -23,8 +23,14 @@
|
|
|
23
23
|
<h1 class='text-6xl my-10 font-bold text-green-900'>Gardener</h1>
|
|
24
24
|
<h2 class='text-2xl font-bold text-green-800 mb-4'>Develop With No Bloat</h2>
|
|
25
25
|
<p class="text-lg mb-6 max-w-md">Gardener is a lightweight, DOM-first front-end library. No virtual DOM, no JSX, and no compilation step. Just the real DOM.</p>
|
|
26
|
-
<
|
|
27
|
-
<a class="
|
|
26
|
+
<div class='flex gap-2 m-2'>
|
|
27
|
+
<a class="block bg-green-700 text-white px-8 py-3 rounded-lg font-bold hover:bg-green-800 transition" href='/get-started'>Get Started</a>
|
|
28
|
+
<a class="block border border-green-700 text-black px-8 py-3 rounded-lg font-bold hover:text-white hover:bg-green-800 transition" href='/documentation/#introduction'>Documentation</a>
|
|
29
|
+
</div>
|
|
30
|
+
<div class='flex gap-2 m-2'>
|
|
31
|
+
<a class="block border border-green-700 text-black px-8 py-3 rounded-lg font-bold hover:text-white hover:bg-green-800 transition" href='https://github.com/ritishDas/Gardener'>View On Github</a>
|
|
32
|
+
<a class="block border border-green-700 text-black px-8 py-3 rounded-lg font-bold hover:text-white hover:bg-green-800 transition" href='https://www.npmjs.com/package/create-gardener'>View On npm</a>
|
|
33
|
+
</div>
|
|
28
34
|
</div>
|
|
29
35
|
<img src="/static/cache/gardener_500x500.webp" alt="Gardener Logo" class="w-96 h-96 object-contain ml-10">
|
|
30
36
|
</div>
|
|
@@ -110,5 +116,5 @@ gardener({
|
|
|
110
116
|
|
|
111
117
|
</body>
|
|
112
118
|
<script type='module' src='/static/global.js'> </script>
|
|
113
|
-
<script type='module' src='/static/pages/_.js'> </script>
|
|
119
|
+
<script type='module' src='/static/pages/pages._.js'> </script>
|
|
114
120
|
</html>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<link rel="icon" type="image/svg+xml" href="/static/cache/favicon_50x50.webp" />
|
|
7
|
-
<link href="/static/style.css" rel="stylesheet"/>
|
|
8
|
-
<link href="/static/style2.css" rel="stylesheet"/>
|
|
9
|
-
<title>Gardener: The Mini Web Framework</title>
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<div class='notification'></div>
|
|
13
|
-
<div class='loader w-screen h-screen bg-white fixed z-2'> </div>
|
|
14
|
-
<div id='main'>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</div>
|
|
20
|
-
</body>
|
|
21
|
-
<script type='module' src='/static/global.js'> </script>
|
|
22
|
-
</html>
|
|
23
|
-
|
|
24
|
-
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<link rel="icon" type="image/svg+xml" href="/static/cache/favicon_50x50.webp" />
|
|
7
|
-
<link href="/static/style.css" rel="stylesheet"/>
|
|
8
|
-
<link href="/static/style2.css" rel="stylesheet"/>
|
|
9
|
-
<title>Gardener: Get Started</title>
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<div class='loader w-screen h-screen bg-white fixed z-2'> </div>
|
|
13
|
-
<div class='notification'></div>
|
|
14
|
-
<div id='main'>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</body>
|
|
20
|
-
|
|
21
|
-
<script src="/static/pages/_get-started.js" type='module'></script>
|
|
22
|
-
<script type='module' src='/static/global.js'> </script>
|
|
23
|
-
</html>
|
|
24
|
-
|
|
25
|
-
|
|
File without changes
|