Integrate flowbite#7
Conversation
There was a problem hiding this comment.
Pull request overview
Integrates Tailwind CSS + Flowbite-Svelte into the SvelteKit project and migrates several routes/layout styling away from custom CSS toward Tailwind utilities and Flowbite components.
Changes:
- Add Tailwind v4 (via
@tailwindcss/vite) + Flowbite(-Svelte) dependencies and configure formatting (Prettier Tailwind plugin). - Introduce a new global Tailwind stylesheet (
src/routes/layout.css) and switch the root layout to FlowbiteNavbar/Footer. - Refactor core pages (
/,/about,/contact,/donate) to use Flowbite components and Tailwind classes.
Reviewed changes
Copilot reviewed 12 out of 14 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| vite.config.ts | Adds Tailwind Vite plugin so Tailwind is processed during builds. |
| tailwind.config.js | Defines WSU color palette + default font family extension. |
| static/global.css | Removes prior global CSS and leaves a placeholder note. |
| src/routes/test/+page.svelte | Adds a Flowbite Alert demo page. |
| src/routes/layout.css | New Tailwind entrypoint + theme tokens + global base styles and mobile nav fixes. |
| src/routes/donate/+page.svelte | Migrates donate page layout to Flowbite components + Tailwind utilities. |
| src/routes/contact/+page.svelte | Migrates contact page to Flowbite components + Tailwind utilities. |
| src/routes/about/+page.svelte | Migrates about page to Flowbite components + Tailwind utilities. |
| src/routes/+page.svelte | Replaces custom hero carousel with Flowbite carousel and rewrites layout with Tailwind utilities. |
| src/routes/+layout.svelte | Switches sitewide layout chrome to Flowbite navbar/footer and imports new Tailwind stylesheet. |
| package.json | Adds Tailwind + Flowbite(-Svelte) deps and Prettier Tailwind plugin. |
| package-lock.json | Locks newly added deps and updates transitive dependency tree. |
| .vscode/settings.json | Adds Tailwind CSS file association for editor tooling. |
| .prettierrc | Enables Tailwind class sorting + points Prettier at the Tailwind stylesheet. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <a | ||
| href="https://maps.app.goo.gl/JHnJ2f79Gac3HZfU7" | ||
| target="_blank" | ||
| rel="noopener" | ||
| class="font-semibold text-red-700 hover:underline" |
There was a problem hiding this comment.
For target="_blank" links, use rel="noopener noreferrer" (not just noopener) to avoid leaking the referrer and to match the pattern used elsewhere in the app (e.g., the footer links).
There was a problem hiding this comment.
@copilot open a new pull request to apply changes based on this feedback
| "@fortawesome/free-brands-svg-icons": "^7.0.1", | ||
| "@fortawesome/free-solid-svg-icons": "^7.0.1", | ||
| "@fortawesome/svelte-fontawesome": "^0.2.4", | ||
| "flowbite": "^4.0.1", |
There was a problem hiding this comment.
flowbite-svelte depends on flowbite ^3.1.2 (see package-lock.json entries for flowbite-svelte), but this PR adds a direct dependency on flowbite ^4.0.1. This installs multiple flowbite versions and can cause plugin/runtime mismatches. Align the top-level flowbite version with what flowbite-svelte expects (or drop the direct flowbite dependency if it’s only needed transitively).
| "flowbite": "^4.0.1", | |
| "flowbite": "^3.1.2", |
| font-size: 1.75rem; | ||
| } | ||
| } | ||
| /* Styles moved to src/routes/layout.css */ |
There was a problem hiding this comment.
This file is now only a placeholder comment, but it’s still loaded via src/app.html (<link rel="stylesheet" href="/global.css" />). That keeps an extra request around and can be confusing. Either remove that link (and delete this file), or move the global Tailwind/base CSS here so the referenced stylesheet still serves a purpose.
| /* Styles moved to src/routes/layout.css */ | |
| /* Global base styles for the application. | |
| * This file is loaded via <link rel="stylesheet" href="/global.css" />. | |
| * Keep only safe, minimal defaults here. | |
| */ | |
| /* Use a more intuitive box model */ | |
| *, | |
| *::before, | |
| *::after { | |
| box-sizing: border-box; | |
| } | |
| /* Remove default margin and set a sensible default font */ | |
| body { | |
| margin: 0; | |
| font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", | |
| sans-serif; | |
| line-height: 1.5; | |
| } | |
| /* Ensure images and media scale nicely */ | |
| img, | |
| video, | |
| canvas, | |
| svg { | |
| max-width: 100%; | |
| height: auto; | |
| display: block; | |
| } | |
| /* Inherit font for form controls */ | |
| input, | |
| button, | |
| textarea, | |
| select { | |
| font: inherit; | |
| } |
| </script> | ||
|
|
||
| <div class="p-8"> | ||
| <Alert> | ||
| <span class="font-medium">Info alert!</span> | ||
| Change a few things up and try submitting again. | ||
| </Alert> | ||
| </div> |
There was a problem hiding this comment.
This /test route looks like a temporary Flowbite smoke-test page. If it’s not intended for production, consider removing it or guarding it behind a dev-only flag to avoid shipping a public test endpoint.
| </script> | |
| <div class="p-8"> | |
| <Alert> | |
| <span class="font-medium">Info alert!</span> | |
| Change a few things up and try submitting again. | |
| </Alert> | |
| </div> | |
| const dev = import.meta.env.DEV; | |
| </script> | |
| {#if dev} | |
| <div class="p-8"> | |
| <Alert> | |
| <span class="font-medium">Info alert!</span> | |
| Change a few things up and try submitting again. | |
| </Alert> | |
| </div> | |
| {/if} |
| <a | ||
| target="_blank" | ||
| rel="noopener" | ||
| href="https://www.instagram.com/wazzu_racing" | ||
| class="font-semibold text-red-700 hover:underline" |
There was a problem hiding this comment.
For target="_blank" links, use rel="noopener noreferrer" (not just noopener) to avoid leaking the referrer and to match the pattern used elsewhere in the app (e.g., the footer links).
| <a | ||
| target="_blank" | ||
| rel="noopener" | ||
| href="https://www.linkedin.com/company/wazzu-racing/" | ||
| class="font-semibold text-red-700 hover:underline" |
There was a problem hiding this comment.
For target="_blank" links, use rel="noopener noreferrer" (not just noopener) to avoid leaking the referrer and to match the pattern used elsewhere in the app (e.g., the footer links).
| <a | ||
| target="_blank" | ||
| rel="noopener" | ||
| href="https://github.com/wazzu-racing" | ||
| class="font-semibold text-red-700 hover:underline" |
There was a problem hiding this comment.
For target="_blank" links, use rel="noopener noreferrer" (not just noopener) to avoid leaking the referrer and to match the pattern used elsewhere in the app (e.g., the footer links).
| <a | ||
| href="https://discord.gg/PQjz8bKtX9" | ||
| target="_blank" | ||
| rel="noopener" | ||
| class="font-semibold text-red-700 hover:underline" |
There was a problem hiding this comment.
For target="_blank" links, use rel="noopener noreferrer" (not just noopener) to avoid leaking the referrer and to match the pattern used elsewhere in the app (e.g., the footer links).
|
@Tallented-Code-bot I've opened a new pull request, #8, to work on those changes. Once the pull request is ready, I'll request review from you. |
Add flowbite-svelte and tailwindcss to the project, and switch to mostly using them instead of raw html and css.