From 15ec60cdd5ae1673a2abe2b14be0098f99a3d192 Mon Sep 17 00:00:00 2001 From: jinhojang6 Date: Wed, 14 Feb 2024 04:34:21 +0900 Subject: [PATCH] feat: implement type effect --- src/App.svelte | 12 +++--- src/app.css | 18 ++++++++- src/components/History.svelte | 24 ++++++++---- src/components/Input.svelte | 3 ++ src/utils/commands.ts | 71 +++++++++++++++++++++++++++++++++-- 5 files changed, 108 insertions(+), 20 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index ecae2c1..b4cce5b 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -20,19 +20,19 @@ class="h-full p-4 overflow-auto text-xs border-2 rounded-md sm:text-sm md:text-base" style={`background-color: ${$theme.background}; color: ${$theme.foreground}; border-color: transparent;`} > - -
+
- -
{` +
+
+ {` + ---------------------------------------------------------------------------- - < Apply > < X > + < X > ----------------------------------------------------------------------------- `} -
diff --git a/src/app.css b/src/app.css index a092dc8..dc1cee8 100644 --- a/src/app.css +++ b/src/app.css @@ -20,12 +20,16 @@ body { background-color: #000099; } +.banner { + white-space: pre-wrap; +} + main > div > div:first-child { display: none; } -main > div:first-child > p { - margin-bottom: 24px; +#input { + margin-top: 24px; } .buttons-row { @@ -34,6 +38,16 @@ main > div:first-child > p { white-space: pre-wrap; } +.whitespace-pre { + white-space: pre-wrap; +} + +.link { + color: #828282; + text-decoration: underline; + cursor: pointer; +} + ::-webkit-scrollbar { width: 5px; height: 5px; diff --git a/src/components/History.svelte b/src/components/History.svelte index 365759d..dd1cf88 100644 --- a/src/components/History.svelte +++ b/src/components/History.svelte @@ -1,15 +1,21 @@ + + {#each $history as { command, outputs }}
- - +

{command}

@@ -17,9 +23,11 @@
{#each outputs as output} -

- {output} -

+ {#if output.startsWith("