1b3a775f6SGreg Roach<?php 2b3a775f6SGreg Roach 310e06497SGreg Roachdeclare(strict_types=1); 410e06497SGreg Roach 5b3a775f6SGreg Roachuse Fisharebest\Webtrees\I18N; 67c2c99faSGreg Roachuse Fisharebest\Webtrees\Tree; 7b3a775f6SGreg Roachuse Fisharebest\Webtrees\View; 8b3a775f6SGreg Roach 97c2c99faSGreg Roach/** 107c2c99faSGreg Roach * @var Tree $tree 117c2c99faSGreg Roach * @var bool $uses_analytics 127c2c99faSGreg Roach */ 137c2c99faSGreg Roach 14b3a775f6SGreg Roach?> 15b3a775f6SGreg Roach 16*5712865dSGreg Roach<div class="wt-footer wt-footer-privacy-policy text-center my-2"> 17b3a775f6SGreg Roach <a href="<?= e(route('module', ['module' => 'privacy-policy', 'action' => 'Page', 'tree' => $tree->name()])) ?>"> 18b3a775f6SGreg Roach <?= I18N::translate('Privacy policy') ?> 19b3a775f6SGreg Roach </a> 20b3a775f6SGreg Roach 21b3a775f6SGreg Roach <?php if ($uses_analytics) : ?> 22*5712865dSGreg Roach <div class="alert alert-info alert-dismissible fade collapse mb-0" id="privacy-warning"> 23b3a775f6SGreg Roach <?= I18N::translate('This website uses cookies to learn about visitor behavior.') ?> 24b3a775f6SGreg Roach 25*5712865dSGreg Roach <button type="button" id="privacy-warning-button" class="btn-close" data-bs-dismiss="alert" aria-label="<?= I18N::translate('close') ?>"> 26b3a775f6SGreg Roach </button> 27b3a775f6SGreg Roach </div> 28b3a775f6SGreg Roach 29b3a775f6SGreg Roach <?php View::push('javascript') ?> 30b3a775f6SGreg Roach <script> 31b3a775f6SGreg Roach if (localStorage.getItem("cookie-warning") !== "ok") { 32*5712865dSGreg Roach document.getElementById("privacy-warning").classList.add("show"); 33b3a775f6SGreg Roach } 34*5712865dSGreg Roach document.getElementById("privacy-warning-button").addEventListener("click", function () { 35b3a775f6SGreg Roach localStorage.setItem("cookie-warning", "ok"); 368e24c0d4SGreg Roach }); 37b3a775f6SGreg Roach </script> 38b3a775f6SGreg Roach <?php View::endpush() ?> 398e24c0d4SGreg Roach <?php endif ?> 408e24c0d4SGreg Roach</div> 41b3a775f6SGreg Roach 42b3a775f6SGreg Roach 43