-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
89 lines (81 loc) · 2.84 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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no,maximum-scale=1">
<link rel="stylesheet" href="build/css/mgallery.css"/>
<title>MGallery Demo</title>
<style>
html, body {
width: 100%;
height: 100%;
margin: 0 auto;
padding: 0;
}
#page {
width: 100%;
height: 100%;
}
.content-width {
min-width:283px;
max-width:1140px;
margin: 0 auto;
height:100%;
box-shadow: 12px 0 15px -4px #999, -12px 0 8px -4px #999;
}
.content-width h1.title {
margin-top: 0;
padding-top: 15px;
text-align: center;
}
</style>
</head>
<body>
<div id="page">
<div class="content-width">
<h1 class="title">MGallery Demo</h1>
<input id="trigger" type="button" value="Open Gallery"></input>
<!-- Gallery dom-->
<div id="mobile-gallery" class="quadratic hide preview show-controls">
<div class="title b"><span></span><i class="caret close b"></i></div>
<a href="#" class="button transparent b close">Back</a>
<div class="viewport">
<ul>
<li class="b"><img src="build/images/p.gif" mainSrc="build/images/m_gallery_1.jpg" alt="Loading"/></li>
<li class="b"><img src="build/images/p.gif" mainSrc="build/images/m_gallery_2.jpg" alt="Loading"/></li>
<li class="b"><img src="build/images/p.gif" mainSrc="build/images/m_gallery_3.jpg" alt="Loading"/></li>
<li class="b"><img src="build/images/p.gif" mainSrc="build/images/m_gallery_4.jpg" alt="Loading"/></li>
<li class="b"><img src="build/images/p.gif" mainSrc="build/images/m_gallery_5.jpg" alt="Loading"/></li>
<li class="b"><img src="build/images/p.gif" mainSrc="build/images/m_gallery_6.jpg" alt="Loading"/></li>
</ul>
</div>
<div class="controls b">
<span class="caret b play-control">
<span class="triangle"></span>
<span class="square"></span>
</span>
<i class="caret prev b hide">◄</i>
<i class="caret next b hide">►</i>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="build/js/mgallery-min.js"></script>
<script>
function init() {
//var container = document.querySelectorAll('#mobile-gallery')[0];
var gallery = null;
gallery = new MGallery('#mobile-gallery');
var button = document.getElementById('trigger');
button.addEventListener('click', function(){
if(gallery !== null) {
gallery.open();
}
}, false);
}
window.addEventListener('load', function(){
init();
}, false);
</script>
</body>
</html>