|
17 | 17 | <ul class="md-nav__list" data-md-scrollfix="">
|
18 | 18 | <li class="md-nav__item md-nav__item--active">
|
19 | 19 | <input class="md-toggle md-nav__toggle" data-md-toggle="toc" id="__toc" type="checkbox">
|
20 |
| - <label class="md-nav__link md-nav__link--active" for="__toc">Home</label> |
21 |
| - <a class="md-nav__link md-nav__link--active" href="{{ site.baseurl }}/" title="Home">Home</a> |
| 20 | + <label class="md-nav__link md-nav__link--active" for="__toc">Home</label> |
| 21 | + <a class="md-nav__link md-nav__link--active" href="{{ site.baseurl }}/" title="Home">Home</a> |
22 | 22 |
|
23 | 23 | <nav class="md-nav md-nav--secondary">
|
24 | 24 | <label class="md-nav__title" for="__toc">Table of contents</label>
|
25 | 25 | <ul class="md-nav__list" data-md-scrollfix="">
|
26 |
| - |
27 | 26 | {% for section in site.data.toc %}
|
28 |
| - <li class="md-nav__item {% if forloop.first%}{% else %}md-nav__item--nested{% endif %}"> |
29 |
| - <a class="md-nav__link" href="#{{ section.title | slugify }}" |
| 27 | + <li class="md-nav__item"> |
| 28 | + <a class="md-nav__link" href="{{ site.baseurl }}/{{ section.url }}" |
30 | 29 | id="pancakes-{{ section.title | slugify }}"
|
31 | 30 | title="{{ section.title }}">{{ section.title }}</a>
|
32 |
| - {% if section.children %}<nav class="md-nav"> |
33 |
| - <ul class="md-nav__list"> |
34 |
| - {% for child in section.children %}<li class="md-nav__item"> |
35 |
| - <a href="#{{ child.title | slugify }}" |
36 |
| - title="{{ child.title }}" |
37 |
| - class="md-nav__link child-{{ section.title | slugify }}">{{ child.title }}</a> |
38 |
| - </li>{% endfor %} |
39 |
| - </ul> |
40 |
| - </nav>{% endif %} |
41 | 31 | </li>
|
42 | 32 | {% endfor %}
|
43 | 33 | </ul>
|
44 | 34 | </nav>
|
45 | 35 | </li>
|
46 | 36 |
|
| 37 | + <!-- This navigation is completely for mobile --> |
| 38 | + {% for section in site.data.toc %}<li class="md-nav__item mobile-nav" style="display:none"> |
| 39 | + <a class="md-nav__link" href="{{ site.baseurl }}/{{ section.url }}" title="{{ section.title }}">{{ section.title }}</a> |
| 40 | + </li>{% endfor %} |
| 41 | + |
| 42 | + <!-- This navigation is completely for non mobile --> |
47 | 43 | {% for section in site.data.toc %}
|
48 |
| - <li class="md-nav__item md-nav__item--nested"> |
| 44 | + <li class="md-nav__item md-nav__item--nested not-mobile-nav"> |
49 | 45 | <a class="md-nav__link pancakes-parent" {% if section.children %}href="#pancakes-{{ section.title | slugify }}"{% else %}href="{{ site.baseurl }}/{{ section.url }}"{% endif %}
|
50 | 46 | id="pancakes-{{ section.title | slugify }}"
|
51 | 47 | title="{{ section.title }}">{{ section.title }}</a>
|
52 | 48 | {% if section.children %}<nav class="md-nav">
|
53 | 49 | <ul class="md-nav__list">
|
54 | 50 | {% for child in section.children %}<li class="md-nav__item">
|
55 | 51 | <a href="{{ site.baseurl }}/{{ child.url }}"
|
56 |
| - title="{{ child.title }}" style="display:none" |
| 52 | + title="{{ child.title }}" |
57 | 53 | class="md-nav__link pancakes-child">{{ child.title }}</a>
|
58 | 54 | </li>{% endfor %}
|
59 | 55 | </ul>
|
60 | 56 | </nav>{% endif %}
|
61 |
| - </li> |
62 |
| - {% endfor %} |
| 57 | + </li>{% endfor %} |
| 58 | + |
63 | 59 | </ul>
|
64 | 60 | </nav>
|
65 | 61 | </div>
|
|
0 commit comments