2026-05-02 08:26:18 +12:00
< script lang = "ts" >
import { onMount } from 'svelte' ;
import { reveal } from '$lib/actions/reveal' ;
import Icon from '$lib/components/Icon.svelte' ;
2026-05-02 19:44:45 +12:00
import { getImageMetadata } from '$lib/image-metadata' ;
2026-05-02 08:26:18 +12:00
import type { TestimonialContent } from '$lib/types' ;
export let testimonials : TestimonialContent [];
export let heading = 'Why people choose us!' ;
export let blurb =
2026-05-02 09:43:32 +12:00
'Real dogs, real routines, trusted by happy owners. Follow along on Instagram to see the Tiny Gang out on their daily adventures.' ;
2026-05-02 08:26:18 +12:00
export let instagramHref = 'https://www.instagram.com/goodwalk.nz/' ;
export let instagramLabel = '@goodwalk.nz' ;
type TestimonialSlide = TestimonialContent & { imageUrl : string };
const wordpressTestimonials : Record < string , TestimonialSlide > = {
Kate : {
reviewer : 'Kate' ,
detail : "Archie's mum" ,
quote :
'Love Aless! She is so amazing with my slightly hyper and anxious dog. She is great with communication if anything on either of our ends need to change. Archie love his walks, and I love the photos she posts of him.' ,
imageUrl : '/images/archie-auckland-dog-walking-review.png'
},
Estelle : {
reviewer : 'Estelle' ,
detail : "Monty's mum" ,
quote :
'GoodWalk was the best dog walking service for my little pooch ! Aless was very helpful - basically doubled as a second mum to Monty. She always provided feedback on his outings and assisted where possible with any additional training that she felt he could work on and made recommendations where necessary which i feel is what every dog mum wants and needs!' ,
imageUrl : '/images/monty-auckland-dog-walking-review.png'
},
Ross : {
reviewer : 'Ross' ,
detail : "Otis's Dad" ,
quote :
'Truly the best dog walker in Auckland! I feel so lucky to have found Aless and my little terrier Otis absolutely adores her. He enjoys his regular weekly walks and always comes back happy & tired. Love the updates on social media so I can see how my dog is enjoying his day! Aless makes logistics so easy too. Highly highly recommend, there’ s a reason she has 5 stars!' ,
imageUrl : '/images/otis-auckland-dog-walking-review.png'
},
Nina : {
reviewer : 'Nina' ,
detail : "Wallace's mum" ,
quote :
'Alessandra has been walking and spending time with my pup since she was 10 weeks old, coming over and doing puppy visits through to transitioning her to pack walks with her little doggo friends. I know Alassandra loves and cares for my dog as much as I do and my dog has a great time! Cant recommend enough' ,
imageUrl : '/images/wallace-auckland-dog-walking-review.png'
}
};
let activeIndex = 0 ;
let paused = false ;
$ : slides = testimonials
. map (( testimonial ) => wordpressTestimonials [ testimonial . reviewer ] ?? testimonial )
. filter (( testimonial ) : testimonial is TestimonialSlide => Boolean ( testimonial . imageUrl ));
$ : if ( activeIndex >= slides . length ) {
activeIndex = 0 ;
}
function showPrevious() {
if ( ! slides . length ) {
return ;
}
activeIndex = ( activeIndex - 1 + slides . length ) % slides . length ;
}
function showNext() {
if ( ! slides . length ) {
return ;
}
activeIndex = ( activeIndex + 1 ) % slides . length ;
}
onMount (() => {
const interval = window . setInterval (() => {
if ( ! paused && slides . length > 1 ) {
showNext ();
}
}, 5000 );
return () => window . clearInterval ( interval );
});
</ script >
< section id = "testimonials" use:reveal = {{ delay : 40 }} class="reveal-block" >
< div class = "testimonials-inner" >
< h2 class = "section-heading" > { heading } </ h2 >
< div class = "testimonials-intro" >
< p > { blurb } </ p >
< a href = { instagramHref } target="_blank" rel = "noopener" class = "testimonials-instagram-link" >
< Icon name = "fab fa-instagram" />
< span > { instagramLabel } </ span >
</ a >
</ div >
{ #if slides . length }
< div
class = "testimonials-carousel"
role = "region"
aria-label = "Customer testimonials"
on:mouseenter = {() => ( paused = true )}
on:mouseleave= {() => ( paused = false )}
>
< button
class = "testimonial-arrow testimonial-arrow-left"
type = "button"
aria-label = "Previous testimonial"
on:click = { showPrevious }
>
< Icon name = "fas fa-chevron-left" />
</ button >
< div class = "testimonial-stage" >
< div class = "testimonial-woof" aria-hidden = "true" >
< span class = "testimonial-woof-text" > WOOF</ span >
< span class = "testimonial-ray testimonial-ray-1" ></ span >
< span class = "testimonial-ray testimonial-ray-2" ></ span >
< span class = "testimonial-ray testimonial-ray-3" ></ span >
</ div >
{ #each slides as testimonial , index }
< article class:testimonial-slide-active = { index === activeIndex } class="testimonial-slide" >
< div class = "testimonial-photo-wrap" >
< div class = "testimonial-photo-frame" >
{ #if index === activeIndex }
2026-05-02 19:44:45 +12:00
{ @const imageMeta = getImageMetadata ( testimonial . imageUrl )}
2026-05-02 08:26:18 +12:00
< img
class = "testimonial-photo"
src = { testimonial . imageUrl }
alt= { ` ${ testimonial . reviewer } 's dog` }
2026-05-02 19:44:45 +12:00
width = { imageMeta ? . width }
height= { imageMeta ? . height }
loading = "lazy"
2026-05-02 08:26:18 +12:00
decoding = "async"
/>
{ /if }
</ div >
</ div >
< div class = "testimonial-copy" >
< span class = "testimonial-quote-mark" > "</ span >
< h5 > { testimonial . quote } </ h5 >
< div class = "testimonial-author" >
< span class = "testimonial-author-name" > { testimonial . reviewer } </ span >
< span class = "testimonial-author-detail" > { testimonial . detail } </ span >
</ div >
< div class = "testimonial-divider" ></ div >
< a
class = "testimonial-google"
href = "https://g.page/r/CUsvrWPhkYrAEB0/"
target = "_blank"
rel = "noopener"
>
< Icon name = "fab fa-google" />
< span > All 5 star reviews on Google!</ span >
</ a >
</ div >
</ article >
{ /each }
</ div >
< button
class = "testimonial-arrow testimonial-arrow-right"
type = "button"
aria-label = "Next testimonial"
on:click = { showNext }
>
< Icon name = "fas fa-chevron-right" />
</ button >
</ div >
{ /if }
</ div >
</ section >
< style >
. testimonials-intro {
max-width : 760 px ;
margin : 18 px auto 0 ;
text-align : center ;
}
. testimonials-intro p {
margin : 0 ;
color : #4c5056 ;
font-size : 17 px ;
line-height : 1.65 ;
}
. testimonials-instagram-link {
display : inline-flex ;
align-items : center ;
gap : 10 px ;
margin-top : 18 px ;
padding : 10 px 16 px ;
border-radius : 999 px ;
background : rgba ( 33 , 48 , 33 , 0.06 );
color : var ( -- green );
font-weight : 700 ;
text-decoration : none ;
box-shadow : inset 0 0 0 1 px rgba ( 17 , 20 , 24 , 0.06 );
transition :
transform 0.16 s cubic-bezier ( 0.22 , 1 , 0.36 , 1 ),
background 0.2 s ease ,
box-shadow 0.2 s ease ;
}
: global ( . testimonials-instagram-link . icon ) {
font-size : 18 px ;
}
@ media ( hover : hover ) {
. testimonials-instagram-link : hover {
transform : translateY ( -2 px );
background : rgba ( 33 , 48 , 33 , 0.09 );
box-shadow :
inset 0 0 0 1 px rgba ( 17 , 20 , 24 , 0.06 ),
0 10 px 22 px rgba ( 17 , 20 , 24 , 0.08 );
}
}
. testimonials-instagram-link : active {
transform : translateY ( 1 px ) scale ( 0.985 );
}
. testimonials-carousel {
position : relative ;
margin-top : 48 px ;
}
@ media ( max-width : 768px ) {
. testimonials-intro {
margin-top : 14 px ;
}
. testimonials-intro p {
font-size : 15 px ;
line-height : 1.55 ;
}
. testimonials-instagram-link {
margin-top : 14 px ;
padding : 9 px 14 px ;
font-size : 15 px ;
}
}
. testimonial-arrow {
transition :
transform 0.16 s cubic-bezier ( 0.22 , 1 , 0.36 , 1 ),
box-shadow 0.2 s ease ,
background 0.2 s ease ;
-webkit- tap-highlight-color : transparent ;
touch-action : manipulation ;
}
@ media ( hover : hover ) {
. testimonial-arrow : hover {
transform : translateY ( -50 % ) scale ( 1.05 );
box-shadow : 0 14 px 28 px rgba ( 17 , 20 , 24 , 0.12 );
}
}
. testimonial-arrow : active {
transform : translateY ( -50 % ) scale ( 0.95 );
}
: global ( . reveal-ready . reveal-block ) {
opacity : 0 ;
transform : translate3d ( 0 , var ( -- reveal - distance , 24 px ), 0 );
transition :
opacity 0.55 s ease ,
transform 0.7 s cubic-bezier ( 0.2 , 0.8 , 0.2 , 1 );
transition-delay : var ( -- reveal - delay , 0 ms );
}
: global ( . reveal-visible . reveal-block ) {
opacity : 1 ;
transform : translate3d ( 0 , 0 , 0 );
}
. testimonial-stage {
position : relative ;
overflow : hidden ;
border-radius : 24 px ;
background : #fff ;
box-shadow : 0 10 px 30 px rgba ( 20 , 24 , 20 , 0.06 );
min-height : 620 px ;
}
. testimonial-slide {
position : absolute ;
inset : 0 ;
display : grid ;
grid-template-columns : 45 % 55 % ;
align-items : stretch ;
opacity : 0 ;
pointer-events : none ;
transition :
opacity 0.35 s ease ,
transform 0.35 s ease ;
transform : translateX ( 18 px );
}
. testimonial-slide-active {
opacity : 1 ;
pointer-events : auto ;
transform : translateX ( 0 );
}
. testimonial-photo-wrap {
display : flex ;
align-items : flex-start ;
justify-content : center ;
padding : 32 px 24 px 0 24 px ;
}
. testimonial-photo-frame {
width : min ( 100 % , 340 px );
}
. testimonial-photo {
display : block ;
width : 100 % ;
margin : 0 auto ;
aspect-ratio : 1 / 1 ;
object-fit : cover ;
}
. testimonial-copy {
align-self : start ;
padding : 118 px 112 px 76 px 10 px ;
}
. testimonial-quote-mark {
display : block ;
font-family : Georgia , serif ;
font-size : 72 px ;
line-height : 0.6 ;
color : var ( -- yellow );
margin-bottom : 20 px ;
user-select : none ;
}
. testimonial-copy h5 {
max-width : 500 px ;
margin : 0 ;
font-size : 17 px ;
font-style : italic ;
font-weight : 400 ;
line-height : 1.6 ;
letter-spacing : 0 ;
color : #2e3031 ;
}
. testimonial-author {
display : flex ;
align-items : center ;
gap : 10 px ;
margin-top : 24 px ;
}
. testimonial-author-name {
font-family : var ( -- font - head );
font-size : 15 px ;
font-weight : 700 ;
color : #1a1a1a ;
}
. testimonial-author-detail {
font-size : 14 px ;
color : #6b7280 ;
}
. testimonial-author-detail :: before {
content : '—' ;
margin-right : 6 px ;
}
. testimonial-divider {
width : 100 % ;
max-width : 690 px ;
height : 1 px ;
margin : 44 px 0 0 ;
background : #e7e7e7 ;
}
. testimonial-google {
display : inline-flex ;
align-items : center ;
gap : 12 px ;
margin-top : 28 px ;
padding : 10 px 20 px ;
border-radius : 999 px ;
background : #f8f8f8 ;
color : #0a304e ;
font-size : 14 px ;
line-height : 1.3 ;
box-shadow : 0 0 0 1 px rgba ( 10 , 48 , 78 , 0.06 );
}
. testimonial-google : global ( . icon ) {
font-size : 20 px ;
}
. testimonial-google : hover {
background : #efe6d5 ;
}
. testimonial-woof {
position : absolute ;
top : 40 px ;
right : 60 px ;
z-index : 2 ;
color : #2e3031 ;
transform : rotate ( -6 deg );
transform-origin : center center ;
}
. testimonial-woof-text {
display : inline-block ;
font-family : 'Fredoka One' , var ( -- font - head ), sans-serif ;
font-size : 32 px ;
line-height : 1 ;
letter-spacing : 0.02 em ;
}
. testimonial-ray {
position : absolute ;
border-radius : 999 px ;
background : #ffd100 ;
}
. testimonial-ray-1 {
top : -12 px ;
right : -48 px ;
width : 32 px ;
height : 11 px ;
transform : rotate ( -35 deg );
}
. testimonial-ray-2 {
top : 6 px ;
right : -60 px ;
width : 46 px ;
height : 13 px ;
transform : rotate ( -35 deg );
}
. testimonial-ray-3 {
top : 24 px ;
right : -50 px ;
width : 36 px ;
height : 11 px ;
transform : rotate ( -35 deg );
}
. testimonial-arrow {
position : absolute ;
top : 50 % ;
z-index : 3 ;
display : inline-flex ;
align-items : center ;
justify-content : center ;
width : 58 px ;
height : 58 px ;
border : 1 px solid rgba ( 0 , 0 , 0 , 0.08 );
border-radius : 20 px ;
background : rgba ( 255 , 255 , 255 , 0.95 );
color : #111 ;
font-size : 22 px ;
transform : translateY ( -50 % );
box-shadow : 0 12 px 28 px rgba ( 20 , 24 , 20 , 0.07 );
}
. testimonial-arrow : hover {
background : #fff ;
}
. testimonial-arrow-left {
left : -38 px ;
}
. testimonial-arrow-right {
right : -38 px ;
}
@ media ( max-width : 1024px ) {
. testimonial-stage {
min-height : 560 px ;
}
. testimonial-photo-wrap {
padding : 88 px 16 px 64 px 44 px ;
}
. testimonial-copy {
padding : 96 px 72 px 64 px 8 px ;
}
. testimonial-copy h5 {
max-width : 460 px ;
font-size : 17 px ;
}
. testimonial-woof {
right : 40 px ;
}
}
@ media ( max-width : 767px ) {
. testimonials-carousel {
margin-top : 32 px ;
}
. testimonial-stage {
min-height : unset ;
padding-bottom : 116 px ;
}
. testimonial-slide {
position : relative ;
display : none ;
grid-template-columns : 1 fr ;
transform : none ;
}
. testimonial-slide-active {
display : grid ;
}
. testimonial-photo-wrap {
justify-content : center ;
padding : 48 px 22 px 16 px ;
}
. testimonial-photo-frame {
width : min ( 100 % , 220 px );
}
. testimonial-photo {
aspect-ratio : 1 / 1 ;
}
. testimonial-copy {
padding : 8 px 28 px 32 px ;
align-self : start ;
}
. testimonial-quote-mark {
font-size : 44 px ;
margin-bottom : 8 px ;
}
. testimonial-copy h5 {
font-size : 16 px ;
line-height : 1.55 ;
}
. testimonial-divider {
margin-top : 28 px ;
}
. testimonial-google {
margin-top : 28 px ;
font-size : 16 px ;
gap : 10 px ;
padding : 10 px 14 px ;
}
. testimonial-google : global ( . icon ) {
font-size : 20 px ;
}
. testimonial-woof {
top : 24 px ;
right : 22 px ;
}
. testimonial-woof-text {
font-size : 22 px ;
}
. testimonial-ray {
right : -28 px ;
width : 9 px ;
}
. testimonial-ray-1 {
top : -7 px ;
height : 34 px ;
}
. testimonial-ray-2 {
top : 10 px ;
right : -38 px ;
width : 34 px ;
height : 9 px ;
}
. testimonial-ray-3 {
top : 35 px ;
right : -28 px ;
width : 27 px ;
height : 8 px ;
}
. testimonial-arrow {
top : auto ;
bottom : 24 px ;
width : 54 px ;
height : 54 px ;
font-size : 20 px ;
transform : none ;
}
. testimonial-arrow-left {
left : 20 px ;
}
. testimonial-arrow-right {
right : 20 px ;
}
}
</ style >