From 9b6f19359866e29035ffc9d3d35bebe236aeb7f3 Mon Sep 17 00:00:00 2001 From: Jon Snow <47143928+therealJonSnow@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:18:57 +0000 Subject: [PATCH 001/192] Delete graphql/aboutPage.js --- graphql/aboutPage.js | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 graphql/aboutPage.js diff --git a/graphql/aboutPage.js b/graphql/aboutPage.js deleted file mode 100644 index b014ad3..0000000 --- a/graphql/aboutPage.js +++ /dev/null @@ -1,31 +0,0 @@ -import AllCitiesCarousel from './blocks/AllCitiesCarousel' -import HeroSection from './blocks/HeroSection' -import Image from './blocks/Image' -import ZigZagContent from './blocks/ZigZagContent' -export default (countryId, locale) => { - return `query { - aboutPage(filter: {site: {eq: "${countryId}"}}, locale: ${locale}) { - herosection { - ${HeroSection()} - } - image { - ${Image()} - } - subHero { - ${HeroSection()} - } - aboutZigZag { - ${ZigZagContent()} - } - carouselHero { - ${HeroSection()} - } - allCitiesCarousel { - ${AllCitiesCarousel()} - } - contactHero { - ${HeroSection()} - } - } - }` -} From d706df75b0166fdf1e1790a47c12cdd53d3c00fe Mon Sep 17 00:00:00 2001 From: Jon Snow <47143928+therealJonSnow@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:19:09 +0000 Subject: [PATCH 002/192] Delete graphql/allCities.js --- graphql/allCities.js | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 graphql/allCities.js diff --git a/graphql/allCities.js b/graphql/allCities.js deleted file mode 100644 index 4859825..0000000 --- a/graphql/allCities.js +++ /dev/null @@ -1,12 +0,0 @@ -export default (locale) => { - return `query { - allCities(locale: ${locale}) { - name - mainImage { - url - alt - } - id - } - }` -} From e94989ec8a4e3209f878a0fbb54d6c691ecea31f Mon Sep 17 00:00:00 2001 From: Jon Snow <47143928+therealJonSnow@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:19:18 +0000 Subject: [PATCH 003/192] Delete graphql/beginnerPage.js --- graphql/beginnerPage.js | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 graphql/beginnerPage.js diff --git a/graphql/beginnerPage.js b/graphql/beginnerPage.js deleted file mode 100644 index a1fd384..0000000 --- a/graphql/beginnerPage.js +++ /dev/null @@ -1,30 +0,0 @@ -import Grid from './blocks/Grid' -import HalfImageHero from './blocks/HalfImageHero' -import HeroSection from './blocks/HeroSection' -import MediaCarousel from './blocks/MediaCarousel' -import ZigZagContent from './blocks/ZigZagContent' - -export default (countryId, locale) => { - return `query { - beginnerPage(filter: {site: {eq: "${countryId}"}}, locale: ${locale}) { - halfImageHero { - ${HalfImageHero()} - } - carouselHero { - ${HeroSection()} - } - mediaCarousel { - ${MediaCarousel()} - } - zigZagContent { - ${ZigZagContent()} - } - knowledge { - ${HeroSection()} - } - grid { - ${Grid()} - } - } - }` -} From 7311685100121d32b4abb8ff824442913ee06770 Mon Sep 17 00:00:00 2001 From: Jon Snow <47143928+therealJonSnow@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:19:27 +0000 Subject: [PATCH 004/192] Delete graphql/citiesByCountry.js --- graphql/citiesByCountry.js | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 graphql/citiesByCountry.js diff --git a/graphql/citiesByCountry.js b/graphql/citiesByCountry.js deleted file mode 100644 index be1f5eb..0000000 --- a/graphql/citiesByCountry.js +++ /dev/null @@ -1,12 +0,0 @@ -export default (countryId, locale) => { - return `query { - allCities(filter: {country: {eq: "${countryId}"}}, locale: ${locale}) { - name - mainImage { - url - alt - } - id - } - }` -} From b42167a95c6a88513c287c40d74bbb52a8a9d169 Mon Sep 17 00:00:00 2001 From: Jon Snow <47143928+therealJonSnow@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:19:35 +0000 Subject: [PATCH 005/192] Delete graphql/city.js --- graphql/city.js | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 graphql/city.js diff --git a/graphql/city.js b/graphql/city.js deleted file mode 100644 index c929761..0000000 --- a/graphql/city.js +++ /dev/null @@ -1,11 +0,0 @@ -import HeroSection from './blocks/HeroSection' - -export default (cityName, locale) => { - return `query { - city(filter: {name: {eq: "${cityName}"}}, locale: ${locale}) { - heroSection { - ${HeroSection()} - } - } - }` -} From 4db496f5bc0d02191377c7a11b23a3b43b796713 Mon Sep 17 00:00:00 2001 From: Jon Snow <47143928+therealJonSnow@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:19:45 +0000 Subject: [PATCH 006/192] Delete graphql/footer.js --- graphql/footer.js | 9 --------- 1 file changed, 9 deletions(-) delete mode 100644 graphql/footer.js diff --git a/graphql/footer.js b/graphql/footer.js deleted file mode 100644 index 75e61ca..0000000 --- a/graphql/footer.js +++ /dev/null @@ -1,9 +0,0 @@ -export default (locale) => { - return `query { - footer(locale: ${locale}) { - title - legal - copyrightText - } - }` -} From 31eacf79d771dbc5b203f4eba3acad569186e603 Mon Sep 17 00:00:00 2001 From: Jon Snow <47143928+therealJonSnow@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:19:55 +0000 Subject: [PATCH 007/192] Delete graphql/homepage.js --- graphql/homepage.js | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 graphql/homepage.js diff --git a/graphql/homepage.js b/graphql/homepage.js deleted file mode 100644 index 6025d8a..0000000 --- a/graphql/homepage.js +++ /dev/null @@ -1,19 +0,0 @@ -import CitiesCarousel from './blocks/CitiesCarousel' -import HeroSection from './blocks/HeroSection' - -export default (countryId, locale) => { - return `query { - homePage(filter: {site: {eq: "${countryId}"}}, locale: ${locale}) { - herosection { - ${HeroSection()} - } - citiesCarousel { - ${CitiesCarousel()} - } - contactsection { - ${HeroSection()} - } - } - } - ` -} From 0b4233caef80cad45e80ebb237d177c3bc3368d5 Mon Sep 17 00:00:00 2001 From: Jon Snow <47143928+therealJonSnow@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:20:12 +0000 Subject: [PATCH 008/192] Delete graphql/merchantPage.js --- graphql/merchantPage.js | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 graphql/merchantPage.js diff --git a/graphql/merchantPage.js b/graphql/merchantPage.js deleted file mode 100644 index 0532396..0000000 --- a/graphql/merchantPage.js +++ /dev/null @@ -1,29 +0,0 @@ -import Grid from './blocks/Grid' -import HeroSection from './blocks/HeroSection' -import TiltedVideo from './blocks/TiltedVideo' -import ZigZagContent from './blocks/ZigZagContent' - -export default (countryId, locale) => { - return `query { - merchantPage(filter: {site: {eq: "${countryId}"}}, locale: ${locale}) { - herosection { - ${HeroSection()} - } - tiltVideo { - ${TiltedVideo()} - } - consultationHero { - ${HeroSection()} - } - zigZagContent { - ${ZigZagContent()} - } - whyCrypto { - ${HeroSection()} - } - grid { - ${Grid()} - } - } - }` -} From 8b691f72a419a96fe5d7945cd9cbed2ea585d204 Mon Sep 17 00:00:00 2001 From: Jon Snow <47143928+therealJonSnow@users.noreply.github.com> Date: Fri, 26 Jan 2024 15:20:19 +0000 Subject: [PATCH 009/192] Delete graphql/networkPage.js --- graphql/networkPage.js | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 graphql/networkPage.js diff --git a/graphql/networkPage.js b/graphql/networkPage.js deleted file mode 100644 index ae52e3a..0000000 --- a/graphql/networkPage.js +++ /dev/null @@ -1,15 +0,0 @@ -import HeroSection from './blocks/HeroSection' -import PartnerGrid from './blocks/PartnerGrid' - -export default (countryId, locale) => { - return `query { - networkPage(filter: {site: {eq: "${countryId}"}}, locale: ${locale}) { - herosection { - ${HeroSection()} - } - partners { - ${PartnerGrid()} - } - } - }` -} From f143fed1fac28e6d9400baa00054bc8b26dcb6c1 Mon Sep 17 00:00:00 2001 From: Jon Snow Date: Fri, 26 Jan 2024 15:22:23 +0000 Subject: [PATCH 010/192] Test push for vercel --- components/TheFooter.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/TheFooter.vue b/components/TheFooter.vue index c14ed9d..cc0f3d3 100644 --- a/components/TheFooter.vue +++ b/components/TheFooter.vue @@ -34,7 +34,7 @@ import { useWebsiteStore } from '../store/store' const store = useWebsiteStore() const footerQuery = footer(store.getCurrentLocale) const { data, error } = await useGraphqlQuery({ query: footerQuery }) - +console.log(error) From 2e5230f427dfbe3c479323286e40a505aaa3e67f Mon Sep 17 00:00:00 2001 From: Jon Snow Date: Fri, 26 Jan 2024 16:22:18 +0000 Subject: [PATCH 011/192] More routing issues --- app.vue | 11 ++++++++ components/LocalizationDropdown.vue | 11 ++++---- components/NavigationLink.vue | 2 +- components/SocialLink.vue | 1 - components/TheFooter.vue | 3 +-- nuxt.config.ts | 3 +++ pages/[locale]/[uid].vue | 41 +++++++++++++---------------- pages/[locale]/index.vue | 26 +++++++----------- pages/index.vue | 32 +++++++++++----------- 9 files changed, 65 insertions(+), 65 deletions(-) diff --git a/app.vue b/app.vue index 3a10a1c..51dc2db 100644 --- a/app.vue +++ b/app.vue @@ -24,3 +24,14 @@ const store = useWebsiteStore() store.setNavigation() const fetchedData = computed(() => { return store.getCurrentCountry }) + diff --git a/components/LocalizationDropdown.vue b/components/LocalizationDropdown.vue index 32d04e1..badccb4 100644 --- a/components/LocalizationDropdown.vue +++ b/components/LocalizationDropdown.vue @@ -6,7 +6,8 @@ @blur="isDropdownExpanded = false" > { }) const isDropdownExpanded = ref(false) -const selectedLocale = computed(() => { - const currentLocale = store.getCurrentLocale - return currentLocale !== 'en' ? currentLocale : 'gb' +const flagUrl = computed(() => { + const currentLocale = store.localization.siteLocales?.find(x => x === route.params.locale) || useRuntimeConfig().public.DATO_DEFAULT_LOCALE + const treatedLocale = currentLocale !== 'en' ? currentLocale : 'gb' + return `https://flagcdn.com/84x63/${treatedLocale}.png` }) const setLocale = (option: string) => { isDropdownExpanded.value = false store.setLocale(option !== 'gb' ? option : 'en') // Route to home as route slugs are language specific' - store.setPageType('home') if (store.getCurrentLocale === useRuntimeConfig().public.DATO_DEFAULT_LOCALE) { useRouter().push('/') } else { diff --git a/components/NavigationLink.vue b/components/NavigationLink.vue index 9f23d82..db6905a 100644 --- a/components/NavigationLink.vue +++ b/components/NavigationLink.vue @@ -96,7 +96,7 @@ const isExternalLink = computed(() => { }) const goToLink = () => { - store.setPageType(props.pageModel) + // store.setPageType(props.pageModel) const link = store.getCurrentLocale === useRuntimeConfig().public.DATO_DEFAULT_LOCALE ? props.link : '/' + store.getCurrentLocale + props.link router.push(link) } diff --git a/components/SocialLink.vue b/components/SocialLink.vue index 0d35961..9e4f67f 100644 --- a/components/SocialLink.vue +++ b/components/SocialLink.vue @@ -68,7 +68,6 @@ v-if="socialMediaData.key === 'whatsapp'" class="whatsapp" /> - diff --git a/components/TheFooter.vue b/components/TheFooter.vue index cc0f3d3..e4e935a 100644 --- a/components/TheFooter.vue +++ b/components/TheFooter.vue @@ -33,8 +33,7 @@ import { useWebsiteStore } from '../store/store' const store = useWebsiteStore() const footerQuery = footer(store.getCurrentLocale) -const { data, error } = await useGraphqlQuery({ query: footerQuery }) -console.log(error) +const { data } = await useGraphqlQuery({ query: footerQuery }) diff --git a/nuxt.config.ts b/nuxt.config.ts index 41394e1..dd332c4 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,6 +1,9 @@ // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ devtools: { enabled: true }, + app: { + pageTransition: { name: 'page', mode: 'out-in' } + }, routeRules: { // prerender index route by default '/': { prerender: true } diff --git a/pages/[locale]/[uid].vue b/pages/[locale]/[uid].vue index a864f5b..4d5dc3d 100644 --- a/pages/[locale]/[uid].vue +++ b/pages/[locale]/[uid].vue @@ -1,18 +1,17 @@ diff --git a/pages/[locale]/index.vue b/pages/[locale]/index.vue index cc59854..26858c7 100644 --- a/pages/[locale]/index.vue +++ b/pages/[locale]/index.vue @@ -1,8 +1,5 @@ diff --git a/components/TheFooter.vue b/components/TheFooter.vue index e4e935a..cbef3d8 100644 --- a/components/TheFooter.vue +++ b/components/TheFooter.vue @@ -17,8 +17,16 @@ Detailed Disclaimer
- Data - Cookies + + + Data Protection + + + Cookies + + + Impressum +

{{ data.footer.copyrightText }}

diff --git a/graphql/Cookies.js b/graphql/Cookies.js new file mode 100644 index 0000000..9b1e43f --- /dev/null +++ b/graphql/Cookies.js @@ -0,0 +1,8 @@ +export default (locale) => { + return `query { + cookie(locale: ${locale}) { + title + text + } + }` +} diff --git a/graphql/DataProtection.js b/graphql/DataProtection.js new file mode 100644 index 0000000..430ccb2 --- /dev/null +++ b/graphql/DataProtection.js @@ -0,0 +1,8 @@ +export default (locale) => { + return `query { + dataProtection(locale: ${locale}) { + title + text + } + }` +} diff --git a/graphql/Impressum.js b/graphql/Impressum.js new file mode 100644 index 0000000..22a2dd6 --- /dev/null +++ b/graphql/Impressum.js @@ -0,0 +1,13 @@ +export default (locale) => { + return `query { + impressum(locale: ${locale}) { + title + text + assets { + alt + url + id + } + } + }` +} diff --git a/pages/cookies.vue b/pages/cookies.vue new file mode 100644 index 0000000..ee5472b --- /dev/null +++ b/pages/cookies.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/pages/data-protection.vue b/pages/data-protection.vue new file mode 100644 index 0000000..1414567 --- /dev/null +++ b/pages/data-protection.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/pages/impressum.vue b/pages/impressum.vue new file mode 100644 index 0000000..fb17689 --- /dev/null +++ b/pages/impressum.vue @@ -0,0 +1,26 @@ +pages/cookies.vue + + + + From 99f17bd1cbc81149a1e8ac5d76d7d8f25d0a8ce1 Mon Sep 17 00:00:00 2001 From: Jon Snow Date: Fri, 26 Jan 2024 17:20:07 +0000 Subject: [PATCH 013/192] Add mobiel menu --- components/HeadlineSection.vue | 4 +- components/LocalizationDropdown.vue | 8 +- components/MobileMenu.vue | 183 ++++++++++++++++++++ components/TheNavigation.vue | 7 + components/datocms-blocks/HalfImageHero.vue | 2 +- composables/useClickOutside.ts | 45 +++++ 6 files changed, 242 insertions(+), 7 deletions(-) create mode 100644 components/MobileMenu.vue create mode 100644 composables/useClickOutside.ts diff --git a/components/HeadlineSection.vue b/components/HeadlineSection.vue index 2f968ad..78e763a 100644 --- a/components/HeadlineSection.vue +++ b/components/HeadlineSection.vue @@ -1,9 +1,9 @@ diff --git a/components/datocms-blocks/HalfImageHero.vue b/components/datocms-blocks/HalfImageHero.vue index c99e130..19b9443 100644 --- a/components/datocms-blocks/HalfImageHero.vue +++ b/components/datocms-blocks/HalfImageHero.vue @@ -7,7 +7,7 @@ >
void) { + if (typeof queueMicrotask === 'function') { + queueMicrotask(cb) + } else { + Promise.resolve() + .then(cb) + .catch(e => + setTimeout(() => { + throw e + }) + ) + } +} + +export function useOutsideClick ( + el: Ref, + cb: (event: MouseEvent | PointerEvent, target: HTMLElement) => void +) { + if (!process.client) { return } // only run on client + + let called = false + function handle (event: MouseEvent | PointerEvent) { + if (called) { return } + called = true + microTask(() => { + called = false + }) + + const target = event.target as HTMLElement + + // Ignore if the target doesn't exist in the DOM anymore + if (!target.ownerDocument.documentElement.contains(target)) { return } + + // Ignore if the target exists in one of the containers + if (el.value?.contains(target)) { return } + + cb(event, target) + } + + useEventListener('pointerdown', handle, window) + useEventListener('mousedown', handle, window) +} From f545a0e5992a1ac6575e446b9197a227c2a3f6c5 Mon Sep 17 00:00:00 2001 From: Jon Snow Date: Mon, 29 Jan 2024 08:49:52 +0000 Subject: [PATCH 014/192] Update footer styling --- components/LocalizationDropdown.vue | 10 ++- components/TheFooter.vue | 101 +++++++++++++++++++++------- components/datocms-blocks/Image.vue | 4 +- 3 files changed, 88 insertions(+), 27 deletions(-) diff --git a/components/LocalizationDropdown.vue b/components/LocalizationDropdown.vue index e459f5f..eba645b 100644 --- a/components/LocalizationDropdown.vue +++ b/components/LocalizationDropdown.vue @@ -1,7 +1,8 @@ From 7ec73a7635e44849e7c77301929662dd612d00a8 Mon Sep 17 00:00:00 2001 From: Jon Snow Date: Mon, 29 Jan 2024 09:22:27 +0000 Subject: [PATCH 015/192] Footer and navigation styling --- components/BlockWrapper.vue | 5 ++ components/TheFooter.vue | 4 +- components/TheNavigation.vue | 155 +++++++++++++++++++---------------- 3 files changed, 90 insertions(+), 74 deletions(-) diff --git a/components/BlockWrapper.vue b/components/BlockWrapper.vue index 69e7aa2..dddd86c 100644 --- a/components/BlockWrapper.vue +++ b/components/BlockWrapper.vue @@ -84,6 +84,11 @@ section > .widest { } /* Section paddings, each slice should be a section with one of these classes + one of the bg- classes used below */ + +section:first-of-type { + @apply pt-160 xl:pt-240 +} + .section-p-360 { @apply pt-300 xl:pt-360; } diff --git a/components/TheFooter.vue b/components/TheFooter.vue index f8ad44a..3dc5d90 100644 --- a/components/TheFooter.vue +++ b/components/TheFooter.vue @@ -1,8 +1,8 @@ @@ -95,6 +103,10 @@ defineProps({ const store = useWebsiteStore() const pages = computed(() => store.pages) +let firstSectionColor = undefined as string | undefined +onMounted(() => { + firstSectionColor = document?.querySelector('section')?.style.backgroundColor +}) const goHome = () => { store.setPageType('home') @@ -113,7 +125,6 @@ const localState = reactive({ prevScrollPos: 0, isSticky: false, isScrolled: false, - isGetStartedModalVisible: false, activeModal: 0 }) From a33cda4331db2c5fb7d7439b09992fa03da7bef2 Mon Sep 17 00:00:00 2001 From: Jon Snow Date: Mon, 29 Jan 2024 11:19:22 +0000 Subject: [PATCH 016/192] Add cities carousel and fallbacks --- components/BlockWrapper.vue | 3 +- components/ContactCard.vue | 2 +- components/DetailedCityCard.vue | 73 +++++ components/HeadlineSection.vue | 2 +- components/NimiqVideo.vue | 2 +- .../datocms-blocks/AllCitiesCarousel.vue | 271 +++++++----------- components/datocms-blocks/CitiesCarousel.vue | 87 +++--- components/datocms-blocks/ContactForm.vue | 36 ++- components/datocms-blocks/MediaCarousel.vue | 6 +- components/datocms-blocks/TiltedVideo.vue | 2 +- composables/useMediaQuery.ts | 16 ++ graphql/AllCities.js | 9 +- graphql/City.js | 2 +- store/store.ts | 2 +- 14 files changed, 274 insertions(+), 239 deletions(-) create mode 100644 components/DetailedCityCard.vue create mode 100644 composables/useMediaQuery.ts diff --git a/components/BlockWrapper.vue b/components/BlockWrapper.vue index dddd86c..58edf13 100644 --- a/components/BlockWrapper.vue +++ b/components/BlockWrapper.vue @@ -1,10 +1,9 @@ diff --git a/components/datocms-blocks/CitiesCarousel.vue b/components/datocms-blocks/CitiesCarousel.vue index 32b1892..ec5a342 100644 --- a/components/datocms-blocks/CitiesCarousel.vue +++ b/components/datocms-blocks/CitiesCarousel.vue @@ -9,7 +9,7 @@
- - - + + + + + + + +
@@ -234,3 +237,15 @@ onMounted(() => { onWindowResize() }) + + diff --git a/components/datocms-blocks/ContactForm.vue b/components/datocms-blocks/ContactForm.vue index 25e8043..1591cf4 100644 --- a/components/datocms-blocks/ContactForm.vue +++ b/components/datocms-blocks/ContactForm.vue @@ -1,24 +1,22 @@