menu.html 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {% assign menu = site.menu | sort:"weight" %}
  2. <div id="menu" class="menu">
  3. <ul>
  4. {% for node in menu %}
  5. <!-- begin menu -->
  6. <li>
  7. <!-- begin menu entry layer 1 -->
  8. <!-- title and link -->
  9. {% if node.url != null %}<a{% if page.url == node.url %} class="current"{% endif %} href="{{ node.url }}">{% endif %}
  10. {{ node.title }}
  11. {% if node.url != null %}</a>{% endif %}
  12. {% if node.sub != null %}
  13. <!-- sub menu -->
  14. <ul>
  15. {% assign sub = node.sub | sort:"weight" %}
  16. {% for subnode in sub %}
  17. <li>
  18. {% if subnode.url != null %}<a{% if page.url == subnode.url %} class="current"{% endif %} href="{{ subnode.url }}">{% endif %}
  19. {{ subnode.title }}
  20. {% if subnode.url != null %}</a>{% endif %}
  21. {% if subnode.sub != null %}
  22. <ul>
  23. {% assign subsub = subnode.sub | sort:"weight" %}
  24. {% for subsubnode in subsub %}
  25. <li>
  26. <a{% if page.url == subsubnode.url %} class="current"{% endif %} href="{{ subsubnode.url }}">
  27. {{ subsubnode.title }}
  28. </a>
  29. </li>
  30. {% endfor %}
  31. </ul>
  32. {% endif %}
  33. </li>
  34. {% endfor %}
  35. </ul>
  36. <!-- end sub menu -->
  37. {% endif %}
  38. <!-- end menu entry layer 1 -->
  39. </li>
  40. <!-- end menu -->
  41. {% endfor %}
  42. </ul>
  43. </div>