From 59fe3d32ffbdc84956e1ecc9be2b11b787999bee Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Wed, 24 Jul 2024 09:17:39 -0400 Subject: [PATCH] added tailwind and cleaned up page Cleaned up page to allow Tailwind to start handling the look and feel of everything --- frontend/package.json | 8 +- frontend/postcss.config.js | 6 + frontend/src/App.svelte | 213 +++++++++++++++++++----------------- frontend/src/style.css | 4 + frontend/tailwind.config.js | 14 +++ 5 files changed, 142 insertions(+), 103 deletions(-) create mode 100644 frontend/postcss.config.js create mode 100644 frontend/tailwind.config.js diff --git a/frontend/package.json b/frontend/package.json index 2ee69ea..1c15fe4 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -12,11 +12,17 @@ "devDependencies": { "@sveltejs/vite-plugin-svelte": "^1.0.1", "@tsconfig/svelte": "^3.0.0", + "autoprefixer": "^10.4.19", + "postcss": "^8.4.39", "svelte": "^3.49.0", "svelte-check": "^2.8.0", "svelte-preprocess": "^4.10.7", + "tailwindcss": "^3.4.6", "tslib": "^2.4.0", "typescript": "^4.6.4", "vite": "^3.0.7" + }, + "dependencies": { + "@tailwindcss/aspect-ratio": "^0.4.2" } -} \ No newline at end of file +} diff --git a/frontend/postcss.config.js b/frontend/postcss.config.js new file mode 100644 index 0000000..2e7af2b --- /dev/null +++ b/frontend/postcss.config.js @@ -0,0 +1,6 @@ +export default { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +} diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index d688775..e11308f 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -1,125 +1,134 @@
- - - - - - +
+ + +
-
{aniListItem !== undefined ? aniListItem.data.Media.title.english : ""}
-
- - -
+ + {#if aniListLoggedIn} +
You are logged in {aniListWatchlist.data.Page.mediaList[0].user.name}!
+ {/if} - - {#if aniListLoggedIn} -
You are logged in!
- {/if} + {#if aniListLoggedIn} +
+

Your Watching List

-
- - -
- {#if aniListSearch !== undefined} -
    - {#each aniListSearch.data.Page.media as media, index (media.id)} -
  • -
    {media.title.english !== null ? media.title.english : media.title.romaji}
    -
  • - {:else} -
    No Results Yet...
    - {/each} -
- {/if} + +
+ {/if}
diff --git a/frontend/src/style.css b/frontend/src/style.css index 3940d6c..1fc5c86 100644 --- a/frontend/src/style.css +++ b/frontend/src/style.css @@ -1,3 +1,7 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + html { background-color: rgba(27, 38, 54, 1); text-align: center; diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js new file mode 100644 index 0000000..6791225 --- /dev/null +++ b/frontend/tailwind.config.js @@ -0,0 +1,14 @@ +/** @type {import('tailwindcss').Config} */ +export default { + content: [ + "./index.html", + "./src/**/*.{svelte,js,ts,jsx,tsx}", + ], + theme: { + extend: {}, + }, + plugins: [ + require('@tailwindcss/aspect-ratio'), + ], +} +