Version 1!
Missing EN translations and directions
This commit is contained in:
13
angular.json
13
angular.json
@@ -35,10 +35,7 @@
|
||||
],
|
||||
"scripts": [],
|
||||
"server": "src/main.server.ts",
|
||||
"prerender": true,
|
||||
"ssr": {
|
||||
"entry": "server.ts"
|
||||
}
|
||||
"baseHref": "replaced-base-href"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
@@ -103,10 +100,14 @@
|
||||
}
|
||||
},
|
||||
"i18n": {
|
||||
"sourceLocale": "nl-NL",
|
||||
"sourceLocale": {
|
||||
"code": "nl-NL",
|
||||
"baseHref": ""
|
||||
},
|
||||
"locales": {
|
||||
"en-US": {
|
||||
"translation": "messages-en.json"
|
||||
"translation": "messages-en.json",
|
||||
"baseHref": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"whenOptionCake": "Cake & Bubbles",
|
||||
"whenOptionDinner": "Dinner",
|
||||
"whenOptionChurch": "Church Ceremony",
|
||||
"whenOptionParty": "Feest",
|
||||
"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"
|
||||
"whenOptionParty": "Party",
|
||||
"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",
|
||||
"whenOptionChurch": "Kerkdienst",
|
||||
"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>
|
||||
<img class="envelope" src="assets/images/envelope.png" alt="Envelope" />
|
||||
</section>
|
||||
<app-heart></app-heart>
|
||||
<section class="item">
|
||||
<h3>Adressen</h3>
|
||||
<a routerLink="directions">Klik</a>
|
||||
</section>
|
||||
<!-- <app-heart></app-heart>-->
|
||||
<!-- <section class="item">-->
|
||||
<!-- <h3>Adressen</h3>-->
|
||||
<!-- <a routerLink="directions">Klik</a>-->
|
||||
<!-- </section>-->
|
||||
</section>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {HeartComponent} from "../heart/heart.component";
|
||||
import {RouterLink} from "@angular/router";
|
||||
import {InviteType, InviteTypeService} from "../shared/invite-type.service";
|
||||
|
||||
@Component({
|
||||
selector: 'app-landing-page',
|
||||
@@ -13,6 +14,10 @@ import {RouterLink} from "@angular/router";
|
||||
styleUrl: './landing-page.component.scss'
|
||||
})
|
||||
export class LandingPageComponent {
|
||||
constructor(
|
||||
private inviteTypeService: InviteTypeService
|
||||
) {
|
||||
}
|
||||
title = 'marc-en-tineke-2024';
|
||||
|
||||
mailTitleWholeDay = $localize`:@@mailTitleWholeDay:RSVP Trouwen 2024`;
|
||||
@@ -41,14 +46,14 @@ ${this.getWhenQuestions()}%0D%0A
|
||||
|
||||
|
||||
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() {
|
||||
return `mailto:marcentinekegaantrouwen@xz1.nl?subject=${this.mailTitleWholeDay}&body=${this.mailBody}`.replace('\n', '%0D%0A');
|
||||
}
|
||||
|
||||
goToAddressesPage() {
|
||||
const title = this.inviteTypeService.getInviteType() === InviteType.EVENING ? this.mailTitleEvening : this.mailTitleWholeDay;
|
||||
|
||||
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">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>MarcEnTineke2024</title>
|
||||
<base href="/random-csp-nonce">
|
||||
<title>Marc en Tineke 2024</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
<app-root ngCspNonce="random-csp-nonce"></app-root>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user