create-qwik 0.0.109-0 → 0.0.110

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 (106) hide show
  1. package/index.cjs +63 -67
  2. package/package.json +1 -1
  3. package/starters/apps/base/README.md +46 -11
  4. package/starters/apps/base/package.json +11 -10
  5. package/starters/apps/base/public/favicon.svg +1 -0
  6. package/starters/apps/base/src/entry.dev.tsx +6 -4
  7. package/starters/apps/base/src/entry.preview.tsx +15 -2
  8. package/starters/apps/base/src/entry.ssr.tsx +12 -0
  9. package/starters/apps/base/src/global.css +7 -0
  10. package/starters/apps/base/src/routes/service-worker.ts +18 -0
  11. package/starters/apps/base/vite.config.ts +3 -1
  12. package/starters/apps/basic/package.json +9 -0
  13. package/starters/apps/basic/src/components/header/header.css +37 -0
  14. package/starters/apps/basic/src/components/header/header.tsx +34 -0
  15. package/starters/apps/basic/src/components/icons/qwik.tsx +32 -0
  16. package/starters/apps/basic/src/components/router-head/router-head.tsx +43 -0
  17. package/starters/apps/basic/src/global.css +125 -0
  18. package/starters/apps/basic/src/root.tsx +26 -0
  19. package/starters/apps/basic/src/routes/flower/flower.css +71 -0
  20. package/starters/apps/basic/src/routes/flower/index.tsx +54 -0
  21. package/starters/apps/basic/src/routes/index.tsx +133 -0
  22. package/starters/apps/basic/src/routes/layout.tsx +20 -0
  23. package/starters/apps/documentation-site/package.json +9 -0
  24. package/starters/apps/{qwik-city → documentation-site}/src/components/breadcrumbs/breadcrumbs.css +0 -0
  25. package/starters/apps/{qwik-city → documentation-site}/src/components/breadcrumbs/breadcrumbs.tsx +0 -0
  26. package/starters/apps/{qwik-city → documentation-site}/src/components/footer/footer.css +4 -4
  27. package/starters/apps/documentation-site/src/components/footer/footer.tsx +36 -0
  28. package/starters/apps/documentation-site/src/components/header/header.css +34 -0
  29. package/starters/apps/documentation-site/src/components/header/header.tsx +26 -0
  30. package/starters/apps/documentation-site/src/components/icons/qwik.tsx +20 -0
  31. package/starters/apps/{qwik-city → documentation-site}/src/components/menu/menu.css +0 -0
  32. package/starters/apps/{qwik-city → documentation-site}/src/components/menu/menu.tsx +1 -1
  33. package/starters/apps/documentation-site/src/components/on-this-page/on-this-page.css +33 -0
  34. package/starters/apps/documentation-site/src/components/on-this-page/on-this-page.tsx +62 -0
  35. package/starters/apps/documentation-site/src/components/router-head/router-head.tsx +43 -0
  36. package/starters/apps/documentation-site/src/global.css +66 -0
  37. package/starters/apps/documentation-site/src/root.tsx +26 -0
  38. package/starters/apps/documentation-site/src/routes/about-us/index.md +15 -0
  39. package/starters/apps/documentation-site/src/routes/docs/advanced/index.md +11 -0
  40. package/starters/apps/documentation-site/src/routes/docs/docs.css +22 -0
  41. package/starters/apps/documentation-site/src/routes/docs/getting-started/index.md +13 -0
  42. package/starters/apps/documentation-site/src/routes/docs/index.md +22 -0
  43. package/starters/apps/documentation-site/src/routes/docs/layout.tsx +25 -0
  44. package/starters/apps/documentation-site/src/routes/docs/menu.md +21 -0
  45. package/starters/apps/documentation-site/src/routes/index.tsx +137 -0
  46. package/starters/apps/{qwik-city → documentation-site}/src/routes/layout.tsx +4 -4
  47. package/starters/apps/library/package.json +2 -7
  48. package/starters/apps/base/public/favicon.ico +0 -0
  49. package/starters/apps/base/public/favicons/android-chrome-192x192.png +0 -0
  50. package/starters/apps/base/public/favicons/apple-touch-icon.png +0 -0
  51. package/starters/apps/base/public/favicons/favicon-16x16.png +0 -0
  52. package/starters/apps/base/public/favicons/favicon-32x32.png +0 -0
  53. package/starters/apps/base/public/favicons/favicon.svg +0 -13
  54. package/starters/apps/base/src/root.tsx +0 -14
  55. package/starters/apps/blank/dist/q-manifest.json +0 -105
  56. package/starters/apps/blank/package.json +0 -7
  57. package/starters/apps/blank/src/components/app/app.tsx +0 -54
  58. package/starters/apps/blank/src/components/logo/logo.tsx +0 -16
  59. package/starters/apps/blank/src/entry.preview.tsx +0 -18
  60. package/starters/apps/blank/src/entry.ssr.tsx +0 -15
  61. package/starters/apps/blank/src/global.css +0 -3
  62. package/starters/apps/blank/src/root.tsx +0 -18
  63. package/starters/apps/qwik-city/dist/favicons/android-chrome-192x192.png +0 -0
  64. package/starters/apps/qwik-city/dist/favicons/android-chrome-256x256.png +0 -0
  65. package/starters/apps/qwik-city/dist/favicons/apple-touch-icon.png +0 -0
  66. package/starters/apps/qwik-city/dist/favicons/favicon.svg +0 -1
  67. package/starters/apps/qwik-city/dist/logos/qwik-logo.svg +0 -1
  68. package/starters/apps/qwik-city/dist/logos/qwik.svg +0 -1
  69. package/starters/apps/qwik-city/dist/q-manifest.json +0 -904
  70. package/starters/apps/qwik-city/dist/service-worker.js +0 -167
  71. package/starters/apps/qwik-city/package.json +0 -8
  72. package/starters/apps/qwik-city/src/components/counter/counter.tsx +0 -19
  73. package/starters/apps/qwik-city/src/components/footer/footer.tsx +0 -27
  74. package/starters/apps/qwik-city/src/components/head/analytics.tsx +0 -13
  75. package/starters/apps/qwik-city/src/components/head/head.tsx +0 -34
  76. package/starters/apps/qwik-city/src/components/head/social.tsx +0 -10
  77. package/starters/apps/qwik-city/src/components/header/header.css +0 -46
  78. package/starters/apps/qwik-city/src/components/header/header.tsx +0 -36
  79. package/starters/apps/qwik-city/src/entry.ssr.tsx +0 -17
  80. package/starters/apps/qwik-city/src/global.css +0 -24
  81. package/starters/apps/qwik-city/src/root.tsx +0 -16
  82. package/starters/apps/qwik-city/src/routes/about-us/index.tsx +0 -17
  83. package/starters/apps/qwik-city/src/routes/api/[org]/[user].json/index.ts +0 -15
  84. package/starters/apps/qwik-city/src/routes/api/api.css +0 -14
  85. package/starters/apps/qwik-city/src/routes/api/data.json/index.ts +0 -9
  86. package/starters/apps/qwik-city/src/routes/api/index@api.tsx +0 -34
  87. package/starters/apps/qwik-city/src/routes/api/layout-api.tsx +0 -37
  88. package/starters/apps/qwik-city/src/routes/blog/[...slug]/index.tsx +0 -36
  89. package/starters/apps/qwik-city/src/routes/blog/index.md +0 -7
  90. package/starters/apps/qwik-city/src/routes/blog/layout.tsx +0 -21
  91. package/starters/apps/qwik-city/src/routes/dashboard/dashboard.css +0 -14
  92. package/starters/apps/qwik-city/src/routes/dashboard/index.tsx +0 -15
  93. package/starters/apps/qwik-city/src/routes/dashboard/layout!.tsx +0 -44
  94. package/starters/apps/qwik-city/src/routes/dashboard/profile/index.tsx +0 -15
  95. package/starters/apps/qwik-city/src/routes/dashboard/settings/index.tsx +0 -15
  96. package/starters/apps/qwik-city/src/routes/docs/[category]/[id]/index.tsx +0 -23
  97. package/starters/apps/qwik-city/src/routes/docs/docs.css +0 -10
  98. package/starters/apps/qwik-city/src/routes/docs/getting-started/index.md +0 -44
  99. package/starters/apps/qwik-city/src/routes/docs/index.tsx +0 -14
  100. package/starters/apps/qwik-city/src/routes/docs/layout!.tsx +0 -31
  101. package/starters/apps/qwik-city/src/routes/docs/menu.md +0 -11
  102. package/starters/apps/qwik-city/src/routes/docs/overview/index.md +0 -7
  103. package/starters/apps/qwik-city/src/routes/index.tsx +0 -16
  104. package/starters/apps/qwik-city/src/routes/products/[id]/index.tsx +0 -123
  105. package/starters/apps/qwik-city/src/routes/service-worker.ts +0 -10
  106. package/starters/apps/qwik-city/vite.config.ts +0 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-qwik",
3
- "version": "0.0.109-0",
3
+ "version": "0.0.110",
4
4
  "description": "Interactive CLI for create Qwik projects and adding features.",
5
5
  "bin": "./create-qwik.cjs",
6
6
  "main": "./index.cjs",
@@ -1,31 +1,66 @@
1
- ## Development Build
1
+ # Qwik App ⚡️
2
2
 
3
- Server-side rendered index.html, with client-side modules prefetched and loaded by the browser.
3
+ - [Qwik Docs](https://qwik.builder.io/)
4
+ - [Discord](https://qwik.builder.io/chat)
5
+ - [Qwik Github](https://github.com/BuilderIO/qwik)
6
+ - [@QwikDev](https://twitter.com/QwikDev)
7
+ - [Vite](https://vitejs.dev/)
8
+ - [Partytown](https://partytown.builder.io/)
9
+ - [Mitosis](https://github.com/BuilderIO/mitosis)
10
+ - [Builder.io](https://www.builder.io/)
11
+
12
+ ---
13
+
14
+ ## Project Structure
15
+
16
+ Inside of you project, you'll see the following directories and files:
4
17
 
5
18
  ```
6
- npm run dev
19
+ ├── public/
20
+ │ └── ...
21
+ └── src/
22
+ ├── components/
23
+ │ └── ...
24
+ └── routes/
25
+ └── ...
7
26
  ```
8
27
 
9
- ## Production Builds
28
+ - `src/routes`: Provides the directory based routing, which can include a hierarchy of `layout.tsx` layout files, and `index.tsx` files as the page. Additionally, `index.ts` files are endpoints. Please see the [routing docs](https://qwik.builder.io/qwikcity/routing/overview/) for more info.
10
29
 
11
- The production build should generate the client and server modules by running both client and server build commands. Additionally, the build command will use Typescript run a type check on the source.
30
+ - `src/components`: Recommended directory for components.
31
+
32
+ - `public`: Any static assets, like images, can be placed in the public directory. Please see the [Vite public directory](https://vitejs.dev/guide/assets.html#the-public-directory) for more info.
33
+
34
+ ## Add Integrations
35
+
36
+ Use the `npm run qwik add` command to add other integrations. Some examples of integrations include as a Cloudflare, Netlify or Vercel server, and the Static Site Generator (SSG).
12
37
 
13
38
  ```
14
- npm run build
39
+ npm run qwik add
15
40
  ```
16
41
 
17
- ### Client Modules
42
+ ## Development
18
43
 
19
- Production build that creates only the client-side modules that are dynamically imported by the browser.
44
+ Development mode uses [Vite's development server](https://vitejs.dev/). For Qwik during development, the `dev` command will also server-side render (SSR) the output. The client-side development modules loaded by the browser.
20
45
 
21
46
  ```
22
- npm run build.client
47
+ npm run dev
23
48
  ```
24
49
 
25
- ### Preview
50
+ > Note: during dev mode, Vite will request many JS files, which does not represent a Qwik production build.
51
+
52
+ ## Preview
26
53
 
27
- The preview command is intended for previewing the build locally and not meant as a production server.
54
+ The preview command will create a production build of the client modules, production build of `src/entry.preview.tsx`, and create a local server. The preview server is only for convenience to locally preview a production build, but it should not be used as a production server.
28
55
 
29
56
  ```
30
57
  npm run preview
31
58
  ```
59
+
60
+ ## Production
61
+
62
+ The production build should generate the client and server modules by running both client and server build commands. Additionally, the build command will use Typescript run a type check on the source.
63
+
64
+ ```
65
+ npm run build
66
+ ```
@@ -5,27 +5,28 @@
5
5
  "build.client": "vite build",
6
6
  "build.preview": "vite build --ssr src/entry.preview.tsx",
7
7
  "dev": "vite --mode ssr",
8
+ "dev.debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force",
8
9
  "fmt": "prettier --write .",
9
10
  "fmt.check": "prettier --check .",
10
11
  "lint": "eslint \"src/**/*.ts*\"",
11
- "preview": "qwik build preview && vite preview",
12
- "start": "vite --mode ssr",
12
+ "preview": "qwik build preview && vite preview --open",
13
+ "start": "vite --open --mode ssr",
13
14
  "typecheck": "tsc --incremental --noEmit",
14
15
  "qwik": "qwik"
15
16
  },
16
17
  "devDependencies": {
17
- "@builder.io/qwik": "0.0.108",
18
- "@builder.io/qwik-city": "0.0.110-0",
18
+ "@builder.io/qwik": "0.0.110",
19
+ "@builder.io/qwik-city": "0.0.111",
19
20
  "@types/eslint": "8.4.6",
20
21
  "@types/node": "latest",
21
- "@typescript-eslint/eslint-plugin": "5.34.0",
22
- "@typescript-eslint/parser": "5.34.0",
23
- "eslint-plugin-qwik": "latest",
24
- "eslint": "8.22.0",
22
+ "@typescript-eslint/eslint-plugin": "5.37.0",
23
+ "@typescript-eslint/parser": "5.37.0",
24
+ "eslint-plugin-qwik": "0.0.110",
25
+ "eslint": "8.23.1",
25
26
  "node-fetch": "3.2.10",
26
27
  "prettier": "2.7.1",
27
- "typescript": "4.7.4",
28
- "vite": "3.0.9",
28
+ "typescript": "4.8.3",
29
+ "vite": "3.1.1",
29
30
  "vite-tsconfig-paths": "3.5.0"
30
31
  },
31
32
  "private": true
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 500 500"><g clip-path="url(#a)"><circle cx="250" cy="250" r="250" fill="#fff"/><path fill="#18B6F6" d="m367.87 418.45-61.17-61.18-.94.13v-.67L175.7 227.53l32.05-31.13L188.9 87.73 99.56 199.09c-15.22 15.42-18.03 40.51-7.08 59.03l55.83 93.11a46.82 46.82 0 0 0 40.73 22.81l27.65-.27 151.18 44.68Z"/><path fill="#AC7EF4" d="m401.25 196.94-12.29-22.81-6.41-11.67-2.54-4.56-.26.26-33.66-58.63a47.07 47.07 0 0 0-41.27-23.75l-29.51.8-88.01.28a47.07 47.07 0 0 0-40.33 23.34L93.4 207l95.76-119.54L314.7 226.19l-22.3 22.67 13.35 108.54.13-.26v.26h-.26l.26.27 10.42 10.2 50.62 49.78c2.13 2 5.6-.4 4.13-2.96l-31.25-61.85 54.5-101.3 1.73-2c.67-.81 1.33-1.62 1.87-2.42a46.8 46.8 0 0 0 3.34-50.18Z"/><path fill="#fff" d="M315.1 225.65 189.18 87.6l17.9 108.14L175 227l130.5 130.27-11.75-108.14 21.37-23.48Z"/></g><defs><clipPath id="a"><path fill="#fff" d="M0 0h500v500H0z"/></clipPath></defs></svg>
@@ -1,7 +1,6 @@
1
- import { render, RenderOptions } from '@builder.io/qwik';
2
- import Root from './root';
3
-
4
- /**
1
+ /*
2
+ * WHAT IS THIS FILE?
3
+ *
5
4
  * Development entry point using only client-side modules:
6
5
  * - Do not use this mode in production!
7
6
  * - No SSR
@@ -10,6 +9,9 @@ import Root from './root';
10
9
  * - More code is transferred to the browser than in SSR mode.
11
10
  * - Optimizer/Serialization/Deserialization code is not exercised!
12
11
  */
12
+ import { render, RenderOptions } from '@builder.io/qwik';
13
+ import Root from './root';
14
+
13
15
  export default function (opts: RenderOptions) {
14
16
  return render(document, <Root />, opts);
15
17
  }
@@ -1,6 +1,19 @@
1
+ /*
2
+ * WHAT IS THIS FILE?
3
+ *
4
+ * It's the bundle entry point for `npm run preview`.
5
+ * That is, serving your app built in production mode.
6
+ *
7
+ * Feel free to modify this file, but don't remove it!
8
+ *
9
+ * Learn more about Vite's preview command:
10
+ * - https://vitejs.dev/config/preview-options.html#preview-options
11
+ *
12
+ */
1
13
  import { qwikCity } from '@builder.io/qwik-city/middleware/node';
2
14
  import render from './entry.ssr';
3
15
 
4
- // Create the Qwik City ssr preview middleware
5
- // Imported by vite preview
16
+ /**
17
+ * The default export is the QwikCity adaptor used by Vite preview.
18
+ */
6
19
  export default qwikCity(render);
@@ -1,3 +1,15 @@
1
+ /**
2
+ * WHAT IS THIS FILE?
3
+ *
4
+ * SSR entry point, in all cases the application is render outside the browser, this
5
+ * entry point will be the common one.
6
+ *
7
+ * - Server (express, cloudflare...)
8
+ * - npm run start
9
+ * - npm run preview
10
+ * - npm run build
11
+ *
12
+ */
1
13
  import { renderToStream, RenderToStreamOptions } from '@builder.io/qwik/server';
2
14
  import { manifest } from '@qwik-client-manifest';
3
15
  import Root from './root';
@@ -1,3 +1,10 @@
1
+ /**
2
+ * WHAT IS THIS FILE?
3
+ *
4
+ * Globally applied styles. No matter which components are in the page or matching route,
5
+ * the styles in here will be applied to the Document, without any sort of CSS scoping.
6
+ *
7
+ */
1
8
  html {
2
9
  line-height: 1.5;
3
10
  -webkit-text-size-adjust: 100%;
@@ -0,0 +1,18 @@
1
+ /*
2
+ * WHAT IS THIS FILE?
3
+ *
4
+ * The service-worker.ts file is used to have state of the art prefetching.
5
+ * https://qwik.builder.io/docs/advanced/prefetching/#prefetching
6
+ *
7
+ * Qwik uses service worker to speed up your site and reduce latency, ie, not used in the tradicional way of offiline.
8
+ * You can also use this file to add more functionality that runs in the service worker.
9
+ */
10
+ import { setupServiceWorker } from '@builder.io/qwik-city/service-worker';
11
+
12
+ setupServiceWorker();
13
+
14
+ addEventListener('install', () => self.skipWaiting());
15
+
16
+ addEventListener('activate', () => self.clients.claim());
17
+
18
+ declare const self: ServiceWorkerGlobalScope;
@@ -1,8 +1,10 @@
1
1
  import { defineConfig } from 'vite';
2
2
  import { qwikVite } from '@builder.io/qwik/optimizer';
3
+ import { qwikCity } from '@builder.io/qwik-city/vite';
4
+ import tsconfigPaths from 'vite-tsconfig-paths';
3
5
 
4
6
  export default defineConfig(() => {
5
7
  return {
6
- plugins: [qwikVite()],
8
+ plugins: [qwikCity(), qwikVite(), tsconfigPaths()],
7
9
  };
8
10
  });
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "qwik-basic-starter",
3
+ "description": "Recommended for your first Qwik app",
4
+ "type": "module",
5
+ "__qwik__": {
6
+ "priority": 1,
7
+ "qwikCity": true
8
+ }
9
+ }
@@ -0,0 +1,37 @@
1
+ header {
2
+ background: var(--qwik-purple);
3
+ }
4
+ header {
5
+ display: flex;
6
+ background: white;
7
+ border-bottom: 10px solid var(--qwik-dark-purple);
8
+ }
9
+
10
+ header .logo a {
11
+ display: inline-block;
12
+ padding: 10px 10px 7px 20px;
13
+ }
14
+
15
+ header ul {
16
+ margin: 0;
17
+ padding: 3px 10px 0 0;
18
+ list-style: none;
19
+ flex: 1;
20
+ text-align: right;
21
+ }
22
+
23
+ header li {
24
+ display: inline-block;
25
+ margin: 0;
26
+ padding: 0;
27
+ }
28
+
29
+ header li a {
30
+ display: inline-block;
31
+ padding: 15px 10px;
32
+ text-decoration: none;
33
+ }
34
+
35
+ header li a:hover {
36
+ text-decoration: underline;
37
+ }
@@ -0,0 +1,34 @@
1
+ import { component$, useStylesScoped$ } from '@builder.io/qwik';
2
+ import { QwikLogo } from '../icons/qwik';
3
+ import styles from './header.css?inline';
4
+
5
+ export default component$(() => {
6
+ useStylesScoped$(styles);
7
+
8
+ return (
9
+ <header>
10
+ <div class="logo">
11
+ <a href="https://qwik.builder.io/" target="_blank">
12
+ <QwikLogo />
13
+ </a>
14
+ </div>
15
+ <ul>
16
+ <li>
17
+ <a href="https://qwik.builder.io/docs/components/overview/" target="_blank">
18
+ Docs
19
+ </a>
20
+ </li>
21
+ <li>
22
+ <a href="https://qwik.builder.io/examples/introduction/hello-world/" target="_blank">
23
+ Examples
24
+ </a>
25
+ </li>
26
+ <li>
27
+ <a href="https://qwik.builder.io/tutorial/welcome/overview/" target="_blank">
28
+ Tutorials
29
+ </a>
30
+ </li>
31
+ </ul>
32
+ </header>
33
+ );
34
+ });
@@ -0,0 +1,32 @@
1
+ export const QwikLogo = () => (
2
+ <svg width="100" height="35" viewBox="0 0 167 53" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <path
4
+ d="M81.9545 46.5859H75.5513V35.4045C73.4363 36.8579 71.0496 37.5749 68.4884 37.5749C65.0151 37.5749 62.4344 36.6253 60.8239 34.6487C59.2134 32.6915 58.3984 29.2034 58.3984 24.2231C58.3984 19.1266 59.3492 15.5997 61.2702 13.5456C63.23 11.4721 66.3734 10.4644 70.7004 10.4644C74.7946 10.4644 78.5201 11.0264 81.9545 12.131V46.5859ZM75.5513 16.278C74.096 15.8323 72.4661 15.6191 70.7004 15.6191C68.5272 15.6191 66.9749 16.1811 66.1017 17.3244C65.2479 18.4871 64.7823 20.6962 64.7823 23.9712C64.7823 27.0524 65.1897 29.1065 66.0435 30.2304C66.8973 31.335 68.3719 31.897 70.5452 31.897C73.3781 31.897 75.5513 30.7343 75.5513 29.2809V16.278Z"
5
+ fill="black"
6
+ />
7
+ <path
8
+ d="M91.133 11.1426C93.4033 17.4406 95.3242 23.7386 96.993 30.0948C99.205 23.5836 101.087 17.2856 102.542 11.1426H108.15C110.265 17.4406 112.031 23.7386 113.447 30.0948C115.97 23.196 117.949 16.8787 119.404 11.1426H125.71C123.033 20.173 120.064 28.777 116.785 36.8966H109.256C108.402 32.3039 107.044 26.7617 105.22 20.1536C104.056 25.2889 102.445 30.8893 100.33 36.8966H92.8018C90.2793 27.5174 87.5434 18.9522 84.6328 11.1426H91.133Z"
9
+ fill="black"
10
+ />
11
+ <path
12
+ d="M132.832 7.55758C129.999 7.55758 129.203 6.85996 129.203 3.97257C129.203 1.39523 130.018 0.794495 132.832 0.794495C135.665 0.794495 136.46 1.39523 136.46 3.97257C136.46 6.85996 135.665 7.55758 132.832 7.55758ZM129.649 11.1426H136.053V36.8966H129.649V11.1426Z"
13
+ fill="black"
14
+ />
15
+ <path
16
+ d="M166.303 11.1426C161.763 17.5956 158.581 21.5295 156.815 22.9441C158.27 23.8937 162.17 28.8933 167.002 36.916H159.628C153.613 27.7887 150.742 23.8549 149.325 23.2542V36.916H142.922V0H149.325V23.2348C150.78 22.169 153.963 18.1382 158.872 11.1426H166.303Z"
17
+ fill="black"
18
+ />
19
+ <path
20
+ d="M40.973 52.5351L32.0861 43.6985L31.9503 43.7179V43.621L13.0511 24.9595L17.708 20.4637L14.9721 4.76715L1.99103 20.8513C-0.220992 23.0798 -0.628467 26.7036 0.962635 29.3778L9.07337 42.8265C10.3152 44.9 12.566 46.1402 14.9915 46.1208L19.0081 46.082L40.973 52.5351Z"
21
+ fill="#18B6F6"
22
+ />
23
+ <path
24
+ d="M45.8232 20.5411L44.038 17.2468L43.1066 15.5609L42.738 14.902L42.6992 14.9408L37.8094 6.47238C36.587 4.34075 34.2974 3.02301 31.8137 3.04239L27.5255 3.15865L14.7384 3.19741C12.313 3.21679 10.101 4.49577 8.87853 6.56927L1.09766 21.9945L15.0101 4.72831L33.2496 24.7656L30.0091 28.0406L31.9495 43.7178L31.9689 43.679V43.7178H31.9301L31.9689 43.7565L33.4824 45.2293L40.8364 52.4187C41.1469 52.7094 41.6514 52.3606 41.4379 51.9924L36.8975 43.0589L44.8142 28.4282L45.0664 28.1375C45.1634 28.0212 45.2604 27.905 45.3381 27.7887C46.8904 25.6764 47.1038 22.8472 45.8232 20.5411Z"
25
+ fill="#AC7EF4"
26
+ />
27
+ <path
28
+ d="M33.3076 24.6882L15.0099 4.74774L17.61 20.3668L12.9531 24.882L31.9105 43.6985L30.203 28.0794L33.3076 24.6882Z"
29
+ fill="white"
30
+ />
31
+ </svg>
32
+ );
@@ -0,0 +1,43 @@
1
+ import { component$ } from '@builder.io/qwik';
2
+ import { useDocumentHead, useLocation } from '@builder.io/qwik-city';
3
+
4
+ /**
5
+ * The RouterHead component is placed inside of the document `<head>` element.
6
+ */
7
+ export const RouterHead = component$(() => {
8
+ const head = useDocumentHead();
9
+ const loc = useLocation();
10
+
11
+ return (
12
+ <>
13
+ <title>{head.title}</title>
14
+
15
+ <link rel="canonical" href={loc.href} />
16
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
17
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
18
+
19
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
20
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
21
+ <link
22
+ href="https://fonts.googleapis.com/css2?family=Poppins&amp;display=swap"
23
+ rel="stylesheet"
24
+ />
25
+
26
+ <meta property="og:site_name" content="Qwik" />
27
+ <meta name="twitter:site" content="@QwikDev" />
28
+ <meta name="twitter:title" content="Qwik" />
29
+
30
+ {head.meta.map((m) => (
31
+ <meta {...m} />
32
+ ))}
33
+
34
+ {head.links.map((l) => (
35
+ <link {...l} />
36
+ ))}
37
+
38
+ {head.styles.map((s) => (
39
+ <style {...s.props} dangerouslySetInnerHTML={s.style} />
40
+ ))}
41
+ </>
42
+ );
43
+ });
@@ -0,0 +1,125 @@
1
+ /**
2
+ * WHAT IS THIS FILE?
3
+ *
4
+ * Globally applied styles. No matter which components are in the page or matching route,
5
+ * the styles in here will be applied to the Document, without any sort of CSS scoping.
6
+ *
7
+ */
8
+
9
+ :root {
10
+ --qwik-dark-blue: #006ce9;
11
+ --qwik-light-blue: #18b6f6;
12
+ --qwik-light-purple: #ac7ff4;
13
+ --qwik-dark-purple: #713fc2;
14
+ }
15
+
16
+ body {
17
+ background-color: #fafafa;
18
+ font-family: 'Poppins', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
19
+ padding: 20px 20px 40px 20px;
20
+ }
21
+
22
+ main {
23
+ max-width: 760px;
24
+ margin: 0 auto;
25
+ background-color: white;
26
+ border-radius: 5px;
27
+ box-shadow: 0px 0px 130px -50px var(--qwik-light-purple);
28
+ overflow: hidden;
29
+ }
30
+
31
+ h1,
32
+ h2 {
33
+ margin: 0 0 5px 0;
34
+ }
35
+
36
+ .lightning {
37
+ filter: hue-rotate(180deg);
38
+ }
39
+
40
+ section {
41
+ padding: 20px;
42
+ border-bottom: 10px solid var(--qwik-dark-blue);
43
+ }
44
+
45
+ ul {
46
+ list-style-type: square;
47
+ margin: 5px 0 30px 0;
48
+ padding-left: 25px;
49
+ }
50
+
51
+ li {
52
+ padding: 5px 0;
53
+ }
54
+
55
+ li::marker {
56
+ color: var(--qwik-light-blue);
57
+ }
58
+
59
+ a,
60
+ a:visited {
61
+ color: var(--qwik-dark-blue);
62
+ }
63
+
64
+ a:hover {
65
+ text-decoration: none;
66
+ }
67
+
68
+ table.commands {
69
+ margin: 0 0 30px 0;
70
+ }
71
+
72
+ .commands td {
73
+ padding: 5px;
74
+ }
75
+
76
+ .commands td:first-child {
77
+ white-space: nowrap;
78
+ padding-right: 20px;
79
+ }
80
+
81
+ code {
82
+ font-family: Menlo, Monaco, Courier New, monospace;
83
+ font-size: 0.9em;
84
+ background-color: rgb(224, 224, 224);
85
+ padding: 2px 4px;
86
+ border-radius: 3px;
87
+ border-bottom: 2px solid #bfbfbf;
88
+ }
89
+
90
+ footer {
91
+ padding: 15px;
92
+ text-align: center;
93
+ font-size: 0.8em;
94
+ }
95
+
96
+ footer a {
97
+ text-decoration: none;
98
+ }
99
+
100
+ footer a:hover {
101
+ text-decoration: underline;
102
+ }
103
+
104
+ a.mindblow {
105
+ margin: 0 auto;
106
+ display: block;
107
+ background: var(--qwik-light-purple);
108
+ padding: 10px 20px;
109
+ border-radius: 10px;
110
+ border: 0;
111
+ color: white;
112
+ text-decoration: none;
113
+ font-size: 20px;
114
+ width: fit-content;
115
+ border-bottom: 4px solid black;
116
+ cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>🤯</text></svg>")
117
+ 16 0,
118
+ auto; /*!emojicursor.app*/
119
+ }
120
+
121
+ a.mindblow:hover {
122
+ border-bottom-width: 0px;
123
+ margin-bottom: 4px;
124
+ transform: translateY(4px);
125
+ }
@@ -0,0 +1,26 @@
1
+ import { component$ } from '@builder.io/qwik';
2
+ import { QwikCity, RouterOutlet, ServiceWorkerRegister } from '@builder.io/qwik-city';
3
+ import { RouterHead } from './components/router-head/router-head';
4
+
5
+ import './global.css';
6
+
7
+ export default component$(() => {
8
+ /**
9
+ * The root of a QwikCity site always start with the <QwikCity> component,
10
+ * immediately followed by the document's <head> and <body>.
11
+ *
12
+ * Dont remove the `<head>` and `<body>` elements.
13
+ */
14
+ return (
15
+ <QwikCity>
16
+ <head>
17
+ <meta charSet="utf-8" />
18
+ <RouterHead />
19
+ </head>
20
+ <body lang="en">
21
+ <RouterOutlet />
22
+ <ServiceWorkerRegister />
23
+ </body>
24
+ </QwikCity>
25
+ );
26
+ });
@@ -0,0 +1,71 @@
1
+ .host {
2
+ display: grid;
3
+
4
+ align-items: center;
5
+ justify-content: center;
6
+ justify-items: center;
7
+ --rotation: 135deg;
8
+ --rotation: 225deg;
9
+ --size-step: 10px;
10
+ --odd-color-step: 5;
11
+ --even-color-step: 5;
12
+ --center: 12;
13
+
14
+ width: 100%;
15
+ height: 500px;
16
+
17
+ contain: strict;
18
+ }
19
+
20
+ input {
21
+ width: 100%;
22
+ }
23
+
24
+ .square {
25
+ --size: calc(40px + var(--index) * var(--size-step));
26
+
27
+ display: block;
28
+ width: var(--size);
29
+ height: var(--size);
30
+ transform: rotateZ(calc(var(--rotation) * var(--state) * (var(--center) - var(--index))));
31
+ transition-property: transform, border-color;
32
+ transition-duration: 5s;
33
+ transition-timing-function: ease-in-out;
34
+ grid-area: 1 / 1;
35
+ background: white;
36
+ border-width: 2px;
37
+ border-style: solid;
38
+ border-color: black;
39
+ box-sizing: border-box;
40
+ will-change: transform, border-color;
41
+
42
+ contain: strict;
43
+ }
44
+
45
+ .square.odd {
46
+ --luminance: calc(1 - calc(calc(var(--index) * var(--odd-color-step)) / 256));
47
+ background: rgb(
48
+ calc(172 * var(--luminance)),
49
+ calc(127 * var(--luminance)),
50
+ calc(244 * var(--luminance))
51
+ );
52
+ }
53
+
54
+ .pride .square:nth-child(12n + 1) {
55
+ background: #e70000;
56
+ }
57
+ .pride .square:nth-child(12n + 3) {
58
+ background: #ff8c00;
59
+ }
60
+ .pride .square:nth-child(12n + 5) {
61
+ background: #ffef00;
62
+ }
63
+ .pride .square:nth-child(12n + 7) {
64
+ background: #00811f;
65
+ }
66
+ .pride .square:nth-child(12n + 9) {
67
+ background: #0044ff;
68
+ }
69
+ .pride .square:nth-child(12n + 11) {
70
+ background: #760089;
71
+ }
@@ -0,0 +1,54 @@
1
+ import { component$, useClientEffect$, useStore, useStylesScoped$ } from '@builder.io/qwik';
2
+ import { 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
+ useClientEffect$(({ 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
+ <>
24
+ <input
25
+ type="range"
26
+ value={state.number}
27
+ max={50}
28
+ onInput$={(ev) => {
29
+ state.number = (ev.target as HTMLInputElement).valueAsNumber;
30
+ }}
31
+ />
32
+ <div
33
+ style={{
34
+ '--state': `${state.count * 0.1}`,
35
+ }}
36
+ class={{
37
+ host: true,
38
+ pride: loc.query['pride'] === 'true',
39
+ }}
40
+ >
41
+ {Array.from({ length: state.number }, (_, i) => (
42
+ <div
43
+ key={i}
44
+ class={{
45
+ square: true,
46
+ odd: i % 2 === 0,
47
+ }}
48
+ style={{ '--index': `${i + 1}` }}
49
+ />
50
+ )).reverse()}
51
+ </div>
52
+ </>
53
+ );
54
+ });