No description
- Astro 77.5%
- TypeScript 11.7%
- CSS 5.8%
- JavaScript 4.3%
- Dockerfile 0.7%
|
All checks were successful
Build and deploy / build (push) Successful in 1m5s
Replaces the single "hero + two-up pairs" section layout with one dense two-column grid where every featured photo spans the full width and the rest tile two-up, all in editor order. Falls back to the first photo when a section has none flagged (matches the extension). Villa gallery already worked this way. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> |
||
|---|---|---|
| .forgejo/workflows | ||
| .github/workflows | ||
| .roo | ||
| deploy | ||
| fonts-src | ||
| public | ||
| scripts | ||
| src | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| astro.config.mjs | ||
| DEPLOY-HETZNER.md | ||
| Dockerfile | ||
| Dockerfile.serve | ||
| NOTES.md | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
grdelina-astro
This is the production Grdelina site. Fully static Astro, pre-rendered from Directus at build time, built by Forgejo Actions and served by nginx on one Hetzner box. Editors publish with a "Publish site" button in Directus (~1 min to live). See DEPLOY-HETZNER.md.
History: originally built in Webstudio, then migrated to this repo. Webstudio
and the earlier Netlify deployment are both retired — do not use either.
NOTES.md has the migration record; inline // … Webstudio … comments are
kept only as lineage notes for where a layout/behaviour came from.
Requirements
- Node 20+ (CI/prod uses Node 22)
- Network access to the Directus instance at build time.
Setup
npm install
cp .env.example .env # PUBLIC_DIRECTUS_URL defaults to the live instance
Commands
npm run dev # dev server (fetches Directus per request)
npm run build # static build → dist/ (pre-renders sk / en / hr + / redirect)
npm run preview # serve dist/
npx astro check # type-check
How it works
- Content: fetched from Directus (
directus.grinvalsky.com) at build time.src/lib/resources.tshas one function per data source, keeping the collection / filter / sort /?fields=/ translation deep-filter pattern. CMS changes only go live on the next build. An editor triggers one with the "Publish site" button in Directus (a Flow that calls the Forgejo workflow); a push tomainalso builds. SeeDEPLOY-HETZNER.md. - Languages:
src/pages/[lang]/…routes enumeratelanguageswhereactive = true(currentlysk,en,hr,pl) viagetStaticPaths./redirects to/sk. - Images: no runtime image service.
src/lib/image.ts(cdnImage()) records the widths each<img>needs;src/integrations/local-images.mjsgenerates the.webpfiles with Sharp intodist/img/at build. - Design tokens:
src/styles/tokens.css— CSS custom properties. - Custom code: idiomatic reimplementations (CSS marquee, native
<details>FAQ, native<dialog>mobile menu, …); trade-offs noted inNOTES.md §2.
Layout
src/lib/ directus.ts · resources.ts · i18n.ts
src/styles/ tokens.css · global.css
src/layouts/ BaseLayout.astro
src/components/ Navbar · Footer · CtaBanner · LanguageSwitcher · MobileMenu
Marquee · FaqAccordion · HeroBadge · WhyUsSlider · Rail
ApartmentCard · VillaCard · Icon
src/pages/ index.astro (→ /sk) · [lang]/index.astro (Home)