diff --git a/docs/01-introduction.md b/docs/01-introduction.md index 4ce8089..381ecd5 100644 --- a/docs/01-introduction.md +++ b/docs/01-introduction.md @@ -2,4 +2,4 @@ title: Introduction --- -Intro +A complementary library for developing applications with Svelte. It includes a set of components, utilities and helpers that can be used in any Svelte project. diff --git a/docs/02-namespaces.md b/docs/02-namespaces.md deleted file mode 100644 index b7f3fb9..0000000 --- a/docs/02-namespaces.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Namespaces ---- - -Namespace diff --git a/package.json b/package.json index bdf2f72..e2feaa0 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,6 @@ "./action/click": "./action/click.js", "./icons/*.svelte": "./icons/*.svelte", "./icons/*": "./icons/*.js", - "./internal/*.svelte": "./internal/*.svelte", "./loader/*.svelte": "./loader/*.svelte", "./store": "./store/index.js", "./store/api": "./store/api.js", @@ -58,6 +57,9 @@ "svelte": "^3.49.0 || ^4.0.0" }, "devDependencies": { + "@fontsource/fira-code": "^5.0.8", + "@fontsource/karla": "^5.0.9", + "@fontsource/rubik": "^5.0.9", "@ignatiusmb/styles": "^0.1.1", "@sveltejs/adapter-vercel": "^3.0.3", "@sveltejs/kit": "^1.23.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ff8b7cc..0efa59c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,6 +10,15 @@ dependencies: version: 0.7.1 devDependencies: + '@fontsource/fira-code': + specifier: ^5.0.8 + version: 5.0.8 + '@fontsource/karla': + specifier: ^5.0.9 + version: 5.0.9 + '@fontsource/rubik': + specifier: ^5.0.9 + version: 5.0.9 '@ignatiusmb/styles': specifier: ^0.1.1 version: 0.1.1 @@ -264,6 +273,18 @@ packages: dev: true optional: true + /@fontsource/fira-code@5.0.8: + resolution: {integrity: sha512-kp/tJUVnjaZeLHENMBFTTSgP2B7+/rIboeofuMfoGB40s2U0DKXNqQcOqIF5PtDhJ5QTG1LcviYXMnc1yG6oYQ==} + dev: true + + /@fontsource/karla@5.0.9: + resolution: {integrity: sha512-aKJodjzrrLo4bUrEgvHQgx3ULIkSB1zDcJ3kkZHqhITbLBBdCahlMz8jDiAKhCKTzRZCSJpKAEBkAmWxQm2QKA==} + dev: true + + /@fontsource/rubik@5.0.9: + resolution: {integrity: sha512-3yKyomN595SrV+tUx1YvlTvg3SONE1PwzyYiJJu+/qKMi7vhYz9OBaHZXBy60fHbkXB881zlzosBUP5MZyCYCw==} + dev: true + /@ignatiusmb/styles@0.1.1: resolution: {integrity: sha512-2Py7LWaRCtsd2HKTAjNft598+wFkVplV9+QYzdgSkv7QkTE/D5soIqNQNLxzK1MB3Uu4Gr0krMNHIfCNY5CEeA==} dev: true diff --git a/src/app.css b/src/app.css new file mode 100644 index 0000000..ed02288 --- /dev/null +++ b/src/app.css @@ -0,0 +1,50 @@ +:root { + --stone-050: #fafaf9; + --stone-100: #f5f5f4; + --stone-200: #e7e5e4; + --stone-300: #d6d3d1; + --stone-400: #a8a29e; + --stone-500: #78716c; + --stone-600: #57534e; + --stone-700: #44403c; + --stone-800: #292524; + --stone-900: #1c1917; + --stone-950: #0c0a09; + + --sky-050: #f0f9ff; + --sky-100: #e0f2fe; + --sky-200: #bae6fd; + --sky-300: #7dd3fc; + --sky-400: #38bdf8; + --sky-500: #0ea5e9; + --sky-600: #0284c7; + --sky-700: #0369a1; + --sky-800: #075985; + --sky-900: #0c4a6e; + --sky-950: #082f49; + + --rose-050: #fff1f2; + --rose-100: #ffe4e6; + --rose-200: #fecdd3; + --rose-300: #fda4af; + --rose-400: #fb7185; + --rose-500: #f43f5e; + --rose-600: #e11d48; + --rose-700: #be123c; + --rose-800: #9f1239; + --rose-900: #881337; + --rose-950: #4c0519; + + --font-mono: 'Fira Code', monospace; +} + +html, +body { + background: var(--stone-900); + color: var(--stone-200); + font-family: 'Rubik', 'Ubuntu', 'Helvetica Neue', sans-serif; +} + +a { + color: var(--sky-400); +} diff --git a/src/lib/internal/Docs.svelte b/src/lib/internal/Docs.svelte deleted file mode 100644 index 87c054b..0000000 --- a/src/lib/internal/Docs.svelte +++ /dev/null @@ -1,141 +0,0 @@ - - -
- - -
- {#each sections as { slug, title, content, path }} -
-

(anchor = true)} - on:mouseleave={() => (anchor = false)} - > - - - - {title} - -

- {@html content} -
- {/each} -
-
- - diff --git a/src/lib/internal/lib/Edit.svelte b/src/lib/internal/lib/Edit.svelte deleted file mode 100644 index f3d8d96..0000000 --- a/src/lib/internal/lib/Edit.svelte +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - diff --git a/src/routes/+error.svelte b/src/routes/+error.svelte index 1dd71b9..3982870 100644 --- a/src/routes/+error.svelte +++ b/src/routes/+error.svelte @@ -17,14 +17,14 @@ diff --git a/src/routes/+page.server.ts b/src/routes/+page.server.ts new file mode 100644 index 0000000..2933a61 --- /dev/null +++ b/src/routes/+page.server.ts @@ -0,0 +1,30 @@ +import type { ComponentProps } from 'svelte'; +import type Docs from './Docs.svelte'; +import { traverse } from 'marqua/fs'; +import { exports } from '../../package.json'; + +export const prerender = true; + +export function load() { + const docs: ComponentProps['sections'] = [ + ...traverse({ entry: 'docs' }, ({ breadcrumb: [filename], buffer, parse }) => { + const { content, metadata } = parse(buffer.toString('utf-8')); + return { slug: filename.slice(3, -3), title: metadata.title, content }; + }), + ...Object.keys(exports).map((key) => { + return { + slug: key.slice(2), + title: `syv${key.slice(1)}`, + content: '', + }; + }), + ]; + + return { + docs, + meta: { + title: 'Svelte Complementary Library', + description: 'A multipurpose library for working with Svelte', + }, + }; +} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 5d92b12..639c0f7 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,47 +1,27 @@ -
{}}> - - -