選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 

41 行
2.4 KiB

  1. <nav role="navigation" aria-label="Main navigation">
  2. <ul class="navigation-list">
  3. {%- assign pages_list = site.html_pages | sort:"nav_order" -%}
  4. {%- for node in pages_list -%}
  5. {%- unless node.nav_exclude -%}
  6. {%- if node.parent == nil -%}
  7. <li class="navigation-list-item{% if page.url == node.url or page.parent == node.title or page.grand_parent == node.title %} active{% endif %}">
  8. {%- if page.parent == node.title or page.grand_parent == node.title -%}
  9. {%- assign first_level_url = node.url | absolute_url -%}
  10. {%- endif -%}
  11. <a href="{{ node.url | absolute_url }}" class="navigation-list-link{% if page.url == node.url %} active{% endif %}">{{ node.title }}</a>
  12. {%- if node.has_children -%}
  13. {%- assign children_list = site.html_pages | where: "parent", node.title | sort:"nav_order" -%}
  14. <ul class="navigation-list-child-list ">
  15. {%- for child in children_list -%}
  16. <li class="navigation-list-item {% if page.url == child.url or page.parent == child.title %} active{% endif %}">
  17. {%- if page.url == child.url or page.parent == child.title -%}
  18. {%- assign second_level_url = child.url | absolute_url -%}
  19. {%- endif -%}
  20. <a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
  21. {%- if child.has_children -%}
  22. {%- assign grand_children_list = site.html_pages | where: "parent", child.title | sort:"nav_order" -%}
  23. <ul class="navigation-list-child-list">
  24. {%- for grand_child in grand_children_list -%}
  25. <li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}">
  26. <a href="{{ grand_child.url | absolute_url }}" class="navigation-list-link{% if page.url == grand_child.url %} active{% endif %}">{{ grand_child.title }}</a>
  27. </li>
  28. {%- endfor -%}
  29. </ul>
  30. {%- endif -%}
  31. </li>
  32. {%- endfor -%}
  33. </ul>
  34. {%- endif -%}
  35. </li>
  36. {%- endif -%}
  37. {%- endunless -%}
  38. {%- endfor -%}
  39. </ul>
  40. </nav>