Cursor rule
.cursor/rules/astro-components.mdcCursor rules
Quality
66/100
Scores the file, not the repository.Length
299 words
10 headings · 1 code blocksRepository
4
— · pushed 203 days agoLast changed
3 days ago
First indexed 3 days ago.12345# Astro Component Development Guidelines67## Component Structure8Follow this structure for all [.astro components](mdc:src/components/):910```astro11---12// TypeScript frontmatter13import type { Props } from './types';14import { getTranslation } from '@/i18n';1516interface ComponentProps {17 // Define props with TypeScript18}1920const { prop1, prop2 } = Astro.props;21const t = getTranslation(Astro.currentLocale);22---2324<!-- HTML template with Tailwind classes -->25<section class="container mx-auto px-4">26 <h2>{t.section.title}</h2>27 <!-- Component content -->28</section>2930<style>31 /* Component-scoped CSS if needed */32</style>33```3435## Key Patterns in JAMCAM Components3637### Carousel Components38- Use [Carousel.astro](mdc:src/components/Carousel.astro) for image galleries39- Support both desktop and mobile layouts40- Implement smooth scrolling and touch gestures4142### Section Components43- Prefix section components with descriptive names (e.g., [AboutSection.astro](mdc:src/components/AboutSection.astro))44- Use consistent container classes: `container mx-auto px-4`45- Include proper semantic HTML (section, article, aside)4647### Card Components48- Follow [InfoCard.astro](mdc:src/components/InfoCard.astro) patterns for consistent styling49- Use Tailwind for responsive designs50- Include hover effects and proper accessibility5152### Layout Components53- [Banner.astro](mdc:src/components/Banner.astro) handles page headers with localized images54- [Header.astro](mdc:src/components/Header.astro) and [Footer.astro](mdc:src/components/Footer.astro) for site-wide elements55- [LanguageSwitcher.astro](mdc:src/components/LanguageSwitcher.astro) for i18n navigation5657## Performance Considerations581. **Optimize images** using Astro's image optimization592. **Lazy load** content below the fold603. **Minimize JavaScript** - leverage Astro's static generation614. **Use WebP format** for images when possible625. **Implement proper caching** headers for assets6364## Accessibility Requirements65- Use semantic HTML elements66- Include proper ARIA labels and descriptions67- Ensure keyboard navigation works68- Test with screen readers69- Maintain color contrast ratios70- Provide alt text for all images7172## Colombian Scouting Branding73- Use official colors and typography from [global.css](mdc:src/styles/global.css)74- 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)75- Follow brand guidelines for JAMCAM logo usage76- Respect Colombian cultural elements in design choices77description:78globs:79alwaysApply: false80---81
Also in MiloAgudelo/jamcam-astro
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| MiloAgudelo/jamcam-astro.cursor/rules/asset-management.mdc · 4 | Cursor rules | stylearchperformance | 62/100 | 3 days ago | |
| MiloAgudelo/jamcam-astro.cursor/rules/development-workflow.mdc · 4 | Cursor rules | setupbuildteststyle+6 | 81/100 | 3 days ago | |
| MiloAgudelo/jamcam-astro.cursor/rules/internationalization.mdc · 4 | Cursor rules | arch | 62/100 | 3 days ago | |
| MiloAgudelo/jamcam-astro.cursor/rules/jamcam-project-overview.mdc · 4 | Cursor rules | arch | 48/100 | 3 days ago | |
| MiloAgudelo/jamcam-astro.cursor/rules/styling-system.mdc · 4 | Cursor rules | stylearchui | 66/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
