✨ Story 2.2: bouton cta navbar
This commit is contained in:
@@ -12,7 +12,7 @@ $navLinks = [
|
||||
['id' => 'projects', 'label' => 'Projets', 'url' => '/projets'],
|
||||
['id' => 'skills', 'label' => 'Compétences', 'url' => '/competences'],
|
||||
['id' => 'about', 'label' => 'Me Découvrir', 'url' => '/a-propos'],
|
||||
['id' => 'contact', 'label' => 'Contact', 'url' => '/contact', 'isCta' => true],
|
||||
['id' => 'contact', 'label' => 'Me contacter', 'url' => '/contact', 'isCta' => true],
|
||||
];
|
||||
?>
|
||||
|
||||
@@ -61,12 +61,20 @@ $navLinks = [
|
||||
<div id="mobile-menu" class="lg:hidden hidden" aria-hidden="true">
|
||||
<ul class="py-4 space-y-2 border-t border-border">
|
||||
<?php foreach ($navLinks as $link): ?>
|
||||
<li>
|
||||
<a href="<?= $link['url'] ?>"
|
||||
class="block py-3 px-4 rounded-lg <?= $currentPage === $link['id'] ? 'bg-surface text-primary' : 'text-text-secondary hover:bg-surface hover:text-text-primary' ?> transition-colors">
|
||||
<?= $link['label'] ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php if (!empty($link['isCta'])): ?>
|
||||
<li class="pt-2 border-t border-border mt-2">
|
||||
<a href="<?= $link['url'] ?>" class="btn-primary w-full justify-center">
|
||||
<?= $link['label'] ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php else: ?>
|
||||
<li>
|
||||
<a href="<?= $link['url'] ?>"
|
||||
class="block py-3 px-4 rounded-lg <?= $currentPage === $link['id'] ? 'bg-surface text-primary' : 'text-text-secondary hover:bg-surface hover:text-text-primary' ?> transition-colors">
|
||||
<?= $link['label'] ?>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user