Skip to content

Commit 612d4f0

Browse files
authored
Switched/Flipped Links for mobile order
1 parent c37eeb8 commit 612d4f0

File tree

1 file changed

+34
-31
lines changed

1 file changed

+34
-31
lines changed

_includes/_navigation.html

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,26 @@
55
*
66
{% endcomment %}
77
<div id="navigation" class="sticky">
8-
<nav class="top-bar" role="navigation" data-topbar>
8+
<nav class="top-bar" role="navigation" data-topbar data-options="scrolltop: false">
99
<ul class="title-area">
1010
<li class="name">
1111
<h1 class="show-for-small-only"><a href="{{ site.url }}{{ site.baseurl }}" class="icon-tree"> {{ site.title }}</a></h1>
1212
</li>
1313
<!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
14-
<li class="toggle-topbar menu-icon"><a href="#"><span>Nav</span></a></li>
14+
<li class="toggle-topbar toggle-topbar-click menu-icon"><a><span>Nav</span></a></li>
1515
</ul>
1616
<section class="top-bar-section">
1717
{% comment %}
1818

19-
____ _ __ __ _ __ _ __ _
20-
/ __ \(_)___ _/ /_ / /_ / | / /___ __ __(_)___ _____ _/ /_(_)___ ____
21-
/ /_/ / / __ `/ __ \/ __/ / |/ / __ `/ | / / / __ `/ __ `/ __/ / __ \/ __ \
22-
/ _, _/ / /_/ / / / / /_ / /| / /_/ /| |/ / / /_/ / /_/ / /_/ / /_/ / / / /
23-
/_/ |_/_/\__, /_/ /_/\__/ /_/ |_/\__,_/ |___/_/\__, /\__,_/\__/_/\____/_/ /_/
24-
/____/ /____/
19+
__ ______ _ __ _ __ _
20+
/ / ___ / __/ /_ / | / /___ __ __(_)___ _____ _/ /_(_)___ ____
21+
/ / / _ \/ /_/ __/ / |/ / __ `/ | / / / __ `/ __ `/ __/ / __ \/ __ \
22+
/ /___/ __/ __/ /_ / /| / /_/ /| |/ / / /_/ / /_/ / /_/ / /_/ / / / /
23+
/_____/\___/_/ \__/ /_/ |_/\__,_/ |___/_/\__, /\__,_/\__/_/\____/_/ /_/
24+
/____/
2525

2626
{% endcomment %}
27-
<ul class="right">
27+
<ul class="left">
2828
{% for link in site.data.navigation %}
2929

3030
{% if link.url contains 'http' %}
@@ -38,19 +38,17 @@ <h1 class="show-for-small-only"><a href="{{ site.url }}{{ site.baseurl }}" class
3838
{% assign _baseurl = site.baseurl %}
3939
{% endif %}
4040

41+
{% comment %} If there are links for left side begin {% endcomment %}
42+
{% if link.side == 'left' %}
4143

42-
43-
{% comment %} If there are links for right side begin {% endcomment %}
44-
{% if link.side == 'right' %}
45-
{% comment %} If right side WITHOUT dropdown menu do {% endcomment %}
44+
{% comment %} If left side WITHOUT dropdown menu do {% endcomment %}
4645
{% if link.dropdown == nil %}
47-
<li class="divider"></li>
4846
<li{% if link.url == page.url %} class="active"{% elsif page.homepage == true and link.url == '/' %} class="active"{% endif %}><a {% if link.class %}class="{{link.class}}"{% endif %} href="{{ domain }}{{ site.baseurl }}{{ link.url }}"{% if link.url contains 'http' %} target="_blank"{% endif %}>{{ link.title | escape }}</a></li>
47+
<li class="divider"></li>
4948

50-
{% comment %} If right side WITH dropdown menu do {% endcomment %}
49+
{% comment %} If left side WITH dropdown menu do {% endcomment %}
5150
{% else %}
5251

53-
<li class="divider"></li>
5452
<li class="has-dropdown{% if link.url == page.url %} active{% endif %}">
5553
<a {% if link.class %}class="{{link.class}}"{% endif %} href="{{ domain }}{{ site.baseurl }}{{ link.url }}"{% if link.url contains 'http' %} target="_blank"{% endif %}>{{ link.title | escape }}</a>
5654

@@ -68,22 +66,25 @@ <h1 class="show-for-small-only"><a href="{{ site.url }}{{ site.baseurl }}" class
6866
</ul>
6967

7068
</li>
69+
<li class="divider"></li>
7170
{% endif %}
7271
{% endif %}
7372
{% endfor %}
74-
{% comment %} First loop finished 1 {% endcomment %}
73+
{% comment %} Second loop finished {% endcomment %}
7574
</ul>
75+
76+
7677
{% comment %}
7778

78-
__ ______ _ __ _ __ _
79-
/ / ___ / __/ /_ / | / /___ __ __(_)___ _____ _/ /_(_)___ ____
80-
/ / / _ \/ /_/ __/ / |/ / __ `/ | / / / __ `/ __ `/ __/ / __ \/ __ \
81-
/ /___/ __/ __/ /_ / /| / /_/ /| |/ / / /_/ / /_/ / /_/ / /_/ / / / /
82-
/_____/\___/_/ \__/ /_/ |_/\__,_/ |___/_/\__, /\__,_/\__/_/\____/_/ /_/
83-
/____/
79+
____ _ __ __ _ __ _ __ _
80+
/ __ \(_)___ _/ /_ / /_ / | / /___ __ __(_)___ _____ _/ /_(_)___ ____
81+
/ /_/ / / __ `/ __ \/ __/ / |/ / __ `/ | / / / __ `/ __ `/ __/ / __ \/ __ \
82+
/ _, _/ / /_/ / / / / /_ / /| / /_/ /| |/ / / /_/ / /_/ / /_/ / /_/ / / / /
83+
/_/ |_/_/\__, /_/ /_/\__/ /_/ |_/\__,_/ |___/_/\__, /\__,_/\__/_/\____/_/ /_/
84+
/____/ /____/
8485

8586
{% endcomment %}
86-
<ul class="left">
87+
<ul class="right">
8788
{% for link in site.data.navigation %}
8889

8990
{% if link.url contains 'http' %}
@@ -97,17 +98,19 @@ <h1 class="show-for-small-only"><a href="{{ site.url }}{{ site.baseurl }}" class
9798
{% assign _baseurl = site.baseurl %}
9899
{% endif %}
99100

100-
{% comment %} If there are links for left side begin {% endcomment %}
101-
{% if link.side == 'left' %}
102101

103-
{% comment %} If left side WITHOUT dropdown menu do {% endcomment %}
102+
103+
{% comment %} If there are links for right side begin {% endcomment %}
104+
{% if link.side == 'right' %}
105+
{% comment %} If right side WITHOUT dropdown menu do {% endcomment %}
104106
{% if link.dropdown == nil %}
105-
<li{% if link.url == page.url %} class="active"{% elsif page.homepage == true and link.url == '/' %} class="active"{% endif %}><a {% if link.class %}class="{{link.class}}"{% endif %} href="{{ domain }}{{ site.baseurl }}{{ link.url }}"{% if link.url contains 'http' %} target="_blank"{% endif %}>{{ link.title | escape }}</a></li>
106107
<li class="divider"></li>
108+
<li{% if link.url == page.url %} class="active"{% elsif page.homepage == true and link.url == '/' %} class="active"{% endif %}><a {% if link.class %}class="{{link.class}}"{% endif %} href="{{ domain }}{{ site.baseurl }}{{ link.url }}"{% if link.url contains 'http' %} target="_blank"{% endif %}>{{ link.title | escape }}</a></li>
107109

108-
{% comment %} If left side WITH dropdown menu do {% endcomment %}
110+
{% comment %} If right side WITH dropdown menu do {% endcomment %}
109111
{% else %}
110112

113+
<li class="divider"></li>
111114
<li class="has-dropdown{% if link.url == page.url %} active{% endif %}">
112115
<a {% if link.class %}class="{{link.class}}"{% endif %} href="{{ domain }}{{ site.baseurl }}{{ link.url }}"{% if link.url contains 'http' %} target="_blank"{% endif %}>{{ link.title | escape }}</a>
113116

@@ -125,12 +128,12 @@ <h1 class="show-for-small-only"><a href="{{ site.url }}{{ site.baseurl }}" class
125128
</ul>
126129

127130
</li>
128-
<li class="divider"></li>
129131
{% endif %}
130132
{% endif %}
131133
{% endfor %}
132-
{% comment %} Second loop finished {% endcomment %}
134+
{% comment %} First loop finished 1 {% endcomment %}
133135
</ul>
136+
134137
</section>
135138
</nav>
136139
</div><!-- /#navigation -->

0 commit comments

Comments
 (0)