navbar.html 1.54 KB
Newer Older
David Haynes's avatar
David Haynes committed
1
<!-- Navbar -->
2
<nav class="navbar navbar-expand-lg navbar-dark bg-primary">
Daniel W Bond's avatar
Daniel W Bond committed
3
  <div class="container">
Daniel W Bond's avatar
Daniel W Bond committed
4

David Haynes's avatar
David Haynes committed
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
    <!-- Brand -->
    <a class="navbar-brand my-2 my-lg-0 xolonium" href="/">
      <img src="/assets/img/SRCT_square.svg" width="30" height="30" class="d-inline-block align-top" alt="Mason SRCT">
      &nbsp;Mason SRCT&nbsp;
    </a>

    <!-- Collapse button -->
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapse"
      aria-controls="collapse" aria-expanded="false" aria-label="Toggle navigation">
      <span class="navbar-toggler-icon"></span>
    </button>

    <!-- Collapse -->
    <div class="collapse navbar-collapse" id="collapse">
      <ul class="navbar-nav ml-auto">
20
21
        {% for link in site.data.navigation.main %}
          {% if link.children == null %}
David Haynes's avatar
David Haynes committed
22
23
24
            <li class="nav-item">
              <a class="nav-link" href="{{ link.url }}">{{ link.title }}</a>
            </li>
25
          {% else %}
David Haynes's avatar
David Haynes committed
26
27
28
29
30
31
            <li class="nav-item dropdown">
              <a class="nav-link dropdown-toggle" id="dropdown-link"
                  data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                  {{ link.title }} 
              </a>
              <div class="dropdown-menu">
32
                {% for childLink in link.children %}
David Haynes's avatar
David Haynes committed
33
                  <a class="dropdown-item" href="{{ childLink.url }}">{{ childLink.title }}</a>          
34
                {% endfor %}
David Haynes's avatar
David Haynes committed
35
              </div>
36
37
38
            </li>
          {% endif %}
        {% endfor %}
Daniel W Bond's avatar
Daniel W Bond committed
39
      </ul>
40
    </div>
Daniel W Bond's avatar
Daniel W Bond committed
41
  </div>
David Haynes's avatar
David Haynes committed
42
</nav>