From 1fa57084547d0956e8ec68049d1702e552d29e70 Mon Sep 17 00:00:00 2001 From: Davis SHYAKA <87414827+davis-shyaka@users.noreply.github.com> Date: Sat, 5 Oct 2024 14:37:48 +0200 Subject: [PATCH] component: description --- src/lib/assets/icons/index.ts | 2 + .../assets/icons/information-fill-small.svg | 4 ++ .../ui/description/description.svelte | 41 +++++++++++++++++++ src/lib/components/ui/description/index.ts | 1 + src/lib/config/sitemap.ts | 3 +- src/routes/description/+page.svelte | 15 ++++++- src/routes/description/+page.ts | 22 ++++++++++ src/routes/description/default.svelte | 9 ++++ 8 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 src/lib/assets/icons/information-fill-small.svg create mode 100644 src/lib/components/ui/description/description.svelte create mode 100644 src/lib/components/ui/description/index.ts create mode 100644 src/routes/description/+page.ts create mode 100644 src/routes/description/default.svelte diff --git a/src/lib/assets/icons/index.ts b/src/lib/assets/icons/index.ts index 5364f6f..d8815c0 100644 --- a/src/lib/assets/icons/index.ts +++ b/src/lib/assets/icons/index.ts @@ -41,6 +41,7 @@ import GitBranch from './git-branch.svg?component'; import Globe from './globe.svg?component'; import GridSquare from './grid-square.svg?component'; import Inbox from './inbox.svg?component'; +import InformationFillSmall from './information-fill-small.svg?component'; import Information from './information.svg?component'; import Key from './key.svg?component'; import Link from './link.svg?component'; @@ -122,6 +123,7 @@ export const Icons = { Globe, GridSquare, Inbox, + InformationFillSmall, Information, Key, Link, diff --git a/src/lib/assets/icons/information-fill-small.svg b/src/lib/assets/icons/information-fill-small.svg new file mode 100644 index 0000000..9f11012 --- /dev/null +++ b/src/lib/assets/icons/information-fill-small.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/lib/components/ui/description/description.svelte b/src/lib/components/ui/description/description.svelte new file mode 100644 index 0000000..afcd6ec --- /dev/null +++ b/src/lib/components/ui/description/description.svelte @@ -0,0 +1,41 @@ + + +
+
+ {title} + + + + + + + +

{tooltip}

+
+
+
+
+
+
{content}
+
diff --git a/src/lib/components/ui/description/index.ts b/src/lib/components/ui/description/index.ts new file mode 100644 index 0000000..7528887 --- /dev/null +++ b/src/lib/components/ui/description/index.ts @@ -0,0 +1 @@ +export { default as Description } from './description.svelte'; diff --git a/src/lib/config/sitemap.ts b/src/lib/config/sitemap.ts index 3ca07d4..ea91ee4 100644 --- a/src/lib/config/sitemap.ts +++ b/src/lib/config/sitemap.ts @@ -101,8 +101,7 @@ export const aside_items: Aside = { }, { title: 'Description', - href: '/description', - status: 'soon' + href: '/description' }, { title: 'Drawer', diff --git a/src/routes/description/+page.svelte b/src/routes/description/+page.svelte index 6c910ae..9c9d155 100644 --- a/src/routes/description/+page.svelte +++ b/src/routes/description/+page.svelte @@ -1 +1,14 @@ -

description

+ + + + + + + diff --git a/src/routes/description/+page.ts b/src/routes/description/+page.ts new file mode 100644 index 0000000..789bc09 --- /dev/null +++ b/src/routes/description/+page.ts @@ -0,0 +1,22 @@ +import type { MetaTagsProps } from 'svelte-meta-tags'; + +export function load() { + const title = 'Description'; + const description = + 'Displays a brief heading and subheading to communicate any additional information or context a user needs to continue.'; + + const pageMetaTags = Object.freeze({ + title, + description, + openGraph: { + title, + description + } + }) satisfies MetaTagsProps; + + return { + pageMetaTags, + title, + description + }; +} diff --git a/src/routes/description/default.svelte b/src/routes/description/default.svelte new file mode 100644 index 0000000..61900e1 --- /dev/null +++ b/src/routes/description/default.svelte @@ -0,0 +1,9 @@ + + +