npx agentspec-cli install 9d108b76-1c35-4ecb-a523-7a39dcb6f8bf --file-type cursor-rules→ .cursor/rules/
---
globs: src/components/*.astro,src/layouts/*.astro,src/pages/*.astro,src/pages/*/*.astro
---
# Astro Component Development Guidelines
## Component Structure
Follow this structure for all [.astro components](mdc:src/components/):
```astro
---
// TypeScript frontmatter
import type { Props } from './types';
import { getTranslation } from '@/i18n';
interface ComponentProps {
// Define props with TypeScript
}
const { prop1, prop2 } = Astro.props;
const t = getTranslation(Astro.currentLocale);
---
<!-- HTML template with Tailwind classes -->
<section class="container mx-auto px-4">
<h2>{t.section.title}</h2>
<!-- Component content -->
</section>
<style>
/* Component-scoped CSS if needed */
</style>
```
## Key Patterns in JAMCAM Components
### Carousel Components
- Use [Carousel.astro](mdc:src/components/Carousel.astro) for image galleries
- Support both desktop and mobile layouts
- Implement smooth scrolling and touch gestures
### Section Components
- Prefix section components with descriptive names (e.g., [AboutSection.astro](mdc:src/components/AboutSection.astro))
- Use consistent container classes: `container mx-auto px-4`
- Include proper semantic HTML (section, article, aside)
### Card Components
- Follow [InfoCard.astro](mdc:src/components/InfoCard.astro) patterns for consistent styling
- Use Tailwind for responsive designs
- Include hover effects and proper accessibility
### Layout Components
- [Banner.astro](mdc:src/components/Banner.astro) handles page headers with localized images
- [Header.astro](mdc:src/components/Header.astro) and [Footer.astro](mdc:src/components/Footer.astro) for site-wide elements
- [LanguageSwitcher.astro](mdc:src/components/LanguageSwitcher.astro) for i18n navigation
## Performance Considerations
1. **Optimize images** using Astro's image optimization
2. **Lazy load** content below the fold
3. **Minimize JavaScript** - leverage Astro's static generation
4. **Use WebP format** for images when possible
5. **Implement proper caching** headers for assets
## Accessibility Requirements
- Use semantic HTML elements
- Include proper ARIA labels and descriptions
- Ensure keyboard navigation works
- Test with screen readers
- Maintain color contrast ratios
- Provide alt text for all images
## Colombian Scouting Branding
- Use official colors and typography from [global.css](mdc:src/styles/global.css)
- Include scout logos: [logo-scouts-colombia.png](mdc:public/images/logo-scouts-colombia.png), [logo-world-scouting.png](mdc:public/images/logo-world-scouting.png)
- Follow brand guidelines for JAMCAM logo usage
- Respect Colombian cultural elements in design choices
description:
globs:
alwaysApply: false
---
Javascript Astro Tailwind Css Cursorrules Prompt F Rules
Cursor IDE rules and conventions for AI-assisted development.
by AgentHub Crawler
Project Overview
This project is built using components generated by a design tool called Subframe. The files for these components are located in the `ui` directory. NEVER EDIT THE FILES IN THE `ui` DIRECTORY. Instead, whem implementing business logic, wrap them in your own components. The `ui` directory may be in different places, so check the codebase first to make sure you find it. If you can't find it on the first try, look harder. It could be in the `src/ui` directory. If you can't find it, ask the user whe
by AgentHub Crawler
UI Component Guidelines
Cursor IDE rules and conventions for AI-assisted development.
by AgentHub Crawler
Sign in to leave a comment.
AI Rules for {{project-name}}
{{project-description}}
by AgentHub Crawler