Skip to content

Commit 8419259

Browse files
committed
improve performance: less shadow; fix horizontal scrollbar
1 parent 5544d61 commit 8419259

4 files changed

Lines changed: 99 additions & 10 deletions

File tree

CLAUDE.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This is **The Tractor Store** - a micro frontend demonstration project built with Astro. It serves as a blueprint for experimenting with micro frontend architecture, similar to TodoMVC but focused on micro frontends. The project is a showcase website that documents the concept and displays various implementation examples.
8+
9+
## Development Commands
10+
11+
- `npm run dev` / `npm start` - Start development server on port 3000
12+
- `npm run build` - Build for production
13+
- `npm run preview` - Preview production build locally
14+
- `npm run clean` - Remove dist directory
15+
16+
## Code Formatting
17+
18+
- `prettier` - Format code using Prettier with Astro plugin
19+
- Configuration in `.prettierrc.mjs` includes special handling for `.astro` files
20+
21+
## Architecture
22+
23+
### Tech Stack
24+
- **Astro** - Static site generator with component islands
25+
- **TypeScript** - Type safety throughout
26+
- **Tailwind CSS** - Utility-first styling with custom design system
27+
- **React** (via @astrojs/react) - For interactive components
28+
29+
### Project Structure
30+
```
31+
src/
32+
├── components/ # Reusable UI components
33+
│ ├── content/ # Page-specific content components
34+
│ └── *.astro # Various UI components (Header, Footer, Nav, etc.)
35+
├── layouts/ # Page layout templates
36+
│ ├── PageLayout.astro # Main layout with header/footer
37+
│ └── ContentLayout.astro # Content-focused layout
38+
├── pages/ # File-based routing
39+
│ ├── index.astro # Homepage
40+
│ └── projects.astro # Projects page
41+
├── lib/ # Utilities and helpers
42+
│ ├── seo.ts # SEO meta generation
43+
│ └── markdoc/ # Markdoc configuration
44+
├── styles/ # Global styles
45+
└── config.ts # Site configuration
46+
```
47+
48+
### Key Architecture Patterns
49+
- **Component-based design**: Heavy use of Astro components for modularity
50+
- **Layout composition**: Main layout provides header/footer, content layouts handle page structure
51+
- **SEO-first**: Comprehensive meta tag generation via `lib/seo.ts`
52+
- **Theme system**: CSS custom properties for colors, dark mode support
53+
- **Static generation**: Built for GitHub Pages deployment
54+
55+
### Styling System
56+
- Custom CSS properties defined in theme classes (`theme-bubblegum`)
57+
- Tailwind extended with custom color palette using CSS variables
58+
- Typography plugin for content styling
59+
- Custom font loading for Raleway family
60+
61+
### Configuration Details
62+
- Base URL configured for GitHub Pages (`/tractor-store/`)
63+
- Assets prefix for CDN deployment
64+
- Sitemap and RSS generation enabled
65+
- Prism syntax highlighting included
66+
67+
## Deployment
68+
69+
Automated deployment to GitHub Pages via GitHub Actions (`.github/workflows/deploy.yml`). Builds are triggered on pushes to `main` branch.
70+
71+
## Development Notes
72+
73+
- The site showcases micro frontend concepts but is itself a traditional Astro site
74+
- Content is primarily static with some interactive elements
75+
- Font assets are loaded from external CDN
76+
- Project includes markdoc integration for potential content management

src/components/MFExample.astro

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,18 +155,16 @@ import { Image } from "astro:assets";
155155
}
156156

157157
.c_shadow {
158-
filter: drop-shadow(-3px -3px 3px rgba(255, 255, 255, 0.4))
159-
drop-shadow(2px 3px 2px #edcdcd) drop-shadow(3px 6px 4px #edcdcd)
160-
drop-shadow(4px 9px 6px #edcdcd)
161-
drop-shadow(0px 4px 40px rgba(255, 90, 85, 0.3));
158+
filter: drop-shadow(2px 4px 8px rgba(237, 205, 205, 0.8))
159+
drop-shadow(0px 8px 32px rgba(255, 90, 85, 0.25));
160+
will-change: transform;
162161
transform: translateZ(0);
163162
}
164163

165164
:global(.dark) .c_shadow {
166-
filter: drop-shadow(-3px -3px 3px rgba(255, 255, 255, 0.1))
167-
drop-shadow(2px 3px 2px #322030) drop-shadow(3px 6px 4px #322030)
168-
drop-shadow(4px 9px 6px #322030)
169-
drop-shadow(0px 4px 40px rgba(255, 90, 85, 0.3));
165+
filter: drop-shadow(2px 4px 8px rgba(50, 32, 48, 0.8))
166+
drop-shadow(0px 8px 32px rgba(255, 90, 85, 0.25));
167+
will-change: transform;
170168
transform: translateZ(0);
171169
}
172170

src/components/content/Hero.astro

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,24 @@ import qwikLogo from "../../../public/images/tech/qwik.svg";
104104

105105
.image {
106106
@media (max-width: 999px) {
107-
filter: drop-shadow(-30px -10px 50px rgba(255, 90, 85, 0.53));
107+
filter: drop-shadow(-20px -8px 40px rgba(255, 90, 85, 0.5));
108108
}
109109

110110
@media (min-width: 1000px) {
111-
filter: drop-shadow(-30px -10px 100px rgba(255, 90, 85, 0.33));
111+
filter: drop-shadow(-20px -8px 60px rgba(255, 90, 85, 0.35));
112112
}
113113
transform: translateZ(0);
114+
will-change: transform;
115+
}
116+
117+
:global(.dark) .image {
118+
@media (max-width: 999px) {
119+
filter: drop-shadow(-20px -8px 40px rgba(255, 90, 85, 0.8));
120+
}
121+
122+
@media (min-width: 1000px) {
123+
filter: drop-shadow(-20px -8px 60px rgba(255, 90, 85, 0.6));
124+
}
114125
width: 100%;
115126
}
116127

src/styles/global.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22
@tailwind components;
33
@tailwind utilities;
44

5+
html {
6+
overflow-x: hidden;
7+
}
8+
59
/*
610
Tailwind colors listed here: https://tailwindcss.com/docs/customizing-colors
711

0 commit comments

Comments
 (0)