Website about Rhodesian Ridgeback Themba and her puppies.
This website tells the story of Themba, a beautiful Rhodesian Ridgeback, and her upcoming litter of puppies. The site contains information about Themba, her partner Motsi van de Palsenborghœve, the Rhodesian Ridgeback breed, and updates about the puppies.
- Astro - Web framework
- Tailwind CSS - For styling
- React - For interactive components
- Framer Motion - For animations
Command | Action |
---|---|
pnpm install |
Install dependencies |
pnpm dev |
Start local dev server at localhost:4321 |
pnpm build |
Build your production site to ./dist/ |
pnpm preview |
Preview your build locally, before deploying |
pnpm astro ... |
Run CLI commands like astro add , astro check |
pnpm astro -- --help |
Get help using the Astro CLI |
/
├── public/
│ └── favicon.svg
├── src/
│ ├── content/
│ │ └── photos/
│ │ └── *.json
│ ├── layouts/
│ │ └── Layout.astro
│ ├── pages/
│ │ ├── index.astro
│ │ ├── verhaal.astro
│ │ ├── pups.astro
│ │ └── fotos.astro
│ └── styles/
│ └── global.css
└── package.json
Astro looks for .astro
or .md
files in the src/pages/
directory. Each page is exposed as a route based on its file name.
Any static assets, like images, can be placed in the public/
directory.
Feel free to check Astro documentation or join their Discord server.
This project uses several methods to optimize images:
The website uses Astro's Image component for optimized image delivery:
- Automatic WebP format conversion
- Responsive sizing
- Lazy loading
- Width and height attributes to prevent layout shifts
There are two utility scripts for bulk image processing:
Converts all images to optimized WebP format with appropriate compression:
npm run optimize-images
- Resizes very large images (>1920px wide)
- Applies different compression levels based on file size
- Converts all images to WebP format
- Reports size reduction statistics
Creates smaller thumbnail versions for gallery previews:
npm run generate-thumbnails
- Creates 300x200px thumbnails
- Uses WebP format with 70% quality
- Names files with "thumb-" prefix
Images are stored in three directories:
src/assets/images/
- Original imported imagessrc/assets/optimized/
- Optimized WebP versionssrc/assets/thumbnails/
- Small preview thumbnails
When adding new images:
- Place the original images in
src/assets/images/
- Run optimization scripts:
npm run optimize-images && npm run generate-thumbnails
- Import and use the optimized images in your components
- Specify width, height, and format in Astro Image components
- Use the
loading="lazy"
attribute for below-the-fold images