kempo-server 3.0.12 → 3.1.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.
- package/CHANGELOG.md +5 -0
- package/LICENSE.md +60 -0
- package/dist/router.js +1 -1
- package/docs/caching.html +60 -12
- package/docs/cli-utils.html +60 -12
- package/docs/configuration.html +60 -12
- package/docs/examples.html +60 -12
- package/docs/fs-utils.html +60 -12
- package/docs/getting-started.html +60 -12
- package/docs/index.html +60 -12
- package/docs/middleware.html +61 -13
- package/docs/request-response.html +60 -12
- package/docs/routing.html +60 -12
- package/docs/templating.html +61 -13
- package/docs/theme.css +1 -1
- package/docs-src/middleware.page.html +1 -1
- package/docs-src/nav.fragment.html +60 -12
- package/package.json +4 -1
- package/src/router.js +38 -14
- package/tests/router-custom-route-ssr.node-test.js +5 -5
package/docs/fs-utils.html
CHANGED
|
@@ -37,13 +37,35 @@
|
|
|
37
37
|
class="d-if ph"
|
|
38
38
|
style="align-items: center"
|
|
39
39
|
>
|
|
40
|
-
<img
|
|
40
|
+
<img
|
|
41
|
+
src="./media/icon32.png"
|
|
42
|
+
alt="Kempo Server Icon"
|
|
43
|
+
class="pr"
|
|
44
|
+
/>
|
|
41
45
|
Kempo Server
|
|
42
46
|
</a>
|
|
43
47
|
<div class="flex"></div>
|
|
44
|
-
<a
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
<a
|
|
49
|
+
href="https://github.com/dustinpoissant/kempo-server?tab=License-1-ov-file#creative-commons-attribution-noncommercial-sharealike-20"
|
|
50
|
+
target="_blank"
|
|
51
|
+
><k-icon name="license"></k-icon></a>
|
|
52
|
+
<a
|
|
53
|
+
href="https://www.npmjs.com/package/kempo-server"
|
|
54
|
+
target="_blank"
|
|
55
|
+
><k-icon name="npm"></k-icon></a>
|
|
56
|
+
<a
|
|
57
|
+
href="https://github.com/dustinpoissant/kempo-server"
|
|
58
|
+
target="_blank"
|
|
59
|
+
><k-icon name="github-mark"></k-icon></a>
|
|
60
|
+
<k-theme-switcher
|
|
61
|
+
class="mr"
|
|
62
|
+
style="
|
|
63
|
+
--padding: 0.5rem;
|
|
64
|
+
--c_active: var(--tc_on_primary);
|
|
65
|
+
--tc_active: var(--c_primary);
|
|
66
|
+
--c_inactive__hover: rgba(255, 255, 255, 0.1);
|
|
67
|
+
"
|
|
68
|
+
></k-theme-switcher>
|
|
47
69
|
</k-nav>
|
|
48
70
|
<div style="width: 100%; height: 4rem;"></div>
|
|
49
71
|
<k-aside
|
|
@@ -51,9 +73,15 @@
|
|
|
51
73
|
state="offscreen"
|
|
52
74
|
>
|
|
53
75
|
<menu>
|
|
54
|
-
<a
|
|
76
|
+
<a
|
|
77
|
+
href="./"
|
|
78
|
+
class="ta-center bb mb r0"
|
|
79
|
+
>
|
|
55
80
|
<h1 class="tc-primary">Kempo Server</h1>
|
|
56
|
-
<img
|
|
81
|
+
<img
|
|
82
|
+
src="./media/icon128.png"
|
|
83
|
+
alt="Kempo UI Icon"
|
|
84
|
+
/>
|
|
57
85
|
</a>
|
|
58
86
|
|
|
59
87
|
<h3 class="mt mb0">Advanced Features</h3>
|
|
@@ -72,18 +100,38 @@
|
|
|
72
100
|
<br /><br />
|
|
73
101
|
|
|
74
102
|
</menu>
|
|
103
|
+
<k-aside-spacer></k-aside-spacer>
|
|
104
|
+
<k-theme-switcher
|
|
105
|
+
labels
|
|
106
|
+
style="--padding:var(--spacer_h);margin:var(--spacer_h) auto"
|
|
107
|
+
></k-theme-switcher>
|
|
75
108
|
</k-aside>
|
|
76
|
-
<script
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<script
|
|
109
|
+
<script
|
|
110
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Aside.js"
|
|
111
|
+
type="module"
|
|
112
|
+
></script>
|
|
113
|
+
<script
|
|
114
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Main.js"
|
|
115
|
+
type="module"
|
|
116
|
+
></script>
|
|
117
|
+
<script
|
|
118
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Nav.js"
|
|
119
|
+
type="module"
|
|
120
|
+
></script>
|
|
121
|
+
<script
|
|
122
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Icon.js"
|
|
123
|
+
type="module"
|
|
124
|
+
></script>
|
|
125
|
+
<script
|
|
126
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/ThemeSwitcher.js"
|
|
127
|
+
type="module"
|
|
128
|
+
></script>
|
|
81
129
|
<script>
|
|
82
130
|
document.getElementById('toggleNavSideMenu').addEventListener('click', async () => {
|
|
83
131
|
await window.customElements.whenDefined('k-aside');
|
|
84
132
|
document.getElementById('navSideMenu').toggle();
|
|
85
133
|
});
|
|
86
|
-
document.addEventListener('click', function(e) {
|
|
134
|
+
document.addEventListener('click', function (e) {
|
|
87
135
|
if (e.target.matches('a[href^="#"]')) {
|
|
88
136
|
e.preventDefault();
|
|
89
137
|
const targetId = e.target.getAttribute('href').replace('#', '');
|
|
@@ -37,13 +37,35 @@
|
|
|
37
37
|
class="d-if ph"
|
|
38
38
|
style="align-items: center"
|
|
39
39
|
>
|
|
40
|
-
<img
|
|
40
|
+
<img
|
|
41
|
+
src="./media/icon32.png"
|
|
42
|
+
alt="Kempo Server Icon"
|
|
43
|
+
class="pr"
|
|
44
|
+
/>
|
|
41
45
|
Kempo Server
|
|
42
46
|
</a>
|
|
43
47
|
<div class="flex"></div>
|
|
44
|
-
<a
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
<a
|
|
49
|
+
href="https://github.com/dustinpoissant/kempo-server?tab=License-1-ov-file#creative-commons-attribution-noncommercial-sharealike-20"
|
|
50
|
+
target="_blank"
|
|
51
|
+
><k-icon name="license"></k-icon></a>
|
|
52
|
+
<a
|
|
53
|
+
href="https://www.npmjs.com/package/kempo-server"
|
|
54
|
+
target="_blank"
|
|
55
|
+
><k-icon name="npm"></k-icon></a>
|
|
56
|
+
<a
|
|
57
|
+
href="https://github.com/dustinpoissant/kempo-server"
|
|
58
|
+
target="_blank"
|
|
59
|
+
><k-icon name="github-mark"></k-icon></a>
|
|
60
|
+
<k-theme-switcher
|
|
61
|
+
class="mr"
|
|
62
|
+
style="
|
|
63
|
+
--padding: 0.5rem;
|
|
64
|
+
--c_active: var(--tc_on_primary);
|
|
65
|
+
--tc_active: var(--c_primary);
|
|
66
|
+
--c_inactive__hover: rgba(255, 255, 255, 0.1);
|
|
67
|
+
"
|
|
68
|
+
></k-theme-switcher>
|
|
47
69
|
</k-nav>
|
|
48
70
|
<div style="width: 100%; height: 4rem;"></div>
|
|
49
71
|
<k-aside
|
|
@@ -51,9 +73,15 @@
|
|
|
51
73
|
state="offscreen"
|
|
52
74
|
>
|
|
53
75
|
<menu>
|
|
54
|
-
<a
|
|
76
|
+
<a
|
|
77
|
+
href="./"
|
|
78
|
+
class="ta-center bb mb r0"
|
|
79
|
+
>
|
|
55
80
|
<h1 class="tc-primary">Kempo Server</h1>
|
|
56
|
-
<img
|
|
81
|
+
<img
|
|
82
|
+
src="./media/icon128.png"
|
|
83
|
+
alt="Kempo UI Icon"
|
|
84
|
+
/>
|
|
57
85
|
</a>
|
|
58
86
|
|
|
59
87
|
<h3 class="mt mb0">Advanced Features</h3>
|
|
@@ -72,18 +100,38 @@
|
|
|
72
100
|
<br /><br />
|
|
73
101
|
|
|
74
102
|
</menu>
|
|
103
|
+
<k-aside-spacer></k-aside-spacer>
|
|
104
|
+
<k-theme-switcher
|
|
105
|
+
labels
|
|
106
|
+
style="--padding:var(--spacer_h);margin:var(--spacer_h) auto"
|
|
107
|
+
></k-theme-switcher>
|
|
75
108
|
</k-aside>
|
|
76
|
-
<script
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<script
|
|
109
|
+
<script
|
|
110
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Aside.js"
|
|
111
|
+
type="module"
|
|
112
|
+
></script>
|
|
113
|
+
<script
|
|
114
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Main.js"
|
|
115
|
+
type="module"
|
|
116
|
+
></script>
|
|
117
|
+
<script
|
|
118
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Nav.js"
|
|
119
|
+
type="module"
|
|
120
|
+
></script>
|
|
121
|
+
<script
|
|
122
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Icon.js"
|
|
123
|
+
type="module"
|
|
124
|
+
></script>
|
|
125
|
+
<script
|
|
126
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/ThemeSwitcher.js"
|
|
127
|
+
type="module"
|
|
128
|
+
></script>
|
|
81
129
|
<script>
|
|
82
130
|
document.getElementById('toggleNavSideMenu').addEventListener('click', async () => {
|
|
83
131
|
await window.customElements.whenDefined('k-aside');
|
|
84
132
|
document.getElementById('navSideMenu').toggle();
|
|
85
133
|
});
|
|
86
|
-
document.addEventListener('click', function(e) {
|
|
134
|
+
document.addEventListener('click', function (e) {
|
|
87
135
|
if (e.target.matches('a[href^="#"]')) {
|
|
88
136
|
e.preventDefault();
|
|
89
137
|
const targetId = e.target.getAttribute('href').replace('#', '');
|
package/docs/index.html
CHANGED
|
@@ -37,13 +37,35 @@
|
|
|
37
37
|
class="d-if ph"
|
|
38
38
|
style="align-items: center"
|
|
39
39
|
>
|
|
40
|
-
<img
|
|
40
|
+
<img
|
|
41
|
+
src="./media/icon32.png"
|
|
42
|
+
alt="Kempo Server Icon"
|
|
43
|
+
class="pr"
|
|
44
|
+
/>
|
|
41
45
|
Kempo Server
|
|
42
46
|
</a>
|
|
43
47
|
<div class="flex"></div>
|
|
44
|
-
<a
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
<a
|
|
49
|
+
href="https://github.com/dustinpoissant/kempo-server?tab=License-1-ov-file#creative-commons-attribution-noncommercial-sharealike-20"
|
|
50
|
+
target="_blank"
|
|
51
|
+
><k-icon name="license"></k-icon></a>
|
|
52
|
+
<a
|
|
53
|
+
href="https://www.npmjs.com/package/kempo-server"
|
|
54
|
+
target="_blank"
|
|
55
|
+
><k-icon name="npm"></k-icon></a>
|
|
56
|
+
<a
|
|
57
|
+
href="https://github.com/dustinpoissant/kempo-server"
|
|
58
|
+
target="_blank"
|
|
59
|
+
><k-icon name="github-mark"></k-icon></a>
|
|
60
|
+
<k-theme-switcher
|
|
61
|
+
class="mr"
|
|
62
|
+
style="
|
|
63
|
+
--padding: 0.5rem;
|
|
64
|
+
--c_active: var(--tc_on_primary);
|
|
65
|
+
--tc_active: var(--c_primary);
|
|
66
|
+
--c_inactive__hover: rgba(255, 255, 255, 0.1);
|
|
67
|
+
"
|
|
68
|
+
></k-theme-switcher>
|
|
47
69
|
</k-nav>
|
|
48
70
|
<div style="width: 100%; height: 4rem;"></div>
|
|
49
71
|
<k-aside
|
|
@@ -51,9 +73,15 @@
|
|
|
51
73
|
state="offscreen"
|
|
52
74
|
>
|
|
53
75
|
<menu>
|
|
54
|
-
<a
|
|
76
|
+
<a
|
|
77
|
+
href="./"
|
|
78
|
+
class="ta-center bb mb r0"
|
|
79
|
+
>
|
|
55
80
|
<h1 class="tc-primary">Kempo Server</h1>
|
|
56
|
-
<img
|
|
81
|
+
<img
|
|
82
|
+
src="./media/icon128.png"
|
|
83
|
+
alt="Kempo UI Icon"
|
|
84
|
+
/>
|
|
57
85
|
</a>
|
|
58
86
|
|
|
59
87
|
<h3 class="mt mb0">Advanced Features</h3>
|
|
@@ -72,18 +100,38 @@
|
|
|
72
100
|
<br /><br />
|
|
73
101
|
|
|
74
102
|
</menu>
|
|
103
|
+
<k-aside-spacer></k-aside-spacer>
|
|
104
|
+
<k-theme-switcher
|
|
105
|
+
labels
|
|
106
|
+
style="--padding:var(--spacer_h);margin:var(--spacer_h) auto"
|
|
107
|
+
></k-theme-switcher>
|
|
75
108
|
</k-aside>
|
|
76
|
-
<script
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<script
|
|
109
|
+
<script
|
|
110
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Aside.js"
|
|
111
|
+
type="module"
|
|
112
|
+
></script>
|
|
113
|
+
<script
|
|
114
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Main.js"
|
|
115
|
+
type="module"
|
|
116
|
+
></script>
|
|
117
|
+
<script
|
|
118
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Nav.js"
|
|
119
|
+
type="module"
|
|
120
|
+
></script>
|
|
121
|
+
<script
|
|
122
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Icon.js"
|
|
123
|
+
type="module"
|
|
124
|
+
></script>
|
|
125
|
+
<script
|
|
126
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/ThemeSwitcher.js"
|
|
127
|
+
type="module"
|
|
128
|
+
></script>
|
|
81
129
|
<script>
|
|
82
130
|
document.getElementById('toggleNavSideMenu').addEventListener('click', async () => {
|
|
83
131
|
await window.customElements.whenDefined('k-aside');
|
|
84
132
|
document.getElementById('navSideMenu').toggle();
|
|
85
133
|
});
|
|
86
|
-
document.addEventListener('click', function(e) {
|
|
134
|
+
document.addEventListener('click', function (e) {
|
|
87
135
|
if (e.target.matches('a[href^="#"]')) {
|
|
88
136
|
e.preventDefault();
|
|
89
137
|
const targetId = e.target.getAttribute('href').replace('#', '');
|
package/docs/middleware.html
CHANGED
|
@@ -37,13 +37,35 @@
|
|
|
37
37
|
class="d-if ph"
|
|
38
38
|
style="align-items: center"
|
|
39
39
|
>
|
|
40
|
-
<img
|
|
40
|
+
<img
|
|
41
|
+
src="./media/icon32.png"
|
|
42
|
+
alt="Kempo Server Icon"
|
|
43
|
+
class="pr"
|
|
44
|
+
/>
|
|
41
45
|
Kempo Server
|
|
42
46
|
</a>
|
|
43
47
|
<div class="flex"></div>
|
|
44
|
-
<a
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
<a
|
|
49
|
+
href="https://github.com/dustinpoissant/kempo-server?tab=License-1-ov-file#creative-commons-attribution-noncommercial-sharealike-20"
|
|
50
|
+
target="_blank"
|
|
51
|
+
><k-icon name="license"></k-icon></a>
|
|
52
|
+
<a
|
|
53
|
+
href="https://www.npmjs.com/package/kempo-server"
|
|
54
|
+
target="_blank"
|
|
55
|
+
><k-icon name="npm"></k-icon></a>
|
|
56
|
+
<a
|
|
57
|
+
href="https://github.com/dustinpoissant/kempo-server"
|
|
58
|
+
target="_blank"
|
|
59
|
+
><k-icon name="github-mark"></k-icon></a>
|
|
60
|
+
<k-theme-switcher
|
|
61
|
+
class="mr"
|
|
62
|
+
style="
|
|
63
|
+
--padding: 0.5rem;
|
|
64
|
+
--c_active: var(--tc_on_primary);
|
|
65
|
+
--tc_active: var(--c_primary);
|
|
66
|
+
--c_inactive__hover: rgba(255, 255, 255, 0.1);
|
|
67
|
+
"
|
|
68
|
+
></k-theme-switcher>
|
|
47
69
|
</k-nav>
|
|
48
70
|
<div style="width: 100%; height: 4rem;"></div>
|
|
49
71
|
<k-aside
|
|
@@ -51,9 +73,15 @@
|
|
|
51
73
|
state="offscreen"
|
|
52
74
|
>
|
|
53
75
|
<menu>
|
|
54
|
-
<a
|
|
76
|
+
<a
|
|
77
|
+
href="./"
|
|
78
|
+
class="ta-center bb mb r0"
|
|
79
|
+
>
|
|
55
80
|
<h1 class="tc-primary">Kempo Server</h1>
|
|
56
|
-
<img
|
|
81
|
+
<img
|
|
82
|
+
src="./media/icon128.png"
|
|
83
|
+
alt="Kempo UI Icon"
|
|
84
|
+
/>
|
|
57
85
|
</a>
|
|
58
86
|
|
|
59
87
|
<h3 class="mt mb0">Advanced Features</h3>
|
|
@@ -72,18 +100,38 @@
|
|
|
72
100
|
<br /><br />
|
|
73
101
|
|
|
74
102
|
</menu>
|
|
103
|
+
<k-aside-spacer></k-aside-spacer>
|
|
104
|
+
<k-theme-switcher
|
|
105
|
+
labels
|
|
106
|
+
style="--padding:var(--spacer_h);margin:var(--spacer_h) auto"
|
|
107
|
+
></k-theme-switcher>
|
|
75
108
|
</k-aside>
|
|
76
|
-
<script
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<script
|
|
109
|
+
<script
|
|
110
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Aside.js"
|
|
111
|
+
type="module"
|
|
112
|
+
></script>
|
|
113
|
+
<script
|
|
114
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Main.js"
|
|
115
|
+
type="module"
|
|
116
|
+
></script>
|
|
117
|
+
<script
|
|
118
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Nav.js"
|
|
119
|
+
type="module"
|
|
120
|
+
></script>
|
|
121
|
+
<script
|
|
122
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Icon.js"
|
|
123
|
+
type="module"
|
|
124
|
+
></script>
|
|
125
|
+
<script
|
|
126
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/ThemeSwitcher.js"
|
|
127
|
+
type="module"
|
|
128
|
+
></script>
|
|
81
129
|
<script>
|
|
82
130
|
document.getElementById('toggleNavSideMenu').addEventListener('click', async () => {
|
|
83
131
|
await window.customElements.whenDefined('k-aside');
|
|
84
132
|
document.getElementById('navSideMenu').toggle();
|
|
85
133
|
});
|
|
86
|
-
document.addEventListener('click', function(e) {
|
|
134
|
+
document.addEventListener('click', function (e) {
|
|
87
135
|
if (e.target.matches('a[href^="#"]')) {
|
|
88
136
|
e.preventDefault();
|
|
89
137
|
const targetId = e.target.getAttribute('href').replace('#', '');
|
|
@@ -176,7 +224,7 @@
|
|
|
176
224
|
|
|
177
225
|
<h3>Middleware Function Parameters</h3>
|
|
178
226
|
<ul>
|
|
179
|
-
<li><code>config</code> -
|
|
227
|
+
<li><code>config</code> - The middleware config object, extended with <code>rootPath</code> (absolute path to the server root directory)</li>
|
|
180
228
|
<li><code>req</code> - Request object (can be modified)</li>
|
|
181
229
|
<li><code>res</code> - Response object (can be modified)</li>
|
|
182
230
|
<li><code>next</code> - Function to call the next middleware or route handler</li>
|
|
@@ -37,13 +37,35 @@
|
|
|
37
37
|
class="d-if ph"
|
|
38
38
|
style="align-items: center"
|
|
39
39
|
>
|
|
40
|
-
<img
|
|
40
|
+
<img
|
|
41
|
+
src="./media/icon32.png"
|
|
42
|
+
alt="Kempo Server Icon"
|
|
43
|
+
class="pr"
|
|
44
|
+
/>
|
|
41
45
|
Kempo Server
|
|
42
46
|
</a>
|
|
43
47
|
<div class="flex"></div>
|
|
44
|
-
<a
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
<a
|
|
49
|
+
href="https://github.com/dustinpoissant/kempo-server?tab=License-1-ov-file#creative-commons-attribution-noncommercial-sharealike-20"
|
|
50
|
+
target="_blank"
|
|
51
|
+
><k-icon name="license"></k-icon></a>
|
|
52
|
+
<a
|
|
53
|
+
href="https://www.npmjs.com/package/kempo-server"
|
|
54
|
+
target="_blank"
|
|
55
|
+
><k-icon name="npm"></k-icon></a>
|
|
56
|
+
<a
|
|
57
|
+
href="https://github.com/dustinpoissant/kempo-server"
|
|
58
|
+
target="_blank"
|
|
59
|
+
><k-icon name="github-mark"></k-icon></a>
|
|
60
|
+
<k-theme-switcher
|
|
61
|
+
class="mr"
|
|
62
|
+
style="
|
|
63
|
+
--padding: 0.5rem;
|
|
64
|
+
--c_active: var(--tc_on_primary);
|
|
65
|
+
--tc_active: var(--c_primary);
|
|
66
|
+
--c_inactive__hover: rgba(255, 255, 255, 0.1);
|
|
67
|
+
"
|
|
68
|
+
></k-theme-switcher>
|
|
47
69
|
</k-nav>
|
|
48
70
|
<div style="width: 100%; height: 4rem;"></div>
|
|
49
71
|
<k-aside
|
|
@@ -51,9 +73,15 @@
|
|
|
51
73
|
state="offscreen"
|
|
52
74
|
>
|
|
53
75
|
<menu>
|
|
54
|
-
<a
|
|
76
|
+
<a
|
|
77
|
+
href="./"
|
|
78
|
+
class="ta-center bb mb r0"
|
|
79
|
+
>
|
|
55
80
|
<h1 class="tc-primary">Kempo Server</h1>
|
|
56
|
-
<img
|
|
81
|
+
<img
|
|
82
|
+
src="./media/icon128.png"
|
|
83
|
+
alt="Kempo UI Icon"
|
|
84
|
+
/>
|
|
57
85
|
</a>
|
|
58
86
|
|
|
59
87
|
<h3 class="mt mb0">Advanced Features</h3>
|
|
@@ -72,18 +100,38 @@
|
|
|
72
100
|
<br /><br />
|
|
73
101
|
|
|
74
102
|
</menu>
|
|
103
|
+
<k-aside-spacer></k-aside-spacer>
|
|
104
|
+
<k-theme-switcher
|
|
105
|
+
labels
|
|
106
|
+
style="--padding:var(--spacer_h);margin:var(--spacer_h) auto"
|
|
107
|
+
></k-theme-switcher>
|
|
75
108
|
</k-aside>
|
|
76
|
-
<script
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<script
|
|
109
|
+
<script
|
|
110
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Aside.js"
|
|
111
|
+
type="module"
|
|
112
|
+
></script>
|
|
113
|
+
<script
|
|
114
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Main.js"
|
|
115
|
+
type="module"
|
|
116
|
+
></script>
|
|
117
|
+
<script
|
|
118
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Nav.js"
|
|
119
|
+
type="module"
|
|
120
|
+
></script>
|
|
121
|
+
<script
|
|
122
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Icon.js"
|
|
123
|
+
type="module"
|
|
124
|
+
></script>
|
|
125
|
+
<script
|
|
126
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/ThemeSwitcher.js"
|
|
127
|
+
type="module"
|
|
128
|
+
></script>
|
|
81
129
|
<script>
|
|
82
130
|
document.getElementById('toggleNavSideMenu').addEventListener('click', async () => {
|
|
83
131
|
await window.customElements.whenDefined('k-aside');
|
|
84
132
|
document.getElementById('navSideMenu').toggle();
|
|
85
133
|
});
|
|
86
|
-
document.addEventListener('click', function(e) {
|
|
134
|
+
document.addEventListener('click', function (e) {
|
|
87
135
|
if (e.target.matches('a[href^="#"]')) {
|
|
88
136
|
e.preventDefault();
|
|
89
137
|
const targetId = e.target.getAttribute('href').replace('#', '');
|
package/docs/routing.html
CHANGED
|
@@ -37,13 +37,35 @@
|
|
|
37
37
|
class="d-if ph"
|
|
38
38
|
style="align-items: center"
|
|
39
39
|
>
|
|
40
|
-
<img
|
|
40
|
+
<img
|
|
41
|
+
src="./media/icon32.png"
|
|
42
|
+
alt="Kempo Server Icon"
|
|
43
|
+
class="pr"
|
|
44
|
+
/>
|
|
41
45
|
Kempo Server
|
|
42
46
|
</a>
|
|
43
47
|
<div class="flex"></div>
|
|
44
|
-
<a
|
|
45
|
-
|
|
46
|
-
|
|
48
|
+
<a
|
|
49
|
+
href="https://github.com/dustinpoissant/kempo-server?tab=License-1-ov-file#creative-commons-attribution-noncommercial-sharealike-20"
|
|
50
|
+
target="_blank"
|
|
51
|
+
><k-icon name="license"></k-icon></a>
|
|
52
|
+
<a
|
|
53
|
+
href="https://www.npmjs.com/package/kempo-server"
|
|
54
|
+
target="_blank"
|
|
55
|
+
><k-icon name="npm"></k-icon></a>
|
|
56
|
+
<a
|
|
57
|
+
href="https://github.com/dustinpoissant/kempo-server"
|
|
58
|
+
target="_blank"
|
|
59
|
+
><k-icon name="github-mark"></k-icon></a>
|
|
60
|
+
<k-theme-switcher
|
|
61
|
+
class="mr"
|
|
62
|
+
style="
|
|
63
|
+
--padding: 0.5rem;
|
|
64
|
+
--c_active: var(--tc_on_primary);
|
|
65
|
+
--tc_active: var(--c_primary);
|
|
66
|
+
--c_inactive__hover: rgba(255, 255, 255, 0.1);
|
|
67
|
+
"
|
|
68
|
+
></k-theme-switcher>
|
|
47
69
|
</k-nav>
|
|
48
70
|
<div style="width: 100%; height: 4rem;"></div>
|
|
49
71
|
<k-aside
|
|
@@ -51,9 +73,15 @@
|
|
|
51
73
|
state="offscreen"
|
|
52
74
|
>
|
|
53
75
|
<menu>
|
|
54
|
-
<a
|
|
76
|
+
<a
|
|
77
|
+
href="./"
|
|
78
|
+
class="ta-center bb mb r0"
|
|
79
|
+
>
|
|
55
80
|
<h1 class="tc-primary">Kempo Server</h1>
|
|
56
|
-
<img
|
|
81
|
+
<img
|
|
82
|
+
src="./media/icon128.png"
|
|
83
|
+
alt="Kempo UI Icon"
|
|
84
|
+
/>
|
|
57
85
|
</a>
|
|
58
86
|
|
|
59
87
|
<h3 class="mt mb0">Advanced Features</h3>
|
|
@@ -72,18 +100,38 @@
|
|
|
72
100
|
<br /><br />
|
|
73
101
|
|
|
74
102
|
</menu>
|
|
103
|
+
<k-aside-spacer></k-aside-spacer>
|
|
104
|
+
<k-theme-switcher
|
|
105
|
+
labels
|
|
106
|
+
style="--padding:var(--spacer_h);margin:var(--spacer_h) auto"
|
|
107
|
+
></k-theme-switcher>
|
|
75
108
|
</k-aside>
|
|
76
|
-
<script
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<script
|
|
109
|
+
<script
|
|
110
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Aside.js"
|
|
111
|
+
type="module"
|
|
112
|
+
></script>
|
|
113
|
+
<script
|
|
114
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Main.js"
|
|
115
|
+
type="module"
|
|
116
|
+
></script>
|
|
117
|
+
<script
|
|
118
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Nav.js"
|
|
119
|
+
type="module"
|
|
120
|
+
></script>
|
|
121
|
+
<script
|
|
122
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/Icon.js"
|
|
123
|
+
type="module"
|
|
124
|
+
></script>
|
|
125
|
+
<script
|
|
126
|
+
src="https://cdn.jsdelivr.net/npm/kempo-ui@0.3/src/components/ThemeSwitcher.js"
|
|
127
|
+
type="module"
|
|
128
|
+
></script>
|
|
81
129
|
<script>
|
|
82
130
|
document.getElementById('toggleNavSideMenu').addEventListener('click', async () => {
|
|
83
131
|
await window.customElements.whenDefined('k-aside');
|
|
84
132
|
document.getElementById('navSideMenu').toggle();
|
|
85
133
|
});
|
|
86
|
-
document.addEventListener('click', function(e) {
|
|
134
|
+
document.addEventListener('click', function (e) {
|
|
87
135
|
if (e.target.matches('a[href^="#"]')) {
|
|
88
136
|
e.preventDefault();
|
|
89
137
|
const targetId = e.target.getAttribute('href').replace('#', '');
|