Part 1

Section Components Overview

An overview of all section components available in AstroGlass.

Section components are the building blocks of each theme page. Every theme page is composed of 12+ sections, each with a dedicated variant per theme.

Available Sections

How It Works

Each section has 6 theme variants โ€” one for each theme (Liquid, Glass, Neo, Luxury, Minimal, Aurora). The dynamic page at src/pages/[theme].astro uses a component map to render the correct variant:

---
// Simplified from [theme].astro
const componentMap = {
liquid: { Hero: HeroLiquid, About: AboutLiquid, ... },
glass: { Hero: HeroGlass, About: AboutGlass, ... },
// neo, luxury, minimal, aurora...
};
const components = componentMap[themeId];
---
<components.Hero />
<components.About />
<components.Features />
โ„น๏ธ
No External Props

Section components accept no props. All text content is loaded internally via useTranslations() from src/locales/{lang}/{section}.json. To change the content of any section, edit the corresponding locale JSON file.

File Structure

Each section follows a consistent directory pattern:

src/components/sections/{section}/
โ”œโ”€โ”€ {Section}Liquid.astro
โ”œโ”€โ”€ {Section}Glass.astro
โ”œโ”€โ”€ {Section}Neo.astro
โ”œโ”€โ”€ {Section}Luxury.astro
โ”œโ”€โ”€ {Section}Minimal.astro
โ””โ”€โ”€ {Section}Aurora.astro

CSS for each section lives in src/styles/components/{section}/.