<?php snippet('header', ['title' => $site->title(), 'template' => 'store']) ?>

    <main>
        <p class="p__baseline-big">
            <?= $page->baseline()->or('Bienvenue sur la boutique de soutien à Index') ?>
        </p>

        <section id="store__container">
            <?php foreach($site->children()->listed() as $product): ?>
            <article class="store__product">
                <figure>
                    <?php if($cover = $product->files()->sort()->first()): ?>
                        <?php snippet('picture', [
                            'file' => $cover,
                            'alt' => $product->title()->html(),
                            'preset' => 'product-card',
                            'size' => 25,
                            'lazy' => true
                        ]) ?>
                    <?php endif ?>
                </figure>
                <p class="line-1"><a href="<?= $product->url() ?>"><?= $product->title()->html() ?></a></p>
                <p class="price"><?= $product->price() ?>€</p>
                <a href="<?= $product->url() ?>" class="link-block" aria-hidden="true"></a>
            </article>
            <?php endforeach ?>
        </section>

        <p class="p__baseline-big">
            <?= t('supportText', 'Pour nous soutenir, vous&nbsp;pouvez&nbsp;aussi') ?>
            <a href="https://soutenir.index.ngo" class="link-don"><?= t('makeDonation', 'faire un don') ?></a>
        </p>
    </main>

<?php snippet('footer') ?>
