commit 4ab5f1679816d57078d7d3c456ef785752a1b67a Author: Kunthawat Greethong Date: Mon Apr 27 19:13:27 2026 +0700 Initial diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..6e1e38d --- /dev/null +++ b/.env.example @@ -0,0 +1,42 @@ +# Astro + Tina CMS Environment Variables + +# Site URL +PUBLIC_SITE_URL=https://your-domain.com + +# Tina CMS (optional - for production Tina admin) +TINA_TOKEN=your-tina-token-from-tina-cloud +TINA_CLIENT_ID=your-client-id + +# ConsentOS - Consent Management (moreminimore.com) +PUBLIC_CONSENT_SITE_ID=your-consent-site-id +PUBLIC_CONSENT_API_BASE=https://consent.moreminimore.com + +# ===== TRACKING SCRIPTS ===== +# All tracking scripts are blocked by ConsentOS until user gives consent + +# --- Analytics --- +# Google Analytics 4 +PUBLIC_GA4_ID=G-XXXXXXXXXX + +# Google Tag Manager +PUBLIC_GTM_ID=GTM-XXXXXXX + +# Umami (self-hosted analytics) +PUBLIC_UMAMI_URL=https://umami.example.com +PUBLIC_UMAMI_WEBSITE_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + +# Microsoft Clarity (heatmaps) +PUBLIC_CLARITY_ID=xxxxxxxxxx + +# --- Marketing / Advertising --- +# Facebook Pixel +PUBLIC_FB_PIXEL_ID=123456789 + +# Google Ads Conversion +PUBLIC_GOOGLE_ADS_ID=AW-123456789 + +# TikTok Pixel +PUBLIC_TIKTOK_PIXEL_ID=XXXXXXXX + +# LINE Channel Tag (Thailand) +PUBLIC_LINE_CHANNEL_ID=1234567890 diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml new file mode 100644 index 0000000..e341039 --- /dev/null +++ b/.gitea/workflows/deploy.yml @@ -0,0 +1,41 @@ +name: Deploy to Easypanel + +on: + push: + branches: + - main + - master + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Push to Easypanel + env: + EASYPANEL_HOST: ${{ secrets.EASYPANEL_HOST }} + EASYPANEL_TOKEN: ${{ secrets.EASYPANEL_TOKEN }} + EASYPANEL_PROJECT: ${{ secrets.EASYPANEL_PROJECT }} + run: | + # Install Easypanel CLI + curl -sSL https://get.easypanel.io | sh + + # Deploy + easypanel deploy $EASYPANEL_PROJECT \ + --host $EASYPANEL_HOST \ + --token $EASYPANEL_TOKEN \ + --dir ./dist \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bf227c9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +# Dependencies +node_modules/ + +# Build output +dist/ + +# Environment +.env +.env.local +.env.production + +# Tina CMS +.tina/dump/** +.tina/node_modules/** + +# IDE +.idea/ +.vscode/ +*.swp +*.swo + +# OS +.DS_Store +Thumbs.db + +# Logs +*.log +npm-debug.log* \ No newline at end of file diff --git a/.tina/config.ts b/.tina/config.ts new file mode 100644 index 0000000..21faba4 --- /dev/null +++ b/.tina/config.ts @@ -0,0 +1,18 @@ +import { defineConfig } from 'tinacms'; +import { schema } from './schema'; + +export default defineConfig({ + schema, + ui: { + navigation: { + 'content/posts': { label: 'Posts' }, + 'content/pages': { label: 'Pages' }, + }, + }, + media: { + tina: { + publicFolder: 'public', + mediaRoot: 'uploads', + }, + }, +}); \ No newline at end of file diff --git a/.tina/schema.ts b/.tina/schema.ts new file mode 100644 index 0000000..08dab72 --- /dev/null +++ b/.tina/schema.ts @@ -0,0 +1,91 @@ +import { defineSchema } from 'tinacms' + +export const schema = defineSchema({ + collections: [ + { + name: 'post', + label: 'Posts', + path: 'src/content/posts', + format: 'mdx', + fields: [ + { + type: 'string', + name: 'title', + label: 'Title', + required: true, + }, + { + type: 'string', + name: 'description', + label: 'Description', + }, + { + type: 'datetime', + name: 'publishedAt', + label: 'Published At', + }, + { + type: 'string', + name: 'category', + label: 'Category', + options: ['news', 'blog', 'tutorial'], + }, + { + type: 'rich-text', + name: 'body', + label: 'Body', + isBody: true, + }, + ], + }, + { + name: 'page', + label: 'Pages', + path: 'src/content/pages', + format: 'mdx', + fields: [ + { + type: 'string', + name: 'title', + label: 'Title', + required: true, + }, + { + type: 'string', + name: 'description', + label: 'Description', + }, + { + type: 'rich-text', + name: 'body', + label: 'Body', + isBody: true, + }, + ], + }, + { + name: 'settings', + label: 'Settings', + path: 'src/content/settings', + format: 'json', + fields: [ + { + type: 'string', + name: 'siteName', + label: 'Site Name', + }, + { + type: 'string', + name: 'siteDescription', + label: 'Site Description', + }, + { + type: 'string', + name: 'language', + label: 'Language', + options: ['th', 'en', 'th-en'], + }, + ], + }, + ], +}) diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..51500df --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,207 @@ +# Astro Tina Starter - Agent Knowledge Base + +**Generated:** 2026-04-17 +**Version:** 2.0.0 +**Type:** Astro 6 + Tina CMS Starter Template + +--- + +## OVERVIEW + +Starter template for building websites with Astro 6, Tina CMS, and Tailwind CSS 4.x. + +### Tech Stack + +| Component | Technology | Version | +|-----------|------------|---------| +| Framework | Astro | 6.1.7 | +| CMS | Tina CMS | 2.x | +| Styling | Tailwind CSS | 4.x | + +### Key Features + +- Self-hosted Tina CMS with schema-based content +- Tailwind CSS 4.x using `@tailwindcss/vite` plugin +- External consent system integration +- Thai language support with Noto Sans Thai +- Docker-ready with nginx + +--- + +## PROJECT STRUCTURE + +``` +astro-tina-starter/ +├── .tina/ +│ ├── config.ts # Tina CMS configuration +│ └── schema.ts # Content schema definitions +├── src/ +│ ├── styles/ +│ │ └── global.css # Tailwind v4 styles + @theme +│ ├── layouts/ +│ │ └── Layout.astro +│ ├── pages/ +│ │ └── index.astro +│ ├── components/ +│ │ ├── Header.astro +│ │ └── TrackingScripts.astro # Tracking scripts (GA4, FB Pixel, etc.) +│ └── content/ +│ ├── config.ts # Astro content collections +│ ├── posts/ # Blog posts (MDX) +│ ├── pages/ # Static pages (MDX) +│ └── settings/ # Site settings (JSON) +├── public/ +│ └── favicon.svg +├── Dockerfile +├── nginx.conf +├── astro.config.mjs +├── tsconfig.json +└── package.json +``` + +--- + +## IMPORTANT CONVENTIONS + +### Tailwind CSS 4.x Setup + +**CRITICAL:** This template uses `@tailwindcss/vite` plugin, NOT `@astrojs/tailwind`. + +```javascript +// astro.config.mjs +import tailwindcss from '@tailwindcss/vite' + +export default defineConfig({ + vite: { + plugins: [tailwindcss()], + }, +}) +``` + +```css +/* src/styles/global.css */ +@import "tailwindcss"; + +@theme { + --color-primary: #1a1a1a; + --color-accent: #3b82f6; +} +``` + +### Tina CMS Content + +Tina CMS manages content in `src/content/`: +- `posts/` - Blog posts (MDX format) +- `pages/` - Static pages (MDX format) +- `settings/` - Site settings (JSON format) + +Schema defined in `.tina/schema.ts`. + +### ConsentOS + Tracking System + +ConsentOS (`consent.moreminimore.com`) manages consent and blocking: + +```bash +# ConsentOS +PUBLIC_CONSENT_SITE_ID=your-site-id +PUBLIC_CONSENT_API_BASE=https://consent.moreminimore.com + +# Analytics +PUBLIC_GA4_ID=G-XXXXXXXXXX +PUBLIC_GTM_ID=GTM-XXXXXXX +PUBLIC_UMAMI_URL=https://umami.example.com +PUBLIC_UMAMI_WEBSITE_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +PUBLIC_CLARITY_ID=xxxxxxxxxx + +# Marketing +PUBLIC_FB_PIXEL_ID=123456789 +PUBLIC_GOOGLE_ADS_ID=AW-123456789 +PUBLIC_TIKTOK_PIXEL_ID=XXXXXXXX +PUBLIC_LINE_CHANNEL_ID=1234567890 +``` + +**Tracking Scripts:** +- `TrackingScripts.astro` - contains all tracking scripts +- Scripts are auto-blocked by ConsentOS until user consent +- Categories: `analytics`, `marketing` + +--- + +## CREDENTIALS + +No external API credentials required for this template. + +### Optional Environment Variables + +| Variable | Description | +|----------|-------------| +| `TINA_TOKEN` | Tina CMS production authentication | +| `TINA_CLIENT_ID` | Tina CMS client ID | +| `PUBLIC_CONSENT_SITE_ID` | ConsentOS site ID | +| `PUBLIC_CONSENT_API_BASE` | ConsentOS API base URL | +| `PUBLIC_GA4_ID` | Google Analytics 4 | +| `PUBLIC_GTM_ID` | Google Tag Manager | +| `PUBLIC_UMAMI_URL` | Umami analytics URL | +| `PUBLIC_UMAMI_WEBSITE_ID` | Umami website ID | +| `PUBLIC_CLARITY_ID` | Microsoft Clarity | +| `PUBLIC_FB_PIXEL_ID` | Facebook Pixel | +| `PUBLIC_GOOGLE_ADS_ID` | Google Ads conversion ID | +| `PUBLIC_TIKTOK_PIXEL_ID` | TikTok Pixel | +| `PUBLIC_LINE_CHANNEL_ID` | LINE Channel Tag | + +--- + +## COMMANDS + +```bash +# Install dependencies +npm install + +# Development +npm run dev + +# Build +npm run build + +# Preview +npm run preview +``` + +--- + +## ANTI-PATTERNS + +- **NEVER** use `@astrojs/tailwind` (deprecated) +- **ALWAYS** use `@tailwindcss/vite` for Tailwind v4 +- **NEVER** commit environment files (.env) + +--- + +## DEPLOYMENT + +### Docker + +```bash +docker build -t astro-tina-starter . +docker run -p 8080:80 astro-tina-starter +``` + +### Easypanel + +Static hosting - no persistent volume needed. + +### Manual + +```bash +npm install +npm run build +# Serve dist/ folder with any static server +``` + +--- + +## NOTES + +- Tina CMS admin: http://localhost:4321/admin +- Astro default port: 4321 +- Tina dev server: 3001 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..140be6f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +# Build stage +FROM node:20-alpine AS builder + +WORKDIR /app + +COPY package*.json ./ +RUN npm install +COPY . . +RUN npm run build + +# Static files stage +FROM nginx:alpine AS runner + +WORKDIR /app + +# Copy static files from builder +COPY --from=builder /app/dist ./dist + +# Copy nginx config +COPY nginx.conf /etc/nginx/http.d/default.conf + +EXPOSE 80 + +CMD ["nginx", "-g", "daemon off;"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..79988f4 --- /dev/null +++ b/README.md @@ -0,0 +1,121 @@ +# Astro Tina Starter + +Astro 6.1.7 + Tina CMS starter template with Tailwind CSS 4.x + +## Tech Stack + +- **Framework:** Astro 6.1.7 (static mode) +- **CMS:** Tina CMS (self-hosted) +- **Styling:** Tailwind CSS 4.x with `@tailwindcss/vite` +- **Language:** TypeScript + +## Features + +- Self-hosted Tina CMS with schema-based content +- Tailwind CSS 4.x using `@tailwindcss/vite` plugin +- ConsentOS + Tracking Scripts (GA4, Facebook Pixel, etc.) +- Docker-ready with nginx +- Thai language support foundation + +## Quick Start + +```bash +# Install dependencies +npm install + +# Start development (accessible at http://0.0.0.0:4321) +npm run dev + +# Build for production +npm run build +``` + +## Tina CMS Access + +During development, access Tina CMS at: +- http://localhost:4321/admin + +For production, you'll need a TINA_TOKEN environment variable. + +## ConsentOS + Tracking + +This template includes ConsentOS (`consent.moreminimore.com`) for PDPA-compliant consent management and auto-blocking of tracking scripts. + +### Environment Variables + +```bash +# ConsentOS +PUBLIC_CONSENT_SITE_ID=your-site-id +PUBLIC_CONSENT_API_BASE=https://consent.moreminimore.com + +# Analytics +PUBLIC_GA4_ID=G-XXXXXXXXXX +PUBLIC_GTM_ID=GTM-XXXXXXX +PUBLIC_UMAMI_URL=https://umami.example.com +PUBLIC_UMAMI_WEBSITE_ID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx +PUBLIC_CLARITY_ID=xxxxxxxxxx + +# Marketing +PUBLIC_FB_PIXEL_ID=123456789 +PUBLIC_GOOGLE_ADS_ID=AW-123456789 +PUBLIC_TIKTOK_PIXEL_ID=XXXXXXXX +PUBLIC_LINE_CHANNEL_ID=1234567890 +``` + +### How It Works + +1. `TrackingScripts.astro` contains all tracking codes with `data-consent-category` attributes +2. ConsentOS `consent-loader.js` scans and auto-blocks scripts until user consent +3. Categories: `analytics`, `marketing` + +## Project Structure + +``` +astro-tina-starter/ +├── .tina/ +│ ├── config.ts # Tina CMS configuration +│ └── schema.ts # Content schema definitions +├── src/ +│ ├── styles/ +│ │ └── global.css # Tailwind v4 styles +│ ├── layouts/ +│ │ └── Layout.astro +│ ├── pages/ +│ │ └── index.astro +│ ├── components/ +│ │ ├── Header.astro +│ │ └── TrackingScripts.astro # Tracking scripts +│ └── content/ +│ └── config.ts # Tina content collections +├── Dockerfile +├── nginx.conf +└── package.json +``` + +## Tailwind CSS 4.x + +This template uses Tailwind CSS 4.x with the `@tailwindcss/vite` plugin. +The configuration is done via CSS `@theme` block in `src/styles/global.css`. + +```css +@import "tailwindcss"; + +@theme { + --color-primary: #1a1a1a; + --color-accent: #3b82f6; +} +``` + +## Docker + +```bash +# Build +docker build -t astro-tina . + +# Run +docker run -p 8080:80 astro-tina +``` + +## License + +MIT diff --git a/astro.config.mjs b/astro.config.mjs new file mode 100644 index 0000000..c71a507 --- /dev/null +++ b/astro.config.mjs @@ -0,0 +1,39 @@ +import { defineConfig } from 'astro/config' +import tailwindcss from '@tailwindcss/vite' +import tina from 'tinacms' +import { fileURLToPath } from 'url' +import path from 'path' + +const __dirname = path.dirname(fileURLToPath(import.meta.url)) + +export default defineConfig({ + site: 'https://example.com', + integrations: [ + tina({ + enabled: !!process.env.TINA_TOKEN, + sidebar: { + partials: [], + }, + }), + ], + vite: { + plugins: [tailwindcss()], + resolve: { + alias: { + '@': path.resolve(__dirname, './src'), + '@components': path.resolve(__dirname, './src/components'), + '@layouts': path.resolve(__dirname, './src/layouts'), + '@styles': path.resolve(__dirname, './src/styles'), + '@content': path.resolve(__dirname, './src/content'), + }, + }, + }, + output: 'static', + build: { + assets: '_assets', + }, + server: { + host: '0.0.0.0', + port: 4321, + }, +}) \ No newline at end of file diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..0908018 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,14 @@ +server { + listen 80; + root /app/dist; + index index.html; + + location / { + try_files $uri $uri/ $uri.html =404; + } + + location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2)$ { + expires 1y; + add_header Cache-Control "public, immutable"; + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..a8a853e --- /dev/null +++ b/package.json @@ -0,0 +1,34 @@ +{ + "name": "astro-tina-starter", + "type": "module", + "version": "2.0.0", + "description": "Astro 6 + Tina CMS starter template with Tailwind CSS 4.x", + "scripts": { + "dev": "tinacms dev --port 3001 & astro dev", + "dev:astro": "astro dev", + "dev:tina": "tinacms dev --port 3001", + "build": "tinacms build && astro build", + "preview": "astro preview", + "astro": "astro" + }, + "dependencies": { + "@astrojs/check": "^0.9.4", + "@astrojs/mdx": "^4.0.0", + "@tailwindcss/typography": "^0.5.15", + "@tailwindcss/vite": "^4.0.0", + "astro": "^6.1.7", + "react": "^18.3.1", + "react-dom": "^18.3.1", + "tailwindcss": "^4.0.0", + "tina": "^2.1.4", + "tinacms": "^2.2.4", + "typescript": "^5.6.3" + }, + "devDependencies": { + "@types/react": "^18.3.12", + "@types/react-dom": "^18.3.1" + }, + "engines": { + "node": ">=20.0.0" + } +} diff --git a/public/favicon.svg b/public/favicon.svg new file mode 100644 index 0000000..5cc28de --- /dev/null +++ b/public/favicon.svg @@ -0,0 +1,10 @@ + + + + + + + + + A + diff --git a/src/components/Header.astro b/src/components/Header.astro new file mode 100644 index 0000000..163a664 --- /dev/null +++ b/src/components/Header.astro @@ -0,0 +1,27 @@ +--- +interface Props { + siteName?: string +} + +const { siteName = "Astro Tina Starter" } = Astro.props +--- + +
+ +
diff --git a/src/components/TrackingScripts.astro b/src/components/TrackingScripts.astro new file mode 100644 index 0000000..51d0abc --- /dev/null +++ b/src/components/TrackingScripts.astro @@ -0,0 +1,167 @@ +--- +const ga4Id = import.meta.env.PUBLIC_GA4_ID +const gtmId = import.meta.env.PUBLIC_GTM_ID +const umamiUrl = import.meta.env.PUBLIC_UMAMI_URL +const umamiWebsiteId = import.meta.env.PUBLIC_UMAMI_WEBSITE_ID +const clarityId = import.meta.env.PUBLIC_CLARITY_ID +const fbPixelId = import.meta.env.PUBLIC_FB_PIXEL_ID +const googleAdsId = import.meta.env.PUBLIC_GOOGLE_ADS_ID +const tiktokPixelId = import.meta.env.PUBLIC_TIKTOK_PIXEL_ID +const lineChannelId = import.meta.env.PUBLIC_LINE_CHANNEL_ID +--- + + +{ga4Id && ( + +)} +{ga4Id && ( + +)} + + +{gtmId && ( + +)} + + +{umamiUrl && umamiWebsiteId && ( + +)} + + +{clarityId && ( + +)} + + +{fbPixelId && ( + +)} +{fbPixelId && ( + +)} + + +{googleAdsId && ( + +)} + + +{tiktokPixelId && ( + +)} + + +{lineChannelId && ( + +)} diff --git a/src/content/config.ts b/src/content/config.ts new file mode 100644 index 0000000..7bf9732 --- /dev/null +++ b/src/content/config.ts @@ -0,0 +1,34 @@ +import { defineCollection, z } from "astro:content" + +const postCollection = defineCollection({ + type: "content", + schema: z.object({ + title: z.string(), + description: z.string().optional(), + publishedAt: z.date().optional(), + category: z.enum(["news", "blog", "tutorial"]).optional(), + }), +}) + +const pageCollection = defineCollection({ + type: "content", + schema: z.object({ + title: z.string(), + description: z.string().optional(), + }), +}) + +const settingsCollection = defineCollection({ + type: "data", + schema: z.object({ + siteName: z.string(), + siteDescription: z.string(), + language: z.enum(["th", "en", "th-en"]).default("th"), + }), +}) + +export const collections = { + posts: postCollection, + pages: pageCollection, + settings: settingsCollection, +} diff --git a/src/content/posts/welcome.mdx b/src/content/posts/welcome.mdx new file mode 100644 index 0000000..8df33e2 --- /dev/null +++ b/src/content/posts/welcome.mdx @@ -0,0 +1,17 @@ +--- +title: Welcome to Astro Tina Starter +description: A modern starter template with Astro 6, Tina CMS, and Thai language support. +publishedAt: 2026-04-17 +category: blog +--- + +Welcome to our new blog built with Astro and Tina CMS! + +## Features + +- **Tina CMS** - Self-hosted content management +- **Tailwind CSS v4** - Latest styling with @tailwindcss/vite +- **ConsentOS** - PDPA-compliant consent management +- **Thai Support** - Ready for Thai language content + +Stay tuned for more updates! diff --git a/src/content/settings/site.json b/src/content/settings/site.json new file mode 100644 index 0000000..8192b18 --- /dev/null +++ b/src/content/settings/site.json @@ -0,0 +1,5 @@ +{ + "siteName": "Astro Tina Starter", + "siteDescription": "Astro 6 + Tina CMS starter template with Thai language support", + "language": "th" +} diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro new file mode 100644 index 0000000..216bcfb --- /dev/null +++ b/src/layouts/Layout.astro @@ -0,0 +1,41 @@ +--- +import "@/styles/global.css" +import TrackingScripts from "@/components/TrackingScripts.astro" + +interface Props { + title?: string + description?: string +} + +const { + title = "Astro Tina Starter", + description = "Astro 6 + Tina CMS starter template", +} = Astro.props + +const consentSiteId = import.meta.env.PUBLIC_CONSENT_SITE_ID || 'demo' +const consentApiBase = import.meta.env.PUBLIC_CONSENT_API_BASE || 'https://consent.moreminimore.com' +--- + + + + + + + + + {title} + + + + + + + + + + + diff --git a/src/pages/index.astro b/src/pages/index.astro new file mode 100644 index 0000000..841ac53 --- /dev/null +++ b/src/pages/index.astro @@ -0,0 +1,47 @@ +--- +import Layout from "@/layouts/Layout.astro" +--- + + +
+
+

+ Welcome to Astro Tina Starter +

+

+ A modern starter template with Astro 6, Tina CMS, Tailwind CSS 4.x, + and Thai language support. +

+ +
+
+

Tina CMS

+

+ Self-hosted content management with schema-based editing. +

+
+ +
+

Tailwind v4

+

+ Latest Tailwind CSS with @tailwindcss/vite plugin. +

+
+ +
+

ConsentOS

+

+ PDPA-compliant consent management with auto-blocking tracking. +

+
+ +
+

Thai Support

+

+ Ready for Thai language content with Noto Sans Thai. +

+
+
+
+
+
diff --git a/src/styles/global.css b/src/styles/global.css new file mode 100644 index 0000000..4247097 --- /dev/null +++ b/src/styles/global.css @@ -0,0 +1,57 @@ +@import "tailwindcss"; +@plugin "@tailwindcss/typography"; + +@theme { + --font-sans: "Inter", "Noto Sans Thai", system-ui, sans-serif; + --font-serif: "Merriweather", Georgia, serif; + + --color-primary-50: #f8fafc; + --color-primary-100: #f1f5f9; + --color-primary-200: #e2e8f0; + --color-primary-300: #cbd5e1; + --color-primary-400: #94a3b8; + --color-primary-500: #64748b; + --color-primary-600: #475569; + --color-primary-700: #334155; + --color-primary-800: #1e293b; + --color-primary-900: #0f172a; + --color-primary-950: #020617; + + --color-accent-50: #eff6ff; + --color-accent-100: #dbeafe; + --color-accent-200: #bfdbfe; + --color-accent-300: #93c5fd; + --color-accent-400: #60a5fa; + --color-accent-500: #3b82f6; + --color-accent-600: #2563eb; + --color-accent-700: #1d4ed8; + --color-accent-800: #1e40af; + --color-accent-900: #1e3a8a; + + --color-success-500: #22c55e; + --color-warning-500: #f59e0b; + --color-error-500: #ef4444; + + --radius-sm: 0.25rem; + --radius-md: 0.5rem; + --radius-lg: 0.75rem; + --radius-xl: 1rem; + --radius-2xl: 1.5rem; + --radius-full: 9999px; +} + +html { + scroll-behavior: smooth; +} + +body { + font-family: var(--font-sans); + line-height: 1.6; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +::selection { + background-color: var(--color-accent-200); + color: var(--color-primary-900); +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000..3a40daf --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,17 @@ +{ + "extends": "astro/tsconfigs/strict", + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/*": ["./src/*"], + "@components/*": ["./src/components/*"], + "@layouts/*": ["./src/layouts/*"], + "@styles/*": ["./src/styles/*"], + "@content/*": ["./src/content/*"] + }, + "jsx": "react-jsx", + "jsxImportSource": "react" + }, + "include": ["src/**/*", ".tina/**/*", "db/**/*"], + "exclude": ["node_modules", "dist", ".astro"] +}