No description
  • Astro 77.5%
  • TypeScript 11.7%
  • CSS 5.8%
  • JavaScript 4.3%
  • Dockerfile 0.7%
Find a file
Pavol Grinvalsky d132780c39
All checks were successful
Build and deploy / build (push) Successful in 1m5s
Apartments: featured photos render full-width, any number, any position
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>
2026-09-06 20:21:56 +03:00
.forgejo/workflows Deploy: fail loudly if the /deploy mount is missing; document end-to-end verification 2026-09-06 20:11:41 +03:00
.github/workflows Prep for Hetzner: build-time image pipeline, woff2 fonts, deploy infra 2026-08-31 11:51:10 +03:00
.roo Update from Stacki 2026-09-01 23:13:53 +03:00
deploy nginx: absolute_redirect off — relative Location headers behind the proxy 2026-08-31 13:00:57 +03:00
fonts-src Prep for Hetzner: build-time image pipeline, woff2 fonts, deploy infra 2026-08-31 11:51:10 +03:00
public Prep for Hetzner: build-time image pipeline, woff2 fonts, deploy infra 2026-08-31 11:51:10 +03:00
scripts Prep for Hetzner: build-time image pipeline, woff2 fonts, deploy infra 2026-08-31 11:51:10 +03:00
src Apartments: featured photos render full-width, any number, any position 2026-09-06 20:21:56 +03:00
.dockerignore Update from Stacki 2026-09-04 09:20:46 +03:00
.env.example Initial commit: Grdelina Astro site + Netlify deploy config 2026-08-30 16:52:27 +03:00
.gitignore Update from Stacki 2026-09-04 09:20:46 +03:00
astro.config.mjs Update from Stacki 2026-09-04 09:20:46 +03:00
DEPLOY-HETZNER.md Deploy: fail loudly if the /deploy mount is missing; document end-to-end verification 2026-09-06 20:11:41 +03:00
Dockerfile Add Coolify path: Dockerfile + container nginx, config-driven / -> /sk redirect 2026-08-31 12:09:45 +03:00
Dockerfile.serve Wire Forgejo pipeline: build, publish to deploy branch, trigger Coolify 2026-09-06 03:27:42 +03:00
NOTES.md Update from Stacki 2026-09-04 09:20:46 +03:00
package-lock.json Prep for Hetzner: build-time image pipeline, woff2 fonts, deploy infra 2026-08-31 11:51:10 +03:00
package.json Prep for Hetzner: build-time image pipeline, woff2 fonts, deploy infra 2026-08-31 11:51:10 +03:00
README.md Docs: rewrite deploy doc for the Forgejo Actions + rsync + nginx setup 2026-09-06 15:43:58 +03:00
tsconfig.json Initial commit: Grdelina Astro site + Netlify deploy config 2026-08-30 16:52:27 +03:00

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.ts has 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 to main also builds. See DEPLOY-HETZNER.md.
  • Languages: src/pages/[lang]/… routes enumerate languages where active = true (currently sk, en, hr, pl) via getStaticPaths. / redirects to /sk.
  • Images: no runtime image service. src/lib/image.ts (cdnImage()) records the widths each <img> needs; src/integrations/local-images.mjs generates the .webp files with Sharp into dist/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 in NOTES.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)