Answer the question
In order to leave comments, you need to log in
How to make a condition for active menus in gulp-file-include?
Tell me how to pass data to navbar depending on the page?
<!DOCTYPE html>
<html lang="ru" data-color-mode="dark">
<head>
...
</head>
<body class="layout">
@@include('header.html')
@@include('navbar.html')
@@include('main.html')
@@include('footer.html')
</body>
</html>
<div class="navbar">
<div class="navbar__list">
<a href="#" class="navbar__item active">Главная</a>
<a href="#" class="navbar__item">О нас</a>
<a href="#" class="navbar__item">Услуги</a>
<a href="#" class="navbar__item">Контакты</a>
</div>
</div>
Answer the question
In order to leave comments, you need to log in
<nav>
<ul>
<li class="@@activeclassHome">Home</li>
<li class="@@activeclassAbout">About</li>
</ul>
</nav>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question