説明なし

nav.html 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <div class="navbar navbar-default navbar-fixed-top" role="navigation">
  2. <div class="container">
  3. <!-- Collapsed navigation -->
  4. <div class="navbar-header">
  5. {% if include_nav or include_next_prev or repo_url %}
  6. <!-- Expander button -->
  7. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
  8. <span class="sr-only">Toggle navigation</span>
  9. <span class="icon-bar"></span>
  10. <span class="icon-bar"></span>
  11. <span class="icon-bar"></span>
  12. </button>
  13. {% endif %}
  14. <!-- Main title -->
  15. <a class="navbar-brand" href="{{ homepage_url }}">{{ site_name }}</a>
  16. </div>
  17. <!-- Expanded navigation -->
  18. <div class="navbar-collapse collapse">
  19. {% if include_nav %}
  20. <!-- Main navigation -->
  21. <ul class="nav navbar-nav">
  22. {% for nav_item in nav %}
  23. {% if nav_item.children %}
  24. <li class="dropdown{% if nav_item.active %} active{% endif %}">
  25. <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ nav_item.title }} <b class="caret"></b></a>
  26. <ul class="dropdown-menu">
  27. {% for nav_item in nav_item.children %}
  28. {% include "nav-sub.html" %}
  29. {% endfor %}
  30. </ul>
  31. </li>
  32. {% else %}
  33. <li {% if nav_item.active %}class="active"{% endif %}>
  34. <a href="{{ nav_item.url }}">{{ nav_item.title }}</a>
  35. </li>
  36. {% endif %}
  37. {% endfor %}
  38. </ul>
  39. {% endif %}
  40. <ul class="nav navbar-nav navbar-right">
  41. {% if repo_url %}
  42. <li>
  43. <a href="{{ repo_url }}">
  44. {% if repo_name == 'GitHub' %}
  45. <i class="fa fa-github"></i>
  46. {% elif repo_name == 'Bitbucket' %}
  47. <i class="fa fa-bitbucket"></i>
  48. {% endif %}
  49. {{ repo_name }}
  50. </a>
  51. </li>
  52. {% endif %}
  53. </ul>
  54. </div>
  55. </div>
  56. </div>