bravo six, going insano style

This commit is contained in:
Oleksandr 2025-11-22 05:49:00 +02:00
parent 9b2ec20636
commit 7f75bba052
Signed by: Xanazf
GPG key ID: 821EEC32761AC17C
28 changed files with 8620 additions and 10546 deletions

6202
.pnp.cjs generated

File diff suppressed because it is too large Load diff

View file

@ -1,18 +1,62 @@
# Quickshell Docs Quickshell Docs
===============
Documentation for [quickshell](https://git.outfoxxed.me/outfoxxed/quickshell) Documentation for [quickshell](https://git.outfoxxed.me/outfoxxed/quickshell) Hosted version at [quickshell.outfoxxed.me](https://quickshell.outfoxxed.me)
Hosted version at [quickshell.outfoxxed.me](https://quickshell.outfoxxed.me)
Frontend rewritten by [Xanazf](https://github.com/Xanazf) Frontend rewritten by [Xanazf](https://github.com/Xanazf)
## Notes for future updates ---
Development
-----------
### Install language server attribution
> [!INFO] Yarn
>
> ```bash
> yarn dlx @yarnpkg/sdks base
> ```
======
> [!INFO] NPM
>
> ```bash
> npx @yarnpkg/sdks base
> ```
---
### Enable the language server to use yarn sdks
> [!NOTE] Example for Neovim
>
> ```lua
> {
> -- ...
> typescript = {
> -- ...
> tsdk = "./.yarn/sdks/typescript/lib",
> -- ...
> },
> -- or whatever language server you're using
> vtsls = {
> autoUseWorkspaceTsdk = true,
> }
> }
> ```
Notes for future updates
------------------------
~- improve Head~ ~- improve Head~
- improve light theme - improve light theme
- QtQML docs search - QtQML docs search
- page metadata: - page metadata:
- lastUpdatedAt - `min_version`
- prevUpdate? - `max_version`
- editURL - `edit_URL`
- typedocs clearer borders between layout parts - typedocs clearer borders between layout parts
- better front page styling

View file

@ -1,4 +1,4 @@
import { defineConfig } from "astro/config"; import { defineConfig, envField } from "astro/config";
import solidJs from "@astrojs/solid-js"; import solidJs from "@astrojs/solid-js";
import mdx from "@astrojs/mdx"; import mdx from "@astrojs/mdx";
import icon from "astro-icon"; import icon from "astro-icon";
@ -10,14 +10,32 @@ import { markdownConfig } from "./src/config/io/markdown.ts";
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
markdown: markdownConfig, markdown: markdownConfig,
site: "https://quickshell.outfoxxed.me", site: "https://quickshell.org",
integrations: [ integrations: [
solidJs({ solidJs({
devtools: true, devtools: false,
}), }),
mdx(), mdx(),
pagefind(), pagefind(),
icon(), icon(),
sitemap(), sitemap(),
], ],
env: {
schema: {
VERSION_FILE_PATH: envField.string({
context: "server",
access: "secret",
default: "./versions.json",
}),
BASE_URL: envField.number({
context: "server",
access: "public",
}),
PRODUCTION: envField.string({
context: "server",
access: "secret",
optional: true,
}),
},
},
}); });

6567
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -10,24 +10,22 @@
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"@ark-ui/solid": "^3.5.0",
"@astrojs/check": "0.9.5", "@astrojs/check": "0.9.5",
"@astrojs/markdown-remark": "6.3.8", "@astrojs/markdown-remark": "6.3.9",
"@astrojs/mdx": "4.3.10", "@astrojs/mdx": "4.3.12",
"@astrojs/sitemap": "3.6.0", "@astrojs/sitemap": "3.6.0",
"@astrojs/solid-js": "5.1.3", "@astrojs/solid-js": "^5.1.3",
"@fontsource-variable/rubik": "^5.1.0", "@fontsource-variable/rubik": "^5.2.8",
"@hbsnow/rehype-sectionize": "^1.0.7", "@hbsnow/rehype-sectionize": "^1.0.7",
"@pagefind/default-ui": "^1.1.1", "@pagefind/default-ui": "^1.4.0",
"@shikijs/rehype": "^3.4.2", "@shikijs/rehype": "^3.15.0",
"astro": "5.15.5", "astro": "5.16.0",
"astro-breadcrumbs": "^3.3.1", "astro-breadcrumbs": "^3.3.1",
"astro-icon": "^1.1.5", "astro-icon": "^1.1.5",
"hast": "^1.0.0",
"hast-util-from-html": "^2.0.3", "hast-util-from-html": "^2.0.3",
"remark-github-blockquote-alert": "^1.2.1", "rehype": "^13.0.2",
"solid-devtools": "^0.30.1", "remark-github-blockquote-alert": "^2.0.0",
"solid-js": "^1.8.18", "solid-js": "^1.9.10",
"unified": "^11.0.5", "unified": "^11.0.5",
"unist-util-visit": "^5.0.0" "unist-util-visit": "^5.0.0"
}, },
@ -35,11 +33,18 @@
"@astrojs/ts-plugin": "1.10.5", "@astrojs/ts-plugin": "1.10.5",
"@babel/core": "^7.28.5", "@babel/core": "^7.28.5",
"@babel/plugin-syntax-typescript": "^7.27.1", "@babel/plugin-syntax-typescript": "^7.27.1",
"@biomejs/biome": "^1.8.3", "@biomejs/biome": "^2.3.7",
"@types/babel__core": "^7", "@types/babel__core": "^7.20.5",
"@types/node": "^20.14.11", "@types/hast": "^3.0.4",
"pagefind": "^1.1.1", "@types/mdast": "^4.0.4",
"typescript": "^5.9.3" "@types/node": "^24.10.1",
"@types/unist": "^3.0.3",
"jsonc-parser": "^3.3.1",
"pagefind": "^1.4.0",
"shiki": "^3.15.0",
"tsx": "^4.20.6",
"typescript": "^5.9.3",
"vite": "^7.2.4"
}, },
"packageManager": "yarn@4.11.0" "packageManager": "yarn@4.11.0"
} }

View file

@ -1,7 +1,9 @@
--- ---
import { processMarkdown } from "@config/io/markdown"; import { processMarkdown } from "@config/io/markdown";
const codeDesktop = await processMarkdown("N/A", `\`\`\`qml const codeDesktop = await processMarkdown(
"N/A",
`\`\`\`qml
// a standard desktop window // a standard desktop window
FloatingWindow { FloatingWindow {
Timer { Timer {
@ -19,9 +21,12 @@ FloatingWindow {
// change the window's color when timer.invert changes // change the window's color when timer.invert changes
color: timer.invert ? "purple" : "green" color: timer.invert ? "purple" : "green"
} }
\`\`\``); \`\`\``
);
const codeMobile = await processMarkdown("N/A", `\`\`\`qml const codeMobile = await processMarkdown(
"N/A",
`\`\`\`qml
// a standard desktop window // a standard desktop window
FloatingWindow { FloatingWindow {
Timer { Timer {
@ -47,7 +52,8 @@ FloatingWindow {
? "purple" ? "purple"
: "green" : "green"
} }
\`\`\``); \`\`\``
);
--- ---
<ul class="featurelist"> <ul class="featurelist">
<li class="featurelist-item hot-reloading left"> <li class="featurelist-item hot-reloading left">

View file

@ -16,11 +16,13 @@ const videos = [
}, },
{ {
author: '<a href="https://outfoxxed.me">outfoxxed</a>', author: '<a href="https://outfoxxed.me">outfoxxed</a>',
source: "https://git.outfoxxed.me/outfoxxed/nixnew/src/branch/master/modules/user/modules/quickshell", source:
"https://git.outfoxxed.me/outfoxxed/nixnew/src/branch/master/modules/user/modules/quickshell",
path: "/assets/showcase/outfoxxed.mp4", path: "/assets/showcase/outfoxxed.mp4",
}, },
{ {
author: '<a href="https://github.com/pfaj/">pfaj</a> and <a href="https://github.com/bdebiase">bdebiase</a>', author:
'<a href="https://github.com/pfaj/">pfaj</a> and <a href="https://github.com/bdebiase">bdebiase</a>',
path: "/assets/showcase/pfaj-bdeblase.mp4", path: "/assets/showcase/pfaj-bdeblase.mp4",
}, },
{ {

View file

@ -0,0 +1,9 @@
interface QMLTypeLinkObject {
type: string;
module?: string;
name?: string;
mtype?: string;
mname?: string;
}
export type { QMLTypeLinkObject };

View file

@ -0,0 +1,31 @@
import type { QMLTypeLinkObject } from "./helper";
import type {
ModuleData,
QuickshellBase,
QuickshellFunction,
QuickshellGadget,
QuickshellInstance,
QuickshellProps,
QuickshellSignal,
QuickshellVariant,
TypeData,
VersionData,
VersionsData,
} from "./module";
import type { SearchLists } from "./search";
export type {
QMLTypeLinkObject,
QuickshellBase,
QuickshellInstance,
QuickshellGadget,
QuickshellProps,
QuickshellFunction,
QuickshellSignal,
QuickshellVariant,
TypeData,
ModuleData,
VersionData,
VersionsData,
SearchLists,
};

View file

@ -0,0 +1,97 @@
interface QuickshellBase {
type: string;
module: string;
name: string;
}
interface QuickshellInstance {
name?: string;
type: {
gadget?: QuickshellGadget;
type: string;
module: string;
name: string;
of?: QuickshellBase;
};
details?: string;
flags?: string[];
}
interface QuickshellGadget {
[key: string]: QuickshellInstance;
}
interface QuickshellProps {
[key: string]: QuickshellInstance;
}
interface QuickshellFunction {
ret: QuickshellInstance;
name: string;
id: string;
details: string;
params: QuickshellInstance[];
}
interface QuickshellSignal {
[key: string]: {
name: string;
details: string;
params: QuickshellInstance[];
};
}
interface QuickshellVariant {
[key: string]: {
name?: string;
details: string;
params?: QuickshellInstance[];
};
}
interface TypeData {
name: string;
description: string;
details: string;
flags?: string[];
contains?: string[];
super?: QuickshellBase;
properties?: QuickshellProps;
functions?: QuickshellFunction[];
signals?: QuickshellSignal;
variants?: QuickshellVariant;
// FIXME: QuickshellData[]
subtypes?: any[];
}
interface ModuleData {
name: string;
description: string;
details: string;
types: TypeData[];
}
interface VersionData {
name: string;
changelog?: string;
modules: ModuleData[];
}
interface VersionsData {
default: string;
versions: VersionData[];
}
export type {
QuickshellBase,
QuickshellInstance,
QuickshellGadget,
QuickshellProps,
QuickshellFunction,
QuickshellSignal,
QuickshellVariant,
TypeData,
ModuleData,
VersionData,
VersionsData,
};

View file

@ -0,0 +1,7 @@
interface SearchLists {
slug: string;
link: string;
summary: string;
}
export type { SearchLists };

View file

@ -1,7 +1,7 @@
import { promises as fs } from "node:fs"; import { promises as fs } from "node:fs";
import path from "node:path"; import path from "node:path";
import type { VersionsData, ModuleData } from "./types"; import type { VersionsData, ModuleData } from "@_types";
async function readModulesData( async function readModulesData(
basePath: string basePath: string

View file

@ -1,17 +1,22 @@
import { type CollectionEntry, getCollection } from "astro:content"; import {
type CollectionEntry,
getCollection,
} from "astro:content";
import { getVersionsData } from "@config/io/generateTypeData"; import { getVersionsData } from "@config/io/generateTypeData";
// load latest version of each page for version // load latest version of each page for version
async function buildGuideCollection(version: string): Promise<CollectionEntry<'guide'>[]> { async function buildGuideCollection(
version: string
): Promise<CollectionEntry<"guide">[]> {
const { versions } = await getVersionsData(); const { versions } = await getVersionsData();
const guidePages = await getCollection("guide"); const guidePages = await getCollection("guide");
const pages: { [key: string]: CollectionEntry<'guide'> } = {}; const pages: { [key: string]: CollectionEntry<"guide"> } = {};
for (const currentVersion of versions.toReversed()) { for (const currentVersion of versions.toReversed()) {
for (const page of guidePages) { for (const page of guidePages) {
let [guideVersion, id] = page.id.split('/'); let [guideVersion, id] = page.id.split("/");
guideVersion = guideVersion.replaceAll('_', '.'); guideVersion = guideVersion.replaceAll("_", ".");
id = id ?? "index"; id = id ?? "index";
if (guideVersion !== currentVersion.name) continue; if (guideVersion !== currentVersion.name) continue;
@ -24,12 +29,18 @@ async function buildGuideCollection(version: string): Promise<CollectionEntry<'g
return Object.values(pages); return Object.values(pages);
} }
let guideCollections: { [key: string]: Promise<CollectionEntry<'guide'>[]> } = {}; let guideCollections: {
[key: string]: Promise<CollectionEntry<"guide">[]>;
} = {};
export async function getGuideCollection(version: string): Promise<CollectionEntry<'guide'>[]> { async function getGuideCollection(
version: string
): Promise<CollectionEntry<"guide">[]> {
if (!(version in guideCollections)) { if (!(version in guideCollections)) {
guideCollections[version] = buildGuideCollection(version); guideCollections[version] = buildGuideCollection(version);
} }
return guideCollections[version]; return guideCollections[version];
} }
export { getGuideCollection };

View file

@ -10,7 +10,7 @@ import type {
ConfigHeading, ConfigHeading,
ConfigTOC, ConfigTOC,
} from "@components/navigation/sidebars/types"; } from "@components/navigation/sidebars/types";
import type { QMLTypeLinkObject } from "./types"; import type { QMLTypeLinkObject } from "@_types";
export function buildHierarchy(headings: ConfigHeading[]) { export function buildHierarchy(headings: ConfigHeading[]) {
const toc: ConfigTOC[] = []; const toc: ConfigTOC[] = [];
@ -30,7 +30,7 @@ export function buildHierarchy(headings: ConfigHeading[]) {
let depth = heading.depth - 1; let depth = heading.depth - 1;
let parent = null; let parent = null;
while (!parent && depth != 0) { while (!parent && depth !== 0) {
parent = parentHeadings.get(depth); parent = parentHeadings.get(depth);
depth -= 1; depth -= 1;
} }
@ -96,13 +96,10 @@ export function getQMLTypeLinkObject(unparsed: string) {
return hashMap[index](); return hashMap[index]();
} }
export function getQMLTypeLink(version: string, { export function getQMLTypeLink(
type, version: string,
module, { type, module, name, mtype, mname }: QMLTypeLinkObject
name, ) {
mtype,
mname,
}: QMLTypeLinkObject) {
if (type === "unknown") { if (type === "unknown") {
return "#unknown"; return "#unknown";
} }
@ -116,7 +113,9 @@ export function getQMLTypeLink(version: string, {
return localLink; return localLink;
}, },
qt: () => { qt: () => {
const isSpecific = mname ? `#${mname}-${mtype === "func" ? "method" : mtype}` : ""; const isSpecific = mname
? `#${mname}-${mtype === "func" ? "method" : mtype}`
: "";
const qtLink = `${qtStart}${module!.toLowerCase().replace(".", "-")}-${name!.toLowerCase()}.html${isSpecific}`; const qtLink = `${qtStart}${module!.toLowerCase().replace(".", "-")}-${name!.toLowerCase()}.html${isSpecific}`;
return qtLink; return qtLink;
}, },

View file

@ -23,7 +23,9 @@ import {
let currentVersion = "NOVERSION"; let currentVersion = "NOVERSION";
const remarkParseAtTypes: RemarkPlugin<[]> = () => (root: Md.Root): Md.Root => { const remarkParseAtTypes: RemarkPlugin<[]> =
() =>
(root: Md.Root): Md.Root => {
visit(root as Unist.Parent, (rawNode: Unist.Node) => { visit(root as Unist.Parent, (rawNode: Unist.Node) => {
if ( if (
rawNode.type === "text" || rawNode.type === "text" ||
@ -67,9 +69,11 @@ const remarkParseAtTypes: RemarkPlugin<[]> = () => (root: Md.Root): Md.Root => {
} }
}); });
return root; return root;
}; };
const rehypeRewriteTypelinks: RehypePlugin<[]> = () => (root: Html.Root): Html.Root => { const rehypeRewriteTypelinks: RehypePlugin<[]> =
() =>
(root: Html.Root): Html.Root => {
visit( visit(
root as Unist.Parent, root as Unist.Parent,
"text", "text",
@ -82,7 +86,10 @@ const rehypeRewriteTypelinks: RehypePlugin<[]> = () => (root: Html.Root): Html.R
changed = true; changed = true;
const linkObject = getQMLTypeLinkObject(match); const linkObject = getQMLTypeLinkObject(match);
const link = getQMLTypeLink(currentVersion, linkObject); const link = getQMLTypeLink(
currentVersion,
linkObject
);
const icon = const icon =
linkObject.mtype && linkObject.mtype !== "func" linkObject.mtype && linkObject.mtype !== "func"
? getIconForLink(linkObject.mtype, false) ? getIconForLink(linkObject.mtype, false)
@ -109,22 +116,27 @@ const rehypeRewriteTypelinks: RehypePlugin<[]> = () => (root: Html.Root): Html.R
); );
return root; return root;
}; };
const rehypeRewriteVersionedDoclinks: RehypePlugin<[]> = () => (root: Html.Root): Html.Root => { const rehypeRewriteVersionedDoclinks: RehypePlugin<[]> =
() =>
(root: Html.Root): Html.Root => {
visit( visit(
root as Unist.Parent, root as Unist.Parent,
"element", "element",
({ tagName, properties }: Html.Element) => { ({ tagName, properties }: Html.Element) => {
if (tagName !== "a") return CONTINUE; if (tagName !== "a") return CONTINUE;
if (!(properties.href as string ?? "").startsWith("@docs")) return CONTINUE; if (
!((properties.href as string) ?? "").startsWith("@docs")
)
return CONTINUE;
properties.href = `/docs/${currentVersion}/${(properties.href as string).slice(6)}`; properties.href = `/docs/${currentVersion}/${(properties.href as string).slice(6)}`;
return CONTINUE; return CONTINUE;
} }
); );
return root; return root;
}; };
const shikiRewriteTypelinks: ShikiTransformer = { const shikiRewriteTypelinks: ShikiTransformer = {
name: "rewrite-typelinks", name: "rewrite-typelinks",
@ -187,7 +199,8 @@ let globalMarkdownProcessor: Promise<MarkdownProcessor>;
async function getMarkdownProcessor(): Promise<MarkdownProcessor> { async function getMarkdownProcessor(): Promise<MarkdownProcessor> {
if (!globalMarkdownProcessor) { if (!globalMarkdownProcessor) {
globalMarkdownProcessor = createMarkdownProcessor(markdownConfig); globalMarkdownProcessor =
createMarkdownProcessor(markdownConfig);
} }
return globalMarkdownProcessor; return globalMarkdownProcessor;
@ -195,10 +208,12 @@ async function getMarkdownProcessor(): Promise<MarkdownProcessor> {
export async function processMarkdown( export async function processMarkdown(
version: string, version: string,
markdown: string, markdown: string
): Promise<string> { ): Promise<string> {
currentVersion = version; currentVersion = version;
const r = (await (await getMarkdownProcessor()).render(markdown)).code; const r = (
await (await getMarkdownProcessor()).render(markdown)
).code;
currentVersion = "NOVERSION"; currentVersion = "NOVERSION";
return r; return r;
} }

View file

@ -1,4 +1,4 @@
//#FIXME fuseConfig.ts //# FIXME: fuseConfig.ts
// -- // --
// generateSearchLists.ts // generateSearchLists.ts
@ -53,7 +53,7 @@ interface QuickshellSignal {
}; };
} }
export interface QuickshellVariant { interface QuickshellVariant {
[key: string]: { [key: string]: {
name?: string; name?: string;
details: string; details: string;
@ -61,7 +61,7 @@ export interface QuickshellVariant {
}; };
} }
export interface TypeData { interface TypeData {
name: string; name: string;
description: string; description: string;
details: string; details: string;
@ -75,20 +75,20 @@ export interface TypeData {
subtypes?: QuickshellData[]; subtypes?: QuickshellData[];
} }
export interface ModuleData { interface ModuleData {
name: string; name: string;
description: string; description: string;
details: string; details: string;
types: TypeData[]; types: TypeData[];
} }
export interface VersionData { interface VersionData {
name: string; name: string;
changelog?: string; changelog?: string;
modules: ModuleData[]; modules: ModuleData[];
} }
export interface VersionsData { interface VersionsData {
default: string; default: string;
versions: VersionData[]; versions: VersionData[];
} }

11
src/env.d.ts vendored
View file

@ -1,2 +1,13 @@
/// <reference path="../.astro/types.d.ts" /> /// <reference path="../.astro/types.d.ts" />
/// <reference types="astro/client" /> /// <reference types="astro/client" />
interface ImportMetaEnv {
readonly VERSION_FILE_PATH: string;
readonly BASE_URL: string;
readonly PRODUCTION?: string;
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}
export type { ImportMeta };

View file

@ -5,10 +5,17 @@ import { processMarkdown } from "@config/io/markdown";
const { versions } = await getVersionsData(); const { versions } = await getVersionsData();
const versionsMd = await Promise.all(versions.filter(version => version.changelog).map(async version => ({ const versionsMd = await Promise.all(
versions
.filter(version => version.changelog)
.map(async version => ({
version, version,
changelog: await processMarkdown(version.name, version.changelog!) changelog: await processMarkdown(
}))); version.name,
version.changelog ?? ""
),
}))
);
const headings = versionsMd.map(({ version }) => ({ const headings = versionsMd.map(({ version }) => ({
text: version.name, text: version.name,

View file

@ -9,14 +9,19 @@ import { render } from "astro:content";
export async function getStaticPaths() { export async function getStaticPaths() {
const { versions } = await getVersionsData(); const { versions } = await getVersionsData();
let pages = await Promise.all(versions.map(async version => { const pages = await Promise.all(
versions.map(async version => {
const pages = await getGuideCollection(version.name); const pages = await getGuideCollection(version.name);
return pages.map(page => ({ return pages.map(page => ({
params: { version: version.name, id: page.id === "index" ? "/" : page.id }, params: {
version: version.name,
id: page.id === "index" ? "/" : page.id,
},
props: { version, page }, props: { version, page },
})); }));
})); })
);
return pages.flat(); return pages.flat();
} }

View file

@ -14,7 +14,11 @@ export async function getStaticPaths() {
return (await getVersionsData()).versions.flatMap(version => { return (await getVersionsData()).versions.flatMap(version => {
return version.modules.flatMap(module => { return version.modules.flatMap(module => {
return module.types.map(type => ({ return module.types.map(type => ({
params: { version: version.name, module: module.name, type: type.name }, params: {
version: version.name,
module: module.name,
type: type.name,
},
props: { version, module, type }, props: { version, module, type },
})); }));
}); });
@ -23,7 +27,9 @@ export async function getStaticPaths() {
const { version, module, type } = Astro.props; const { version, module, type } = Astro.props;
const superLink = type.super ? getQMLTypeLink(version.name, type.super) : null; const superLink = type.super
? getQMLTypeLink(version.name, type.super)
: null;
const details = type.details const details = type.details
? await processMarkdown(version.name, type.details) ? await processMarkdown(version.name, type.details)

View file

@ -116,3 +116,45 @@
--percent-nav-root_filled: 65%; --percent-nav-root_filled: 65%;
} }
} }
@keyframes spin {
to {
transform: rotate(360deg);
}
}
@keyframes ping {
75%,
100% {
transform: scale(2);
opacity: 0;
}
}
@keyframes pulse {
50% {
opacity: 0.5;
}
}
@keyframes bounce {
0%,
100% {
transform: translateY(-25%);
animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
}
50% {
transform: none;
animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
}
}
:root {
--animate-spin: spin 1s linear infinite;
--animate-ping: ping 1s cubic-bezier(0, 0, 0.2, 1) infinite;
--animate-pulse: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
--animate-bounce: bounce 1s infinite;
}

View file

@ -0,0 +1,6 @@
@import "normalize.css";
@import "animations.css";
@import "vars.css";
@import "base.css";
@import "code.css";
@import "colors.css";

475
src/styles/css-config/normalize.css vendored Normal file
View file

@ -0,0 +1,475 @@
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
/**
* 1. Set default font family to sans-serif.
* 2. Prevent iOS and IE text size adjust after device orientation change,
* without disabling user zoom.
*/
html {
font-family: "Inter", sans-serif;
/* 1 */
-ms-text-size-adjust: 100%;
/* 2 */
-webkit-text-size-adjust: 100%;
/* 2 */
}
/**
* Remove default margin.
*/
body {
margin: 0;
}
/* HTML5 display definitions
========================================================================== */
/**
* Correct `block` display not defined for any HTML5 element in IE 8/9.
* Correct `block` display not defined for `details` or `summary` in IE 10/11
* and Firefox.
* Correct `block` display not defined for `main` in IE 11.
*/
/* article, */
/* aside, */
details,
/* figcaption, */
/* figure, */
/* footer, */
/* header, */
/* hgroup, */
/* main, */
/* menu, */
/* nav, */
/* section, */
summary {
display: block;
}
/**
* 1. Correct `inline-block` display not defined in IE 8/9.
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
*/
audio,
canvas,
progress,
video {
display: inline-block;
/* 1 */
vertical-align: baseline;
/* 2 */
}
/**
* Prevent modern browsers from displaying `audio` without controls.
* Remove excess height in iOS 5 devices.
*/
audio:not([controls]) {
display: none;
height: 0;
}
/**
* Address `[hidden]` styling not present in IE 8/9/10.
* Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
*/
[hidden],
template {
display: none;
}
/* Links
========================================================================== */
/**
* Remove the gray background color from active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* Improve readability of focused elements when they are also in an
* active/hover state.
*/
a:active,
a:hover {
outline: 0;
}
/* Text-level semantics
========================================================================== */
/**
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
*/
abbr[title] {
border-bottom: 1px dotted;
}
/**
* Address style set to `bolder` in Firefox 4+, Safari, and Chrome.
*/
b,
strong {
font-weight: bold;
}
/**
* Address styling not present in Safari and Chrome.
*/
dfn {
font-style: italic;
}
/**
* Address variable `h1` font-size and margin within `section` and `article`
* contexts in Firefox 4+, Safari, and Chrome.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/**
* Address styling not present in IE 8/9.
*/
mark {
background: #ff0;
color: var(--hl-onbackground);
}
/**
* Address inconsistent and variable font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
/* Embedded content
========================================================================== */
/**
* Remove border when inside `a` element in IE 8/9/10.
*/
img {
border: 0;
}
/**
* Correct overflow not hidden in IE 9/10/11.
*/
svg:not(:root) {
overflow: hidden;
}
/* Grouping content
========================================================================== */
/**
* Address margin not present in IE 8/9 and Safari.
*/
figure {
margin: 1em 40px;
}
/**
* Address differences between Firefox and other browsers.
*/
hr {
box-sizing: content-box;
height: 0;
}
/**
* Contain overflow in all browsers.
*/
pre {
overflow: auto;
}
/**
* Address odd `em`-unit font size rendering in all browsers.
*/
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
/* Forms
========================================================================== */
/**
* Known limitation: by default, Chrome and Safari on OS X allow very limited
* styling of `select`, unless a `border` property is set.
*/
/**
* 1. Correct color not being inherited.
* Known issue: affects color of disabled elements.
* 2. Correct font properties not being inherited.
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
*/
button,
input,
optgroup,
select,
textarea {
color: inherit;
/* 1 */
font: inherit;
/* 2 */
margin: 0;
/* 3 */
}
/**
* Address `overflow` set to `hidden` in IE 8/9/10/11.
*/
/**
* Address inconsistent `text-transform` inheritance for `button` and `select`.
* All other form control elements do not inherit `text-transform` values.
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
* Correct `select` style inheritance in Firefox.
*/
button,
select {
text-transform: none;
}
/**
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
* and `video` controls.
* 2. Correct inability to style clickable `input` types in iOS.
* 3. Improve usability and consistency of cursor style between image-type
* `input` and others.
* 4. CUSTOM FOR WEBFLOW: Removed the input[type="submit"] selector to reduce
* specificity and defer to the .w-button selector
*/
button,
html input[type="button"],
input[type="reset"] {
-webkit-appearance: button;
/* 2 */
cursor: pointer;
/* 3 */
}
/**
* Re-set default cursor for disabled elements.
*/
button[disabled],
html input[disabled] {
cursor: default;
}
/**
* Remove inner padding and border in Firefox 4+.
*/
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
/**
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
* the UA stylesheet.
*/
input {
line-height: normal;
}
/**
* It's recommended that you don't attempt to style these elements.
* Firefox's implementation doesn't respect box-sizing, padding, or width.
*
* 1. Address box sizing set to `content-box` in IE 8/9/10.
* 2. Remove excess padding in IE 8/9/10.
*/
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box;
/* 1 */
padding: 0;
/* 2 */
}
/**
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
* `font-size` values of the `input`, it causes the cursor style of the
* decrement button to change from `default` to `text`.
*/
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. CUSTOM FOR WEBFLOW: changed from `textfield` to `none` to normalize iOS rounded input
* 2. CUSTOM FOR WEBFLOW: box-sizing: content-box rule removed
* (similar to normalize.css >=4.0.0)
*/
input[type="search"] {
-webkit-appearance: none;
/* 1 */
}
/**
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
* Safari (but not Chrome) clips the cancel button when the search input has
* padding (and `textfield` appearance).
*/
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* Define consistent border, margin, and padding.
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct `color` not being inherited in IE 8/9/10/11.
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
*/
legend {
border: 0;
/* 1 */
padding: 0;
/* 2 */
}
/**
* Remove default vertical scrollbar in IE 8/9/10/11.
*/
textarea {
overflow: auto;
}
/**
* Don't inherit the `font-weight` (applied by a rule above).
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
*/
optgroup {
font-weight: bold;
}
/* Tables
========================================================================== */
/**
* Remove most spacing between table cells.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
p {
margin: 0;
}
/* Remove default margins and padding on all basic HTML elements */
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
margin: 0;
padding: 0;
}

View file

@ -0,0 +1,49 @@
:root {
--scaleFactor: 1.618;
--wholestep: 1.618;
--halfstep: 1.272;
--quarterstep: 1.128;
--eighthstep: 1.062;
--wholestep-dec: 0.618;
--halfstep-dec: 0.272;
--quarterstep-dec: 0.128;
--eighthstep-dec: 0.062;
--md: 1em;
--sm: calc(1em / var(--scaleFactor));
--xs: calc(var(--sm) / var(--scaleFactor));
--2xs: calc(var(--xs) / var(--scaleFactor));
--3xs: calc(var(--2xs) / var(--scaleFactor));
--lg: calc(1em * var(--scaleFactor));
--xl: calc(var(--lg) * var(--scaleFactor));
--2xl: calc(var(--xl) * var(--scaleFactor));
--3xl: calc(var(--2xl) * var(--scaleFactor));
--4xl: calc(var(--3xl) * var(--scaleFactor));
/* Unitless sizes; required for adhoc calculations (division and multiplication in calc() require unitless numbers */
/* NOTE: in calc() with multiplication or division the right side must be a unitless number */
--sm-unitless: calc(1 / var(--scaleFactor));
--xs-unitless: calc(var(--sm-unitless) / var(--scaleFactor));
--2xs-unitless: calc(var(--xs-unitless) / var(--scaleFactor));
--lg-unitless: calc(1 * var(--scaleFactor));
--xl-unitless: calc(var(--lg-unitless) * var(--scaleFactor));
--2xl-unitless: calc(var(--xl-unitless) * var(--scaleFactor));
--radius-xs: var(--xs);
--radius-sm: var(--sm);
--radius-md: var(--md);
--radius-lg: var(--lg);
--radius-xl: var(--xl);
--shadow-sm: var(--shadow-sm);
--shadow-md: var(--shadow-md);
--shadow-lg: var(--shadow-lg);
--shadow-xl: var(--shadow-xl);
--shadow-2xl: var(--shadow-2xl);
--ease-in: cubic-bezier(0.4, 0, 1, 1);
--ease-out: cubic-bezier(0, 0, 0.2, 1);
--ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

View file

@ -1,9 +1,6 @@
@import "remark-github-blockquote-alert/alert.css"; @import "remark-github-blockquote-alert/alert.css";
@import "./css-config/base.css";
@import "./css-config/animations.css";
@import "./css-config/code.css";
@import "./css-config/colors.css";
@import "./css-config/entry.css";
@import "./main-page.css"; @import "./main-page.css";
@import "./docs/nav/nav.css"; @import "./docs/nav/nav.css";
@ -40,6 +37,7 @@ a {
cursor: pointer; cursor: pointer;
} }
} }
html.dark .baselayout, html.dark .baselayout,
html.dark .docslayout { html.dark .docslayout {
background-color: hsl(var(--bg-900)); background-color: hsl(var(--bg-900));
@ -58,13 +56,12 @@ html.dark {
width: 75%; width: 75%;
height: 1px; height: 1px;
margin-block: 0.618rem; margin-block: 0.618rem;
background: linear-gradient( background: linear-gradient(to right,
to right,
transparent, transparent,
hsl(var(--blue) 100% 59%), hsl(var(--blue) 100% 59%),
transparent transparent);
);
} }
.unset { .unset {
all: unset; all: unset;
} }
@ -160,12 +157,10 @@ footer {
left: -1rem; left: -1rem;
height: 1px; height: 1px;
width: calc(100% + 1rem); width: calc(100% + 1rem);
background: linear-gradient( background: linear-gradient(90deg,
90deg,
transparent 0%, transparent 0%,
hsl(var(--footer-bkg-border)) 50%, hsl(var(--footer-bkg-border)) 50%,
transparent 100% transparent 100%);
);
} }
& a { & a {
@ -204,12 +199,12 @@ footer {
gap: 0.2rem; gap: 0.2rem;
color: hsl(var(--text-dark)); color: hsl(var(--text-dark));
& > p { &>p {
margin-bottom: 0.2rem; margin-bottom: 0.2rem;
color: hsl(0deg 0% 40%); color: hsl(0deg 0% 40%);
} }
& > a { &>a {
text-decoration: none; text-decoration: none;
} }
} }
@ -225,8 +220,10 @@ footer {
font-size: 2.5rem; font-size: 2.5rem;
} }
& .changelog { & .changelog {
display: flex; display: flex;
& a { & a {
text-decoration: none; text-decoration: none;
margin-inline: auto; margin-inline: auto;
@ -238,7 +235,7 @@ footer {
footer { footer {
padding-inline: 0.75rem; padding-inline: 0.75rem;
& .credits > a { & .credits>a {
padding: 0.2rem 0; padding: 0.2rem 0;
} }
} }

View file

@ -34,6 +34,12 @@
], ],
"@styles/*": [ "@styles/*": [
"./src/styles/*" "./src/styles/*"
],
"@_types": [
"./src/config/_types/index.ts"
],
"@_types/*": [
"./src/config/_types/*"
] ]
} }
} }

5119
yarn.lock

File diff suppressed because it is too large Load diff