-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
190 lines (150 loc) · 4.75 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Folding sidebar</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<!-- Custom styles for this template -->
<link rel="stylesheet" type="text/css" href="css/style.css">
</head>
<body>
<div class="container-fluid">
<div class="row">
<nav id="sidebar" class="col-md-2 d-block bg-light sidebar">
<div class="sidebar-sticky">
<div class="sidebar-content">
<form class="form">
<input class="form-control form-control-dark w-100" type="text" placeholder="Search" aria-label="Search">
</form>
<ul class="nav flex-column">
<li class="nav-item">
<a class="nav-link active" href="#">
<span data-feather="home"></span>
Dashboard <span class="sr-only">(current)</span>
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file"></span>
Orders
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="shopping-cart"></span>
Products
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="users"></span>
Customers
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="bar-chart-2"></span>
Reports
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="layers"></span>
Integrations
</a>
</li>
</ul>
<h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
<span>Saved reports</span>
<a class="d-flex align-items-center text-muted" href="#">
<span data-feather="plus-circle"></span>
</a>
</h6>
<ul class="nav flex-column mb-2">
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Current month
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Last quarter
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Social engagement
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#">
<span data-feather="file-text"></span>
Year-end sale
</a>
</li>
</ul>
</div>
</div>
</nav>
<main id="main" class="col-md-10 ml-sm-auto px-4 main is-open"></main>
</div>
</div>
<!-- Icons -->
<script src="https://unpkg.com/feather-icons/dist/feather.min.js"></script>
<script>
feather.replace()
</script>
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script src="http://code.jquery.com/mobile/1.5.0-alpha.1/jquery.mobile-1.5.0-alpha.1.min.js"></script>
<script type="text/javascript">
$( function () {
function cloneSidebar() {
$( '.sidebar-half' ).remove();
let sidebarHalf1 = $( '.sidebar-sticky' ).clone();
let sidebarHalf2 = $( '.sidebar-sticky' ).clone();
sidebarHalf1
.wrap( 'div' )
.attr( 'class', 'sidebar-sticky sidebar-half sidebar-half-1' )
.appendTo( '#sidebar' );
sidebarHalf2
.wrap( 'div' )
.attr( 'class', 'sidebar-sticky sidebar-half sidebar-half-2' )
.appendTo( '#sidebar' );
}
$.mobile.loading().hide();
function closeSidebar() {
$( '#main' ).removeClass( 'is-open' );
$( '.sidebar input' ).css( 'pointer-events', 'none' );
cloneSidebar();
$( '.sidebar-sticky:first-child' ).hide();
setTimeout( function () {
$( '#sidebar' ).addClass( 'is-close' );
}, 200 );
setTimeout( function () {
$( '#main' ).addClass( 'is-close' );
}, 1000 );
}
function openSidebar() {
$( '#main' ).removeClass( 'is-close' );
$( '.sidebar input' ).css( 'pointer-events', 'none' );
$( '#sidebar' ).removeClass( 'is-close' );
setTimeout( function () {
$( '.sidebar-sticky:first-child' ).show();
$( '.sidebar-half' ).remove();
$( '.sidebar input' ).css( 'pointer-events', '' );
$( '#main' ).addClass( 'is-open' );
}, 1000 );
}
$( 'body' ).on( 'swipeleft', '.is-open', closeSidebar );
$( 'body' ).on( 'swiperight', '.is-close', openSidebar );
} );
</script>
</body>
</html>