A modern, responsive landing page built with Astro, React, and Tailwind CSS. Features a JSON-based content management system for easy updates without touching code.
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Preview production build
npm run previewYour site will be available at http://localhost:4321/
/
βββ public/ # Static assets (favicon, images, etc.)
βββ src/
β βββ components/ # React components
β β βββ About.tsx
β β βββ Contact.tsx
β β βββ Features.tsx
β β βββ Footer.tsx
β β βββ Hero.tsx
β β βββ Navigation.tsx
β βββ data/
β β βββ content.json # Site content configuration
β βββ layouts/
β β βββ Layout.astro # Base layout with SEO
β βββ pages/
β β βββ index.astro # Homepage
βββ astro.config.mjs # Astro configuration
βββ tailwind.config.mjs # Tailwind CSS configuration
βββ package.json
All site content is managed through src/data/content.json. This file controls:
- Site metadata (title, description)
- Navigation links
- Hero section (headline, tagline, CTA buttons)
- Features/Services section
- About section
- Contact information
- Footer content
{
"hero": {
"cta": {
"primary": {
"text": "Start Your Project", // β Edit this
"href": "#contact" // β Edit this
}
}
}
}Edit navigation in src/data/content.json:
{
"navigation": {
"logo": "Your Company",
"links": [
{
"label": "Home",
"href": "/"
},
{
"label": "Services",
"href": "/#services"
},
{
"label": "About",
"href": "/#about"
},
{
"label": "Contact",
"href": "/#contact"
}
]
}
}The site uses Tailwind CSS for styling. Key design features:
- Modern gradient effects with animated blobs
- Smooth transitions and hover effects
- Responsive design (mobile-first)
- Accessible with proper ARIA labels
- Typography optimized for readability
Edit tailwind.config.mjs to change the color scheme:
theme: {
extend: {
colors: {
primary: {
600: '#2563eb', // Change primary color
// ... other shades
},
},
},
}The site includes custom blob animations. Modify them in tailwind.config.mjs:
animation: {
'blob': 'blob 7s infinite',
},
keyframes: {
blob: {
'0%': { transform: 'translate(0px, 0px) scale(1)' },
'33%': { transform: 'translate(30px, -50px) scale(1.1)' },
'66%': { transform: 'translate(-20px, 20px) scale(0.9)' },
'100%': { transform: 'translate(0px, 0px) scale(1)' },
},
}Edit astro.config.mjs:
export default defineConfig({
site: 'https://your-domain.com', // Your site URL
output: 'static',
integrations: [react(), tailwind()],
});The Layout component includes:
- Meta descriptions
- Open Graph tags
- Twitter Card tags
- Canonical URLs
Edit in src/layouts/Layout.astro or pass as props.
- Update
.github/workflows/astro.ymlif needed - Push to your repository
- Enable GitHub Pages in repository settings
Vercel:
npm run build
# Deploy the ./dist folderNetlify:
npm run build
# Deploy the ./dist folderCloudflare Pages:
- Build command:
npm run build - Build output directory:
dist
β Modern, responsive design inspired by Tailwind documentation β JSON-based content management β SEO optimized β Fast page loads with Astro β Mobile-friendly navigation β Smooth animations and transitions β Accessible (WCAG compliant) β Gradient effects and modern UI patterns β Contact section with social links β Statistics display β Feature cards with hover effects
- Create a component in
src/components/ - Add content to
src/data/content.json - Import and use in
src/pages/index.astro
Example:
// src/components/Testimonials.tsx
export default function Testimonials({ items }) {
return (
<section>
{items.map(item => (
<div key={item.id}>{item.quote}</div>
))}
</section>
);
}// src/data/content.json
{
"testimonials": {
"heading": "What Our Clients Say",
"items": [...]
}
}All components use TypeScript for type safety. Define interfaces for props:
interface MyComponentProps {
title: string;
description?: string;
items: Array<{
id: string;
name: string;
}>;
}Port already in use:
# Kill process on port 4321
kill -9 $(lsof -ti:4321)Build errors:
# Clear cache and reinstall
rm -rf node_modules package-lock.json
npm installMIT License - feel free to use this for your own projects!
Contributions are welcome! Please feel free to submit a Pull Request.
Built with β€οΈ by Calafold