Refactor: Extract header and footer into reusable snippets
All checks were successful
Deploy / Deploy to Production (push) Successful in 7s

- Created site/snippets/header.php with parameterized title and template
- Created site/snippets/footer.php with optional additional scripts
- Updated home.php and product.php to use the new snippets
- Reduces code duplication and improves maintainability

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
isUnknown 2025-12-10 15:54:25 +01:00
parent 24997f746d
commit 9c91a87720
4 changed files with 73 additions and 130 deletions

19
site/snippets/footer.php Normal file
View file

@ -0,0 +1,19 @@
<footer id="site-footer">
<div class="site-footer__container">
<div class="footer__mentions">
<p class="p__small">
© <?= date('Y') ?> Index Investigation |
<a target="_blank" href="https://www.index.ngo/mentions-legales/">Mentions légales</a>
</p>
</div>
</div>
</footer>
<script src="<?= url('assets/js/onload.js') ?>"></script>
<?php if(isset($scripts) && is_array($scripts)): ?>
<?php foreach($scripts as $script): ?>
<script src="<?= url($script) ?>"></script>
<?php endforeach ?>
<?php endif ?>
</body>
</html>