Skip to content

Commit aec9bf4

Browse files
committed
docs: add new layout-docs.tsx as base styles for docs-related pages
1 parent fc8840d commit aec9bf4

37 files changed

+222
-20
lines changed

apps/website/src/components/header/header.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default component$(() => {
2727
const isDocsRoute = location.url.pathname.indexOf('/docs/') !== -1;
2828

2929
return (
30-
<header class="fixed w-full h-20 z-10 flex gap-4 p-4 items-center backdrop-blur">
30+
<header class="fixed w-full h-20 z-10 flex gap-8 p-4 items-center backdrop-blur">
3131
<button
3232
type="button"
3333
aria-label="Toggle navigation"
@@ -44,12 +44,16 @@ export default component$(() => {
4444
</div>
4545
</aside>
4646
)}
47-
<a href="/" class="lg:ml-8 mr-auto">
48-
<img src="/qwik-ui.png" class="w-32" />
47+
<a href="/" class="lg:ml-8">
48+
<img src="/qwik-ui.png" class="h-12 w-auto" />
4949
</a>
50-
<div data-tip="Qwik-UI Version" class="">
50+
<div data-tip="Qwik-UI Version" class="mr-auto">
5151
v.{version}
5252
</div>
53+
<nav class="hidden sm:flex gap-4">
54+
<a href="/docs">Docs</a>
55+
<a href="/contact">Contact</a>
56+
</nav>
5357
{isDocsRoute && <SelectTheme />}
5458
<button
5559
type="button"
@@ -62,6 +66,7 @@ export default component$(() => {
6266
target="_blank"
6367
href="https://github.com/qwikifiers/qwik-ui"
6468
aria-label="Qwik-UI GitHub repository"
69+
class="sm:mr-8"
6570
>
6671
<GitHubIcon />
6772
</a>
Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
export const GitHubIcon = () => (
22
<svg
3-
width="20"
4-
height="20"
53
xmlns="http://www.w3.org/2000/svg"
6-
viewBox="0 0 512 512"
7-
class="inline-block h-5 w-5 fill-current md:h-6 md:w-6"
4+
width="32"
5+
height="32"
6+
viewBox="0 0 15 15"
7+
class="p-1 sm:block"
88
>
9-
<path d="M256,32C132.3,32,32,134.9,32,261.7c0,101.5,64.2,187.5,153.2,217.9a17.56,17.56,0,0,0,3.8.4c8.3,0,11.5-6.1,11.5-11.4,0-5.5-.2-19.9-.3-39.1a102.4,102.4,0,0,1-22.6,2.7c-43.1,0-52.9-33.5-52.9-33.5-10.2-26.5-24.9-33.6-24.9-33.6-19.5-13.7-.1-14.1,1.4-14.1h.1c22.5,2,34.3,23.8,34.3,23.8,11.2,19.6,26.2,25.1,39.6,25.1a63,63,0,0,0,25.6-6c2-14.8,7.8-24.9,14.2-30.7-49.7-5.8-102-25.5-102-113.5,0-25.1,8.7-45.6,23-61.6-2.3-5.8-10-29.2,2.2-60.8a18.64,18.64,0,0,1,5-.5c8.1,0,26.4,3.1,56.6,24.1a208.21,208.21,0,0,1,112.2,0c30.2-21,48.5-24.1,56.6-24.1a18.64,18.64,0,0,1,5,.5c12.2,31.6,4.5,55,2.2,60.8,14.3,16.1,23,36.6,23,61.6,0,88.2-52.4,107.6-102.3,113.3,8,7.1,15.2,21.1,15.2,42.5,0,30.7-.3,55.5-.3,63,0,5.4,3.1,11.5,11.4,11.5a19.35,19.35,0,0,0,4-.4C415.9,449.2,480,363.1,480,261.7,480,134.9,379.7,32,256,32Z"></path>
9+
<path
10+
fill="currentColor"
11+
fill-rule="evenodd"
12+
d="M7.5.25a7.25 7.25 0 0 0-2.292 14.13c.363.066.495-.158.495-.35c0-.172-.006-.628-.01-1.233c-2.016.438-2.442-.972-2.442-.972c-.33-.838-.805-1.06-.805-1.06c-.658-.45.05-.441.05-.441c.728.051 1.11.747 1.11.747c.647 1.108 1.697.788 2.11.602c.066-.468.254-.788.46-.969c-1.61-.183-3.302-.805-3.302-3.583a2.8 2.8 0 0 1 .747-1.945c-.075-.184-.324-.92.07-1.92c0 0 .61-.194 1.994.744A6.963 6.963 0 0 1 7.5 3.756A6.97 6.97 0 0 1 9.315 4c1.384-.938 1.992-.743 1.992-.743c.396.998.147 1.735.072 1.919c.465.507.745 1.153.745 1.945c0 2.785-1.695 3.398-3.31 3.577c.26.224.492.667.492 1.343c0 .97-.009 1.751-.009 1.989c0 .194.131.42.499.349A7.25 7.25 0 0 0 7.499.25Z"
13+
clip-rule="evenodd"
14+
/>
1015
</svg>
1116
);

apps/website/src/components/kit-selection-cta/kit-selection-cta.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default component$(({ kit }: Kit) => {
77
return (
88
<a
99
href={`/docs/install/${kit}`}
10-
class="rounded-3xl border-2 overflow-hidden hover:-outline-offset-4 hover:outline-4 hover:outline hover:outline-[var(--qwik-light-blue)] hover:scale-105 focus:-outline-offset-4 focus:outline-4 focus:outline focus:outline-[var(--qwik-light-blue)] focus:scale-105 duration-150"
10+
class="rounded-3xl border-2 overflow-hidden hover:-outline-offset-4 hover:outline-4 hover:outline hover:outline-[var(--qwik-light-blue)] hover:scale-[1.025] focus:-outline-offset-4 focus:outline-4 focus:outline focus:outline-[var(--qwik-light-blue)] focus:scale-[1.025] duration-150"
1111
>
1212
<Card class={`max-w-md`}>
1313
<CardImage
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
import { component$ } from '@builder.io/qwik';
2+
import { Link } from '@builder.io/qwik-city';
3+
4+
const components = [
5+
'Accordion',
6+
'Alert',
7+
'Badge',
8+
'Breadcrumb',
9+
'Button',
10+
'Button Group',
11+
'Card',
12+
'Carousel',
13+
'Checkbox',
14+
'Collapse',
15+
'Drawer',
16+
'Input',
17+
'Input Phone',
18+
'Navigation Bar',
19+
'Pagination',
20+
'Popover',
21+
'Progress',
22+
'Radio',
23+
'Rating',
24+
'Select',
25+
'Slider',
26+
'Spinner',
27+
'Tabs',
28+
'Toast',
29+
'Toggle',
30+
'Tooltip',
31+
];
32+
33+
export const DocsNavigation = component$(() => {
34+
return (
35+
<nav class="flex flex-col gap-4 fixed h-full pt-20 pb-6 bg-blue-900 w-80">
36+
<h1 class="pl-12 mt-8 font-medium text-lg">Getting started</h1>
37+
<ul class="pl-12 flex flex-col gap-2">
38+
<li>
39+
<Link
40+
class="px-4 py-2 -ml-4 mr-4 text-sm block rounded-lg hover:bg-[var(--qwik-light-blue)]"
41+
href="/docs"
42+
>
43+
Introduction
44+
</Link>
45+
</li>
46+
<li>
47+
<Link
48+
class="px-4 py-2 -ml-4 mr-4 text-sm block rounded-lg hover:bg-[var(--qwik-light-blue)]"
49+
href="/install"
50+
>
51+
Installation
52+
</Link>
53+
</li>
54+
<li>
55+
<Link
56+
class="px-4 py-2 -ml-4 mr-4 text-sm block rounded-lg hover:bg-[var(--qwik-light-blue)]"
57+
href="/usage"
58+
>
59+
Usage
60+
</Link>
61+
</li>
62+
<li>
63+
<Link
64+
class="px-4 py-2 -ml-4 mr-4 text-sm block rounded-lg hover:bg-[var(--qwik-light-blue)]"
65+
href="/contributing"
66+
>
67+
Contributing
68+
</Link>
69+
</li>
70+
</ul>
71+
<h1 class="pl-12 font-medium text-lg">Components</h1>
72+
<ol class="pl-12 flex flex-col gap-2 w-full h-full overflow-y-auto">
73+
{components
74+
.sort((a, b) => (a > b ? 1 : -1))
75+
.map((component, index) => (
76+
<li key={index}>
77+
<Link
78+
class="px-4 py-2 -ml-4 mr-4 text-sm block rounded-lg hover:bg-[var(--qwik-light-blue)]"
79+
href={`/docs/headless/${component
80+
.toLowerCase()
81+
.replace(' ', '-')}`}
82+
>
83+
{component}
84+
</Link>
85+
</li>
86+
))}
87+
</ol>
88+
</nav>
89+
);
90+
});

0 commit comments

Comments
 (0)