nav.html 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <nav class="navbar navbar-default navbar-fixed-top navbar-custom">
  2. <div class="container-fluid">
  3. <div class="navbar-header">
  4. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#main-navbar">
  5. <span class="sr-only">Toggle navigation</span>
  6. <span class="icon-bar"></span>
  7. <span class="icon-bar"></span>
  8. <span class="icon-bar"></span>
  9. </button>
  10. {%- if site.title-img -%}
  11. <a class="navbar-brand navbar-brand-logo" href="{{ '' | absolute_url }}"><img src="{{ site.title-img }}"/></a>
  12. {%- else -%}
  13. <a class="navbar-brand" href="{{ '' | absolute_url }}">{{ site.title }}</a>
  14. {%- endif -%}
  15. </div>
  16. <div class="collapse navbar-collapse" id="main-navbar">
  17. <ul class="nav navbar-nav navbar-right">
  18. {%- for link in site.navbar-links -%}
  19. {%- if link[1].first %}
  20. <li class="navlinks-container">
  21. <a class="navlinks-parent" href="javascript:void(0)">{{ link[0] }}</a>
  22. <div class="navlinks-children">
  23. {%- for childlink in link[1] -%}
  24. {%- for linkparts in childlink %}
  25. <a href="{{ linkparts[1] | relative_url }}">{{ linkparts[0] }}</a>
  26. {%- endfor -%}
  27. {%- endfor %}
  28. </div>
  29. </li>
  30. {% else %}
  31. <li><a href="{{ link[1] | relative_url }}">{{ link[0] }}</a></li>
  32. {%- endif -%}
  33. {%- endfor -%}
  34. </ul>
  35. </div>
  36. {% if page.image and (layout.show-avatar or page.show-avatar) %}
  37. <div class="avatar-container">
  38. <div class="avatar-img-border">
  39. <a href="{{ '' | absolute_url }}">
  40. <img class="avatar-img" src="{{ page.image | relative_url }}" />
  41. </a>
  42. </div>
  43. </div>
  44. {% elsif site.avatar and (layout.show-avatar or page.show-avatar) %}
  45. <div class="avatar-container">
  46. <div class="avatar-img-border">
  47. <a href="{{ '' | absolute_url }}">
  48. <img class="avatar-img" src="{{ site.avatar | relative_url }}" />
  49. </a>
  50. </div>
  51. </div>
  52. {% endif %}
  53. </div>
  54. </nav>