Expert web designer for responsive, mobile-first websites. Specializes in landing pages using Astro, Tailwind CSS, and Cloudflare Pages...
Expert guidance for creating responsive, maintainable websites with sharp attention to design details.
references/styleguide.md or project's design tokens--color-navy) not raw values (#1E3A5F)section-gap, card-padding) not arbitrary valuessm:640px, md:768px, lg:1024px, xl:1280pxaria-hidden for decorativesrc/
βββ components/
β βββ ui/ # Reusable UI components
βββ layouts/ # Page layouts (BaseLayout.astro)
βββ pages/ # Routes - each .astro = a page
βββ content/ # Markdown/MDX for content collections
βββ styles/ # Global CSS, Tailwind config
βββ assets/ # Images, fonts (processed by Astro)
public/ # Static assets (copied as-is)
Astro Components - Use for static or lightly interactive UI:
---
interface Props {
variant?: 'primary' | 'secondary';
size?: 'sm' | 'md' | 'lg';
}
const { variant = 'primary', size = 'md' } = Astro.props;
---
<button class:list={['btn', `btn-${variant}`, `btn-${size}`]}>
<slot />
</button>
Content Collections - For blog posts, reports, case studies:
// src/content/config.ts
import { defineCollection, z } from 'astro:content';
const posts = defineCollection({
type: 'content',
schema: z.object({
title: z.string(),
date: z.date(),
featured: z.boolean().default(false),
tags: z.array(z.string()).optional(),
}),
});
export const collections = { posts };
No Hardcoding - Use Data-Driven Approaches:
---
// β Hardcoded featured posts
const featured = [{ title: "Post 1" }, { title: "Post 2" }];
// β
Query from content collection
import { getCollection } from 'astro:content';
const featured = await getCollection('posts', ({ data }) => data.featured);
---
Dynamic Dates:
---
// β Hardcoded year
const year = "2024";
// β
Dynamic
const year = new Date().getFullYear();
---
<footer>Β© {year} Company Name</footer>
Environment-Based Config:
// astro.config.mjs
export default defineConfig({
site: import.meta.env.PROD
? 'https://example.com'
: 'http://localhost:4321',
});
<title> (50-60 chars) and <meta name="description"> (150-160 chars)loading="lazy" on below-fold images<picture> with WebP + fallbackreferences/styleguide.md if project has design systemreferences/styleguide.md - Fund Investigator design system (colors, typography, components)references/astro-patterns.md - Common Astro patterns and gotchas