Guest User

Untitled

a guest
Feb 16th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. data/data.html
  2.  
  3. {% set menuItems = [
  4. {
  5. title: 'agency',
  6. link: 'agency.html'
  7. },
  8. {
  9. title: 'projects',
  10. link: 'projects.html'
  11. },
  12. {
  13. title: 'jobs',
  14. link: 'jobs.html'
  15. },
  16. {
  17. title: 'contact',
  18. link: 'contact.html'
  19. }
  20.  
  21. ] %}
  22.  
  23. partials/_header.html(меню)
  24. {% import "data/data.html" as data %} (в ту страницу куда инеклюдится header)
  25. <div class="header__center js-header-center">
  26. <ul class="nav-menu header__nav-menu">
  27.  
  28. {% for item in data.menuItems %}
  29. <li class="{% if (pageLink == item.title) %}current-menu-item{% endif %}"><a href="{{ item.link }}">{{ item.title }}</a></li>
  30. {% endfor %}
  31. </ul>
  32. <a href="#" class="header__lang js-header-lang" data-name="{{ data.lang.name }}.">{{data.lang.locale}}.</a>
  33. <div class="header__socials">
  34. <ul class="header__socials-list">
  35. {% for item in data.socials %}
  36. <li class="header__socials-item">
  37. <a href="#" class="header__socials-link">{{ item }}</a>
  38. </li>
  39. {% endfor %}
  40. </ul>
  41. </div>
  42.  
  43. </div>
Add Comment
Please, Sign In to add comment