Refactor: Extract header and footer into reusable snippets
All checks were successful
Deploy / Deploy to Production (push) Successful in 7s
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:
parent
24997f746d
commit
9c91a87720
4 changed files with 73 additions and 130 deletions
19
site/snippets/footer.php
Normal file
19
site/snippets/footer.php
Normal 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>
|
||||
Loading…
Add table
Add a link
Reference in a new issue