From 9ce8397ca0cf76f8dd3fe8e7221ad600e4059726 Mon Sep 17 00:00:00 2001 From: Elijah Potter Date: Mon, 15 Jan 2024 00:24:16 -0700 Subject: [PATCH] Styled Page --- .github/workflows/rust.yml | 6 ++- web/src/lib/Editor.svelte | 71 ++++++++++++++++++++++++++++ web/src/routes/+page.svelte | 92 +++++++----------------------------- web/static/icons/github.svg | 3 ++ web/static/icons/profile.svg | 1 + web/tailwind.config.js | 47 +++++++++--------- 6 files changed, 123 insertions(+), 97 deletions(-) create mode 100644 web/src/lib/Editor.svelte create mode 100644 web/static/icons/github.svg create mode 100644 web/static/icons/profile.svg diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d54fa2fd..2ca5bab6 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -18,5 +18,9 @@ jobs: - uses: actions/checkout@v3 - name: Build run: cargo build --verbose - - name: Run tests + - name: Build Release + run: cargo build --verbose --release + - name: Run Tests run: cargo test --verbose + - name: Run Tests in Release + run: cargo test --verbose --release diff --git a/web/src/lib/Editor.svelte b/web/src/lib/Editor.svelte new file mode 100644 index 00000000..31b93078 --- /dev/null +++ b/web/src/lib/Editor.svelte @@ -0,0 +1,71 @@ + + +
+ +
+ +
+ +
+ +

Suggestions

+ {#each lints as lint, i} + (focused = i)}> +
+
+

+ {lint.lint_kind} - “ + {spanContent(lint.span, content)} + ” +

+
+
+

{lint.message}

+ {#each lint.suggestions as suggestion} + + {/each} +
+
+
+ {/each} +
+
diff --git a/web/src/routes/+page.svelte b/web/src/routes/+page.svelte index 27cb28b9..e758913f 100644 --- a/web/src/routes/+page.svelte +++ b/web/src/routes/+page.svelte @@ -1,78 +1,22 @@ - -
- -
- +
+
+

Hi! I'm Audrey

+

The Grammar Checker for Artists

+
+ Project Repository + Author
- - - - {#each lints as lint, i} - (focused = i)}> -
-
-

- {lint.lint_kind} - “ - {spanContent(lint.span, content)} - ” -

-
-
-

{lint.message}

- {#each lint.suggestions as suggestion} - - {/each} -
-
-
- {/each} -
+
+
+ +
+ diff --git a/web/static/icons/github.svg b/web/static/icons/github.svg new file mode 100644 index 00000000..0215e057 --- /dev/null +++ b/web/static/icons/github.svg @@ -0,0 +1,3 @@ + + + diff --git a/web/static/icons/profile.svg b/web/static/icons/profile.svg new file mode 100644 index 00000000..fc8dc4cc --- /dev/null +++ b/web/static/icons/profile.svg @@ -0,0 +1 @@ + diff --git a/web/tailwind.config.js b/web/tailwind.config.js index 3bf251b9..6a890bab 100644 --- a/web/tailwind.config.js +++ b/web/tailwind.config.js @@ -1,27 +1,30 @@ export default { - content: ['./src/**/*.{html,js,svelte,ts}', './node_modules/flowbite-svelte/**/*.{html,js,svelte,ts}'], + content: [ + './src/**/*.{html,js,svelte,ts}', + './node_modules/flowbite-svelte/**/*.{html,js,svelte,ts}' + ], - plugins: [require('flowbite/plugin')], + plugins: [require('flowbite/plugin')], - darkMode: 'class', + darkMode: 'class', - theme: { - extend: { - colors: { - // flowbite-svelte - primary: { - 50: '#FFF5F2', - 100: '#FFF1EE', - 200: '#FFE4DE', - 300: '#FFD5CC', - 400: '#FFBCAD', - 500: '#FE795D', - 600: '#EF562F', - 700: '#EB4F27', - 800: '#CC4522', - 900: '#A5371B' - } - } - } - } + theme: { + extend: { + colors: { + // flowbite-svelte + primary: { + 900: '#133f71', + 800: '#355280', + 700: '#50658f', + 600: '#69799f', + 500: '#818eae', + 400: '#9aa4be', + 300: '#b3bace', + 200: '#ccd0de', + 100: '#e5e7ef', + 50: '#ffffff' + } + } + } + } };