Files
Gallus_Pub/CLAUDE.md

2.0 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

This is a website for Gallus Pub, a bar/pub in Switzerland. The site is built with Astro, a static site generator, and uses component-based architecture with .astro files. Content is in German.

Development Commands

npm install              # Install dependencies
npm run dev             # Start dev server at localhost:4321
npm run build           # Build production site to ./dist/
npm run preview         # Preview production build locally
npm run astro ...       # Run Astro CLI commands

Architecture

Component Structure

  • Layout.astro: Base layout template that wraps all pages. Imports global styles (variables.css, index.css) and includes Header/Footer components
  • Pages (src/pages/): File-based routing where each .astro file becomes a route
    • index.astro: Main landing page that composes multiple sections (Hero, Welcome, EventsGrid, ImageCarousel, Drinks)
    • Gallery.astro, Openings.astro: Additional pages
  • Components (src/components/): Reusable UI components
    • Most components have corresponding CSS files in src/styles/components/
    • EventsGrid uses HoverCard components to display event information
    • Event data is defined directly in page files (e.g., events array in index.astro)

Content Management Pattern

Event data and image galleries are defined as JavaScript arrays in the frontmatter of page files (see index.astro:11-55). This is the current pattern for managing dynamic content rather than using a separate CMS or data files.

Styling

  • Global styles: src/styles/variables.css (CSS custom properties) and src/styles/index.css
  • Component styles: src/styles/components/[ComponentName].css
  • All styles are imported in component files, not centrally

Static Assets

Images and other static files are in /public/images/ and referenced with absolute paths (e.g., "/images/Gallery1.png")