diff --git a/site/src/lib/ui/BottomAppbar.svelte b/site/src/lib/ui/BottomAppbar.svelte deleted file mode 100644 index e37d878..0000000 --- a/site/src/lib/ui/BottomAppbar.svelte +++ /dev/null @@ -1,62 +0,0 @@ - - -{#if navOpen} - -
(navOpen = false)} - /> -{/if} - -
- {#if navOpen} - - {/if} - -
- - t18s - T18S - - - -
-
diff --git a/site/src/lib/ui/Code.svelte b/site/src/lib/ui/Code.svelte index e0f13cf..23d52cb 100644 --- a/site/src/lib/ui/Code.svelte +++ b/site/src/lib/ui/Code.svelte @@ -1,17 +1,9 @@
- npm install --save-dev t18s + npm install --save-dev t18s
diff --git a/site/src/lib/ui/Code/CodeGroup.svelte b/site/src/lib/ui/Code/CodeGroup.svelte deleted file mode 100644 index bd92406..0000000 --- a/site/src/lib/ui/Code/CodeGroup.svelte +++ /dev/null @@ -1,3 +0,0 @@ - \ No newline at end of file diff --git a/site/src/lib/ui/Code/CodeGroupHeader.svelte b/site/src/lib/ui/Code/CodeGroupHeader.svelte index b63b812..c33fb02 100644 --- a/site/src/lib/ui/Code/CodeGroupHeader.svelte +++ b/site/src/lib/ui/Code/CodeGroupHeader.svelte @@ -1,20 +1,18 @@ -
- - {#if title} -

- {title} -

- {/if} - - -
\ No newline at end of file +
diff --git a/site/src/lib/ui/Code/CodeHeader.svelte b/site/src/lib/ui/Code/CodeHeader.svelte new file mode 100644 index 0000000..49e468b --- /dev/null +++ b/site/src/lib/ui/Code/CodeHeader.svelte @@ -0,0 +1,8 @@ + + + +
+ +
\ No newline at end of file diff --git a/site/src/lib/ui/Code/CodePanelHeader.svelte b/site/src/lib/ui/Code/CodePanelHeader.svelte index 0945fd2..8fa3889 100644 --- a/site/src/lib/ui/Code/CodePanelHeader.svelte +++ b/site/src/lib/ui/Code/CodePanelHeader.svelte @@ -8,7 +8,7 @@ {#if tag || label}
{#if tag}
diff --git a/site/src/lib/ui/Code/CodeTab.svelte b/site/src/lib/ui/Code/CodeTab.svelte index 8618772..37ea406 100644 --- a/site/src/lib/ui/Code/CodeTab.svelte +++ b/site/src/lib/ui/Code/CodeTab.svelte @@ -2,14 +2,23 @@ import CodePanelHeader from "./CodePanelHeader.svelte"; import CopyButton from "./CopyButton.svelte"; - /** @type {string} */ - export let code; + /** @type {HTMLElement}*/ + let content; + + let copied = false; + function saveCodeToClipboard() { + copied = true; + navigator.clipboard.writeText(content.innerText); + setTimeout(() => { + copied = false; + }, 1000); + }
-
- +
+
diff --git a/site/src/lib/ui/Code/CopyButton.svelte b/site/src/lib/ui/Code/CopyButton.svelte index 722993b..82b05a7 100644 --- a/site/src/lib/ui/Code/CopyButton.svelte +++ b/site/src/lib/ui/Code/CopyButton.svelte @@ -1,26 +1,15 @@ +
+ + {#if navOpen} + +{/if} + diff --git a/site/src/lib/ui/nav/Appbar/BottomAppbarLink.svelte b/site/src/lib/ui/nav/Appbar/BottomAppbarLink.svelte new file mode 100644 index 0000000..6ab3ffb --- /dev/null +++ b/site/src/lib/ui/nav/Appbar/BottomAppbarLink.svelte @@ -0,0 +1,15 @@ + + + + + diff --git a/site/src/lib/ui/nav/Appbar/BottomAppbarSection.svelte b/site/src/lib/ui/nav/Appbar/BottomAppbarSection.svelte new file mode 100644 index 0000000..f240e0c --- /dev/null +++ b/site/src/lib/ui/nav/Appbar/BottomAppbarSection.svelte @@ -0,0 +1,8 @@ + + +
+ +
\ No newline at end of file diff --git a/site/src/lib/ui/nav/Appbar/BottomAppbarSectionHeading.svelte b/site/src/lib/ui/nav/Appbar/BottomAppbarSectionHeading.svelte new file mode 100644 index 0000000..0bc08bc --- /dev/null +++ b/site/src/lib/ui/nav/Appbar/BottomAppbarSectionHeading.svelte @@ -0,0 +1,3 @@ +

+ +

\ No newline at end of file diff --git a/site/src/lib/ui/Sidebar.svelte b/site/src/lib/ui/nav/Sidebar/Sidebar.svelte similarity index 51% rename from site/src/lib/ui/Sidebar.svelte rename to site/src/lib/ui/nav/Sidebar/Sidebar.svelte index e26d6e5..8204011 100644 --- a/site/src/lib/ui/Sidebar.svelte +++ b/site/src/lib/ui/nav/Sidebar/Sidebar.svelte @@ -1,7 +1,7 @@ @@ -16,19 +16,14 @@