Version 1!
Missing EN translations and directions
This commit is contained in:
13
angular.json
13
angular.json
@@ -35,10 +35,7 @@
|
|||||||
],
|
],
|
||||||
"scripts": [],
|
"scripts": [],
|
||||||
"server": "src/main.server.ts",
|
"server": "src/main.server.ts",
|
||||||
"prerender": true,
|
"baseHref": "replaced-base-href"
|
||||||
"ssr": {
|
|
||||||
"entry": "server.ts"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
@@ -103,10 +100,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"i18n": {
|
"i18n": {
|
||||||
"sourceLocale": "nl-NL",
|
"sourceLocale": {
|
||||||
|
"code": "nl-NL",
|
||||||
|
"baseHref": ""
|
||||||
|
},
|
||||||
"locales": {
|
"locales": {
|
||||||
"en-US": {
|
"en-US": {
|
||||||
"translation": "messages-en.json"
|
"translation": "messages-en.json",
|
||||||
|
"baseHref": ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
"whenOptionCake": "Cake & Bubbles",
|
"whenOptionCake": "Cake & Bubbles",
|
||||||
"whenOptionDinner": "Dinner",
|
"whenOptionDinner": "Dinner",
|
||||||
"whenOptionChurch": "Church Ceremony",
|
"whenOptionChurch": "Church Ceremony",
|
||||||
"whenOptionParty": "Feest",
|
"whenOptionParty": "Party",
|
||||||
"mailBody": "Glad to hear you are attending! Please provide answers to the following questions:\n\nI will attend with: X persons\nI will be attending (please remove the events you will not attend):\n{$PH}\nNotes and dietary requirements"
|
"mailBody": "Glad to hear you are attending! Please provide answers to the following questions:%0D%0A\nI will attend with: X persons%0D%0A %0D%0A\nI will be attending (please remove the events you will not attend):\n%0D%0A\n{$PH}%0D%0A\n%0D%0ANotes and dietary requirements"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,6 @@
|
|||||||
"whenOptionDinner": "Diner",
|
"whenOptionDinner": "Diner",
|
||||||
"whenOptionChurch": "Kerkdienst",
|
"whenOptionChurch": "Kerkdienst",
|
||||||
"whenOptionParty": "Feest",
|
"whenOptionParty": "Feest",
|
||||||
"mailBody": "Fijn dat je komt! Geef hieronder antwoord op de volgende vragen:\n\nIk kom met: X personen\nIk ben er bij met (verwijder als je niet aanwezig bent):\n{$PH}\nVerdere opmerkingen/dieetwensen"
|
"mailBody": "Wat fijn dat je ons laat weten of je er bij bent!%0D%0A\nIk kom met: %0D%0A\n- X personen%0D%0A %0D%0A\nIk ben er bij met (verwijder als je niet aanwezig bent):\n%0D%0A\n{$PH}%0D%0A\n%0D%0AVerdere opmerkingen/dieetwensen"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -27,10 +27,10 @@
|
|||||||
<h3>Cadeautip</h3>
|
<h3>Cadeautip</h3>
|
||||||
<img class="envelope" src="assets/images/envelope.png" alt="Envelope" />
|
<img class="envelope" src="assets/images/envelope.png" alt="Envelope" />
|
||||||
</section>
|
</section>
|
||||||
<app-heart></app-heart>
|
<!-- <app-heart></app-heart>-->
|
||||||
<section class="item">
|
<!-- <section class="item">-->
|
||||||
<h3>Adressen</h3>
|
<!-- <h3>Adressen</h3>-->
|
||||||
<a routerLink="directions">Klik</a>
|
<!-- <a routerLink="directions">Klik</a>-->
|
||||||
</section>
|
<!-- </section>-->
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import {Component} from '@angular/core';
|
import {Component} from '@angular/core';
|
||||||
import {HeartComponent} from "../heart/heart.component";
|
import {HeartComponent} from "../heart/heart.component";
|
||||||
import {RouterLink} from "@angular/router";
|
import {RouterLink} from "@angular/router";
|
||||||
|
import {InviteType, InviteTypeService} from "../shared/invite-type.service";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-landing-page',
|
selector: 'app-landing-page',
|
||||||
@@ -13,6 +14,10 @@ import {RouterLink} from "@angular/router";
|
|||||||
styleUrl: './landing-page.component.scss'
|
styleUrl: './landing-page.component.scss'
|
||||||
})
|
})
|
||||||
export class LandingPageComponent {
|
export class LandingPageComponent {
|
||||||
|
constructor(
|
||||||
|
private inviteTypeService: InviteTypeService
|
||||||
|
) {
|
||||||
|
}
|
||||||
title = 'marc-en-tineke-2024';
|
title = 'marc-en-tineke-2024';
|
||||||
|
|
||||||
mailTitleWholeDay = $localize`:@@mailTitleWholeDay:RSVP Trouwen 2024`;
|
mailTitleWholeDay = $localize`:@@mailTitleWholeDay:RSVP Trouwen 2024`;
|
||||||
@@ -41,14 +46,14 @@ ${this.getWhenQuestions()}%0D%0A
|
|||||||
|
|
||||||
|
|
||||||
getWhenQuestions() {
|
getWhenQuestions() {
|
||||||
return this.whenQuestionOptionsWholeDay.map(item => `- ${encodeURIComponent(item)}`).join('%0D%0A');
|
const options = this.inviteTypeService.getInviteType() === InviteType.EVENING ? this.whenQuestionOptionsEvening : this.whenQuestionOptionsWholeDay;
|
||||||
|
|
||||||
|
return options.map(item => `- ${encodeURIComponent(item)}`).join('%0D%0A');
|
||||||
}
|
}
|
||||||
|
|
||||||
getMailToLink() {
|
getMailToLink() {
|
||||||
return `mailto:marcentinekegaantrouwen@xz1.nl?subject=${this.mailTitleWholeDay}&body=${this.mailBody}`.replace('\n', '%0D%0A');
|
const title = this.inviteTypeService.getInviteType() === InviteType.EVENING ? this.mailTitleEvening : this.mailTitleWholeDay;
|
||||||
}
|
|
||||||
|
|
||||||
goToAddressesPage() {
|
|
||||||
|
|
||||||
|
return `mailto:marcentinekegaantrouwen@xz1.nl?subject=${title}&body=${this.mailBody}`.replace('\n', '%0D%0A');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
39
src/app/shared/invite-type.service.ts
Normal file
39
src/app/shared/invite-type.service.ts
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
import {Inject, Injectable} from '@angular/core';
|
||||||
|
import {DOCUMENT} from "@angular/common";
|
||||||
|
|
||||||
|
export enum InviteType {
|
||||||
|
FULL_DAY,
|
||||||
|
EVENING
|
||||||
|
}
|
||||||
|
|
||||||
|
const inviteTypeMap = {
|
||||||
|
'u7Tk3QvK': InviteType.EVENING,
|
||||||
|
'AGr3ZfXM': InviteType.FULL_DAY,
|
||||||
|
'ZXwfAK7g': InviteType.EVENING,
|
||||||
|
'5JnTf3NF': InviteType.FULL_DAY
|
||||||
|
}
|
||||||
|
|
||||||
|
@Injectable({
|
||||||
|
providedIn: 'root'
|
||||||
|
})
|
||||||
|
export class InviteTypeService {
|
||||||
|
|
||||||
|
|
||||||
|
getInviteType() {
|
||||||
|
const inviteValue = this.getCookieValue('invite');
|
||||||
|
|
||||||
|
if (!inviteValue) {
|
||||||
|
return InviteType.EVENING;
|
||||||
|
}
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
return inviteTypeMap[inviteValue]
|
||||||
|
}
|
||||||
|
|
||||||
|
private getCookieValue(name: string) {
|
||||||
|
return document.cookie
|
||||||
|
.split("; ")
|
||||||
|
.find((row) => row.startsWith(`${name}=`))
|
||||||
|
?.split("=")[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
src/favicon.ico
BIN
src/favicon.ico
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
@@ -2,12 +2,11 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>MarcEnTineke2024</title>
|
<title>Marc en Tineke 2024</title>
|
||||||
<base href="/random-csp-nonce">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<app-root ngCspNonce="random-csp-nonce"></app-root>
|
<app-root></app-root>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user