Skip to content

Commit

Permalink
Add TailwindCSS and DaisyUI
Browse files Browse the repository at this point in the history
  • Loading branch information
FyreByrd committed Sep 21, 2024
1 parent 4579147 commit a7b74da
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,20 @@
"@sveltejs/adapter-auto": "^3.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@tailwindcss/typography": "^0.5.15",
"@types/eslint": "^9.6.0",
"autoprefixer": "^10.4.20",
"daisyui": "^4.12.10",
"eslint": "^9.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-svelte": "^2.36.0",
"globals": "^15.0.0",
"postcss": "^8.4.47",
"prettier": "^3.1.1",
"prettier-plugin-svelte": "^3.1.2",
"svelte": "^4.2.7",
"svelte-check": "^4.0.0",
"tailwindcss": "^3.4.12",
"typescript": "^5.0.0",
"typescript-eslint": "^8.0.0",
"vite": "^5.0.3"
Expand Down
6 changes: 6 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {}
}
};
7 changes: 7 additions & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<script lang="ts">
import 'tailwindcss/tailwind.css';
</script>

<main class="prose p-5 dark:prose-invert w-full m-auto max-w-none">
<slot />
</main>
12 changes: 12 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ['./src/**/*.{html,svelte,js,ts}'],
theme: {
extend: {}
},
plugins: [require('daisyui'), require('@tailwindcss/typography')],
daisyui: {
themes: ['light', 'dark'],
darkTheme: 'dark'
}
};

0 comments on commit a7b74da

Please sign in to comment.