forked from olton/Metro-UI-CSS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebar.php
215 lines (205 loc) · 7.98 KB
/
sidebar.php
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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<?php include("header.php")?>
<div class="page secondary with-sidebar">
<div class="page-header">
<div class="page-header-content">
<h1>Sidebar<small>demo</small></h1>
<a href="/" class="back-button big page-back"></a>
</div>
</div>
<div class="page-sidebar">
<ul>
<li>
<a>Projects</a>
<ul class="sub-menu">
<li><a href="">Currently</a></li>
<li><a href="">Closed</a></li>
</ul>
</li>
<li>
<a>Notes</a>
<ul class="sub-menu">
<li><a href="">Important</a></li>
<li><a href="">Today</a></li>
<li><a href="">Weekly</a></li>
<li><a href="">Monthly</a></li>
</ul>
</li>
<li class="sticker sticker-color-orange"><a href="#"><i class="icon-cart"></i> Shopping</a></li>
<li class="sticker sticker-color-orangeDark"><a href="#"><i class="icon-clipboard"></i> Recipes</a></li>
<li class="sticker sticker-color-green"><a href="#"><i class="icon-history"></i> Hobbies</a></li>
<li class="sticker sticker-color-pink dropdown active" data-role="dropdown">
<a><i class="icon-list"></i> To Do dropdown</a>
<ul class="sub-menu light sidebar-dropdown-menu open">
<li><a href="">Today</a></li>
<li><a href="">To Do List</a></li>
<li><a href="">To Do after work</a></li>
<li><a href="">Movies to watch</a></li>
</ul>
</li>
<li class="sticker sticker-color-red dropdown active" data-role="dropdown">
<a><i class="icon-list"></i> To Do dropdown</a>
<ul class="sub-menu light sidebar-dropdown-menu">
<li><a href="">Today</a></li>
<li><a href="">To Do List</a></li>
<li><a href="">To Do after work</a></li>
<li><a href="">Movies to watch</a></li>
</ul>
</li>
<li class="sticker sticker-color-orange dropdown active" data-role="dropdown">
<a><i class="icon-list"></i> List opened</a>
<ul class="sub-menu light sidebar-dropdown-menu keep-opened open">
<li><a href="">Item 1</a></li>
<li><a href="">Item 2</a></li>
<li><a href="">Item 3</a></li>
<li><a href="">Item 4</a></li>
</ul>
</li>
<li class="sticker sticker-color-green dropdown active" data-role="dropdown">
<a><i class="icon-list"></i> List opened</a>
<ul class="sub-menu light sidebar-dropdown-menu keep-opened">
<li><a href="">Item 1</a></li>
<li><a href="">Item 2</a></li>
<li><a href="">Item 3</a></li>
<li><a href="">Item 4</a></li>
</ul>
</li>
</ul>
</div>
<div class="page-region">
<div class="page-region-content">
<div class="span9">
<h2>Before</h2>
<p>
You must create page layout for using <code>sidebar</code>
</p>
<pre class="prettyprint linenums">
<div class="page [secondary] with-sidebar">
<div class="page-header" />
<div class="page-sidebar" />
<div class="page-region" />
</div>
</pre>
<h2>Sidebar</h2>
<p>
For define sidebar you must use <code><ul /></code>
</p>
<pre class="prettyprint linenums">
<div class="page-sidebar">
<ul>
<li><a>Item</a></li>
...
<li><a>Item</a></li>
</ul>
</div>
</pre>
<h2>Icons</h2>
<p>
You can use <code>icon-*</code> class to add icon on the menu item
</p>
<pre class="prettyprint linenums">
<div class="page-sidebar">
<ul>
<li><a><i class="icon-cube"></i>Item</a></li>
...
</ul>
</div>
</pre>
<h2>Colored stickers</h2>
<p>
You can create colored stickers for sidebar menu items. To create sticker, add class <code>sticker</code> for menu item.
</p>
<pre class="prettyprint linenums">
<div class="page-sidebar">
<ul>
<li class="sticker"><a>Item</a></li>
...
</ul>
</div>
</pre>
<p>
To color sticker you can use colors classes with prefix <code>sticker-</code>. For Example: <code>sticker-color-blue</code>
</p>
<pre class="prettyprint linenums">
<div class="page-sidebar">
<ul>
<li class="sticker sticker-color-blue"><a>Item</a></li>
...
</ul>
</div>
</pre>
<h2>Second level menu</h2>
<p>
You can create the second level menu in sidebar.
</p>
<pre class="prettyprint linenums">
<div class="page-sidebar">
<ul>
<li>
<a>Item</a>
<ul class="sub-menu">
...
</ul>
</li>
...
</ul>
</div>
</pre>
<h2>Second level Dropdown menu</h2>
<p>
Also you can create second level <strong>dropdown</strong> menu.
</p>
<pre class="prettyprint linenums">
<div class="page-sidebar">
<ul>
<li data-role="dropdown">
<a>Item</a>
<ul class="sub-menu sidebar-dropdown-menu">
...
</ul>
</li>
...
</ul>
</div>
</pre>
<p>
To use dropdown menu you must add <code>dropdown.js</code> in head of you page.
</p>
<h2>Second level menu Dropdown opened menu</h2>
<p>
You can add <code>keep-opened</code> class to sub-menu to prevent default collapsing of menu.
</p>
<pre class="prettyprint linenums">
<div class="page-sidebar">
<ul>
<li>
<a>Item</a>
<ul class="sub-menu sidebar-dropdown-menu keep-opened">
...
</ul>
</li>
...
</ul>
</div>
</pre>
<h2>Lighting second level menu</h2>
<p>
You can lighting second level menu with subclass <code>light</code>.
</p>
<pre class="prettyprint linenums">
<div class="page-sidebar">
<ul>
<li>
<a>Item</a>
<ul class="sub-menu light">
...
</ul>
</li>
...
</ul>
</div>
</pre>
</div>
</div>
</div>
</div>
<?php include("footer.php")?>