diff --git a/assets/img/smiley.svg b/assets/img/smiley.svg new file mode 100644 index 0000000..1259d5f --- /dev/null +++ b/assets/img/smiley.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/site/blueprints/pages/white-paper.yml b/site/blueprints/pages/white-paper.yml index 57d1c52..c97619b 100644 --- a/site/blueprints/pages/white-paper.yml +++ b/site/blueprints/pages/white-paper.yml @@ -59,50 +59,3 @@ tabs: accept: application/pdf translate: false help: Fichier téléchargé après soumission du formulaire - leads: - label: Contacts intéressés - icon: users - sections: - contactDatabase: - type: fields - fields: - contactDatabase: - label: Visiteurs ayant téléchargé - type: structure - translate: false - columns: - firstName: - label: Prénom - width: 1/4 - lastName: - label: Nom - width: 1/4 - email: - label: Email - width: 1/4 - company: - label: Entreprise - width: 1/4 - role: - label: Fonction - downloadedAt: - label: Date - fields: - firstName: - type: text - label: Prénom - lastName: - type: text - label: Nom - email: - type: email - label: Email - company: - type: text - label: Entreprise - role: - type: text - label: Fonction - downloadedAt: - type: text - label: Date diff --git a/site/blueprints/pages/white-papers.yml b/site/blueprints/pages/white-papers.yml index 816c625..7c05d1e 100644 --- a/site/blueprints/pages/white-papers.yml +++ b/site/blueprints/pages/white-papers.yml @@ -41,3 +41,48 @@ tabs: ratio: 3/4 cover: true info: "{{ page.published.toDate('d/m/Y') }}" + dataTab: + label: Contacts + icon: chart + fields: + contactDatabase: + label: Ont téléchargé un livre blanc + type: structure + columns: + firstName: + label: Prénom + width: 1/4 + lastName: + label: Nom + width: 1/4 + email: + label: Email + width: 1/4 + company: + label: Entreprise + width: 1/4 + role: + label: Fonction + downloadedAt: + label: Date + fields: + firstName: + label: Prénom + type: text + required: true + lastName: + label: Nom + type: text + required: true + company: + label: Société + type: text + role: + label: Fonction + type: text + email: + type: email + required: true + downloadedAt: + type: text + label: Date diff --git a/site/blueprints/site.yml b/site/blueprints/site.yml index f4a3748..61507b1 100644 --- a/site/blueprints/site.yml +++ b/site/blueprints/site.yml @@ -86,28 +86,3 @@ tabs: max: 1 accept: application/pdf translate: false - dataTab: - label: Données d'usage - icon: chart - fields: - contactDatabase: - label: Ont téléchargé un livre blanc - type: structure - fields: - firstName: - label: Prénom - type: text - required: true - lastName: - label: Nom - type: text - required: true - company: - label: Société - type: text - role: - label: Fonction - type: text - email: - type: email - required: true diff --git a/site/config/routes/download-white-paper.php b/site/config/routes/download-white-paper.php index 41d93aa..05d6a5c 100644 --- a/site/config/routes/download-white-paper.php +++ b/site/config/routes/download-white-paper.php @@ -80,7 +80,7 @@ return [ } kirby()->impersonate('kirby', function () use ($page, $entries) { - $page->update(['contactDatabase' => \Kirby\Data\Data::encode($entries, 'yaml')]); + page('livres-blancs')->update(['contactDatabase' => \Kirby\Data\Data::encode($entries, 'yaml')]); }); header('Content-Type: application/json'); diff --git a/src/i18n/index.js b/src/i18n/index.js index 4e6dd2d..b7c4601 100644 --- a/src/i18n/index.js +++ b/src/i18n/index.js @@ -64,9 +64,13 @@ const dict = { en: "By checking this box, I agree to be contacted by World Game. My data will not be sold or shared.", }, wp_download: { fr: "TÉLÉCHARGER", en: "DOWNLOAD" }, - wp_success: { - fr: "Votre demande a été enregistrée. Le téléchargement devrait démarrer.", - en: "Your request has been registered. The download should start.", + wp_success_heading: { + fr: "Merci pour votre\nintérêt et bonne lecture !", + en: "Thank you for your\ninterest, enjoy the read!", + }, + wp_success_sub: { + fr: "L'équipe du World Game.", + en: "The World Game team.", }, wp_error: { fr: "Une erreur est survenue, veuillez réessayer.", diff --git a/src/views/WhitePaper.svelte b/src/views/WhitePaper.svelte index 82557da..769aa8a 100644 --- a/src/views/WhitePaper.svelte +++ b/src/views/WhitePaper.svelte @@ -80,38 +80,44 @@
-
-

{t('wp_form_intro')}

-
-
- - -
- - - + {#if status === 'success'} +
+ +

{t('wp_success_heading')}

+

{t('wp_success_sub')}

+
+ {:else} +
+

{t('wp_form_intro')}

+ +
+ + +
+ + + - + - + - {#if status === 'success'} -

{t('wp_success')}

- {:else if status === 'error'} -

{t('wp_error')}

- {/if} + {#if status === 'error'} +

{t('wp_error')}

+ {/if} - - -
+ + +
+ {/if}
@@ -179,8 +185,10 @@ /* ── Form area: desktop — right column ── */ .form-area { + background: #000; margin-top: 2rem; width: 30vw; + align-self: stretch; display: flex; align-items: flex-start; justify-content: center; @@ -193,7 +201,6 @@ } .form-card { - background: #0b0b18; border-radius: 4px; padding: 2.5rem; width: 100%; @@ -294,9 +301,36 @@ border-radius: 2px; } - .status--success { - background: rgba(4, 254, 160, 0.15); + /* ── Thank you screen ── */ + .thank-you { + border-radius: 4px; + width: 100%; + height: 70vh; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + gap: 1.5rem; + padding: 2.5rem; + text-align: center; + } + + .thank-you-smiley { + width: 80px; + height: 80px; + } + + .thank-you-heading { + font-family: "Danzza bold", sans-serif; + font-size: var(--font-size-title-section); color: var(--color-primary); + line-height: 1.2; + } + + .thank-you-sub { + font-family: "Danzza", sans-serif; + font-size: var(--font-size-paragraph); + color: rgba(255, 255, 255, 0.6); } .status--error {