-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.html
299 lines (299 loc) · 15.1 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
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
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Slider Panel</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="assets/img/favicon.png" title="Slider">
<link href='http://fonts.googleapis.com/css?family=Open Sans:400,600' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="dist/css/slider-panel.css" type="text/css" charset="utf-8">
<link rel="stylesheet" href="assets/css/bootstrap.min.css" type="text/css" charset="utf-8">
<link rel="stylesheet" href="assets/css/style.css" type="text/css" charset="utf-8">
<link rel="stylesheet" href="assets/css/prism.css" type="text/css" charset="utf-8">
<link rel="stylesheet" href="assets/css/fontello-embedded.css" type="text/css" charset="utf-8">
</head>
<body data-slide="push">
<div id="l-panel" class="slider-panel styled">
<h4><b>Slider Panel</b></h4><hr>
<ul>
<li><i class="fa fa-home"></i><a href="#"><span class="icon-home"></span> Home</a></li>
<li><i class="fa fa-folder-o"></i><a href="#"><span class="icon-archive"></span> Collections</a></li>
<li><i class="fa fa-bookmark"></i><a href="#"><span class="icon-bookmark"></span> Bookmarks</a></li>
<li><i class="fa fa-bar-chart"></i><a href="#"><span class="icon-chart-bar"></span> Stats</a></li>
<li><i class="fa fa-plus"></i><a href="#"><span class="icon-plus"></span> New Story</a></li>
</ul>
</div>
<div id="r-panel" class="slider-panel styled">
<h4><b>Slider Panel</b></h4><hr>
<ul>
<li><i class="fa fa-home"></i><a href="#"><span class="icon-home"></span> Home</a></li>
<li><i class="fa fa-folder-o"></i><a href="#"><span class="icon-archive"></span> Collections</a></li>
<li><i class="fa fa-bookmark"></i><a href="#"><span class="icon-bookmark"></span> Bookmarks</a></li>
<li><i class="fa fa-bar-chart"></i><a href="#"><span class="icon-chart-bar"></span> Stats</a></li>
<li><i class="fa fa-plus"></i><a href="#"><span class="icon-plus"></span> New Story</a></li>
</ul>
</div>
<div id="t-panel" class="slider-panel styled">
<h6 class="text-center">If you really like this project you can help Spread the Word. You can also star the project on Github :) <span class="icon-github-circled"></span></h6>
</div>
<div id="b-panel" class="slider-panel styled">
<h6 class="text-center">If you really like this project you can help Spread the Word. You can also star the project on Github :) <span class="icon-github-circled"></span></h6></h6>
</div>
<div class="wrapper">
<nav class="navbar navbar-default navbar-inverse" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="#" id="slide-btn" data-panel="l-panel" data-dir="left">
<span class="icon-menu-2"></span>
</a>
<a href="#" class="navbar-brand hidden-xs"><b>Slider Panel</b></a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="https://github.com/sudharti/slider-panel"><span class="icon-github-circled"></span> Github</a></li>
</ul>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-xs-10 col-xs-offset-1">
<div class="row">
<h3><b>Slider Panel</b></h3>
<p>A simple sliding panel plugin to display off-canvas contents.</p>
<a href="https://github.com/sudharti/slider-panel/archive/v1.1.zip" class="btn btn-success">Download</a>
</div>
<br>
<div class="row">
<div role="tabpanel">
<ul class="nav nav-tabs nav-justified" role="tablist">
<li role="presentation" class="active"><a href="#getting-started" aria-controls="getting-started" role="tab" data-toggle="tab">Getting Started</a></li>
<li role="presentation"><a href="#usage" aria-controls="usage" role="tab" data-toggle="tab">Usage</a></li>
<li role="presentation"><a href="#examples" aria-controls="examples" role="tab" data-toggle="tab">Examples</a></li>
<li role="presentation"><a href="#issues" aria-controls="issues" role="tab" data-toggle="tab">Issues</a></li>
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="getting-started">
<br>
<p>
A simple sliding panel to display off-canvas contents. The panel pushes the exiting body content to the specified direction and smoothly transitions into the view area. This plugin uses css transforms (translate3d) and cubic bezier transitions to achieve the sliding effect.
</p>
<img src="assets/img/coffeescript.png" alt="Coffeescript">
<span class="icon-plus"></span>
<img src="assets/img/sass.png" alt="Sass">
<h3><b>Quick Start</b></h3>
<ul>
<li><a href="https://github.com/sudharti/slider-panel/archive/v1.0.zip">Download</a> the plugin</li>
<li>or <code>git clone https://github.com/sudharti/slider-panel.git</code></li>
<li>Include <b>js</b> and <b>css</b> from dist/</li>
<li>Include <a href="http://jquery.com/" target="_blank">JQuery</a> depedency</li>
<li>Check out how to use it</li>
<li>Plug it in your code</li>
</ul>
<h3><b>Customizing</b></h3>
<ol>
<li>Install Git</li>
<li>Clone the Repository using <code>git clone https://github.com/sudharti/slider-panel.git</code></li>
<li>The plugin is written using coffeescript and scss</li>
<li>Checkout the folder structure below</li>
</ol>
<h4><b>Folder Structure</b></h4>
<pre>
slider-panel/
├── dist/
│ ├── css/
│ │ ├── slider-panel.css
│ │ └── slider-panel.min.css
│ │
│ └── js/
│ ├── slider-panel.js
│ └── slider-panel.min.js
│
├── assets/
│ ├── css/
│ └── js/
├── src/
│ ├── coffee/
│ │ └── slider-panel.coffee
│ └── scss/
│ ├── _dimension.scss
│ ├── _panel.scss
│ ├── _transform.scss
│ ├── _translate.scss
│ ├── _variables.scss
│ └── slider-panel.scss
├── code-templates/
├── index.html
├── Gruntfile.js
├── package.json
├── README.md
└── LICENSE
</pre>
<h4><b>Install Dependencies</b></h4>
<h5><b>npm</b></h5>
To install nodejs & npm checkout the following <a href="https://github.com/joyent/node/wiki/installing-node.js-via-package-manager">link</a>
<h5><b>Grunt</b></h5>
Grunt and it's plugins can be installed and managed using npm, the default Javascript package manager for nodejs. You can then install Grunt using the following command
<pre class="language-bash"><code>npm install -g grunt-cli</code></pre>
<h4><b>Grunt Tasks</b></h4>
<ul>
<li>grunt sass: Compiles the Sass files from src/ and generates css in dist/css</li>
<li>grunt coffee: Compiles coffee files from src/ and generates js in dist/js</li>
<li>grunt: The default grunt task</li>
<li>grunt server: Start the server, performs grunt connect and grunt watch</li>
</ul>
<h4><b>Start Customizing</b></h4>
<ol>
<li>Modify the scss and coffee files under src/</li>
<li>Compile source using <b>grunt</b></li>
<li>Start the server using <b>grunt server</b></li>
<li>Any changes you make to the scss files will trigger the <b>watch</b> task which will regenerate the dist/ files</li>
</ol>
<h3><b>Browser Compatability</b></h3>
<ul>
<li>Firefox 4.0 (2.0)+</li>
<li>Chrome 4.0+</li>
<li>Internet Explorer 10+ (Really? Even IE? :O)</li>
<li>Opera 10.5+</li>
<li>Safari 3.1+</li>
</ul><br>
</div>
<div role="tabpanel" class="tab-pane" id="usage">
<h3><b>Usage</b></h3>
<h4><b>Data Attributes</b></h4>
<p>Slide panel is automatically invoked by setting data attributes</p>
<ol>
<li>Add data-slide to body <code><body data-slide='[push overlay]'>...</body></code></li>
<li>Add .slider-panel class to panel <code><div class='slider-panel'>...</div></code></li>
<li>Add .wrapper class <code><div class='wrapper'>...</div></code></li>
<li>Add data-panel='panel-id', data-dir='[left right]' & data-dim='[true false]' to calling element <code><a data-panel='panel-id' data-dir='[left right]' data-dim='[true false]' href>...</a></code></li>
</ol>
<pre data-src="code-templates/usage-data-attrib.html"></pre><br>
<table class="table table-bordered table-striped">
<thead>
<tr>
<th>Attribute</th>
<th>Options</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>data-slide</td>
<td>
[push overlay]
</td>
<td>Whether the panel shoudl push or overlay over content</td>
</tr>
<tr>
<td>data-panel</td>
<td>[target panel id]</td>
<td>The Target panel id</td>
</tr>
<tr>
<td>data-dir</td>
<td>
[left right top bottom]
</td>
<td>
The Direction in which panel should appear
</td>
</tr>
<tr>
<td>data-dim</td>
<td>[true false]</td>
<td>Dim page content or not</td>
</tr>
</tbody>
</table>
<br>
<h4><b>Using Javascript</b></h4>
<p> Alternatively you can manually invoke the slider panel using Javascript.
<ol>
<li>Add data-slide to body <code><body data-slide='[push overlay]'>...</body></code></li>
<li>Add .slider-panel class to panel <code><div class='slider-panel'>...</div></code></li>
<li>Add .wrapper class <code><div class='wrapper'>...</div></code></li>
<li><code>$(element).sliderpanel(options);</code></li>
</ol>
options are provided as a Javascript Object { }</p>
<pre data-src="code-templates/usage-javascript.html"></pre>
</div>
<div role="tabpanel" class="tab-pane" id="examples">
<h3><b>Examples</b></h3>
<div class="btn-group" role="group">
<button class="btn btn-default" data-panel="l-panel" data-dir="left">
Left</button>
<button class="btn btn-default" data-panel="r-panel" data-dir="right" data-dim="false">Right</button>
<button id="btn-top" class="btn btn-default">Top</button>
<button id="btn-bottom" class="btn btn-default">Bottom</button>
</div>
<pre data-src="code-templates/example-template.html"></pre>
</div>
<div role="tabpanel" class="tab-pane" id="issues">
<h3><b>Issues</b></h3>
You can raise issues at <a href="https://github.com/sudharti/slider-panel/issues">https://github.com/sudharti/slider-panel/issues</a>
<h3><b>Contributing</b></h3>
If you want to contribute to this project
<ol>
<li>Fork the Project at https://github.com/sudharti/slider-panel</li>
<li>Make changes</li>
<li>Send Pull Request</li>
</ol>
</div>
</div>
</div>
</div>
<hr>
<div class="row text-center">
<div class="footer">
<span>Released under MIT License</span> |
<span>Made by <a href="https://github.com/sudharti">sudharti</a></span>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/prism.js"></script>
<script src="dist/js/slider-panel.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$("#btn-top").click(function(){
$(this).sliderpanel({
panel: "t-panel",
dir: "top",
dim: false
});
});
$("#btn-bottom").click(function(){
$(this).sliderpanel({
panel: "b-panel",
dir: "bottom",
dim: true
});
});
});
</script>
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='//www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-XXXXX-X');ga('send','pageview');
</script>
</body>
</html>