Home: contact card platform + mail/phone icons, gallery icon in nav

- Put the Kontakt section on a rounded card ("platform")
- Add mail/phone icons (via SvgImage mask) next to the email and phone
- Use gallery_icon.svg in the top-nav Galerija button
- Scope the header banner-image CSS to .banner-link so the nav icon isn't resized

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Matic Ivešić 2026-08-03 18:51:33 +02:00
parent a6076fbbf3
commit d5368067d6
2 changed files with 56 additions and 17 deletions

View File

@ -1,5 +1,6 @@
<script lang="ts">
import intelidom_banner from '$lib/assets/intelidom_banner.svg';
import gallery_icon from '$lib/assets/gallery_icon.svg';
import HeaderContact from './HeaderContact.svelte';
</script>
@ -18,7 +19,7 @@
z-index: 1;
}
.header-content img{
.banner-link img{
padding: 1em;
width: 15em;
z-index: 1;
@ -32,6 +33,9 @@
}
.nav-link{
display: inline-flex;
align-items: center;
gap: 0.5em;
color: #e5e4ea;
text-decoration: none;
font-weight: 500;
@ -42,6 +46,12 @@
transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.nav-icon{
width: 1.15em;
height: 1.15em;
display: block;
}
.nav-link:hover{
background-color: rgba(66, 175, 56, 0.15);
border-color: rgba(66, 175, 56, 0.8);
@ -76,7 +86,10 @@
<div class="header-content">
<nav class="nav">
<a class="nav-link" href="/gallery">Galerija</a>
<a class="nav-link" href="/gallery">
<img class="nav-icon" src={gallery_icon} alt="" />
<span>Galerija</span>
</a>
</nav>
<a class="banner-link" href="/" aria-label="Domov">
<img src={intelidom_banner} alt="intelidom banner">

View File

@ -1,5 +1,6 @@
<script lang="ts">
import Slideshow from '$lib/Slideshow.svelte';
import SvgImage from '$lib/SvgImage.svelte';
import type { PageData } from './$types';
let { data }: { data: PageData } = $props();
@ -64,16 +65,23 @@
<section class="contact" id="kontakt">
<h2 class="section-title">Kontakt</h2>
<div class="contact-card">
<div class="contact-grid">
<div class="contact-info">
{#if data.contact.address}
<p class="address">{data.contact.address}</p>
{/if}
{#if data.contact.email}
<p><a href="mailto:{data.contact.email}">{data.contact.email}</a></p>
<div class="contact-line">
<SvgImage image_src="/mail.svg" icon_color="#42af38" width="1.4em" height="1.4em" />
<a href="mailto:{data.contact.email}">{data.contact.email}</a>
</div>
{/if}
{#if data.contact.phone}
<p><a href="tel:{data.contact.phone.replace(/\s+/g, '')}">{data.contact.phone}</a></p>
<div class="contact-line">
<SvgImage image_src="/phone.svg" icon_color="#42af38" width="1.4em" height="1.4em" />
<a href="tel:{data.contact.phone.replace(/\s+/g, '')}">{data.contact.phone}</a>
</div>
{/if}
</div>
{#if data.contact.showMap && data.contact.address}
@ -82,6 +90,7 @@
</div>
{/if}
</div>
</div>
</section>
</div>
@ -225,6 +234,12 @@
text-decoration: none;
}
.contact-card {
background: #11161a;
border-radius: 1.5em;
padding: clamp(1.5em, 4vw, 2.5em);
}
.contact-grid {
display: grid;
grid-template-columns: 1fr;
@ -234,11 +249,22 @@
.contact-info {
font-size: 1.1em;
line-height: 1.6;
display: flex;
flex-direction: column;
gap: 0.8em;
justify-content: center;
}
.address {
white-space: pre-line;
color: #c7c9cf;
margin: 0;
}
.contact-line {
display: flex;
align-items: center;
gap: 0.7em;
}
.contact-info a {