-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathindex.html
314 lines (309 loc) · 19.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Light Modal - 100% Pure CSS Modal with Animations</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="icon" type="image/x-icon" href="https://assets-cdn.github.com/favicon.ico">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Reenie+Beanie">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/3.5.2/animate.min.css">
<link rel="stylesheet" href="demoSrc/demo.scss">
<link rel="stylesheet" href="dist/css/light-modal.css">
</head>
<body>
<a class="bar" href="https://hunzaboy.github.io/CSS-Checkbox-Library/">
Get rid of ugly checkboxes.Checkout CSS Checkbox Library
</a>
<header>
<a href="#how-to-use" class="btn">How to use?</a>
<a href="https://github.com/hunzaboy/Light-Modal" class="btn for-github">
<svg aria-hidden="false" class="octicon octicon-mark-github" height="32" version="1.1" viewBox="0 0 16 16" width="32">
<path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z"></path>
</svg>
</a>
</header>
<div class="main">
<div class="center">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Light Modal -->
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-6403491308890107" data-ad-slot="6376271203" data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<div class="title">Light Modal | <small>Pure CSS</small></div>
<div class="modals">
<div class="modal-type">
<a href="#modal-id-1" class="btn">Open Simple Modal</a>
<a href="#modal-id-2" class="btn">Modal with Header/Footer</a>
<a href="#image-modal" class="btn">Open Image Modal</a>
<a href="#gallery-modal-1" class="btn btn-secondary">Gallery (New)</a>
</div>
<form>
<select class="input input--dropdown js--animations">
<option value="zoomInUp">Choose an Animation ( Default Zoom In Up )</option>
<option value="basic">Basic</option>
<optgroup label="Attention Seekers">
<option value="bounce">bounce</option>
<option value="flash">flash</option>
<option value="pulse">pulse</option>
<option value="rubberBand">rubberBand</option>
<option value="shake">shake</option>
<option value="swing">swing</option>
<option value="tada">tada</option>
<option value="wobble">wobble</option>
<option value="jello">jello</option>
</optgroup>
<optgroup label="Bouncing Entrances">
<option value="bounceIn">bounceIn</option>
<option value="bounceInDown">bounceInDown</option>
<option value="bounceInLeft">bounceInLeft</option>
<option value="bounceInRight">bounceInRight</option>
<option value="bounceInUp">bounceInUp</option>
</optgroup>
<optgroup label="Fading Entrances">
<option value="fadeIn">fadeIn</option>
<option value="fadeInDown">fadeInDown</option>
<option value="fadeInDownBig">fadeInDownBig</option>
<option value="fadeInLeft">fadeInLeft</option>
<option value="fadeInLeftBig">fadeInLeftBig</option>
<option value="fadeInRight">fadeInRight</option>
<option value="fadeInRightBig">fadeInRightBig</option>
<option value="fadeInUp">fadeInUp</option>
<option value="fadeInUpBig">fadeInUpBig</option>
</optgroup>
<optgroup label="Flippers">
<option value="flip">flip</option>
<option value="flipInX">flipInX</option>
<option value="flipInY">flipInY</option>
</optgroup>
<optgroup label="Lightspeed">
<option value="lightSpeedIn">lightSpeedIn</option>
</optgroup>
<optgroup label="Rotating Entrances">
<option value="rotateIn">rotateIn</option>
<option value="rotateInDownLeft">rotateInDownLeft</option>
<option value="rotateInDownRight">rotateInDownRight</option>
<option value="rotateInUpLeft">rotateInUpLeft</option>
<option value="rotateInUpRight">rotateInUpRight</option>
</optgroup>
<optgroup label="Sliding Entrances">
<option value="slideInUp">slideInUp</option>
<option value="slideInDown">slideInDown</option>
<option value="slideInLeft">slideInLeft</option>
<option value="slideInRight">slideInRight</option>
</optgroup>
<optgroup label="Zoom Entrances">
<option value="zoomIn">zoomIn</option>
<option value="zoomInDown">zoomInDown</option>
<option value="zoomInLeft">zoomInLeft</option>
<option value="zoomInRight">zoomInRight</option>
<option value="zoomInUp">zoomInUp</option>
</optgroup>
<optgroup label="Specials">
<option value="rollIn">rollIn</option>
</optgroup>
</select>
</form>
</div>
<div class="ga">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Light Modal -->
<ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-6403491308890107" data-ad-slot="6376271203" data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<footer>
<p>Made in
<a href="https://www.thebrokebackpacker.com/travel-to-pakistan/" target="_blank" title="Pakistan">
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="20" viewBox="-75 -40 120 80" version="1.1">
<title>Flag of Pakistan</title>
<rect x="-75" y="-40" width="120" height="80" fill="#fff" />
<rect x="-45" y="-40" width="90" height="80" fill="#01411C" />
<circle r="24" fill="#fff" />
<circle r="22" cx="-7" cy="-40" fill="#01411C" transform="rotate(-41.63354, 45, -40)" />
<polygon points="0,-513674 301930,415571 -488533,-158734 488533,-158734 -301930,415571" fill="#fff" transform="rotate(-41.63354) translate(16) rotate(18) scale(0.00001557408)" />
</svg>
</a> by <a href="http://twitter.com/hunzaboy"> Aslam </a></p>
</footer>
</div>
<div class="light-modal" id="how-to-use" role="dialog" aria-labelledby="light-modal-label" aria-hidden="false">
<div class="light-modal-content large-content animated zoomInUp">
<div class="light-modal-header">
<h3 class="light-modal-heading">How to Use</h3>
<a href="#/" class="light-modal-close-icon" aria-label="close">×</a>
</div>
<div class="light-modal-body">
<p>Install via npm <code>npm install light-modal</code></p>
<p>Or Download the Zip and include <code>dist/css/light-modal.min.css</code> in your page head.</p>
<p>Modal Markup:</p>
<code>
<pre><div class="light-modal" id="unique-id" role="dialog" aria-labelledby="light-modal-label" aria-hidden="false">
<div class="light-modal-content animated zoomInUp">
<!-- light modal header -->
<div class="light-modal-header">
<h3 class="light-modal-heading">Modal Title</h3>
<a href="#" class="light-modal-close-icon" aria-label="close">&times;</a>
</div>
<!-- light modal body -->
<div class="light-modal-body">
<!-- Your content -->
</div>
<!-- light modal footer -->
<div class="light-modal-footer">
<a href="#" class="light-modal-close-btn" aria-label="close">Close</a>
</div>
</div>
</div></pre>
</code>
<p>Note:If you don't need header and footer then simply exclude it. </p>
<h3>How to Trigger?</h3>
<p>You can open a modal by adding the <span>id</span> of the modal to any anchor tag e.g to open the above markup modal you need to add:</p>
<code><pre><a href="#unique-id" class="btn">Open Modal</a></pre></code>
<p>Note:Dont forget to add the <span>#</span> before the id. e.g <span>#unique-id</span></p>
<h3>Animation</h3>
<p>To add an animation, include animation class to <span>light-modal-content</span> For demo i am using <a href="https://daneden.github.io/animate.css/" target="_blank" class="animated infinite">Animate.css</a> animations.</p>
<p>That's It.
<br>If you find any issue feel free to submit on <a href="https://github.com/hunzaboy/Light-Modal/issues">Github.</a></p>
</div>
<div class="light-modal-footer">
<a href="#" class="light-modal-close-btn" aria-label="close">Close</a>
</div>
</div>
</div>
<div class="light-modal" id="modal-id-1" role="dialog" aria-labelledby="light-modal-label" aria-hidden="false">
<div class="light-modal-content animated zoomInUp">
<a href="#/" class="light-modal-close-icon" aria-label="close">×</a>
<div class="light-modal-body">
<p>Light modal is a pure CSS based modal. It works using <span>:target</span> property</p>
<p>Current animations are based on <a href="https://daneden.github.io/animate.css/" target="_blank" class="animated infinite">Animate.css</a>.</p>
<p>However you are free to use your own animations. Just add your animation class to <span>light-modal-content</span> and you are good to go.</p>
</div>
</div>
</div>
<div class="light-modal" id="modal-id-2" role="dialog" aria-labelledby="light-modal-label" aria-hidden="false">
<div class="light-modal-content animated zoomInUp">
<!-- light modal header -->
<div class="light-modal-header">
<h3 class="light-modal-heading">Modal Title</h3>
<a href="#/" class="light-modal-close-icon" aria-label="close">×</a>
</div>
<!-- light modal body -->
<div class="light-modal-body">
<p>Light modal is a pure CSS based modal. It works using <span>:target</span> property</p>
<p>Current animations are based on <a href="https://daneden.github.io/animate.css/" target="_blank" class="animated infinite">Animate.css</a>.</p>
<p>However you are free to use your own animations. Just add your animation class to <span>light-modal-content</span> and you are good to go.</p>
</div>
<!-- light modal footer -->
<div class="light-modal-footer">
<a href="#" class="light-modal-close-btn" aria-label="close">Close</a>
</div>
</div>
</div>
<div class="light-modal" id="image-modal" role="dialog" aria-labelledby="light-modal-label" aria-hidden="false">
<div class="light-modal-content animated zoomInUp">
<img src="demoSrc/norbert-von-niman-354528.jpg" alt="from unsplash">
<a href="#/" class="light-modal-close-icon" aria-label="close">×</a>
<div class="light-modal-caption">Photo by Norbert von Niman on <a href="https://unsplash.com/@norrisniman" target="_blank">Unsplash</a></div>
</div>
</div>
<!-- gallery modal content start-->
<div class="light-modal" id="gallery-modal-1" role="dialog" aria-labelledby="light-modal-label" aria-hidden="false">
<div class="light-modal-content animated fadeIn">
<img src="https://picsum.photos/800?random" alt="from unsplash">
<a href="#/" class="light-modal-close-icon" aria-label="close">×</a>
<div class="light-modal-caption">This is the Image Gallery with Fade Effect.</div>
<div class="light-modal-navigation">
<a href="#gallery-modal-4" class="light-modal-navigation navigation-prev"></a>
<a href="#gallery-modal-2" class="light-modal-navigation navigation-next"></a>
</div>
</div>
</div>
<div class="light-modal" id="gallery-modal-2" role="dialog" aria-labelledby="light-modal-label" aria-hidden="false">
<div class="light-modal-content no animated flipInY">
<img src="https://picsum.photos/700?random" alt="from unsplash">
<a href="#/" class="light-modal-close-icon" aria-label="close">×</a>
<div class="light-modal-caption">You can use any css animation on each modal like this one.</div>
<div class="light-modal-navigation">
<a href="#gallery-modal-1" class="light-modal-navigation navigation-prev"></a>
<a href="#gallery-modal-3" class="light-modal-navigation navigation-next"></a>
</div>
</div>
</div>
<div class="light-modal" id="gallery-modal-3" role="dialog" aria-labelledby="light-modal-label" aria-hidden="false">
<div class="light-modal-content no animated rollIn">
<img src="https://picsum.photos/600?random" alt="from unsplash">
<a href="#/" class="light-modal-close-icon" aria-label="close">×</a>
<div class="light-modal-caption">I mean any...</div>
<div class="light-modal-navigation">
<a href="#gallery-modal-2" class="light-modal-navigation navigation-prev"></a>
<a href="#gallery-modal-4" class="light-modal-navigation navigation-next"></a>
</div>
</div>
</div>
<div class="light-modal" id="gallery-modal-4" role="dialog" aria-labelledby="light-modal-label" aria-hidden="false">
<div class="light-modal-content no animated rubberBand">
<div class="light-modal-header">
<h3 class="light-modal-heading">Gallery Markup</h3>
<a href="#/" class="light-modal-close-icon" aria-label="close">×</a>
</div>
<div class="light-modal-body">
<p>The Markup for gallery uses the same principle as of normal modal. We are targeting a new modal on the click of the left and right arrows. <strong>You can add any css animation to individual images.</strong></p>
<code>
<pre style="max-height: 300px;"><div class="light-modal" id="gallery-modal-1" role="dialog" aria-labelledby="light-modal-label" aria-hidden="false">
<div class="light-modal-content animated fadeIn">
<img src="https://picsum.photos/800?random" alt="from unsplash">
<a href="#" class="light-modal-close-icon" aria-label="close">×</a>
<div class="light-modal-caption">This is the Image Gallery with Fade Effect.</div>
<div class="light-modal-navigation">
<a href="#gallery-modal-4" class="light-modal-navigation navigation-prev"></a>
<a href="#gallery-modal-2" class="light-modal-navigation navigation-next"></a>
</div>
</div>
</div>
<div class="light-modal" id="gallery-modal-2" role="dialog" aria-labelledby="light-modal-label" aria-hidden="false">
<div class="light-modal-content animated flipInY">
<img src="https://picsum.photos/700?random" alt="from unsplash">
<a href="#" class="light-modal-close-icon" aria-label="close">×</a>
<div class="light-modal-caption">You can use any css animation on each modal like this one.</div>
<div class="light-modal-navigation">
<a href="#gallery-modal-1" class="light-modal-navigation navigation-prev"></a>
<a href="#gallery-modal-3" class="light-modal-navigation navigation-next"></a>
</div>
</div>
</div>
<div class="light-modal" id="gallery-modal-3" role="dialog" aria-labelledby="light-modal-label" aria-hidden="false">
<div class="light-modal-content animated rollIn">
<img src="https://picsum.photos/600?random" alt="from unsplash">
<a href="#" class="light-modal-close-icon" aria-label="close">×</a>
<div class="light-modal-caption">I mean any...</div>
<div class="light-modal-navigation">
<a href="#gallery-modal-2" class="light-modal-navigation navigation-prev"></a>
<a href="#gallery-modal-4" class="light-modal-navigation navigation-next"></a>
</div>
</div>
</div></pre>
</code>
</div>
<div class="light-modal-caption">Enjoy! </div>
<div class="light-modal-navigation">
<a href="#gallery-modal-3" class="light-modal-navigation navigation-prev"></a>
<a href="#gallery-modal-1" class="light-modal-navigation navigation-next"></a>
</div>
</div>
</div>
<!-- gallery modal content end -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="demoSrc/scripts.js"></script>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-105402107-2"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() { dataLayer.push(arguments); }
gtag('js', new Date());
gtag('config', 'UA-105402107-2');
</script>
</body>
</html>