support : integrate shop
This commit is contained in:
parent
ba0df6b5cb
commit
1637b26f58
6 changed files with 68 additions and 46 deletions
|
|
@ -1 +1,25 @@
|
|||
title: Produit
|
||||
|
||||
tabs:
|
||||
contentTab:
|
||||
columns:
|
||||
- width: 1/3
|
||||
sections:
|
||||
gallery:
|
||||
label: Galerie
|
||||
type: files
|
||||
layout: cards
|
||||
min: 1
|
||||
max: 1
|
||||
- width: 2/3
|
||||
fields:
|
||||
price:
|
||||
label: Prix
|
||||
type: number
|
||||
after: €
|
||||
width: 1/3
|
||||
description:
|
||||
type: writer
|
||||
nodes: false
|
||||
marks: false
|
||||
width: 2/3
|
||||
|
|
|
|||
10
site/blueprints/pages/shop.yml
Normal file
10
site/blueprints/pages/shop.yml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
title: Boutique
|
||||
|
||||
tabs:
|
||||
contentTab:
|
||||
sections:
|
||||
products:
|
||||
label: Produits
|
||||
type: pages
|
||||
template: product
|
||||
ratio: 4/3
|
||||
|
|
@ -22,4 +22,7 @@ return [
|
|||
],
|
||||
],
|
||||
],
|
||||
'panel' => [
|
||||
'menu' => require_once __DIR__ . '/menu.php'
|
||||
]
|
||||
];
|
||||
22
site/config/menu.php
Normal file
22
site/config/menu.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'home' => [
|
||||
'label' => 'Soutien',
|
||||
'icon' => 'home',
|
||||
'link' => 'pages/support',
|
||||
'current' => function ($current) {
|
||||
$path = Kirby::instance()->request()->path()->toString();
|
||||
return Str::contains($path, 'pages/support');
|
||||
},
|
||||
],
|
||||
'shop' => [
|
||||
'label' => 'Boutique',
|
||||
'icon' => 'cart',
|
||||
'link' => 'pages/boutique',
|
||||
'current' => function ($current) {
|
||||
$path = Kirby::instance()->request()->path()->toString();
|
||||
return Str::contains($path, 'pages/boutique');
|
||||
},
|
||||
],
|
||||
];
|
||||
0
site/templates/shop.php
Normal file
0
site/templates/shop.php
Normal file
|
|
@ -144,55 +144,18 @@
|
|||
<p class="p__baseline">Vous pouvez également soutenir Index en commandant des articles disponibles sur notre boutique.</p>
|
||||
|
||||
<div class="store__container">
|
||||
<article class="store__product">
|
||||
<figure style="--data-bg: #ffffff">
|
||||
<img src="assets/images/tshirt-01.png">
|
||||
</figure>
|
||||
<p class="line-1"><a href="#">T-shirt Index 01</a></p>
|
||||
<p class="price">35€</p>
|
||||
<a href="#" class="link-block" aria-hidden="true"></a>
|
||||
</article>
|
||||
|
||||
|
||||
<?php foreach(page('boutique')->children() as $product): ?>
|
||||
<article class="store__product">
|
||||
<figure style="--data-bg: #000000">
|
||||
<img src="assets/images/publi-lebal.jpg">
|
||||
</figure>
|
||||
<!-- Note: le contenu des lignes est libre, max 3 lignes, seule la première ligne est obligatoire -->
|
||||
<p class="line-1">Publication</p>
|
||||
<p class="line-2"><a href="#">Éclairages/Spotlights</a></p>
|
||||
<p class="price">35€</p>
|
||||
<a href="#" class="link-block" aria-hidden="true"></a>
|
||||
</article>
|
||||
|
||||
<article class="store__product">
|
||||
<figure style="--data-bg: #ffffff">
|
||||
<img src="assets/images/casquette-01.png">
|
||||
</figure>
|
||||
<p class="line-1"><a href="#">Casquette</a></p>
|
||||
<p class="price">35€</p>
|
||||
<a href="#" class="link-block" aria-hidden="true"></a>
|
||||
</article>
|
||||
|
||||
|
||||
<article class="store__product">
|
||||
<figure style="--data-bg: #ffffff">
|
||||
<img src="assets/images/tshirt-01.png">
|
||||
</figure>
|
||||
<p class="line-1"><a href="#">T-shirt Index 01</a></p>
|
||||
<p class="price">35€</p>
|
||||
<a href="#" class="link-block" aria-hidden="true"></a>
|
||||
</article>
|
||||
|
||||
<article class="store__product">
|
||||
<figure style="--data-bg: #000000">
|
||||
<img src="assets/images/publi-lebal.jpg">
|
||||
</figure>
|
||||
<p class="line-1">Publication</p>
|
||||
<p class="line-2"><a href="#">Éclairages/Spotlights</a></p>
|
||||
<p class="price">35€</p>
|
||||
<?php if ($product->hasFiles()): ?>
|
||||
<figure style="--data-bg: #000000">
|
||||
<img src="<?= $product->files()->first()->url() ?>" alt="">
|
||||
</figure>
|
||||
<?php endif ?>
|
||||
<p><?= $product->title() ?></p>
|
||||
<?= $product->description() ?>
|
||||
<a href="#" class="link-block" aria-hidden="true"></a>
|
||||
</article>
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue