create-qwik 0.103.0-dev20230421164933 → 0.103.0-dev20230425141617
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/index.cjs +35 -35
- package/package.json +1 -1
- package/starters/apps/base/package.json +2 -2
- package/starters/apps/base/src/global.css +0 -1
- package/starters/apps/basic/public/favicon.svg +1 -0
- package/starters/apps/basic/public/fonts/poppins-400.woff2 +0 -0
- package/starters/apps/basic/public/fonts/poppins-500.woff2 +0 -0
- package/starters/apps/basic/public/fonts/poppins-700.woff2 +0 -0
- package/starters/apps/basic/public/manifest.json +9 -0
- package/starters/apps/basic/public/robots.txt +0 -0
- package/starters/apps/basic/src/components/starter/counter/counter.module.css +13 -0
- package/starters/apps/basic/src/components/starter/counter/counter.tsx +19 -8
- package/starters/apps/basic/src/components/starter/footer/footer.module.css +12 -0
- package/starters/apps/basic/src/components/starter/footer/footer.tsx +8 -6
- package/starters/apps/basic/src/components/starter/gauge/gauge.module.css +27 -0
- package/starters/apps/basic/src/components/starter/gauge/index.tsx +32 -0
- package/starters/apps/basic/src/components/starter/header/header.module.css +12 -13
- package/starters/apps/basic/src/components/starter/header/header.tsx +23 -21
- package/starters/apps/basic/src/components/starter/hero/hero.module.css +19 -7
- package/starters/apps/basic/src/components/starter/hero/hero.tsx +62 -52
- package/starters/apps/basic/src/components/starter/icons/qwik.tsx +8 -2
- package/starters/apps/basic/src/components/starter/infobox/infobox.module.css +5 -1
- package/starters/apps/basic/src/components/starter/next-steps/next-steps.module.css +20 -3
- package/starters/apps/basic/src/components/starter/next-steps/next-steps.tsx +16 -8
- package/starters/apps/basic/src/global.css +13 -163
- package/starters/apps/basic/src/routes/{demo → (starter)/demo}/flower/flower.css +5 -1
- package/starters/apps/basic/src/routes/(starter)/demo/flower/index.tsx +64 -0
- package/starters/apps/basic/src/routes/(starter)/demo/todolist/index.tsx +74 -0
- package/starters/apps/basic/src/routes/(starter)/demo/todolist/todolist.module.css +44 -0
- package/starters/apps/basic/src/routes/(starter)/index.tsx +112 -0
- package/starters/apps/basic/src/routes/(starter)/layout.tsx +26 -0
- package/starters/apps/basic/src/routes/(starter)/styles.css +232 -0
- package/starters/apps/basic/src/routes/layout.tsx +5 -22
- package/starters/apps/basic/src/components/starter/counter/counter.css +0 -19
- package/starters/apps/basic/src/routes/demo/flower/index.tsx +0 -60
- package/starters/apps/basic/src/routes/demo/todolist/index.tsx +0 -73
- package/starters/apps/basic/src/routes/demo/todolist/todolist.module.css +0 -13
- package/starters/apps/basic/src/routes/index.tsx +0 -117
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { component$ } from '@builder.io/qwik';
|
|
2
|
-
import {
|
|
3
|
-
type DocumentHead,
|
|
4
|
-
routeLoader$,
|
|
5
|
-
routeAction$,
|
|
6
|
-
zod$,
|
|
7
|
-
z,
|
|
8
|
-
Form,
|
|
9
|
-
} from '@builder.io/qwik-city';
|
|
10
|
-
import styles from './todolist.module.css';
|
|
11
|
-
|
|
12
|
-
interface ListItem {
|
|
13
|
-
text: string;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const list: ListItem[] = [];
|
|
17
|
-
|
|
18
|
-
export const useListLoader = routeLoader$(() => {
|
|
19
|
-
return list;
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
export const useAddToListAction = routeAction$(
|
|
23
|
-
(item) => {
|
|
24
|
-
list.push(item);
|
|
25
|
-
return {
|
|
26
|
-
success: true,
|
|
27
|
-
};
|
|
28
|
-
},
|
|
29
|
-
zod$({
|
|
30
|
-
text: z.string().trim().min(1),
|
|
31
|
-
})
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
export default component$(() => {
|
|
35
|
-
const list = useListLoader();
|
|
36
|
-
const action = useAddToListAction();
|
|
37
|
-
|
|
38
|
-
return (
|
|
39
|
-
<>
|
|
40
|
-
<div class="section">
|
|
41
|
-
<div class="container center">
|
|
42
|
-
<h1 class="hero">TODO List</h1>
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<div class="section bright">
|
|
47
|
-
<div class="container center mh-300">
|
|
48
|
-
{(list.value.length && (
|
|
49
|
-
<ul class={styles.list}>
|
|
50
|
-
{list.value.map((item, index) => (
|
|
51
|
-
<li key={`items-${index}`}>{item.text}</li>
|
|
52
|
-
))}
|
|
53
|
-
</ul>
|
|
54
|
-
)) || <span class="no-content">No items found</span>}
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
|
|
58
|
-
<div class="section">
|
|
59
|
-
<div class="container center">
|
|
60
|
-
<Form action={action} spaReset>
|
|
61
|
-
<input type="text" name="text" required /> <button type="submit">Add item</button>
|
|
62
|
-
</Form>
|
|
63
|
-
|
|
64
|
-
<p class={styles.hint}>PS: This little app works even when JavaScript is disabled.</p>
|
|
65
|
-
</div>
|
|
66
|
-
</div>
|
|
67
|
-
</>
|
|
68
|
-
);
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
export const head: DocumentHead = {
|
|
72
|
-
title: 'Qwik Todo List',
|
|
73
|
-
};
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { component$ } from '@builder.io/qwik';
|
|
2
|
-
import type { DocumentHead } from '@builder.io/qwik-city';
|
|
3
|
-
|
|
4
|
-
import Counter from '~/components/starter/counter/counter';
|
|
5
|
-
import Hero from '~/components/starter/hero/hero';
|
|
6
|
-
import Infobox from '~/components/starter/infobox/infobox';
|
|
7
|
-
import Starter from '~/components/starter/next-steps/next-steps';
|
|
8
|
-
|
|
9
|
-
export default component$(() => {
|
|
10
|
-
return (
|
|
11
|
-
<>
|
|
12
|
-
<Hero />
|
|
13
|
-
|
|
14
|
-
<div class="section bright">
|
|
15
|
-
<div class="container center">
|
|
16
|
-
<Starter />
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
<div class="section">
|
|
21
|
-
<div class="container center">
|
|
22
|
-
<h3>
|
|
23
|
-
You can <b>count</b> on me
|
|
24
|
-
</h3>
|
|
25
|
-
<Counter />
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<div class="section">
|
|
30
|
-
<div class="container topics">
|
|
31
|
-
<Infobox>
|
|
32
|
-
<div q:slot="title" class="icon icon-cli">
|
|
33
|
-
CLI Commands
|
|
34
|
-
</div>
|
|
35
|
-
<>
|
|
36
|
-
<p>
|
|
37
|
-
<code>npm run dev</code>
|
|
38
|
-
<br />
|
|
39
|
-
Starts the development server and watches for changes
|
|
40
|
-
</p>
|
|
41
|
-
<p>
|
|
42
|
-
<code>npm run preview</code>
|
|
43
|
-
<br />
|
|
44
|
-
Creates production build and starts a server to preview it
|
|
45
|
-
</p>
|
|
46
|
-
<p>
|
|
47
|
-
<code>npm run build</code>
|
|
48
|
-
<br />
|
|
49
|
-
Creates production build
|
|
50
|
-
</p>
|
|
51
|
-
<p>
|
|
52
|
-
<code>npm run qwik add</code>
|
|
53
|
-
<br />
|
|
54
|
-
Runs the qwik CLI to add integrations
|
|
55
|
-
</p>
|
|
56
|
-
</>
|
|
57
|
-
</Infobox>
|
|
58
|
-
|
|
59
|
-
<div>
|
|
60
|
-
<Infobox>
|
|
61
|
-
<div q:slot="title" class="icon icon-apps">
|
|
62
|
-
Example Apps
|
|
63
|
-
</div>
|
|
64
|
-
<p>
|
|
65
|
-
Have a look at the <a href="/demo/flower">Flower App</a> or the{' '}
|
|
66
|
-
<a href="/demo/todolist">Todo App</a>.
|
|
67
|
-
</p>
|
|
68
|
-
</Infobox>
|
|
69
|
-
|
|
70
|
-
<Infobox>
|
|
71
|
-
<div q:slot="title" class="icon icon-community">
|
|
72
|
-
Community
|
|
73
|
-
</div>
|
|
74
|
-
<ul>
|
|
75
|
-
<li>
|
|
76
|
-
<span>Questions or just want to say hi? </span>
|
|
77
|
-
<a href="https://qwik.builder.io/chat" target="_blank">
|
|
78
|
-
Chat on discord!
|
|
79
|
-
</a>
|
|
80
|
-
</li>
|
|
81
|
-
<li>
|
|
82
|
-
<span>Follow </span>
|
|
83
|
-
<a href="https://twitter.com/QwikDev" target="_blank">
|
|
84
|
-
@QwikDev
|
|
85
|
-
</a>
|
|
86
|
-
<span> on Twitter</span>
|
|
87
|
-
</li>
|
|
88
|
-
<li>
|
|
89
|
-
<span>Open issues and contribute on </span>
|
|
90
|
-
<a href="https://github.com/BuilderIO/qwik" target="_blank">
|
|
91
|
-
GitHub
|
|
92
|
-
</a>
|
|
93
|
-
</li>
|
|
94
|
-
<li>
|
|
95
|
-
<span>Watch </span>
|
|
96
|
-
<a href="https://qwik.builder.io/media/" target="_blank">
|
|
97
|
-
Presentations, Podcasts, Videos, etc.
|
|
98
|
-
</a>
|
|
99
|
-
</li>
|
|
100
|
-
</ul>
|
|
101
|
-
</Infobox>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
</>
|
|
106
|
-
);
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
export const head: DocumentHead = {
|
|
110
|
-
title: 'Welcome to Qwik',
|
|
111
|
-
meta: [
|
|
112
|
-
{
|
|
113
|
-
name: 'description',
|
|
114
|
-
content: 'Qwik site description',
|
|
115
|
-
},
|
|
116
|
-
],
|
|
117
|
-
};
|