-
Notifications
You must be signed in to change notification settings - Fork 13
/
index.html
90 lines (73 loc) · 2.44 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Modals</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- A basic responsive reset -->
<style>
@-webkit-viewport { width: device-width; zoom: 1.0; }
@-moz-viewport { width: device-width; zoom: 1.0; }
@-ms-viewport { width: device-width; zoom: 1.0; }
@-o-viewport { width: device-width; zoom: 1.0; }
@viewport { width: device-width; zoom: 1.0; }
html { overflow-y: auto; }
img, audio, video, canvas { max-width: 100%; }
/* Sets body width */
.container {
max-width: 40em;
width: 88%;
margin-left: auto;
margin-right: auto;
}
</style>
<!-- stylesheets -->
<link rel="stylesheet" href="dist/css/modals.css" type="text/css">
<!-- HTML5 Shim for IE -->
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<section class="container">
<h1 style="text-align: center; font-size: 3em; margin-bottom: 0;">Modals</h1>
<p style="text-align: center; font-size: 1.5em; margin: 0;">Simple modal dialogue windows.</p>
<p style="text-align: center;"><a href="https://github.com/cferdinandi/modals#readme">Modals on GitHub</a></p>
<br><br>
<p><button data-modal="#modal1">Modal</button> <button data-modal="#modal2">Modal Medium</button> <button data-modal="#modal3">Modal Small</button></p>
<div class="modal" data-modal-window id="modal1">
<a class="close" data-modal-close>x</a>
<h3>Modal</h3>
<p>Modal content</p>
<button data-modal-close>Close</button>
</div>
<div class="modal modal-medium" data-modal-window id="modal2">
<a class="close" data-modal-close>x</a>
<h3>Modal Medium</h3>
<p>Modal content</p>
<button data-modal-close>Close</button>
</div>
<div class="modal modal-small" data-modal-window id="modal3">
<a class="close" data-modal-close>x</a>
<h3>Modal Small</h3>
<p>Modal content</p>
<button data-modal-close>Close</button>
</div>
</section>
<!-- Javascript -->
<script src="dist/js/classList.js"></script>
<script src="dist/js/bind-polyfill.js"></script>
<script src="dist/js/modals.js"></script>
<script>
modals.init({
modalActiveClass: 'active',
modalBGClass: 'modal-bg',
backspaceClose: true,
callbackBeforeOpen: function () {},
callbackAfterOpen: function () {},
callbackBeforeClose: function () {},
callbackAfterClose: function () {}
});
</script>
</body>
</html>