Add tailwind to frontend

This commit is contained in:
2024-10-28 00:41:03 +01:00
parent 87edd6f478
commit 0662ed0c56
7 changed files with 578 additions and 1 deletions

View File

@@ -10,8 +10,13 @@
"astro": "astro" "astro": "astro"
}, },
"dependencies": { "dependencies": {
"astro": "^4.16.7",
"@astrojs/check": "^0.9.4", "@astrojs/check": "^0.9.4",
"astro": "^4.16.7",
"typescript": "^5.6.3" "typescript": "^5.6.3"
},
"devDependencies": {
"autoprefixer": "^10.4.20",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.14"
} }
} }

547
frontend/pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

View File

@@ -1,4 +1,6 @@
--- ---
import '../styles/global.css';
interface Props { interface Props {
title: string; title: string;
} }

View File

@@ -61,6 +61,12 @@ import Card from '../components/Card.astro';
/> />
</ul> </ul>
</main> </main>
<div class="min-h-screen bg-gray-100 flex items-center justify-center">
<h1 class="text-4xl font-bold text-blue-600 hover:text-blue-800">
Hello Tailwind + Astro!
</h1>
</div>
</Layout> </Layout>
<style> <style>

View File

@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;

View File

@@ -0,0 +1,8 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ['./src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}'],
theme: {
extend: {},
},
plugins: [],
}