Files
gw-svelte/src/lib/components/IntroStrip.svelte
T

67 lines
1.9 KiB
Svelte
Raw Normal View History

2026-05-02 08:26:18 +12:00
<script lang="ts">
import Icon from '$lib/components/Icon.svelte';
import type { IntroContent } from '$lib/types';
export let intro: IntroContent;
const stars = Array.from({ length: 5 });
2026-05-18 09:43:29 +12:00
const statement = intro.text.replace(/\.$/, '');
const statementWords = statement.split(/(\s+)/);
2026-05-02 08:26:18 +12:00
</script>
2026-05-18 09:43:29 +12:00
<section id="intro" aria-label="Goodwalk at a glance">
<div class="intro-inner">
2026-05-18 09:43:29 +12:00
<div class="intro-statement">
<span class="intro-kicker" aria-hidden="true">
<span class="intro-kicker-rule"></span>
Goodwalk · Auckland
</span>
<h2 class="intro-headline">
{#each statementWords as token, index}
{#if /\s+/.test(token)}
{token}
{:else}
<span class="intro-word" style="--word-i: {index};">{token}</span>
{/if}
{/each}
</h2>
</div>
<aside class="intro-trust" aria-label="Reviews">
2026-05-03 11:16:53 +12:00
<a
2026-05-18 09:43:29 +12:00
class="intro-google"
2026-05-03 11:16:53 +12:00
href={intro.reviewCta.href}
target="_blank"
rel="noopener"
aria-label="Read our Google reviews"
>
2026-05-18 09:43:29 +12:00
<span class="intro-google-mark" aria-hidden="true">
<img
class="intro-google-logo"
src="/images/google-g-logo.svg"
alt=""
width="22"
height="23"
/>
</span>
<span class="intro-google-copy">
<span class="intro-stars" aria-label="5 star rating">
{#each stars as _, index}
<Icon name="fas fa-star" className={`intro-star intro-star-${index + 1}`} />
{/each}
2026-05-18 09:43:29 +12:00
</span>
<span class="intro-google-label">
{intro.reviewCta.label}
2026-05-18 09:43:29 +12:00
</span>
</span>
</a>
<p class="intro-meta">
<span class="intro-meta-dot" aria-hidden="true"></span>
Auckland Central · Mon&ndash;Fri
</p>
</aside>
2026-05-02 08:26:18 +12:00
</div>
2026-05-18 09:43:29 +12:00
</section>