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
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { component$, useVisibleTask$, useStore, useStylesScoped$ } from '@builder.io/qwik';
|
|
2
|
+
import { type DocumentHead, useLocation } from '@builder.io/qwik-city';
|
|
3
|
+
import styles from './flower.css?inline';
|
|
4
|
+
|
|
5
|
+
export default component$(() => {
|
|
6
|
+
useStylesScoped$(styles);
|
|
7
|
+
const loc = useLocation();
|
|
8
|
+
|
|
9
|
+
const state = useStore({
|
|
10
|
+
count: 0,
|
|
11
|
+
number: 20,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
useVisibleTask$(({ cleanup }) => {
|
|
15
|
+
const timeout = setTimeout(() => (state.count = 1), 500);
|
|
16
|
+
cleanup(() => clearTimeout(timeout));
|
|
17
|
+
|
|
18
|
+
const internal = setInterval(() => state.count++, 7000);
|
|
19
|
+
cleanup(() => clearInterval(internal));
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<div class="container container-center">
|
|
24
|
+
<div role="presentation" class="ellipsis"></div>
|
|
25
|
+
<h1>
|
|
26
|
+
<span class="highlight">Generate</span> Flowers
|
|
27
|
+
</h1>
|
|
28
|
+
|
|
29
|
+
<input
|
|
30
|
+
class="input"
|
|
31
|
+
type="range"
|
|
32
|
+
value={state.number}
|
|
33
|
+
max={50}
|
|
34
|
+
onInput$={(ev) => {
|
|
35
|
+
state.number = (ev.target as HTMLInputElement).valueAsNumber;
|
|
36
|
+
}}
|
|
37
|
+
/>
|
|
38
|
+
<div
|
|
39
|
+
style={{
|
|
40
|
+
'--state': `${state.count * 0.1}`,
|
|
41
|
+
}}
|
|
42
|
+
class={{
|
|
43
|
+
host: true,
|
|
44
|
+
pride: loc.url.searchParams.get('pride') === 'true',
|
|
45
|
+
}}
|
|
46
|
+
>
|
|
47
|
+
{Array.from({ length: state.number }, (_, i) => (
|
|
48
|
+
<div
|
|
49
|
+
key={i}
|
|
50
|
+
class={{
|
|
51
|
+
square: true,
|
|
52
|
+
odd: i % 2 === 0,
|
|
53
|
+
}}
|
|
54
|
+
style={{ '--index': `${i + 1}` }}
|
|
55
|
+
/>
|
|
56
|
+
)).reverse()}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
);
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export const head: DocumentHead = {
|
|
63
|
+
title: 'Qwik Flower',
|
|
64
|
+
};
|
|
@@ -0,0 +1,74 @@
|
|
|
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="container container-center">
|
|
41
|
+
<h1>
|
|
42
|
+
<span class="highlight">TODO</span> List
|
|
43
|
+
</h1>
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
<div role="presentation" class="ellipsis"></div>
|
|
47
|
+
|
|
48
|
+
<div class="container container-center">
|
|
49
|
+
{(list.value.length && (
|
|
50
|
+
<ul class={styles.list}>
|
|
51
|
+
{list.value.map((item, index) => (
|
|
52
|
+
<li key={`items-${index}`}>{item.text}</li>
|
|
53
|
+
))}
|
|
54
|
+
</ul>
|
|
55
|
+
)) || <span class={styles.empty}>No items found</span>}
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div class="container container-center">
|
|
59
|
+
<Form action={action} spaReset>
|
|
60
|
+
<input type="text" name="text" required class={styles.input} />{' '}
|
|
61
|
+
<button type="submit" class="button-dark">
|
|
62
|
+
Add item
|
|
63
|
+
</button>
|
|
64
|
+
</Form>
|
|
65
|
+
|
|
66
|
+
<p class={styles.hint}>PS: This little app works even when JavaScript is disabled.</p>
|
|
67
|
+
</div>
|
|
68
|
+
</>
|
|
69
|
+
);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
export const head: DocumentHead = {
|
|
73
|
+
title: 'Qwik Todo List',
|
|
74
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
.list {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 20px;
|
|
5
|
+
color: white;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.list,
|
|
9
|
+
.empty {
|
|
10
|
+
min-height: 250px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.list li {
|
|
14
|
+
list-style: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.empty {
|
|
18
|
+
color: white;
|
|
19
|
+
display: block;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.input {
|
|
23
|
+
background: white;
|
|
24
|
+
color: var(--qwik-light-blue);
|
|
25
|
+
border: none;
|
|
26
|
+
border-radius: 8px;
|
|
27
|
+
padding: 15px 20px;
|
|
28
|
+
margin-right: 10px;
|
|
29
|
+
font-size: 0.8rem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.hint {
|
|
33
|
+
font-size: 0.8rem;
|
|
34
|
+
color: white;
|
|
35
|
+
margin-top: 30px;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media screen and (min-width: 768px) {
|
|
39
|
+
.input {
|
|
40
|
+
padding: 23px 35px;
|
|
41
|
+
margin-right: 20px;
|
|
42
|
+
font-size: 1rem;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
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
|
+
<Starter />
|
|
14
|
+
|
|
15
|
+
<div role="presentation" class="ellipsis"></div>
|
|
16
|
+
<div role="presentation" class="ellipsis ellipsis-purple"></div>
|
|
17
|
+
|
|
18
|
+
<div class="container container-center container-spacing-xl">
|
|
19
|
+
<h3>
|
|
20
|
+
You can <span class="highlight">count</span>
|
|
21
|
+
<br /> on me
|
|
22
|
+
</h3>
|
|
23
|
+
<Counter />
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="container container-flex">
|
|
27
|
+
<Infobox>
|
|
28
|
+
<div q:slot="title" class="icon icon-cli">
|
|
29
|
+
CLI Commands
|
|
30
|
+
</div>
|
|
31
|
+
<>
|
|
32
|
+
<p>
|
|
33
|
+
<code>npm run dev</code>
|
|
34
|
+
<br />
|
|
35
|
+
Starts the development server and watches for changes
|
|
36
|
+
</p>
|
|
37
|
+
<p>
|
|
38
|
+
<code>npm run preview</code>
|
|
39
|
+
<br />
|
|
40
|
+
Creates production build and starts a server to preview it
|
|
41
|
+
</p>
|
|
42
|
+
<p>
|
|
43
|
+
<code>npm run build</code>
|
|
44
|
+
<br />
|
|
45
|
+
Creates production build
|
|
46
|
+
</p>
|
|
47
|
+
<p>
|
|
48
|
+
<code>npm run qwik add</code>
|
|
49
|
+
<br />
|
|
50
|
+
Runs the qwik CLI to add integrations
|
|
51
|
+
</p>
|
|
52
|
+
</>
|
|
53
|
+
</Infobox>
|
|
54
|
+
|
|
55
|
+
<div>
|
|
56
|
+
<Infobox>
|
|
57
|
+
<div q:slot="title" class="icon icon-apps">
|
|
58
|
+
Example Apps
|
|
59
|
+
</div>
|
|
60
|
+
<p>
|
|
61
|
+
Have a look at the <a href="/demo/flower">Flower App</a> or the{' '}
|
|
62
|
+
<a href="/demo/todolist">Todo App</a>.
|
|
63
|
+
</p>
|
|
64
|
+
</Infobox>
|
|
65
|
+
|
|
66
|
+
<Infobox>
|
|
67
|
+
<div q:slot="title" class="icon icon-community">
|
|
68
|
+
Community
|
|
69
|
+
</div>
|
|
70
|
+
<ul>
|
|
71
|
+
<li>
|
|
72
|
+
<span>Questions or just want to say hi? </span>
|
|
73
|
+
<a href="https://qwik.builder.io/chat" target="_blank">
|
|
74
|
+
Chat on discord!
|
|
75
|
+
</a>
|
|
76
|
+
</li>
|
|
77
|
+
<li>
|
|
78
|
+
<span>Follow </span>
|
|
79
|
+
<a href="https://twitter.com/QwikDev" target="_blank">
|
|
80
|
+
@QwikDev
|
|
81
|
+
</a>
|
|
82
|
+
<span> on Twitter</span>
|
|
83
|
+
</li>
|
|
84
|
+
<li>
|
|
85
|
+
<span>Open issues and contribute on </span>
|
|
86
|
+
<a href="https://github.com/BuilderIO/qwik" target="_blank">
|
|
87
|
+
GitHub
|
|
88
|
+
</a>
|
|
89
|
+
</li>
|
|
90
|
+
<li>
|
|
91
|
+
<span>Watch </span>
|
|
92
|
+
<a href="https://qwik.builder.io/media/" target="_blank">
|
|
93
|
+
Presentations, Podcasts, Videos, etc.
|
|
94
|
+
</a>
|
|
95
|
+
</li>
|
|
96
|
+
</ul>
|
|
97
|
+
</Infobox>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
</>
|
|
101
|
+
);
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
export const head: DocumentHead = {
|
|
105
|
+
title: 'Welcome to Qwik',
|
|
106
|
+
meta: [
|
|
107
|
+
{
|
|
108
|
+
name: 'description',
|
|
109
|
+
content: 'Qwik site description',
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { component$, Slot, useStyles$ } from '@builder.io/qwik';
|
|
2
|
+
import { routeLoader$ } from '@builder.io/qwik-city';
|
|
3
|
+
|
|
4
|
+
import Header from '~/components/starter/header/header';
|
|
5
|
+
import Footer from '~/components/starter/footer/footer';
|
|
6
|
+
|
|
7
|
+
import styles from './styles.css?inline';
|
|
8
|
+
|
|
9
|
+
export const useServerTimeLoader = routeLoader$(() => {
|
|
10
|
+
return {
|
|
11
|
+
date: new Date().toISOString(),
|
|
12
|
+
};
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export default component$(() => {
|
|
16
|
+
useStyles$(styles);
|
|
17
|
+
return (
|
|
18
|
+
<>
|
|
19
|
+
<Header />
|
|
20
|
+
<main>
|
|
21
|
+
<Slot />
|
|
22
|
+
</main>
|
|
23
|
+
<Footer />
|
|
24
|
+
</>
|
|
25
|
+
);
|
|
26
|
+
});
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/* THIS FILE IS JUST FOR EXAMPLES, DELETE IT IF YOU DON'T NEED IT */
|
|
2
|
+
/* latin */
|
|
3
|
+
@font-face {
|
|
4
|
+
font-family: 'Poppins';
|
|
5
|
+
font-style: normal;
|
|
6
|
+
font-weight: 400;
|
|
7
|
+
font-display: swap;
|
|
8
|
+
src: url(/fonts/poppins-400.woff2?v=1) format('woff2');
|
|
9
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F,
|
|
10
|
+
U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* latin */
|
|
14
|
+
@font-face {
|
|
15
|
+
font-family: 'Poppins';
|
|
16
|
+
font-style: normal;
|
|
17
|
+
font-weight: 500;
|
|
18
|
+
font-display: swap;
|
|
19
|
+
src: url(/fonts/poppins-500.woff2?v=1) format('woff2');
|
|
20
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F,
|
|
21
|
+
U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/* latin */
|
|
25
|
+
@font-face {
|
|
26
|
+
font-family: 'Poppins';
|
|
27
|
+
font-style: normal;
|
|
28
|
+
font-weight: 700;
|
|
29
|
+
font-display: swap;
|
|
30
|
+
src: url(/fonts/poppins-700.woff2?v=1) format('woff2');
|
|
31
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F,
|
|
32
|
+
U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* SHELL ---------------------------------------- */
|
|
36
|
+
html {
|
|
37
|
+
font-family: Poppins, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI',
|
|
38
|
+
Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
|
|
39
|
+
'Segoe UI Symbol', 'Noto Color Emoji';
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
body {
|
|
43
|
+
background: var(--qwik-dark-background);
|
|
44
|
+
overflow-x: hidden;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* HEADINGS ------------------------------------- */
|
|
48
|
+
h1,
|
|
49
|
+
h2,
|
|
50
|
+
h3 {
|
|
51
|
+
color: white;
|
|
52
|
+
margin: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
h1 {
|
|
56
|
+
font-size: 3.2rem;
|
|
57
|
+
text-align: center;
|
|
58
|
+
}
|
|
59
|
+
h1 .highlight,
|
|
60
|
+
h3 .highlight {
|
|
61
|
+
color: var(--qwik-light-blue);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
h2 {
|
|
65
|
+
font-weight: 400;
|
|
66
|
+
font-size: 2.4rem;
|
|
67
|
+
}
|
|
68
|
+
h2 .highlight {
|
|
69
|
+
font-weight: 700;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
h3 {
|
|
73
|
+
font-size: 2rem;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
@media screen and (min-width: 768px) {
|
|
77
|
+
h1 {
|
|
78
|
+
font-size: 5rem;
|
|
79
|
+
}
|
|
80
|
+
h2 {
|
|
81
|
+
font-size: 3.4rem;
|
|
82
|
+
}
|
|
83
|
+
h3 {
|
|
84
|
+
font-size: 3rem;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* TAGS ----------------------------------------- */
|
|
89
|
+
a {
|
|
90
|
+
text-decoration: none;
|
|
91
|
+
color: var(--qwik-light-blue);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
code {
|
|
95
|
+
background: rgba(230, 230, 230, 0.3);
|
|
96
|
+
border-radius: 4px;
|
|
97
|
+
padding: 2px 6px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
ul {
|
|
101
|
+
margin: 0;
|
|
102
|
+
padding-left: 20px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* CONTAINER ------------------------------------ */
|
|
106
|
+
.container {
|
|
107
|
+
margin: 0 auto;
|
|
108
|
+
padding: 30px 40px;
|
|
109
|
+
}
|
|
110
|
+
.container.container-purple {
|
|
111
|
+
background: var(--qwik-light-purple);
|
|
112
|
+
}
|
|
113
|
+
.container.container-dark {
|
|
114
|
+
background: var(--qwik-dark-background);
|
|
115
|
+
}
|
|
116
|
+
.container.container-center {
|
|
117
|
+
text-align: center;
|
|
118
|
+
}
|
|
119
|
+
.container.container-flex {
|
|
120
|
+
/* does nothing on mobile */
|
|
121
|
+
}
|
|
122
|
+
.container.container-spacing-xl {
|
|
123
|
+
padding: 50px 40px;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@media screen and (min-width: 768px) {
|
|
127
|
+
.container {
|
|
128
|
+
padding: 50px 80px;
|
|
129
|
+
}
|
|
130
|
+
.container.container-spacing-xl {
|
|
131
|
+
padding: 100px 60px;
|
|
132
|
+
}
|
|
133
|
+
.container.container-flex {
|
|
134
|
+
display: flex;
|
|
135
|
+
justify-content: center;
|
|
136
|
+
gap: 60px;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* BUTTONS -------------------------------------- */
|
|
141
|
+
a.button,
|
|
142
|
+
button {
|
|
143
|
+
background: var(--qwik-light-blue);
|
|
144
|
+
border: none;
|
|
145
|
+
border-radius: 8px;
|
|
146
|
+
color: white;
|
|
147
|
+
cursor: pointer;
|
|
148
|
+
font-size: 0.8rem;
|
|
149
|
+
padding: 15px 20px;
|
|
150
|
+
text-align: center;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
a.button.button-dark,
|
|
154
|
+
button.button-dark {
|
|
155
|
+
background: var(--qwik-dirty-black);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
a.button.button-small,
|
|
159
|
+
button.button-small {
|
|
160
|
+
padding: 15px 25px;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
@media screen and (min-width: 768px) {
|
|
164
|
+
a.button,
|
|
165
|
+
button {
|
|
166
|
+
font-size: 1rem;
|
|
167
|
+
padding: 23px 35px;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* DESIGN --------------------------------------- */
|
|
172
|
+
.ellipsis {
|
|
173
|
+
position: absolute;
|
|
174
|
+
top: 100px;
|
|
175
|
+
left: -100px;
|
|
176
|
+
width: 400px;
|
|
177
|
+
height: 400px;
|
|
178
|
+
background: radial-gradient(
|
|
179
|
+
57.58% 57.58% at 48.79% 42.42%,
|
|
180
|
+
rgba(24, 180, 244, 0.5) 0%,
|
|
181
|
+
rgba(46, 55, 114, 0) 63.22%
|
|
182
|
+
);
|
|
183
|
+
transform: rotate(5deg);
|
|
184
|
+
opacity: 0.5;
|
|
185
|
+
z-index: -1;
|
|
186
|
+
}
|
|
187
|
+
.ellipsis.ellipsis-purple {
|
|
188
|
+
top: 1350px;
|
|
189
|
+
left: -100px;
|
|
190
|
+
background: radial-gradient(
|
|
191
|
+
50% 50% at 50% 50%,
|
|
192
|
+
rgba(172, 127, 244, 0.5) 0%,
|
|
193
|
+
rgba(21, 25, 52, 0) 100%
|
|
194
|
+
);
|
|
195
|
+
transform: rotate(-5deg);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
@media screen and (min-width: 768px) {
|
|
199
|
+
.ellipsis {
|
|
200
|
+
top: -100px;
|
|
201
|
+
left: 350px;
|
|
202
|
+
width: 1400px;
|
|
203
|
+
height: 800px;
|
|
204
|
+
}
|
|
205
|
+
.ellipsis.ellipsis-purple {
|
|
206
|
+
top: 1300px;
|
|
207
|
+
left: -200px;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/* used icon pack: https://www.svgrepo.com/collection/phosphor-thin-icons */
|
|
212
|
+
.icon:before {
|
|
213
|
+
width: 18px;
|
|
214
|
+
height: 18px;
|
|
215
|
+
content: '';
|
|
216
|
+
display: inline-block;
|
|
217
|
+
margin-right: 20px;
|
|
218
|
+
position: relative;
|
|
219
|
+
top: 2px;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.icon-cli:before {
|
|
223
|
+
background-image: url("data:image/svg+xml,%3Csvg fill='%23ffffff' width='20px' height='20px' viewBox='0 0 256 256' id='Flat' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M122.499 124.87646a4.00053 4.00053 0 0 1 0 6.24708l-40 32a4.0002 4.0002 0 0 1-4.998-6.24708L113.59668 128 77.501 99.12354a4.0002 4.0002 0 0 1 4.998-6.24708ZM175.99414 156h-40a4 4 0 0 0 0 8h40a4 4 0 1 0 0-8ZM228 56.48535v143.0293A12.49909 12.49909 0 0 1 215.51465 212H40.48535A12.49909 12.49909 0 0 1 28 199.51465V56.48535A12.49909 12.49909 0 0 1 40.48535 44h175.0293A12.49909 12.49909 0 0 1 228 56.48535Zm-8 0A4.49023 4.49023 0 0 0 215.51465 52H40.48535A4.49023 4.49023 0 0 0 36 56.48535v143.0293A4.49023 4.49023 0 0 0 40.48535 204h175.0293A4.49023 4.49023 0 0 0 220 199.51465Z'/%3E%3C/svg%3E");
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.icon-apps:before {
|
|
227
|
+
background-image: url("data:image/svg+xml,%3Csvg fill='%23ffffff' width='20px' height='20px' viewBox='0 0 256 256' id='Flat' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M216 44.00586H40a12.01375 12.01375 0 0 0-12 12v144a12.01375 12.01375 0 0 0 12 12H216a12.01375 12.01375 0 0 0 12-12v-144A12.01375 12.01375 0 0 0 216 44.00586Zm4 156a4.00458 4.00458 0 0 1-4 4H40a4.00458 4.00458 0 0 1-4-4v-144a4.00458 4.00458 0 0 1 4-4H216a4.00458 4.00458 0 0 1 4 4Zm-144-116a8 8 0 1 1-8-8A7.99977 7.99977 0 0 1 76 84.00586Zm40 0a8 8 0 1 1-8-8A7.99977 7.99977 0 0 1 116 84.00586Z'/%3E%3C/svg%3E");
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.icon-community:before {
|
|
231
|
+
background-image: url("data:image/svg+xml,%3Csvg fill='%23ffffff' width='20px' height='20px' viewBox='0 0 256 256' id='Flat' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M246.40381 143.19434a4.00061 4.00061 0 0 1-5.60108-.7959A55.57857 55.57857 0 0 0 196 120a4 4 0 0 1 0-8 28 28 0 1 0-27.50732-33.26074 4.00013 4.00013 0 0 1-7.85987-1.49219 36.00191 36.00191 0 1 1 54.06494 37.50513 63.58068 63.58068 0 0 1 32.50147 22.84155A3.99993 3.99993 0 0 1 246.40381 143.19434Zm-57.24268 71.05273a3.9998 3.9998 0 1 1-7.1914 3.50391 60.02582 60.02582 0 0 0-107.93946 0 3.9998 3.9998 0 1 1-7.1914-3.50391 67.56008 67.56008 0 0 1 40.90625-35.20581 44 44 0 1 1 40.50976 0A67.56139 67.56139 0 0 1 189.16113 214.24707ZM128 176a36 36 0 1 0-36-36A36.04061 36.04061 0 0 0 128 176ZM60 112A28 28 0 1 1 87.50732 78.73828a3.99989 3.99989 0 1 0 7.85938-1.49219A36.00177 36.00177 0 1 0 41.30225 114.7522 63.5829 63.5829 0 0 0 8.79883 137.5957a4 4 0 1 0 6.39648 4.80469A55.58072 55.58072 0 0 1 60 120a4 4 0 0 0 0-8Z'/%3E%3C/svg%3E");
|
|
232
|
+
}
|
|
@@ -1,27 +1,10 @@
|
|
|
1
1
|
import { component$, Slot } from '@builder.io/qwik';
|
|
2
|
-
import { routeLoader$ } from '@builder.io/qwik-city';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
return {
|
|
9
|
-
date: new Date().toISOString(),
|
|
10
|
-
};
|
|
11
|
-
});
|
|
3
|
+
/**
|
|
4
|
+
* create a new `index.tsx` file in the `src/routes` folder
|
|
5
|
+
* to start building your own app 🚀
|
|
6
|
+
*/
|
|
12
7
|
|
|
13
8
|
export default component$(() => {
|
|
14
|
-
return
|
|
15
|
-
<div class="page">
|
|
16
|
-
<main>
|
|
17
|
-
<Header />
|
|
18
|
-
<Slot />
|
|
19
|
-
</main>
|
|
20
|
-
<div class="section dark">
|
|
21
|
-
<div class="container">
|
|
22
|
-
<Footer />
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
);
|
|
9
|
+
return <Slot />;
|
|
27
10
|
});
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
.counter-wrapper {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
gap: 15px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.counter-value {
|
|
9
|
-
background: white;
|
|
10
|
-
border-radius: 12px;
|
|
11
|
-
color: var(--qwik-light-purple);
|
|
12
|
-
font-weight: 400;
|
|
13
|
-
font-size: 2rem;
|
|
14
|
-
width: 120px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.counter-value.odd {
|
|
18
|
-
color: var(--qwik-light-blue);
|
|
19
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { component$, useVisibleTask$, useStore, useStylesScoped$ } from '@builder.io/qwik';
|
|
2
|
-
import { type DocumentHead, useLocation } from '@builder.io/qwik-city';
|
|
3
|
-
import styles from './flower.css?inline';
|
|
4
|
-
|
|
5
|
-
export default component$(() => {
|
|
6
|
-
useStylesScoped$(styles);
|
|
7
|
-
const loc = useLocation();
|
|
8
|
-
|
|
9
|
-
const state = useStore({
|
|
10
|
-
count: 0,
|
|
11
|
-
number: 20,
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
useVisibleTask$(({ cleanup }) => {
|
|
15
|
-
const timeout = setTimeout(() => (state.count = 1), 500);
|
|
16
|
-
cleanup(() => clearTimeout(timeout));
|
|
17
|
-
|
|
18
|
-
const internal = setInterval(() => state.count++, 7000);
|
|
19
|
-
cleanup(() => clearInterval(internal));
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<div class="section">
|
|
24
|
-
<div class="container center">
|
|
25
|
-
<input
|
|
26
|
-
type="range"
|
|
27
|
-
value={state.number}
|
|
28
|
-
max={50}
|
|
29
|
-
onInput$={(ev) => {
|
|
30
|
-
state.number = (ev.target as HTMLInputElement).valueAsNumber;
|
|
31
|
-
}}
|
|
32
|
-
/>
|
|
33
|
-
<div
|
|
34
|
-
style={{
|
|
35
|
-
'--state': `${state.count * 0.1}`,
|
|
36
|
-
}}
|
|
37
|
-
class={{
|
|
38
|
-
host: true,
|
|
39
|
-
pride: loc.url.searchParams.get('pride') === 'true',
|
|
40
|
-
}}
|
|
41
|
-
>
|
|
42
|
-
{Array.from({ length: state.number }, (_, i) => (
|
|
43
|
-
<div
|
|
44
|
-
key={i}
|
|
45
|
-
class={{
|
|
46
|
-
square: true,
|
|
47
|
-
odd: i % 2 === 0,
|
|
48
|
-
}}
|
|
49
|
-
style={{ '--index': `${i + 1}` }}
|
|
50
|
-
/>
|
|
51
|
-
)).reverse()}
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
);
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
export const head: DocumentHead = {
|
|
59
|
-
title: 'Qwik Flower',
|
|
60
|
-
};
|