Feat: écran de remerciement post-téléchargement white paper
All checks were successful
Deploy / Deploy to Production (push) Successful in 22s

- Remplace le message inline par un écran centré (smiley + heading + signature)
- Ajout clés i18n wp_success_heading / wp_success_sub
- Ajustements blueprints white-paper / white-papers / site
- Route : stockage leads sur page livres-blancs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2026-03-19 11:36:00 +01:00
parent 1cbb843c89
commit 79019b761f
7 changed files with 133 additions and 107 deletions

View file

@ -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.",

View file

@ -80,38 +80,44 @@
<!-- Form area: right column on desktop, full-screen overlay on mobile -->
<div class="form-area" class:is-visible={showForm}>
<button class="form-close" onclick={() => showForm = false} aria-label="Fermer"></button>
<div class="form-card">
<p class="form-intro">{t('wp_form_intro')}</p>
<form class="form" onsubmit={handleSubmit}>
<div class="form-row">
<input class="input" type="text" placeholder={t('wp_firstname')} bind:value={firstName} required />
<input class="input" type="text" placeholder={t('wp_lastname')} bind:value={lastName} required />
</div>
<input class="input" type="text" placeholder={t('wp_company')} bind:value={company} />
<input class="input" type="text" placeholder={t('wp_role')} bind:value={role} />
<input class="input" type="email" placeholder={t('wp_email')} bind:value={email} required />
{#if status === 'success'}
<div class="thank-you">
<img src="/assets/img/smiley.svg" alt="" class="thank-you-smiley" aria-hidden="true" />
<p class="thank-you-heading">{t('wp_success_heading')}</p>
<p class="thank-you-sub">{t('wp_success_sub')}</p>
</div>
{:else}
<div class="form-card">
<p class="form-intro">{t('wp_form_intro')}</p>
<form class="form" onsubmit={handleSubmit}>
<div class="form-row">
<input class="input" type="text" placeholder={t('wp_firstname')} bind:value={firstName} required />
<input class="input" type="text" placeholder={t('wp_lastname')} bind:value={lastName} required />
</div>
<input class="input" type="text" placeholder={t('wp_company')} bind:value={company} />
<input class="input" type="text" placeholder={t('wp_role')} bind:value={role} />
<input class="input" type="email" placeholder={t('wp_email')} bind:value={email} required />
<div class="hp" aria-hidden="true">
<label for="website">Website</label>
<input id="website" type="text" name="website" tabindex="-1" autocomplete="off" bind:value={honeypot} />
</div>
<div class="hp" aria-hidden="true">
<label for="website">Website</label>
<input id="website" type="text" name="website" tabindex="-1" autocomplete="off" bind:value={honeypot} />
</div>
<label class="consent">
<input type="checkbox" bind:checked={consent} required />
<span>{t('wp_consent')}</span>
</label>
<label class="consent">
<input type="checkbox" bind:checked={consent} required />
<span>{t('wp_consent')}</span>
</label>
{#if status === 'success'}
<p class="status status--success">{t('wp_success')}</p>
{:else if status === 'error'}
<p class="status status--error">{t('wp_error')}</p>
{/if}
{#if status === 'error'}
<p class="status status--error">{t('wp_error')}</p>
{/if}
<button type="submit" class="submit button download-icon" disabled={submitting || !isDownloadable}>
{t('wp_download')}
</button>
</form>
</div>
<button type="submit" class="submit button download-icon" disabled={submitting || !isDownloadable}>
{t('wp_download')}
</button>
</form>
</div>
{/if}
</div>
</div>
@ -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 {