prepare subscription page
This commit is contained in:
parent
4c5b7677d7
commit
1b62fa7589
10 changed files with 77 additions and 61 deletions
|
|
@ -3,6 +3,11 @@ title: Liste de diffusion
|
|||
tabs:
|
||||
content:
|
||||
columns:
|
||||
- width: 1/1
|
||||
fields:
|
||||
body:
|
||||
label: Texte
|
||||
type: writer
|
||||
- width: 1/2
|
||||
fields:
|
||||
subscribers:
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ return [
|
|||
return Str::contains($path, 'pages/a-propos');
|
||||
}
|
||||
],
|
||||
'newsletter' => [
|
||||
'subscription' => [
|
||||
'icon' => 'email',
|
||||
'label' => 'Liste de diffusion',
|
||||
'link' => 'pages/liste-de-diffusion',
|
||||
'link' => 'pages/inscription',
|
||||
'current' => function ($current) {
|
||||
$path = Kirby::instance()->request()->path()->toString();
|
||||
return Str::contains($path, 'pages/liste-de-diffusion');
|
||||
|
|
|
|||
|
|
@ -1,12 +1,18 @@
|
|||
<footer id="main-footer">
|
||||
<ul id="links">
|
||||
<li
|
||||
id="subscribe-btn-wrapper"
|
||||
>
|
||||
<a id="subscribe-btn" class="plus">
|
||||
s'inscrire
|
||||
</a>
|
||||
</li>
|
||||
<?php if ($page->is(page('inscription'))): ?>
|
||||
<li>
|
||||
<a href="<?= $site->url() ?>">
|
||||
accueil
|
||||
</a>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li>
|
||||
<a href="/inscription" id="subscribe-btn" class="plus">
|
||||
s'inscrire
|
||||
</a>
|
||||
</li>
|
||||
<?php endif ?>
|
||||
<li>
|
||||
<a href="<?= $site->find('a-propos')->url() ?>">
|
||||
à propos
|
||||
|
|
|
|||
19
site/templates/newsletter.php
Normal file
19
site/templates/newsletter.php
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
<?php snippet('header') ?>
|
||||
<main id="<?= $page->template() ?>">
|
||||
<article>
|
||||
<?php snippet('cover', array('isOpen' => true), slots: true) ?>
|
||||
<?php slot('title') ?>
|
||||
<h2 class="main-title <?= setTitleFontSizeClass($page->title()) ?>"><?= $page->title() ?></h2>
|
||||
<?= $page->body() ?>
|
||||
<form id="subscribe-form">
|
||||
<label for="email">
|
||||
<input type="email" name="email" id="email" placeholder="votre e-mail">
|
||||
<button type="submit" onclick="subscribe(event)">→</button>
|
||||
</label>
|
||||
</form>
|
||||
<?php endslot() ?>
|
||||
<?php endsnippet() ?>
|
||||
</article>
|
||||
</main>
|
||||
|
||||
<?php snippet('footer') ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue