diff --git a/src/app.css b/src/app.css index 18596bb..7b124d4 100644 --- a/src/app.css +++ b/src/app.css @@ -54,6 +54,13 @@ strong { @apply text-xl; } +.tiptap-minirenderer { + @apply h-full w-full p-2; + @apply focus:outline-none; + font-family: Minecraft; + @apply text-xl; +} + .tiptap p.is-editor-empty:first-child::before { color: #7f7f7f; content: attr(data-placeholder); @@ -92,6 +99,11 @@ strong { filter: blur(3px); } +.export-button { + @apply items-center p-1 px-1.5 bg-zinc-900 text-zinc-200 hover:text-white rounded-md font-lexend text-xs h-6; + @apply w-0 invisible sm:w-fit sm:visible; /* hide on mobile */ +} + /* Useful */ .nomob { diff --git a/src/lib/components/modals/ExportSelectionModal.svelte b/src/lib/components/modals/ExportSelectionModal.svelte new file mode 100644 index 0000000..95c4452 --- /dev/null +++ b/src/lib/components/modals/ExportSelectionModal.svelte @@ -0,0 +1,115 @@ + + + +
+ {#key value} +

Selected text:

+
+ +
+ +

Output:

+ + {#if $appSettings.syntaxHighlight} + + {:else} +
+                {editor ? convert(
+                    value,
+                    shouldOptimise,
+                    "standard",
+                    jsonOutput
+                ) : "Loading..."}
+            
+ {/if} +
+ +
+ + +
+ + + + {/key} +
+
diff --git a/src/lib/components/modals/topbar/ExportModal.svelte b/src/lib/components/modals/topbar/ExportModal.svelte index 7cfc145..e42c976 100644 --- a/src/lib/components/modals/topbar/ExportModal.svelte +++ b/src/lib/components/modals/topbar/ExportModal.svelte @@ -7,6 +7,7 @@ import { Highlight } from "svelte-highlight"; import typescript from "svelte-highlight/languages/typescript"; import { appSettings } from "$lib/settings"; + import { json } from "svelte-highlight/languages"; // Icons import IconItem from "~icons/tabler/swords"; @@ -17,7 +18,6 @@ import IconCopy from "~icons/tabler/copy"; import IconCheck from "~icons/tabler/check"; import IconDownload from "~icons/tabler/download"; - import { json } from "svelte-highlight/languages"; // UI let showOutput: string | null = $state(null); diff --git a/src/lib/components/modals/topbar/SettingsModal.svelte b/src/lib/components/modals/topbar/SettingsModal.svelte index a655ae2..6f0d927 100644 --- a/src/lib/components/modals/topbar/SettingsModal.svelte +++ b/src/lib/components/modals/topbar/SettingsModal.svelte @@ -42,6 +42,15 @@ +
+ + +
+