Skip to content

Commit 8daf6c5

Browse files
committed
Merge branch 'v1-dev'
2 parents 1d88a30 + 50ebd1e commit 8daf6c5

File tree

5 files changed

+145
-8
lines changed

5 files changed

+145
-8
lines changed

bower.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@
2020
"Sortable": "~1.4.2",
2121
"tether": "~1.3.7",
2222
"tinycolor": "~1.2.1",
23-
"dropzone": "~4.2.0"
23+
"dropzone": "~4.2.0",
24+
"jquery-touchswipe": "^1.6.18",
25+
"jquery.browser": "^0.1.0"
2426
},
2527
"overrides": {
2628
"bootstrap": {

src/app/_common/sidebar/sidebar.hbs

Lines changed: 92 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<i class="fa arrow"></i>
2121
</a>
2222

23-
<ul>
23+
<ul class="nav">
2424
<li {{#is pagename "===" "items-list"}}class="active"{{/is}} >
2525
<a href="items-list.html">
2626
Items List
@@ -41,7 +41,7 @@
4141
<i class="fa arrow"></i>
4242
</a>
4343

44-
<ul>
44+
<ul class="nav">
4545
<li {{#is pagename "===" "charts-flot"}}class="active"{{/is}} >
4646
<a href="charts-flot.html">
4747
Flot Charts
@@ -62,7 +62,7 @@
6262
<i class="fa arrow"></i>
6363
</a>
6464

65-
<ul>
65+
<ul class="nav">
6666
<li {{#is pagename "===" "static-tables"}}class="active"{{/is}} >
6767
<a href="static-tables.html">
6868
Static Tables
@@ -92,7 +92,7 @@
9292
<i class="fa arrow"></i>
9393
</a>
9494

95-
<ul>
95+
<ul class="nav">
9696
<li {{#is pagename "===" "buttons"}}class="active"{{/is}}>
9797
<a href="buttons.html">
9898
Buttons
@@ -134,7 +134,7 @@
134134
<i class="fa arrow"></i>
135135
</a>
136136

137-
<ul>
137+
<ul class="nav">
138138
<li {{#is pagename "===" "login"}}class="active"{{/is}}>
139139
<a href="login.html">
140140
Login
@@ -179,6 +179,91 @@
179179
</ul>
180180
</li>
181181

182+
<li>
183+
<a href="">
184+
<i class="fa fa-sitemap"></i> Menu Levels
185+
<i class="fa arrow"></i>
186+
</a>
187+
188+
<ul class="nav">
189+
190+
<li>
191+
<a href="#">
192+
Second Level Item
193+
<i class="fa arrow"></i>
194+
</a>
195+
196+
<ul class="nav">
197+
198+
<li>
199+
<a href="#">
200+
Third Level Item
201+
</a>
202+
</li>
203+
204+
<li>
205+
<a href="#">
206+
Third Level Item
207+
</a>
208+
</li>
209+
210+
</ul>
211+
</li>
212+
213+
<li>
214+
<a href="#">
215+
Second Level Item
216+
</a>
217+
</li>
218+
219+
<li>
220+
<a href="#">
221+
Second Level Item
222+
<i class="fa arrow"></i>
223+
</a>
224+
225+
<ul class="nav">
226+
227+
<li>
228+
<a href="#">
229+
Third Level Item
230+
</a>
231+
</li>
232+
233+
<li>
234+
<a href="#">
235+
Third Level Item
236+
</a>
237+
</li>
238+
239+
<li>
240+
<a href="#">
241+
Third Level Item
242+
<i class="fa arrow"></i>
243+
</a>
244+
245+
<ul class="nav">
246+
247+
<li>
248+
<a href="#">
249+
Fourth Level Item
250+
</a>
251+
</li>
252+
253+
<li>
254+
<a href="#">
255+
Fourth Level Item
256+
</a>
257+
</li>
258+
</ul>
259+
260+
</li>
261+
</ul>
262+
</li>
263+
264+
</ul>
265+
</li>
266+
182267
<li {{#is pagename "===" "docs"}}class="active"{{/is}} >
183268
<a href="https://github.com/modularcode/modular-admin-html">
184269
<i class="fa fa-github-alt"></i> Theme Docs
@@ -194,4 +279,5 @@
194279
{{> app/_common/sidebar/customize/customize}}
195280

196281
</aside>
197-
<div class="sidebar-overlay" id="sidebar-overlay"></div>
282+
<div class="sidebar-overlay" id="sidebar-overlay"></div>
283+
<div class="sidebar-mobile-menu-handle" id="sidebar-mobile-menu-handle"></div>

src/app/_common/sidebar/sidebar.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,25 @@ $(function () {
1414
$("#sidebar-overlay").on('click', function() {
1515
$("#app").removeClass("sidebar-open");
1616
});
17+
18+
if ($.browser.mobile) {
19+
var $appContainer = $('#app ');
20+
var $mobileHandle = $('#sidebar-mobile-menu-handle ');
21+
22+
$mobileHandle.swipe({
23+
swipeLeft: function() {
24+
if($appContainer.hasClass("sidebar-open")) {
25+
$appContainer.removeClass("sidebar-open");
26+
}
27+
},
28+
swipeRight: function() {
29+
if(!$appContainer.hasClass("sidebar-open")) {
30+
$appContainer.addClass("sidebar-open");
31+
}
32+
},
33+
// excludedElements: "button, input, select, textarea, .noSwipe, table",
34+
triggerOnTouchEnd: false
35+
});
36+
}
1737

1838
});

src/app/_common/sidebar/sidebar.scss

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@
136136
}
137137

138138
// Second level items
139-
& > li > ul > li {
139+
& > li > .nav> li {
140140

141141
// Second level and deeper items links
142142
// Have bit darker background and more padding
@@ -153,6 +153,19 @@
153153
&.active a {
154154
color: $sidebar-color-text-active;
155155
}
156+
157+
// Third level items
158+
& > .nav > li {
159+
a {
160+
padding-left: 60px;
161+
}
162+
163+
& > .nav > li {
164+
a {
165+
padding-left: 70px;
166+
}
167+
}
168+
}
156169
}
157170
}
158171

@@ -185,4 +198,18 @@
185198
opacity: 1;
186199
}
187200
}
201+
}
202+
203+
.sidebar-mobile-menu-handle {
204+
display: none;
205+
position: absolute;
206+
top: $header-height-xs;
207+
background-color: transparent;
208+
width: 30px;
209+
bottom: 0;
210+
z-index: 10;
211+
212+
@include media-down(md) {
213+
display: block;
214+
}
188215
}

src/app/app-layout.hbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ themeTitle: ModularAdmin
1010
{{!-- Default sidebar block --}}
1111
{{> app/_common/sidebar/sidebar}}
1212

13+
<div class="mobile-menu-handle"></div>
14+
1315
{{!-- Content section --}}
1416
<article class="content {{pagename}}-page">
1517
{{{body}}}

0 commit comments

Comments
 (0)