Skouter mortgage estimates. Web application with view written in PHP and Vue, but controller and models in Go.
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

48 lines
1.3 KiB

  1. {% macro nav_loop(page) %}
  2. {% import _self as macros %}
  3. {% for p in page.children.visible
  4. if (not p.header.skouter.onlyguests) and (not p.header.skouter.onlymembers)%}
  5. {% set active_page = (p.active or p.activeChild) ? 'active' : '' %}
  6. <li>
  7. <a href="{{ p.url }}" class="{{ active_page }}">
  8. {{ p.menu }}
  9. </a>
  10. {% if p.children.visible.count > 0 %}
  11. <ul>
  12. {{ macros.nav_loop(p) }}
  13. </ul>
  14. {% endif %}
  15. </li>
  16. {% endfor %}
  17. {% for p in page.children.visible
  18. if p.header.skouter.onlyguests and not grav.session.skouter %}
  19. {% set active_page = (p.active or p.activeChild) ? 'active' : '' %}
  20. <li>
  21. <a href="{{ p.url }}" class="{{ active_page }}">
  22. {{ p.menu }}
  23. </a>
  24. {% if p.children.visible.count > 0 %}
  25. <ul>
  26. {{ macros.nav_loop(p) }}
  27. </ul>
  28. {% endif %}
  29. </li>
  30. {% endfor %}
  31. {% for p in page.children.visible
  32. if p.header.skouter.onlymembers and grav.session.skouter %}
  33. {% set active_page = (p.active or p.activeChild) ? 'active' : '' %}
  34. <li>
  35. <a href="{{ p.url }}" class="{{ active_page }}">
  36. {{ p.menu }} {{p.header.skouter.onlyguests}}
  37. </a>
  38. {% if p.children.visible.count > 0 %}
  39. <ul>
  40. {{ macros.nav_loop(p) }}
  41. </ul>
  42. {% endif %}
  43. </li>
  44. {% endfor %}
  45. {% endmacro %}