From 8a8f19133fe64dfb86eebdac5f7ff8bd4b301d6c Mon Sep 17 00:00:00 2001 From: MaticIvesic Date: Mon, 3 Aug 2026 19:06:06 +0200 Subject: [PATCH] Home: gallery preview grid, side-by-side contact, larger section titles - Add a homepage gallery preview: "Galerija" heading + 4-wide image grid that fades out toward the bottom, linking to /gallery (up to 12 images) - Put contact email + phone side by side - Make section titles (Galerija/Novice/Kontakt) larger than service names - listGalleryImages() added to the content service Co-Authored-By: Claude Opus 4.8 --- src/lib/Header.svelte | 18 +-------- src/lib/server/content.ts | 10 +++++ src/routes/+page.server.ts | 13 ++++++- src/routes/+page.svelte | 78 ++++++++++++++++++++++++++++++++------ 4 files changed, 89 insertions(+), 30 deletions(-) diff --git a/src/lib/Header.svelte b/src/lib/Header.svelte index 9b54624..39e9fd6 100644 --- a/src/lib/Header.svelte +++ b/src/lib/Header.svelte @@ -33,31 +33,18 @@ } .nav-link{ - display: inline-flex; align-items: center; - gap: 0.5em; color: #e5e4ea; text-decoration: none; font-weight: 500; - letter-spacing: 0.02em; - padding: 0.35em 0.9em; - border: 1px solid rgba(229, 228, 234, 0.25); - border-radius: 999px; - transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease; } .nav-icon{ - width: 1.15em; - height: 1.15em; + width: 2em; + height: 2em; display: block; } - .nav-link:hover{ - background-color: rgba(66, 175, 56, 0.15); - border-color: rgba(66, 175, 56, 0.8); - color: #ffffff; - } - .banner-link{ display: inline-flex; } @@ -88,7 +75,6 @@ + {/if} + {#if data.posts.length > 0}

Novice

@@ -71,18 +84,20 @@ {#if data.contact.address}

{data.contact.address}

{/if} - {#if data.contact.email} - - {/if} - {#if data.contact.phone} - - {/if} +
+ {#if data.contact.email} + + {/if} + {#if data.contact.phone} + + {/if} +
{#if data.contact.showMap && data.contact.address}
@@ -170,6 +185,39 @@ .section-title { text-align: center; margin: 0 0 1em; + font-size: clamp(2em, 5vw, 2.8em); + } + + .gallery-link { + display: block; + text-decoration: none; + } + + .gallery-grid { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 0.6em; + -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); + mask-image: linear-gradient(to bottom, #000 55%, transparent 100%); + } + + .g-tile { + aspect-ratio: 1; + border-radius: 8px; + overflow: hidden; + background: #11161a; + } + + .g-tile img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; + transition: transform 0.3s ease; + } + + .g-tile:hover img { + transform: scale(1.05); } .news-grid { @@ -261,6 +309,12 @@ margin: 0; } + .contact-methods { + display: flex; + flex-wrap: wrap; + gap: 1.5em; + } + .contact-line { display: flex; align-items: center;