forked from psiborg/PantherUI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
517 lines (437 loc) · 18.8 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
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
<!DOCTYPE html>
<!--
Copyright 2013-2014 BlackBerry Limited.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<html>
<head>
<meta charset="utf-8">
<title>PantherUI</title>
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no">
<link rel="stylesheet" href="dist/PantherUI.min.css">
<link rel="stylesheet" href="docs/lib/highlight/styles/monokai_sublime.css">
<style>
body {
font: 100% Arial, sans-serif;
margin: 0;
padding: 0;
overflow: hidden;
}
li {
line-height: 200%;
}
#container1 {
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.nav-buttons {
text-align: center;
}
.panther-Carousel-carousel {
/* easeOutBack */
-webkit-transition: all 1000ms cubic-bezier(0.175, 0.885, 0.320, 1);
-webkit-transition: all 1000ms cubic-bezier(0.175, 0.885, 0.320, 1.275);
-moz-transition: all 1000ms cubic-bezier(0.175, 0.885, 0.320, 1.275);
-o-transition: all 1000ms cubic-bezier(0.175, 0.885, 0.320, 1.275);
transition: all 1000ms cubic-bezier(0.175, 0.885, 0.320, 1.275);
}
.watermark {
background-image: url(img/logos/waawesome626_watermark.png);
background-repeat: no-repeat;
background-position: center top;
}
.logo {
background-image: url(img/logos/waawesome626_watermark.png);
background-repeat: no-repeat;
background-position: center center;
}
/* Desktop (landscape) */
#toc {
position: absolute;
top: 0;
width: 30%;
height: 100%;
overflow: auto;
z-index: 10;
}
.toc-collapse {
left: -30%;
}
.toc-expand {
left: 0;
}
#tabpanel {
background-repeat: no-repeat;
background-position: center center;
position: absolute;
top: 2px;
width: 38px;
height: 48px;
margin: 0;
padding: 0;
z-index: 10;
}
.tabpanel-collapse {
/*background-image: url(img/toggle-horz-trans-collapse.png);*/
background-image: url(img/toggle-horz-trans-hamburger.png);
left: 30%;
}
.tabpanel-expand {
/*background-image: url(img/toggle-horz-trans-expand.png);*/
background-image: url(img/toggle-horz-trans-hamburger.png);
left: 0;
}
#content {
position: absolute;
top: 0;
height: 100%;
margin: 0;
padding: 0;
overflow: hidden;
z-index: 0;
}
.content-collapse {
left: 0;
width: 100%;
}
.content-expand {
left: 30%;
width: 70%;
}
/* Desktop (portrait) */
@media (orientation: portrait) {
#toc {
width: 100%;
height: 30%;
}
.toc-collapse {
top: -30% !important;
}
.toc-expand {
top: 0 !important;
}
#tabpanel {
left: 2px;
width: 48px;
height: 38px;
}
.tabpanel-collapse {
top: 30% !important;
/*background-image: url(img/toggle-vert-trans-collapse.png);*/
background-image: url(img/toggle-vert-trans-hamburger.png);
}
.tabpanel-expand {
top: 0 !important;
/*background-image: url(img/toggle-vert-trans-expand.png);*/
background-image: url(img/toggle-vert-trans-hamburger.png);
}
#content {
left: 0;
width: 100%;
}
.content-collapse {
top: 0 !important;
height: 100% !important;
}
.content-expand {
top: 30% !important;
height: 70% !important;
}
}
/* Smartphones (portrait) */
@media only screen and (min-width: 320px) and (max-width: 720px) and (orientation: portrait) {
#toc {
left: 0;
width: 100%;
height: 85%;
-webkit-box-shadow: 0px 5px 5px 0px rgba(50, 50, 50, 0.75);
-moz-box-shadow: 0px 5px 5px 0px rgba(50, 50, 50, 0.75);
box-shadow: 0px 5px 5px 0px rgba(50, 50, 50, 0.75);
-webkit-transition: all 500ms;
transition: all 500ms;
}
.toc-collapse {
top: -85% !important;
}
.toc-expand {
top: 0 !important;
}
#tabpanel {
left: 2px;
width: 48px;
height: 38px;
-webkit-transition: all 500ms;
transition: all 500ms;
}
.tabpanel-collapse {
top: 85% !important;
/*background-image: url(img/toggle-vert-light-collapse.png);*/
background-image: url(img/toggle-vert-light-hamburger.png);
}
.tabpanel-expand {
top: 0 !important;
/*background-image: url(img/toggle-vert-light-expand.png);*/
background-image: url(img/toggle-vert-light-hamburger.png);
}
#content {
left: 0;
width: 100%;
}
.content-collapse {
top: 0 !important;
height: 100% !important;
}
.content-expand {
top: 0 !important;
height: 100% !important;
}
}
/* Smartphones (landscape) */
@media only screen and (min-width: 320px) and (max-width: 720px) and (orientation: landscape) {
#toc {
width: 85%;
height: 100%;
-webkit-box-shadow: 5px 0px 5px 0px rgba(50, 50, 50, 0.75);
-moz-box-shadow: 5px 0px 5px 0px rgba(50, 50, 50, 0.75);
box-shadow: 5px 0px 5px 0px rgba(50, 50, 50, 0.75);
-webkit-transition: all 500ms;
transition: all 500ms;
}
.toc-collapse {
left: -85% !important;
}
.toc-expand {
left: 0 !important;
}
#tabpanel {
top: 2px;
width: 38px;
height: 48px;
-webkit-transition: all 500ms;
transition: all 500ms;
}
.tabpanel-collapse {
left: 85% !important;
/*background-image: url(img/toggle-horz-light-collapse.png);*/
background-image: url(img/toggle-horz-light-hamburger.png);
}
.tabpanel-expand {
left: 0 !important;
/*background-image: url(img/toggle-horz-light-expand.png);*/
background-image: url(img/toggle-horz-light-hamburger.png);
}
#content {
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.content-collapse {
left: 0 !important;
height: 100% !important;
}
.content-expand {
left: 0 !important;
height: 100% !important;
}
}
</style>
</head>
<body>
<div id="toc" class="toc-expand">
<section class="panther-Carousels">
<section id="container1" class="panther-Carousel-container">
<div id="carousel1" class="panther-Carousel-carousel">
<figure>
<div class="panther-Carousel-panelTitleBar"><span class="panther-Carousel-panelTitle">< PantherUI ></span></div>
<div class="panther-Carousel-panelContent watermark">
<!-- Panel 1: Add your content here -->
<div class="nav-buttons">
<input type="button" value="< Credits" onclick="Panther.Carousel.turnPrev('carousel1');">
<input type="button" value="Basics >" onclick="Panther.Carousel.turnNext('carousel1');">
</div>
<h3>About:</h3>
<p>The <b>PantherUI Carousel</b> is a 3D layout pattern for most modern browsers.</p>
<p>You can swipe left or right on the title bars to switch panels.</p>
<p>These templates use responsive design to auto-adjust the layout for desktop or mobile, and portrait or landscape.</p>
<p>This template was tested on:</p>
<h4>Desktop Browsers:</h4>
<ul>
<li>Google Chrome 27 - 33</li>
<li>Safari 6</li>
<li>Firefox 21 - 27</li>
<li>Opera Next 15 - 19</li>
</ul>
<h4>Tablets:</h4>
<ul>
<li>BlackBerry PlayBook OS 2.1</li>
<li>iOS 5.1 - 7.0 (iPad)</li>
<li>Android 4.1 (Galaxy Tab 2 7.0)</li>
<li>Android 4.3 (Nexus 7)</li>
</ul>
<h4>Smartphones:</h4>
<ul>
<li>BlackBerry 10.1 - 10.2 (Z30, Z10 and Q10)</li>
<li>BlackBerry OS 7.1 (Bold 9900)</li>
<li>iOS 5.0 (iPod Touch)</li>
</ul>
<h4>Known issues:</h4>
<p>On iOS devices, you need to use the “two-finger” scroll gesture for scrolling overflow content because of the “rubber band” bounce effect with vertical scrolling.</p>
<p>For PhoneGap apps built for iOS, you can disable the bounce in the config.xml:</p>
<pre><code>
<preference name="DisallowOverscroll" value="true" />
<preference name="webviewbounce" value="false" />
</code></pre>
</div>
</figure>
<figure>
<div class="panther-Carousel-panelTitleBar"><span class="panther-Carousel-panelTitle">< 2 ></span></div>
<div class="panther-Carousel-panelContent">
<!-- Panel 2: Add your content here -->
<div class="nav-buttons">
<input type="button" value="< About" onclick="Panther.Carousel.turnPrev('carousel1');">
<input type="button" value="Use Cases >" onclick="Panther.Carousel.turnNext('carousel1');">
</div>
<h3>Basics (ABCs):</h3>
<ul>
<li><a href="docs/basic1a_source.html" target="content">1A - Apply 1-Carousel</a></li>
<li><a href="docs/basic1b_source.html" target="content">1B - Backgrounds and Buttons</a></li>
<li><a href="docs/basic1c_source.html" target="content">1C - Callback</a></li>
<li><a href="docs/basic1d_source.html" target="content">1D - Direction</a></li>
<li><a href="docs/basic1e_source.html" target="content">1E - Easing</a></li>
<li><a href="docs/basic1f_source.html" target="content">1F - For 1-Handed Thumb Use</a></li>
<li>
<a href="docs/basic1h_source.html" target="content">1H - Hash:</a>
<a href="docs/basic1h_source.html#1" target="content">#1</a>
<a href="docs/basic1h_source.html#2" target="content">#2</a>
<a href="docs/basic1h_source.html#3" target="content">#3</a>
<a href="docs/basic1h_source.html#4" target="content">#4</a>
</li>
<li><a href="docs/basic1k_source.html" target="content">1K - Keyboard Support</a></li>
<li>
1T - Theming:
<a href="docs/basic1t_flat_source.html" target="content">Flat</a>
<a href="docs/basic1t_gradient_source.html" target="content">Gradient</a>
<a href="docs/basic1t_dark_source.html" target="content">Dark</a>
</li>
<li><a href="docs/basic2a_source.html" target="content">2A - Apply 2-Carousel</a></li>
</ul>
</div>
</figure>
<figure>
<div class="panther-Carousel-panelTitleBar"><span class="panther-Carousel-panelTitle">< 3 ></span></div>
<div class="panther-Carousel-panelContent">
<!-- Panel 3: Add your content here -->
<div class="nav-buttons">
<input type="button" value="< Basics" onclick="Panther.Carousel.turnPrev('carousel1');">
<input type="button" value="Credits >" onclick="Panther.Carousel.turnNext('carousel1');">
</div>
<h3>Use Cases:</h3>
<ul>
<li><a href="templates/app.html" target="content">3-Carousel App - with dynamic panels and maximize buttons</a></li>
<li><a href="templates/ticker.html" target="content">Ticker</a></li>
<li><a href="templates/thumbnails.html" target="content">Thumbnail Grid - with a bottom navigation bar</a></li>
<li><a href="templates/slideshow.html" target="content">Slideshow</a></li>
</ul>
</div>
</figure>
<figure>
<div class="panther-Carousel-panelTitleBar"><span class="panther-Carousel-panelTitle">< Credits ></span></div>
<div class="panther-Carousel-panelContent logo">
<div class="nav-buttons">
<input type="button" value="< Use Cases" onclick="Panther.Carousel.turnPrev('carousel1');">
<input type="button" value="About >" onclick="Panther.Carousel.turnNext('carousel1');">
<h3>PantherUI Carousel</h3>
<p>by <a href="https://twitter.com/jim_ing" target="_blank">Jim Ing</a></p>
<p>Fork me on <a href="https://github.com/psiborg/PantherUI" target="_blank">GitHub</a></p>
<p>Thanks to the following for their support and feedback:</p>
<ul>
<li><a href="https://twitter.com/muttejo" target="_blank">John Mutter</a></li>
<li><a href="https://twitter.com/brentthornton32" target="_blank">Brent Thornton</a></li>
<li><a href="https://twitter.com/latestlinux" target="_blank">Seb Barthelmess</a></li>
<li><a href="https://twitter.com/ed_bourne" target="_blank">Ed Bourne</a></li>
<li><a href="https://twitter.com/OG1Dot" target="_blank">HyunJun Jung</a></li>
<li><a href="https://twitter.com/redinnc" target="_blank">Jeff Bentley</a></li>
<li><a href="https://twitter.com/Wayne_Pau" target="_blank">Wayne Pau</a></li>
<li><a href="https://twitter.com/desandro" target="_blank">Dave DeSandro</a></li>
</ul>
<p>Copyright © 2013 - 2014</p>
</div>
</div>
</figure>
</div>
</section>
</section>
</div>
<div id="tabpanel" class="tabpanel-collapse"></div>
<iframe id="content" class="content-expand" name="content" src="docs/basic1a_source.html" seamless></iframe>
<script src="local:///chrome/webworks.js"></script>
<script src="dist/PantherUI.min.js"></script>
<script src="docs/lib/highlight/highlight.pack.js"></script>
<script>
hljs.initHighlightingOnLoad();
// Initialize carousel
Panther.Carousel.init({
id: 'carousel1',
backgroundColor: 'rgba(157, 157, 157, 0.97)'
});
var app = {
toc: document.getElementById('toc'),
tabpanel: document.getElementById('tabpanel'),
content: document.getElementById('content')
};
app.handleClick = function (ev) {
console.log('clicked', ev);
app.collapse();
};
app.collapse = function () {
app.tabpanel.className = 'tabpanel-expand';
app.toc.className = 'toc-collapse';
app.content.className = 'content-collapse';
};
app.expand = function () {
app.tabpanel.className = 'tabpanel-collapse';
app.toc.className = 'toc-expand';
app.content.className = 'content-expand';
};
app.toggle = function () {
if (app.tabpanel.className == 'tabpanel-collapse') {
app.collapse();
}
else {
app.expand();
}
// Force refresh
app.content.contentWindow.Panther.Carousel.refresh();
};
// Add toggle listener
app.tabpanel.addEventListener('click', app.toggle);
// Close side panel after a click on smaller screens
console.log(window.innerWidth);
if (window.innerWidth <= 720) {
var anchors = document.querySelectorAll('a[target="content"]');
for (var i = 0, ii = anchors.length; i < ii; i++) {
anchors[i].addEventListener('click', app.handleClick, false);
}
}
// Add swipedown event for BlackBerry 10
if (navigator.userAgent.match(/WebWorks/)) {
window.addEventListener('DOMContentLoaded', function() {
document.addEventListener('webworksready', function () {
blackberry.event.addEventListener('swipedown', app.toggle);
}, false);
}, false);
}
</script>
</body>
</html>