diff --git a/packages/docs b/packages/docs deleted file mode 160000 index de99749..0000000 --- a/packages/docs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit de99749cd5443a76b8603743db918f9c8c908c3c diff --git a/packages/docs/.eslintignore b/packages/docs/.eslintignore new file mode 100644 index 0000000..73d2683 --- /dev/null +++ b/packages/docs/.eslintignore @@ -0,0 +1,33 @@ +**/*.log +**/.DS_Store +*. +.vscode/settings.json +.history +.yarn +bazel-* +bazel-bin +bazel-out +bazel-qwik +bazel-testlogs +dist +dist-dev +lib +lib-types +etc +external +node_modules +temp +tsc-out +tsdoc-metadata.json +target +output +rollup.config.js +build +.cache +.vscode +.rollup.cache +dist +tsconfig.tsbuildinfo +vite.config.ts +*.spec.tsx +*.spec.ts diff --git a/packages/docs/.eslintrc.cjs b/packages/docs/.eslintrc.cjs new file mode 100644 index 0000000..32abdc8 --- /dev/null +++ b/packages/docs/.eslintrc.cjs @@ -0,0 +1,40 @@ +module.exports = { + root: true, + env: { + browser: true, + es2021: true, + node: true, + }, + extends: [ + "eslint:recommended", + "plugin:@typescript-eslint/recommended", + "plugin:qwik/recommended", + ], + parser: "@typescript-eslint/parser", + parserOptions: { + tsconfigRootDir: __dirname, + project: ["./tsconfig.json"], + ecmaVersion: 2021, + sourceType: "module", + ecmaFeatures: { + jsx: true, + }, + }, + plugins: ["@typescript-eslint"], + rules: { + "@typescript-eslint/no-explicit-any": "off", + "@typescript-eslint/explicit-module-boundary-types": "off", + "@typescript-eslint/no-inferrable-types": "off", + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/no-empty-interface": "off", + "@typescript-eslint/no-namespace": "off", + "@typescript-eslint/no-empty-function": "off", + "@typescript-eslint/no-this-alias": "off", + "@typescript-eslint/ban-types": "off", + "@typescript-eslint/ban-ts-comment": "off", + "prefer-spread": "off", + "no-case-declarations": "off", + "no-console": "off", + "@typescript-eslint/no-unused-vars": ["error"], + }, +}; diff --git a/packages/docs/.gitignore b/packages/docs/.gitignore new file mode 100644 index 0000000..a88d7a8 --- /dev/null +++ b/packages/docs/.gitignore @@ -0,0 +1,43 @@ +# Build +/dist +/lib +/lib-types +/server + +# Development +node_modules/ + +# Cache +.cache +.mf +.vscode +.rollup.cache +tsconfig.tsbuildinfo + +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +# Editor +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? + +# Yarn +.yarn/* +!.yarn/releases + +package-lock.json + +# Cloudflare +functions/**/*.js diff --git a/packages/docs/.node-version b/packages/docs/.node-version new file mode 100644 index 0000000..b6a7d89 --- /dev/null +++ b/packages/docs/.node-version @@ -0,0 +1 @@ +16 diff --git a/packages/docs/.prettierignore b/packages/docs/.prettierignore new file mode 100644 index 0000000..1592248 --- /dev/null +++ b/packages/docs/.prettierignore @@ -0,0 +1,6 @@ +# Files Prettier should not format +**/*.log +**/.DS_Store +*. +dist +node_modules diff --git a/packages/docs/.stackblitzrc b/packages/docs/.stackblitzrc new file mode 100644 index 0000000..43798ec --- /dev/null +++ b/packages/docs/.stackblitzrc @@ -0,0 +1,6 @@ +{ + "startCommand": "npm start", + "env": { + "ENABLE_CJS_IMPORTS": true + } +} \ No newline at end of file diff --git a/packages/docs/LICENSE.md b/packages/docs/LICENSE.md new file mode 100644 index 0000000..81566ba --- /dev/null +++ b/packages/docs/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 onWidget + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/packages/docs/README.md b/packages/docs/README.md new file mode 100644 index 0000000..b5f99a5 --- /dev/null +++ b/packages/docs/README.md @@ -0,0 +1,240 @@ +# πŸ’  Qwind + +**Qwind** is a free and open-source template to make your website using **[Qwik](https://qwik.builder.io/) + [Tailwind CSS](https://tailwindcss.com/)**. Ready to start a new project and designed taking into account best practices. + +## Features + +- βœ… Integration with **Tailwind CSS** supporting **Dark mode**. +- βœ… **Production-ready** scores in [Lighthouse](https://web.dev/measure/) and [PageSpeed Insights](https://pagespeed.web.dev/) reports. +- βœ… **Image optimization** and **Font optimization**. + +
+ +Qwind Theme Screenshot + +[![onWidget](https://custom-icon-badges.demolab.com/badge/made%20by%20-onWidget-556bf2?style=flat-square&logo=onwidget&logoColor=white&labelColor=101827)](https://onwidget.com) +[![License](https://img.shields.io/github/license/onwidget/qwind?style=flat-square&color=dddddd&labelColor=000000)](https://github.com/onwidget/qwind/blob/main/LICENSE.md) +[![Maintained](https://img.shields.io/badge/maintained%3F-yes-brightgreen.svg?style=flat-square)](https://github.com/onwidget) +[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat-square)](https://github.com/onwidget/qwind#contributing) +[![Known Vulnerabilities](https://snyk.io/test/github/onwidget/qwind/badge.svg?style=flat-square)](https://snyk.io/test/github/onwidget/qwind) + +
+ +
+Table of Contents + +- [Demo](#demo) +- [Getting started](#getting-started) + - [Project structure](#project-structure) + - [Commands](#commands) + - [Configuration](#configuration) + - [Deploy](#deploy) +- [Roadmap](#roadmap) +- [Contributing](#contributing) +- [Acknowledgements](#acknowledgements) +- [License](#license) + +
+ +
+ +## Demo + +πŸ“Œ [https://qwind.pages.dev/](https://qwind.pages.dev/) + +
+ +## Getting started + +This project is using Qwik with [QwikCity](https://qwik.builder.io/qwikcity/overview/). QwikCity is just a extra set of tools on top of Qwik to make it easier to build a full site, including directory-based routing, layouts, and more. + +### Project structure + +Inside **Qwind** template, you'll see the following folders and files: + +``` +/ +β”œβ”€β”€ adaptors/ +| └── static/ +| └── vite.config.ts +β”œβ”€β”€ public/ +β”‚ β”œβ”€β”€ favicon.svg +β”‚ β”œβ”€β”€ manifest.json +β”‚ └── robots.txt +β”œβ”€β”€ src/ +β”‚ β”œβ”€β”€ assets/ +β”‚ β”‚ β”œβ”€β”€ images/ +| | └── styles/ +| | └── global.css +β”‚ β”œβ”€β”€ components/ +β”‚ β”‚ β”œβ”€β”€ atoms/ +β”‚ β”‚ β”œβ”€β”€ core/ +β”‚ β”‚ β”œβ”€β”€ icons/ +| | └── widgets/ +| | β”œβ”€β”€ Header.astro +| | β”œβ”€β”€ Footer.astro +| | └── ... +β”‚ β”œβ”€β”€ routes/ +β”‚ | β”œβ”€β”€ blog/ +β”‚ | β”œβ”€β”€ index.astro +| | β”œβ”€β”€ layout.tsx +| | β””-- service-worker.ts +β”‚ β”œβ”€β”€ config.mjs +β”‚ β”œβ”€β”€ entry.dev.tsx +β”‚ β”œβ”€β”€ entry.preview.tsx +β”‚ β”œβ”€β”€ entry.ssr.tsx +β”‚ └── root.tsx +β”œβ”€β”€ package.json +└── ... +``` + +- `src/routes`: Provides the directory based routing, which can include a hierarchy of `layout.tsx` layout files, and an `index.tsx` file as the page. Additionally, `index.ts` files are endpoints. Please see the [routing docs](https://qwik.builder.io/qwikcity/routing/overview/) for more info. + +- `src/components`: Recommended directory for components. + +- `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. + +[![Edit Qwind on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://githubbox.com/onwidget/qwind/tree/main) + +> **Seasoned qwik expert?** Delete this file. Update `config.mjs` and contents. Have fun! + +
+ +### Commands + +All commands are run from the root of the project, from a terminal: + +| Command | Action | +| :-------------------- | :------------------------------------------------- | +| `npm install` | Installs dependencies | +| `npm run dev` | Starts local dev server at `127.0.0.1:5173/` | +| `npm run build` | Build your production site to `./dist/` | +| `npm run preview` | Preview your build locally, before deploying | +| `npm run fmt` | Format codes with Prettier | +| `npm run lint` | Run Eslint | +| `npm run qwik ...` | Run CLI commands like `qwik add`, `qwik build` | + +
+ +### Configuration + +Basic configuration file: `./src/config.mjs` + +```javascript +export const SITE = { + name: 'Example', + + origin: 'https://example.com', + basePathname: '/', // Change this if you need to deploy to Github Pages, for example + trailingSlash: true, // Generate permalinks with or without "/" at the end +}; +``` + +
+ +### Deploy + +#### Deploy to production (manual) + +You can create an optimized production build with: + +```shell +npm run build +``` + +Now, your website is ready to be deployed. All generated files are located at +`dist` folder, which you can deploy the folder to any hosting service you +prefer. + +#### Deploy to Netlify + +Clone this repository on own GitHub account and deploy to Netlify: + +[![Netlify Deploy button](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/onwidget/qwind) + +#### Deploy to Vercel + +Clone this repository on own GitHub account and deploy to Vercel: + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fonwidget%2Fqwind) + +
+ +## Roadmap + +### Base +- [ ] Create utilities to generate permalinks tailored to the domain and base pathname. +- [ ] Simplify the way to optimize images. +- [ ] Create component to make SEO simpler and more intuitive. +- [ ] Create configurable blog with categories, tags and authors using MDX. +- [ ] Add more frequently used pages (Portfolio, Services, Contact, Docs ...). +- [ ] Find or create a library to have more icon sources available. +- [ ] Refactor some code that doesn't follow Qwik conventions yet. + +### Advanced + +- [ ] Achieve perfect 100% Google Page Speed score. +- [ ] Insert complex javascript example widget on home page to demonstrate Qwik features. +- [ ] Create small illustrative admin backend. + +
+ +## Contributing + +If you have any idea, suggestions or find any bugs, feel free to open a discussion, an issue or create a pull request. +That would be very useful for all of us and we would be happy to listen and take action. + +## Acknowledgements + +Initially created by [onWidget](https://onwidget.com) and maintained by a community of [contributors](https://github.com/onwidget/qwind/graphs/contributors). + +## License + +**Qwind** is licensed under the MIT license β€” see the [LICENSE](https://github.com/onwidget/qwind/blob/main/LICENSE.md) file for details. + +## Cloudflare Pages + +Cloudflare's [wrangler](https://github.com/cloudflare/wrangler) CLI can be used to preview a production build locally. To start a local server, run: + +``` +npm run serve +``` + +Then visit [http://localhost:8787/](http://localhost:8787/) + +### Deployments + +[Cloudflare Pages](https://pages.cloudflare.com/) are deployable through their [Git provider integrations](https://developers.cloudflare.com/pages/platform/git-integration/). + +If you don't already have an account, then [create a Cloudflare account here](https://dash.cloudflare.com/sign-up/pages). Next go to your dashboard and follow the [Cloudflare Pages deployment guide](https://developers.cloudflare.com/pages/framework-guides/deploy-anything/). + +Within the projects "Settings" for "Build and deployments", the "Build command" should be `npm run build`, and the "Build output directory" should be set to `dist`. + +### Function Invocation Routes + +Cloudflare Page's [function-invocation-routes config](https://developers.cloudflare.com/pages/platform/functions/function-invocation-routes/) can be used to include, or exclude, certain paths to be used by the worker functions. Having a `_routes.json` file gives developers more granular control over when your Function is invoked. +This is useful to determine if a page response should be Server-Side Rendered (SSR) or if the response should use a static-site generated (SSG) `index.html` file. + +By default, the Cloudflare pages adaptor _does not_ include a `public/_routes.json` config, but rather it is auto-generated from the build by the Cloudflare adaptor. An example of an auto-generate `dist/_routes.json` would be: + +``` +{ + "include": [ + "/*" + ], + "exclude": [ + "/_headers", + "/_redirects", + "/build/*", + "/favicon.ico", + "/manifest.json", + "/service-worker.js", + "/about" + ], + "version": 1 +} +``` + +In the above example, it's saying _all_ pages should be SSR'd. However, the root static files such as `/favicon.ico` and any static assets in `/build/*` should be excluded from the Functions, and instead treated as a static file. + +In most cases the generated `dist/_routes.json` file is ideal. However, if you need more granular control over each path, you can instead provide you're own `public/_routes.json` file. When the project provides its own `public/_routes.json` file, then the Cloudflare adaptor will not auto-generate the routes config and instead use the committed one within the `public` directory. diff --git a/packages/docs/adaptors/cloudflare-pages/vite.config.ts b/packages/docs/adaptors/cloudflare-pages/vite.config.ts new file mode 100644 index 0000000..dc2bfde --- /dev/null +++ b/packages/docs/adaptors/cloudflare-pages/vite.config.ts @@ -0,0 +1,19 @@ +import { cloudflarePagesAdaptor } from '@builder.io/qwik-city/adaptors/cloudflare-pages/vite' +import { extendConfig } from '@builder.io/qwik-city/vite' +import baseConfig from '../../vite.config' + +export default extendConfig(baseConfig, () => { + return { + build: { + ssr: true, + rollupOptions: { + input: ['src/entry.cloudflare-pages.tsx', '@qwik-city-plan'], + }, + }, + plugins: [ + cloudflarePagesAdaptor({ + staticGenerate: true, + }), + ], + } +}) diff --git a/packages/docs/adaptors/static/vite.config.ts b/packages/docs/adaptors/static/vite.config.ts new file mode 100644 index 0000000..eeefc30 --- /dev/null +++ b/packages/docs/adaptors/static/vite.config.ts @@ -0,0 +1,21 @@ +import { staticAdaptor } from '@builder.io/qwik-city/adaptors/static/vite' +import { extendConfig } from '@builder.io/qwik-city/vite' +import baseConfig from '../../vite.config' + +import { SITE } from '../../src/config.mjs' + +export default extendConfig(baseConfig, () => { + return { + build: { + ssr: true, + rollupOptions: { + input: ['@qwik-city-plan'], + }, + }, + plugins: [ + staticAdaptor({ + origin: SITE.origin, + }), + ], + } +}) diff --git a/packages/docs/functions/[[path]].ts b/packages/docs/functions/[[path]].ts new file mode 100644 index 0000000..ce9a129 --- /dev/null +++ b/packages/docs/functions/[[path]].ts @@ -0,0 +1,5 @@ +// @ts-ignore + +// Cloudflare Pages Functions +// https://developers.cloudflare.com/pages/platform/functions/ +export { onRequest } from '../server/entry.cloudflare-pages' diff --git a/packages/docs/netlify.toml b/packages/docs/netlify.toml new file mode 100644 index 0000000..9324f51 --- /dev/null +++ b/packages/docs/netlify.toml @@ -0,0 +1,7 @@ +[build] + publish = "dist" + command = "npm run build" +[[headers]] + for = "/build/*" + [headers.values] + Cache-Control = "public, max-age=31536000, immutable" \ No newline at end of file diff --git a/packages/docs/package.json b/packages/docs/package.json new file mode 100644 index 0000000..cdb8f7e --- /dev/null +++ b/packages/docs/package.json @@ -0,0 +1,51 @@ +{ + "name": "qwind", + "description": "A template to make your website using Qwik + Tailwind CSS.", + "version": "0.1.1", + "private": true, + "scripts": { + "build": "qwik build && npm run subfont", + "build.client": "vite build", + "build.preview": "vite build --ssr src/entry.preview.tsx", + "build.server": "vite build -c adaptors/cloudflare-pages/vite.config.ts", + "build.types": "tsc --incremental --noEmit", + "deploy": "wrangler pages dev ./dist", + "dev": "vite --mode ssr", + "dev.debug": "node --inspect-brk ./node_modules/vite/bin/vite.js --mode ssr --force", + "fmt": "prettier --write .", + "fmt.check": "prettier --check .", + "lint": "eslint \"src/**/*.ts*\"", + "preview": "qwik build preview && vite preview --open", + "start": "vite --open --mode ssr", + "subfont": "subfont -i --inline-css --no-fallbacks --silent --root dist", + "qwik": "qwik" + }, + "devDependencies": { + "@builder.io/qwik": "0.15.0", + "@builder.io/qwik-city": "0.0.128", + "@fontsource/inter": "^4.5.14", + "@iconify-json/tabler": "^1.1.49", + "@types/eslint": "8.4.10", + "@types/node": "latest", + "@typescript-eslint/eslint-plugin": "5.45.0", + "@typescript-eslint/parser": "5.45.0", + "autoprefixer": "10.4.13", + "eslint": "8.29.0", + "eslint-plugin-qwik": "0.15.0", + "imagetools-core": "^3.2.3", + "node-fetch": "3.3.0", + "postcss": "^8.4.19", + "prettier": "2.8.0", + "rehype-autolink-headings": "^6.1.1", + "subfont": "^6.12.2", + "tailwindcss": "^3.1.8", + "typescript": "4.8.4", + "vite": "3.2.4", + "vite-imagetools": "^4.0.11", + "vite-tsconfig-paths": "3.6.0", + "wrangler": "latest" + }, + "engines": { + "node": ">=15.0.0" + } +} diff --git a/packages/docs/postcss.config.js b/packages/docs/postcss.config.js new file mode 100644 index 0000000..fef1b22 --- /dev/null +++ b/packages/docs/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/packages/docs/public/_headers b/packages/docs/public/_headers new file mode 100644 index 0000000..0690cb4 --- /dev/null +++ b/packages/docs/public/_headers @@ -0,0 +1,4 @@ +# https://developers.cloudflare.com/pages/platform/headers/ + +/build/* + Cache-Control: public, max-age=31536000, s-maxage=31536000, immutable diff --git a/packages/docs/public/_redirects b/packages/docs/public/_redirects new file mode 100644 index 0000000..e274610 --- /dev/null +++ b/packages/docs/public/_redirects @@ -0,0 +1 @@ +# https://developers.cloudflare.com/pages/platform/redirects/ diff --git a/packages/docs/public/favicon.svg b/packages/docs/public/favicon.svg new file mode 100644 index 0000000..0ded7c1 --- /dev/null +++ b/packages/docs/public/favicon.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/docs/public/manifest.json b/packages/docs/public/manifest.json new file mode 100644 index 0000000..44825fa --- /dev/null +++ b/packages/docs/public/manifest.json @@ -0,0 +1,9 @@ +{ + "$schema": "https://json.schemastore.org/web-manifest-combined.json", + "name": "qwik-project-name", + "short_name": "Welcome to Qwik", + "start_url": ".", + "display": "standalone", + "background_color": "#fff", + "description": "A Qwik project app." +} diff --git a/packages/docs/public/robots.txt b/packages/docs/public/robots.txt new file mode 100644 index 0000000..e69de29 diff --git a/packages/docs/sandbox.config.json b/packages/docs/sandbox.config.json new file mode 100644 index 0000000..a8b5f3e --- /dev/null +++ b/packages/docs/sandbox.config.json @@ -0,0 +1,11 @@ +{ + "infiniteLoopProtection": true, + "hardReloadOnChange": false, + "view": "browser", + "template": "node", + "container": { + "port": 5173, + "startScript": "start", + "node": "16" + } +} diff --git a/packages/docs/screenshot.jpg b/packages/docs/screenshot.jpg new file mode 100644 index 0000000..66b228f Binary files /dev/null and b/packages/docs/screenshot.jpg differ diff --git a/packages/docs/src/assets/images/hero.jpg b/packages/docs/src/assets/images/hero.jpg new file mode 100644 index 0000000..9f88a5e Binary files /dev/null and b/packages/docs/src/assets/images/hero.jpg differ diff --git a/packages/docs/src/assets/images/logo.png b/packages/docs/src/assets/images/logo.png new file mode 100644 index 0000000..6137145 Binary files /dev/null and b/packages/docs/src/assets/images/logo.png differ diff --git a/packages/docs/src/assets/styles/global.css b/packages/docs/src/assets/styles/global.css new file mode 100644 index 0000000..da1e370 --- /dev/null +++ b/packages/docs/src/assets/styles/global.css @@ -0,0 +1,40 @@ +/** + * WHAT IS THIS FILE? + * + * Globally applied styles. No matter which components are in the page or matching route, + * the styles in here will be applied to the Document, without any sort of CSS scoping. + * + */ + +@tailwind base; +@tailwind components; +@tailwind utilities; + +@layer components { + .btn { + @apply inline-flex items-center justify-center rounded-md shadow-md border-gray-400 border bg-transparent font-medium text-center text-base text-gray-700 leading-snug transition py-3 px-6 md:px-8 ease-in duration-200 focus:ring-blue-500 focus:ring-offset-blue-200 focus:ring-2 focus:ring-offset-2 hover:bg-gray-100 hover:border-gray-600 dark:text-slate-300 dark:border-slate-500 dark:hover:bg-slate-800 dark:hover:border-slate-800; + } + + .btn-ghost { + @apply border-none shadow-none text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white; + } + + .btn-primary { + @apply font-semibold bg-primary-600 text-white border-primary-600 hover:bg-primary-800 hover:border-primary-800 hover:text-white dark:text-white dark:bg-primary-700 dark:border-primary-700 dark:hover:border-primary-900 dark:hover:bg-primary-900; + } + + [data-aw-toggle-menu] path { + @apply transition; + } + [data-aw-toggle-menu].expanded g > path:first-child { + @apply -rotate-45 translate-y-[15px] translate-x-[-3px]; + } + + [data-aw-toggle-menu].expanded g > path:last-child { + @apply rotate-45 translate-y-[-8px] translate-x-[14px]; + } +} + +.dropdown:hover .dropdown-menu { + display: block; +} diff --git a/packages/docs/src/components/atoms/Logo.tsx b/packages/docs/src/components/atoms/Logo.tsx new file mode 100644 index 0000000..bd310f5 --- /dev/null +++ b/packages/docs/src/components/atoms/Logo.tsx @@ -0,0 +1,18 @@ +import { component$ } from '@builder.io/qwik' + +// @ts-ignore +import logoSrc from '~/assets/images/logo.png?width=64&height=64&png' + +export default component$(() => ( + + Qwind Logo + Qwind + +)) diff --git a/packages/docs/src/components/core/DarkThemeLauncher.tsx b/packages/docs/src/components/core/DarkThemeLauncher.tsx new file mode 100644 index 0000000..5bc512f --- /dev/null +++ b/packages/docs/src/components/core/DarkThemeLauncher.tsx @@ -0,0 +1,3 @@ +export const DarkThemeLauncher = () => ( + +) diff --git a/packages/docs/src/components/core/RouterHead.tsx b/packages/docs/src/components/core/RouterHead.tsx new file mode 100644 index 0000000..3a3e0b4 --- /dev/null +++ b/packages/docs/src/components/core/RouterHead.tsx @@ -0,0 +1,35 @@ +import { component$ } from '@builder.io/qwik' +import { useDocumentHead, useLocation } from '@builder.io/qwik-city' + +/** + * The RouterHead component is placed inside of the document `` element. + */ +export const RouterHead = component$(() => { + const head = useDocumentHead() + const loc = useLocation() + + return ( + <> + {head.title} + + + + + + {head.meta.map((m) => ( + + ))} + + {head.links.map((l) => ( + + ))} + + {head.styles.map((s) => ( +