|
13 | 13 | <div class="collapse navbar-collapse" id="main-navbar"> |
14 | 14 | <ul class="nav navbar-nav navbar-right"> |
15 | 15 | {% for link in site.navbar-links %} |
16 | | - {% capture before %}{{ link[1] | split: "://" | first }}{% endcapture %} |
17 | | - {% capture after %}{{ link[1] | split: "://" | last }}{% endcapture %} |
18 | | - <li> |
19 | | - {% assign internal = true %} |
20 | | - {% if before != after %} |
21 | | - {% if before == "http" or before == "https" %} |
22 | | - {% assign internal = false %} |
23 | | - {% endif %} |
24 | | - {% endif %} |
25 | | - |
26 | | - {% if internal %} |
27 | | - {% capture linkurl %}{{ site.baseurl }}/{{ link[1] }}{% endcapture %} |
| 16 | + {% if link[1].first %} |
| 17 | + <li class="navlinks-container"> |
| 18 | + <a class="navlinks-parent" href="javascript:void(0)">{{ link[0] }}</a> |
| 19 | + <div class="navlinks-children"> |
| 20 | + {% for childlink in link[1] %} |
| 21 | + {% for linkparts in childlink %} |
| 22 | + {% capture before %}{{ linkparts[1] | split: "://" | first }}{% endcapture %} |
| 23 | + {% capture after %}{{ linkparts[1] | split: "://" | last }}{% endcapture %} |
| 24 | + {% assign internal = true %} |
| 25 | + {% if before != after %} |
| 26 | + {% if before == "http" or before == "https" %} |
| 27 | + {% assign internal = false %} |
| 28 | + {% endif %} |
| 29 | + {% endif %} |
| 30 | + |
| 31 | + {% if internal %} |
| 32 | + {% capture linkurl %}{{ site.baseurl }}/{{ linkparts[1] }}{% endcapture %} |
| 33 | + {% else %} |
| 34 | + {% capture linkurl %}{{ linkparts[1] }}{% endcapture %} |
| 35 | + {% endif %} |
| 36 | + |
| 37 | + <a href="{{ linkurl }}">{{ linkparts[0] }}</a> |
| 38 | + {% endfor %} |
| 39 | + {% endfor %} |
| 40 | + </div> |
| 41 | + </li> |
28 | 42 | {% else %} |
29 | | - {% capture linkurl %}{{ link[1] }}{% endcapture %} |
30 | | - {% endif %} |
| 43 | + <li> |
| 44 | + {% capture before %}{{ link[1] | split: "://" | first }}{% endcapture %} |
| 45 | + {% capture after %}{{ link[1] | split: "://" | last }}{% endcapture %} |
| 46 | + {% assign internal = true %} |
| 47 | + {% if before != after %} |
| 48 | + {% if before == "http" or before == "https" %} |
| 49 | + {% assign internal = false %} |
| 50 | + {% endif %} |
| 51 | + {% endif %} |
31 | 52 |
|
32 | | - <a href="{{ linkurl }}">{{ link[0] }}</a> |
33 | | - </li> |
34 | | - {% endfor %} |
| 53 | + {% if internal %} |
| 54 | + {% capture linkurl %}{{ site.baseurl }}/{{ link[1] }}{% endcapture %} |
| 55 | + {% else %} |
| 56 | + {% capture linkurl %}{{ link[1] }}{% endcapture %} |
| 57 | + {% endif %} |
| 58 | + |
| 59 | + <a href="{{ linkurl }}">{{ link[0] }}</a> |
| 60 | + </li> |
| 61 | + {% endif %} |
| 62 | + {% endfor %} |
35 | 63 | </ul> |
36 | 64 | </div> |
37 | 65 |
|
|
0 commit comments