kempo-server 2.2.0 → 3.0.1

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.
Files changed (62) hide show
  1. package/CONFIG.md +295 -187
  2. package/README.md +5 -4
  3. package/SPA.md +14 -14
  4. package/dist/defaultConfig.js +1 -1
  5. package/dist/index.js +1 -1
  6. package/dist/render.js +2 -0
  7. package/dist/router.js +1 -1
  8. package/dist/serveFile.js +1 -1
  9. package/dist/templating/index.js +1 -0
  10. package/dist/templating/parse.js +1 -0
  11. package/docs/caching.html +103 -17
  12. package/docs/cli-utils.html +102 -16
  13. package/docs/configuration.html +104 -17
  14. package/docs/examples.html +104 -17
  15. package/docs/fs-utils.html +102 -16
  16. package/docs/getting-started.html +104 -17
  17. package/docs/index.html +176 -81
  18. package/docs/middleware.html +104 -17
  19. package/docs/request-response.html +104 -17
  20. package/docs/routing.html +104 -17
  21. package/docs/templating.html +292 -0
  22. package/docs-src/.config.js +11 -0
  23. package/docs-src/caching.page.html +220 -0
  24. package/docs-src/cli-utils.page.html +71 -0
  25. package/docs-src/configuration.page.html +310 -0
  26. package/docs-src/default.template.html +35 -0
  27. package/docs-src/examples.page.html +192 -0
  28. package/docs-src/fs-utils.page.html +102 -0
  29. package/docs-src/getting-started.page.html +63 -0
  30. package/docs-src/index.page.html +79 -0
  31. package/docs-src/middleware.page.html +133 -0
  32. package/docs-src/nav.fragment.html +73 -0
  33. package/docs-src/request-response.page.html +96 -0
  34. package/docs-src/routing.page.html +73 -0
  35. package/docs-src/templating.page.html +188 -0
  36. package/llms.txt +97 -31
  37. package/package.json +5 -2
  38. package/scripts/build.js +22 -1
  39. package/scripts/render.js +58 -0
  40. package/src/defaultConfig.js +14 -2
  41. package/src/index.js +1 -1
  42. package/src/router.js +69 -10
  43. package/src/serveFile.js +27 -0
  44. package/src/templating/index.js +132 -0
  45. package/src/templating/parse.js +285 -0
  46. package/tests/cacheConfig.node-test.js +2 -2
  47. package/tests/config-flag.node-test.js +61 -25
  48. package/tests/customRoute-outside-root.node-test.js +1 -1
  49. package/tests/router-wildcard.node-test.js +47 -2
  50. package/tests/templating-parse.node-test.js +243 -0
  51. package/tests/templating-render.node-test.js +188 -0
  52. package/tests/utils/test-scenario.js +4 -4
  53. package/docs/.config.json.example +0 -29
  54. package/docs/api/_admin/cache/DELETE.js +0 -28
  55. package/docs/api/_admin/cache/GET.js +0 -53
  56. package/docs/api/user/[id]/GET.js +0 -15
  57. package/docs/api/user/[id]/[info]/DELETE.js +0 -12
  58. package/docs/api/user/[id]/[info]/GET.js +0 -17
  59. package/docs/api/user/[id]/[info]/POST.js +0 -18
  60. package/docs/api/user/[id]/[info]/PUT.js +0 -19
  61. package/docs/init.js +0 -2
  62. package/docs/nav.inc.html +0 -70
@@ -1,19 +1,102 @@
1
- <html lang="en" theme="auto">
1
+ <!DOCTYPE html>
2
+ <html lang="en">
2
3
  <head>
3
- <meta charset='utf-8'>
4
- <meta http-equiv='X-UA-Compatible' content='IE=edge'>
5
- <title>Configuration - Kempo Server</title>
6
- <meta name='viewport' content='width=device-width, initial-scale=1'>
7
- <link rel="icon" type="image/png" sizes="48x48" href="./media/icon48.png">
8
- <link rel="manifest" href="./manifest.json" />
9
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2.1.3/dist/kempo.min.css" />
10
- <link rel="stylesheet" href="./theme.css" />
11
- <script src="./init.js"></script>
4
+ <meta charset="UTF-8" />
5
+ <meta
6
+ name="viewport"
7
+ content="width=device-width, initial-scale=1.0"
8
+ />
9
+ <title>Configuration - Kempo Server</title>
10
+ <link rel="icon" type="image/svg+xml" href="./media/icon.svg" />
11
+ <link rel="icon" type="image/png" sizes="32x32" href="./media/icon32.png" />
12
+ <link rel="manifest" href="./manifest.json" />
13
+ <link
14
+ rel="stylesheet"
15
+ href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css"
16
+ />
17
+ <link rel="stylesheet" href="./theme.css" />
18
+ <script>
19
+ window.litDisableBundleWarning = true;
20
+ window.kempo = { pathsToIcons: ['https://cdn.jsdelivr.net/npm/kempo-ui@0.0.42/icons/'] };
21
+ </script>
12
22
  </head>
13
23
  <body>
14
- <k-import src="./nav.inc.html"></k-import>
15
- <k-main>
16
- <h1>Configuration</h1>
24
+
25
+ <k-nav
26
+ fixed
27
+ class="bg-primary"
28
+ >
29
+ <button
30
+ id="toggleNavSideMenu"
31
+ class="link"
32
+ >
33
+ <k-icon name="menu"></k-icon>
34
+ </button>
35
+ <a
36
+ href="./"
37
+ class="d-if ph"
38
+ style="align-items: center"
39
+ >
40
+ <img src="./media/icon32.png" alt="Kempo Server Icon" class="pr" />
41
+ Kempo Server
42
+ </a>
43
+ <div class="flex"></div>
44
+ <a href="https://github.com/dustinpoissant/kempo-ui?tab=License-1-ov-file#creative-commons-attribution-noncommercial-sharealike-20" target="_blank"><k-icon name="license"></k-icont></a>
45
+ <a href="https://github.com/dustinpoissant/kempo-ui" target="_blank"><k-icon name="github-mark"></k-icont></a>
46
+ <k-theme-switcher></k-theme-switcher>
47
+ </k-nav>
48
+ <div style="width: 100%; height: 4rem;"></div>
49
+ <k-aside
50
+ id="navSideMenu"
51
+ state="offscreen"
52
+ >
53
+ <menu>
54
+ <a href="./" class="ta-center bb mb r0">
55
+ <h1 class="tc-primary">Kempo Server</h1>
56
+ <img src="./media/icon128.png" alt="Kempo UI Icon" />
57
+ </a>
58
+ <h3>Getting Started</h3>
59
+ <a href="./" class="d-b pq pl">Quick Start</a>
60
+ <a href="./routing.html" class="d-b pq pl">Routing</a>
61
+ <a href="./request-response.html" class="d-b pq pl">Request & Response</a>
62
+ <br /><br />
63
+ <h3>Advanced Features</h3>
64
+ <a href="configuration.html" class="d-b pq pl">Configuration</a>
65
+ <a href="templating.html" class="d-b pq pl">Templating</a>
66
+ <a href="middleware.html" class="d-b pq pl">Middleware</a>
67
+ <a href="caching.html" class="d-b pq pl">Module Caching</a>
68
+ <a href="cli-utils.html" class="d-b pq pl">CLI Utilities</a>
69
+ <a href="fs-utils.html" class="d-b pq pl">File System Utilities</a>
70
+ <a href="examples.html" class="d-b pq pl">Examples & Demos</a>
71
+ </menu>
72
+ </k-aside>
73
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/Aside.js" type="module"></script>
74
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/Main.js" type="module"></script>
75
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/Nav.js" type="module"></script>
76
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/Icon.js" type="module"></script>
77
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/ThemeSwitcher.js" type="module"></script>
78
+ <script>
79
+ document.getElementById('toggleNavSideMenu').addEventListener('click', async () => {
80
+ await window.customElements.whenDefined('k-aside');
81
+ document.getElementById('navSideMenu').toggle();
82
+ });
83
+ document.addEventListener('click', function(e) {
84
+ if (e.target.matches('a[href^="#"]')) {
85
+ e.preventDefault();
86
+ const targetId = e.target.getAttribute('href').replace('#', '');
87
+ const target = document.getElementById(targetId);
88
+ if (target) {
89
+ target.scrollIntoView({ behavior: 'smooth' });
90
+ const url = window.location.pathname + window.location.search + '#' + targetId;
91
+ history.replaceState(null, '', url);
92
+ }
93
+ }
94
+ });
95
+ </script>
96
+
97
+ <main>
98
+ <h1 class="ta-center">Configuration</h1>
99
+
17
100
  <p>Customize Kempo Server's behavior with a simple JSON configuration file.</p>
18
101
 
19
102
  <h2>Configuration File</h2>
@@ -320,8 +403,12 @@
320
403
  <li>Enable file watching in development, disable in production for stability</li>
321
404
  <li>Use shorter TTL in development for faster iteration</li>
322
405
  </ul>
323
- </k-main>
324
- <div style="height:25vh"></div>
325
- <script type="module" src="https://cdn.jsdelivr.net/npm/kempo-ui@0.0.42/dist/components/Import.js"></script>
406
+
407
+ </main>
408
+ <div style="height:25vh"></div>
409
+ <script
410
+ type="module"
411
+ src="https://cdn.jsdelivr.net/npm/kempo-ui@0.0.42/dist/components/Import.js"
412
+ ></script>
326
413
  </body>
327
- </html>
414
+ </html>
@@ -1,19 +1,102 @@
1
- <html lang="en" theme="auto">
1
+ <!DOCTYPE html>
2
+ <html lang="en">
2
3
  <head>
3
- <meta charset='utf-8'>
4
- <meta http-equiv='X-UA-Compatible' content='IE=edge'>
5
- <title>Examples & Demos - Kempo Server</title>
6
- <meta name='viewport' content='width=device-width, initial-scale=1'>
7
- <link rel="icon" type="image/png" sizes="48x48" href="./media/icon48.png">
8
- <link rel="manifest" href="./manifest.json" />
9
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2.1.3/dist/kempo.min.css" />
10
- <link rel="stylesheet" href="./theme.css" />
11
- <script src="./init.js"></script>
4
+ <meta charset="UTF-8" />
5
+ <meta
6
+ name="viewport"
7
+ content="width=device-width, initial-scale=1.0"
8
+ />
9
+ <title>Examples &amp; Demos - Kempo Server</title>
10
+ <link rel="icon" type="image/svg+xml" href="./media/icon.svg" />
11
+ <link rel="icon" type="image/png" sizes="32x32" href="./media/icon32.png" />
12
+ <link rel="manifest" href="./manifest.json" />
13
+ <link
14
+ rel="stylesheet"
15
+ href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css"
16
+ />
17
+ <link rel="stylesheet" href="./theme.css" />
18
+ <script>
19
+ window.litDisableBundleWarning = true;
20
+ window.kempo = { pathsToIcons: ['https://cdn.jsdelivr.net/npm/kempo-ui@0.0.42/icons/'] };
21
+ </script>
12
22
  </head>
13
23
  <body>
14
- <k-import src="./nav.inc.html"></k-import>
15
- <k-main>
16
- <h1>Examples & Demos</h1>
24
+
25
+ <k-nav
26
+ fixed
27
+ class="bg-primary"
28
+ >
29
+ <button
30
+ id="toggleNavSideMenu"
31
+ class="link"
32
+ >
33
+ <k-icon name="menu"></k-icon>
34
+ </button>
35
+ <a
36
+ href="./"
37
+ class="d-if ph"
38
+ style="align-items: center"
39
+ >
40
+ <img src="./media/icon32.png" alt="Kempo Server Icon" class="pr" />
41
+ Kempo Server
42
+ </a>
43
+ <div class="flex"></div>
44
+ <a href="https://github.com/dustinpoissant/kempo-ui?tab=License-1-ov-file#creative-commons-attribution-noncommercial-sharealike-20" target="_blank"><k-icon name="license"></k-icont></a>
45
+ <a href="https://github.com/dustinpoissant/kempo-ui" target="_blank"><k-icon name="github-mark"></k-icont></a>
46
+ <k-theme-switcher></k-theme-switcher>
47
+ </k-nav>
48
+ <div style="width: 100%; height: 4rem;"></div>
49
+ <k-aside
50
+ id="navSideMenu"
51
+ state="offscreen"
52
+ >
53
+ <menu>
54
+ <a href="./" class="ta-center bb mb r0">
55
+ <h1 class="tc-primary">Kempo Server</h1>
56
+ <img src="./media/icon128.png" alt="Kempo UI Icon" />
57
+ </a>
58
+ <h3>Getting Started</h3>
59
+ <a href="./" class="d-b pq pl">Quick Start</a>
60
+ <a href="./routing.html" class="d-b pq pl">Routing</a>
61
+ <a href="./request-response.html" class="d-b pq pl">Request & Response</a>
62
+ <br /><br />
63
+ <h3>Advanced Features</h3>
64
+ <a href="configuration.html" class="d-b pq pl">Configuration</a>
65
+ <a href="templating.html" class="d-b pq pl">Templating</a>
66
+ <a href="middleware.html" class="d-b pq pl">Middleware</a>
67
+ <a href="caching.html" class="d-b pq pl">Module Caching</a>
68
+ <a href="cli-utils.html" class="d-b pq pl">CLI Utilities</a>
69
+ <a href="fs-utils.html" class="d-b pq pl">File System Utilities</a>
70
+ <a href="examples.html" class="d-b pq pl">Examples & Demos</a>
71
+ </menu>
72
+ </k-aside>
73
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/Aside.js" type="module"></script>
74
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/Main.js" type="module"></script>
75
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/Nav.js" type="module"></script>
76
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/Icon.js" type="module"></script>
77
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/ThemeSwitcher.js" type="module"></script>
78
+ <script>
79
+ document.getElementById('toggleNavSideMenu').addEventListener('click', async () => {
80
+ await window.customElements.whenDefined('k-aside');
81
+ document.getElementById('navSideMenu').toggle();
82
+ });
83
+ document.addEventListener('click', function(e) {
84
+ if (e.target.matches('a[href^="#"]')) {
85
+ e.preventDefault();
86
+ const targetId = e.target.getAttribute('href').replace('#', '');
87
+ const target = document.getElementById(targetId);
88
+ if (target) {
89
+ target.scrollIntoView({ behavior: 'smooth' });
90
+ const url = window.location.pathname + window.location.search + '#' + targetId;
91
+ history.replaceState(null, '', url);
92
+ }
93
+ }
94
+ });
95
+ </script>
96
+
97
+ <main>
98
+ <h1 class="ta-center">Examples &amp; Demos</h1>
99
+
17
100
  <p>Explore practical examples and try interactive demos of Kempo Server features.</p>
18
101
 
19
102
  <h2>Code Examples</h2>
@@ -202,8 +285,12 @@
202
285
  }
203
286
  }
204
287
  </script>
205
- </k-main>
206
- <div style="height:25vh"></div>
207
- <script type="module" src="https://cdn.jsdelivr.net/npm/kempo-ui@0.0.42/dist/components/Import.js"></script>
288
+
289
+ </main>
290
+ <div style="height:25vh"></div>
291
+ <script
292
+ type="module"
293
+ src="https://cdn.jsdelivr.net/npm/kempo-ui@0.0.42/dist/components/Import.js"
294
+ ></script>
208
295
  </body>
209
- </html>
296
+ </html>
@@ -1,20 +1,102 @@
1
1
  <!DOCTYPE html>
2
- <html lang="en" theme="auto">
2
+ <html lang="en">
3
3
  <head>
4
- <meta charset='utf-8'>
5
- <meta http-equiv='X-UA-Compatible' content='IE=edge'>
6
- <title>File System Utilities - Kempo Server</title>
7
- <meta name='viewport' content='width=device-width, initial-scale=1'>
8
- <link rel="icon" type="image/png" sizes="48x48" href="./media/icon48.png">
9
- <link rel="manifest" href="./manifest.json" />
10
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2.1.3/dist/kempo.min.css" />
11
- <link rel="stylesheet" href="./theme.css" />
12
- <script src="./init.js"></script>
4
+ <meta charset="UTF-8" />
5
+ <meta
6
+ name="viewport"
7
+ content="width=device-width, initial-scale=1.0"
8
+ />
9
+ <title>File System Utilities - Kempo Server</title>
10
+ <link rel="icon" type="image/svg+xml" href="./media/icon.svg" />
11
+ <link rel="icon" type="image/png" sizes="32x32" href="./media/icon32.png" />
12
+ <link rel="manifest" href="./manifest.json" />
13
+ <link
14
+ rel="stylesheet"
15
+ href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css"
16
+ />
17
+ <link rel="stylesheet" href="./theme.css" />
18
+ <script>
19
+ window.litDisableBundleWarning = true;
20
+ window.kempo = { pathsToIcons: ['https://cdn.jsdelivr.net/npm/kempo-ui@0.0.42/icons/'] };
21
+ </script>
13
22
  </head>
14
23
  <body>
15
- <k-import src="./nav.inc.html"></k-import>
16
- <k-main>
17
- <h1>File System Utilities</h1>
24
+
25
+ <k-nav
26
+ fixed
27
+ class="bg-primary"
28
+ >
29
+ <button
30
+ id="toggleNavSideMenu"
31
+ class="link"
32
+ >
33
+ <k-icon name="menu"></k-icon>
34
+ </button>
35
+ <a
36
+ href="./"
37
+ class="d-if ph"
38
+ style="align-items: center"
39
+ >
40
+ <img src="./media/icon32.png" alt="Kempo Server Icon" class="pr" />
41
+ Kempo Server
42
+ </a>
43
+ <div class="flex"></div>
44
+ <a href="https://github.com/dustinpoissant/kempo-ui?tab=License-1-ov-file#creative-commons-attribution-noncommercial-sharealike-20" target="_blank"><k-icon name="license"></k-icont></a>
45
+ <a href="https://github.com/dustinpoissant/kempo-ui" target="_blank"><k-icon name="github-mark"></k-icont></a>
46
+ <k-theme-switcher></k-theme-switcher>
47
+ </k-nav>
48
+ <div style="width: 100%; height: 4rem;"></div>
49
+ <k-aside
50
+ id="navSideMenu"
51
+ state="offscreen"
52
+ >
53
+ <menu>
54
+ <a href="./" class="ta-center bb mb r0">
55
+ <h1 class="tc-primary">Kempo Server</h1>
56
+ <img src="./media/icon128.png" alt="Kempo UI Icon" />
57
+ </a>
58
+ <h3>Getting Started</h3>
59
+ <a href="./" class="d-b pq pl">Quick Start</a>
60
+ <a href="./routing.html" class="d-b pq pl">Routing</a>
61
+ <a href="./request-response.html" class="d-b pq pl">Request & Response</a>
62
+ <br /><br />
63
+ <h3>Advanced Features</h3>
64
+ <a href="configuration.html" class="d-b pq pl">Configuration</a>
65
+ <a href="templating.html" class="d-b pq pl">Templating</a>
66
+ <a href="middleware.html" class="d-b pq pl">Middleware</a>
67
+ <a href="caching.html" class="d-b pq pl">Module Caching</a>
68
+ <a href="cli-utils.html" class="d-b pq pl">CLI Utilities</a>
69
+ <a href="fs-utils.html" class="d-b pq pl">File System Utilities</a>
70
+ <a href="examples.html" class="d-b pq pl">Examples & Demos</a>
71
+ </menu>
72
+ </k-aside>
73
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/Aside.js" type="module"></script>
74
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/Main.js" type="module"></script>
75
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/Nav.js" type="module"></script>
76
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/Icon.js" type="module"></script>
77
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/ThemeSwitcher.js" type="module"></script>
78
+ <script>
79
+ document.getElementById('toggleNavSideMenu').addEventListener('click', async () => {
80
+ await window.customElements.whenDefined('k-aside');
81
+ document.getElementById('navSideMenu').toggle();
82
+ });
83
+ document.addEventListener('click', function(e) {
84
+ if (e.target.matches('a[href^="#"]')) {
85
+ e.preventDefault();
86
+ const targetId = e.target.getAttribute('href').replace('#', '');
87
+ const target = document.getElementById(targetId);
88
+ if (target) {
89
+ target.scrollIntoView({ behavior: 'smooth' });
90
+ const url = window.location.pathname + window.location.search + '#' + targetId;
91
+ history.replaceState(null, '', url);
92
+ }
93
+ }
94
+ });
95
+ </script>
96
+
97
+ <main>
98
+ <h1 class="ta-center">File System Utilities</h1>
99
+
18
100
  <p>The file system utilities provide common file and directory operations with Promise-based APIs for Node.js applications.</p>
19
101
 
20
102
  <h2>Installation</h2>
@@ -113,8 +195,12 @@ async function backupProject() {
113
195
  <li>Functions handle errors appropriately (e.g., ensureDir ignores EEXIST)</li>
114
196
  <li>copyDir preserves directory structure recursively</li>
115
197
  </ul>
116
- </k-main>
117
- <div style="height:25vh"></div>
118
- <script type="module" src="https://cdn.jsdelivr.net/npm/kempo-ui@0.0.42/dist/components/Import.js"></script>
198
+
199
+ </main>
200
+ <div style="height:25vh"></div>
201
+ <script
202
+ type="module"
203
+ src="https://cdn.jsdelivr.net/npm/kempo-ui@0.0.42/dist/components/Import.js"
204
+ ></script>
119
205
  </body>
120
206
  </html>
@@ -1,19 +1,102 @@
1
- <html lang="en" theme="auto">
1
+ <!DOCTYPE html>
2
+ <html lang="en">
2
3
  <head>
3
- <meta charset='utf-8'>
4
- <meta http-equiv='X-UA-Compatible' content='IE=edge'>
5
- <title>Getting Started - Kempo Server</title>
6
- <meta name='viewport' content='width=device-width, initial-scale=1'>
7
- <link rel="icon" type="image/png" sizes="48x48" href="./media/icon48.png">
8
- <link rel="manifest" href="./manifest.json" />
9
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2.1.3/dist/kempo.min.css" />
10
- <link rel="stylesheet" href="./theme.css" />
11
- <script src="./init.js"></script>
4
+ <meta charset="UTF-8" />
5
+ <meta
6
+ name="viewport"
7
+ content="width=device-width, initial-scale=1.0"
8
+ />
9
+ <title>Getting Started - Kempo Server</title>
10
+ <link rel="icon" type="image/svg+xml" href="./media/icon.svg" />
11
+ <link rel="icon" type="image/png" sizes="32x32" href="./media/icon32.png" />
12
+ <link rel="manifest" href="./manifest.json" />
13
+ <link
14
+ rel="stylesheet"
15
+ href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css"
16
+ />
17
+ <link rel="stylesheet" href="./theme.css" />
18
+ <script>
19
+ window.litDisableBundleWarning = true;
20
+ window.kempo = { pathsToIcons: ['https://cdn.jsdelivr.net/npm/kempo-ui@0.0.42/icons/'] };
21
+ </script>
12
22
  </head>
13
23
  <body>
14
- <k-import src="./nav.inc.html"></k-import>
15
- <k-main>
16
- <h1>Getting Started</h1>
24
+
25
+ <k-nav
26
+ fixed
27
+ class="bg-primary"
28
+ >
29
+ <button
30
+ id="toggleNavSideMenu"
31
+ class="link"
32
+ >
33
+ <k-icon name="menu"></k-icon>
34
+ </button>
35
+ <a
36
+ href="./"
37
+ class="d-if ph"
38
+ style="align-items: center"
39
+ >
40
+ <img src="./media/icon32.png" alt="Kempo Server Icon" class="pr" />
41
+ Kempo Server
42
+ </a>
43
+ <div class="flex"></div>
44
+ <a href="https://github.com/dustinpoissant/kempo-ui?tab=License-1-ov-file#creative-commons-attribution-noncommercial-sharealike-20" target="_blank"><k-icon name="license"></k-icont></a>
45
+ <a href="https://github.com/dustinpoissant/kempo-ui" target="_blank"><k-icon name="github-mark"></k-icont></a>
46
+ <k-theme-switcher></k-theme-switcher>
47
+ </k-nav>
48
+ <div style="width: 100%; height: 4rem;"></div>
49
+ <k-aside
50
+ id="navSideMenu"
51
+ state="offscreen"
52
+ >
53
+ <menu>
54
+ <a href="./" class="ta-center bb mb r0">
55
+ <h1 class="tc-primary">Kempo Server</h1>
56
+ <img src="./media/icon128.png" alt="Kempo UI Icon" />
57
+ </a>
58
+ <h3>Getting Started</h3>
59
+ <a href="./" class="d-b pq pl">Quick Start</a>
60
+ <a href="./routing.html" class="d-b pq pl">Routing</a>
61
+ <a href="./request-response.html" class="d-b pq pl">Request & Response</a>
62
+ <br /><br />
63
+ <h3>Advanced Features</h3>
64
+ <a href="configuration.html" class="d-b pq pl">Configuration</a>
65
+ <a href="templating.html" class="d-b pq pl">Templating</a>
66
+ <a href="middleware.html" class="d-b pq pl">Middleware</a>
67
+ <a href="caching.html" class="d-b pq pl">Module Caching</a>
68
+ <a href="cli-utils.html" class="d-b pq pl">CLI Utilities</a>
69
+ <a href="fs-utils.html" class="d-b pq pl">File System Utilities</a>
70
+ <a href="examples.html" class="d-b pq pl">Examples & Demos</a>
71
+ </menu>
72
+ </k-aside>
73
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/Aside.js" type="module"></script>
74
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/Main.js" type="module"></script>
75
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/Nav.js" type="module"></script>
76
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/Icon.js" type="module"></script>
77
+ <script src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3.5/src/components/ThemeSwitcher.js" type="module"></script>
78
+ <script>
79
+ document.getElementById('toggleNavSideMenu').addEventListener('click', async () => {
80
+ await window.customElements.whenDefined('k-aside');
81
+ document.getElementById('navSideMenu').toggle();
82
+ });
83
+ document.addEventListener('click', function(e) {
84
+ if (e.target.matches('a[href^="#"]')) {
85
+ e.preventDefault();
86
+ const targetId = e.target.getAttribute('href').replace('#', '');
87
+ const target = document.getElementById(targetId);
88
+ if (target) {
89
+ target.scrollIntoView({ behavior: 'smooth' });
90
+ const url = window.location.pathname + window.location.search + '#' + targetId;
91
+ history.replaceState(null, '', url);
92
+ }
93
+ }
94
+ });
95
+ </script>
96
+
97
+ <main>
98
+ <h1 class="ta-center">Getting Started</h1>
99
+
17
100
  <p>Get up and running with Kempo Server in just a few steps.</p>
18
101
 
19
102
  <h2>Installation</h2>
@@ -73,8 +156,12 @@
73
156
  <li><a href="middleware.html">Middleware</a> - Add authentication, logging, CORS, and more</li>
74
157
  <li><a href="examples.html">Examples & Demos</a> - See real-world examples in action</li>
75
158
  </ul>
76
- </k-main>
77
- <div style="height:25vh"></div>
78
- <script type="module" src="https://cdn.jsdelivr.net/npm/kempo-ui@0.0.42/dist/components/Import.js"></script>
159
+
160
+ </main>
161
+ <div style="height:25vh"></div>
162
+ <script
163
+ type="module"
164
+ src="https://cdn.jsdelivr.net/npm/kempo-ui@0.0.42/dist/components/Import.js"
165
+ ></script>
79
166
  </body>
80
- </html>
167
+ </html>