-
Notifications
You must be signed in to change notification settings - Fork 3
/
flaterial.html
277 lines (214 loc) · 10.7 KB
/
flaterial.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
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, shrink-to-fit=no">
<title>Modal Box by Patrick LEFEVRE</title>
<!-- Remove Tap Highlight on Windows Phone IE -->
<meta name="msapplication-tap-highlight" content="no">
<script>
/*! loadFonts.js by cara-tm.com - MIT license */
'use strict';function loadFonts(U,t,c){var args=Array.prototype.slice.call(arguments,3),xhr=new XMLHttpRequest();xhr.ontimeout=function(){console.error('The request for '+U+' timed out.')};xhr.onload=function(){if(xhr.readyState===4){if(xhr.status===200){c.apply(xhr,args);console.log('Fonts Loaded!')}else{console.error(xhr.statusText)};console.timeEnd("Process")}};xhr.open('GET',U,true);xhr.timeout=t;xhr.send(null)}function inject(){var e=this.responseText,h=document.getElementsByTagName('head')[0],a=document.getElementsByTagName('link')[0],s=document.createElement('style');s.media='only screen';s.innerHTML=e;if('undefined'!=typeof s){h.insertBefore(h.appendChild(s),a)}}
/*! Loader */
loadFonts('https://fonts.googleapis.com/css?family=Noto+Sans|Open+Sans+Condensed:300&subset=latin', 9500, inject);
</script>
<link rel="stylesheet" href="css/modal-box.min.css" media="screen">
<link rel="stylesheet" href="css/custom.min.css" media="screen">
<link rel="stylesheet" href="css/flaterial.css" media="screen">
<style>
/*! ============================
CSS rules for this page demo
*/
/**
* Waiting for Google font loader: hide the entire page
*/
.wf-loading {
opacity: 0;
visibility: hidden;
height: 100%;
overflow: hidden
}
/**
* All is fine: display the document
*/
.wf-active {
opacity: 1;
visibility: visible
}
.wrapper {
width: 100%;
padding: 0 0 3em;
font-family: sans-serif
}
/* Corrects the wrapper position on Modal Boxes opening */
.modal-dialog:target ~.wrapper{margin-top: 1.2em}
.wrapper p {
padding: 0 2% 10px;
font-size: 20px;
line-height: 1.5
}
p.first-line {
float: left;
clear: both;
width: 96%
}
/* Custom fonts */
@media only screen and (min-width: 720px) {
.header-modal,
.modal-dialog .inner-dialog h2 {
font-family: 'Noto Sans', sans-serif;
font-weight: 300
}
.modal-dialog .inner-dialog p,
.footer-modal {font-family: 'Open Sans', sans-serif}
}
/**
* The buttons
*/
.button {
float: left;
margin: 0 .5em 1em 0;
padding: .8em .5em 1em;
border: 2px solid #0b7cd7;
text-decoration: none;
font-size: smaller;
line-height: 1;
-webkit-text-decoration-skip: ink;
text-decoration-skip: ink
}
.button:hover {
background: #0b7cd7;
text-decoration: underline;
color: #fff
}
/**
* For JS fallback if used
*/
html .visible {
display: block;
opacity: 1;
visibility: visible
}
/*! Simple Scrollbar https://github.com/buzinas/simple-scrollbar */
.ss-wrapper {
overflow: hidden;
position: relative;
z-index: 1;
float: left;
width: 100%;
height: 100%
}
.ss-content {
overflow: auto;
overflow-x: hidden;
position: relative;
right: -18px;
left: 0;
width: 100%;
height: 100%;
padding: 0 32px 0 0
}
.ss-scroll {
opacity: 0;
position: relative;
z-index: 2;
top: 0;
width: 6px;
cursor: pointer;
-webkit-border-radius: 4px;
border-radius: 4px;
-webkit-transition: opacity 0.25s linear;
-o-transition: opacity 0.25s linear;
transition: opacity 0.25s linear
}
html .modal-dialog .modal .ss-container {
overflow-x: hidden;
max-height: 47vh;
height: 9.766em
}
.ss-container:hover .ss-scroll {
opacity: 1;
background: #d9d9d9;
background: rgba(0,0,0,0.15)
}
.ss-grabbed {
-o-user-select: none;
-moz-user-select: none;
-khtml-user-select: none;
-webkit-user-select: none;
user-select: none
}
</style>
<noscript>
<link rel="prefetch" href="https://fonts.googleapis.com/css?family=Open+Sans|Noto+Sans" media="screen">
</noscript>
</head>
<body>
<div role="dialog" aria-modal="true" aria-haspopup="true" tabindex="-1" aria-live="assertive" aria-describedby="dialog-description" class="modal-dialog dialog" id="openModal">
<div role="document" class="modal">
<!--
<a href="#close" title="Close" class="close no__select" id="close-modal" onclick="document.getElementById('openModal').style.display='none';return true;">×</a>
-->
<div class="header-modal no__select">
<span id="dialog-description"><strong class="static">☂</strong> Parameters</span> <span><strong class="mob-hide">Action:</strong> <a href="#openModal" title="Validate changes"><svg class="svg-icon" viewBox="0 0 20 20">✓<path d="M7.6 14.6c0.1 0.1 0.3 0.2 0.5 0.2 0.2 0 0.3-0.1 0.5-0.2l8.2-8.2c0.3-0.3 0.3-0.7 0-0.9 -0.3-0.3-0.7-0.3-0.9 0l-7.8 7.8L4.2 9.3c-0.3-0.3-0.7-0.3-0.9 0 -0.3 0.3-0.3 0.7 0 0.9L7.6 14.6z"></path></svg></a></span>
</div>
<div class="inner-dialog">
<span>Modal Box</span>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>You could do a lot of things here like have a pop-up ad that shows when your website loads, or create a login/register form for users.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>You could do a lot of things here like have a pop-up ad that shows when your website loads, or create a login/register form for users.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>You could do a lot of things here like have a pop-up ad that shows when your website loads, or create a login/register form for users.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>You could do a lot of things here like have a pop-up ad that shows when your website loads, or create a login/register form for users.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>You could do a lot of things here like have a pop-up ad that shows when your website loads, or create a login/register form for users.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>You could do a lot of things here like have a pop-up ad that shows when your website loads, or create a login/register form for users.</p>
</div> <!-- /inner-dialog -->
<div class="footer-modal no__select">
<a href="#close" class="ripple" id="footer-close" onclick="document.getElementById('openModal').style.display='none';return true;">Close</a><a href="https://www.cara-tm.com" target="_blank" class="ripple">Help</a>
</div>
</div> <!-- /modal -->
</div> <!-- /modal-dialog -->
<div role="dialog" aria-modal="true" aria-haspopup="true" tabindex="-1" aria-live="assertive" aria-describedby="dialog-description" class="modal-dialog dialog" id="openMessage">
<div role="document" class="modal modal-message">
<a href="#close" title="Close" class="close no__select" id="close-msg" onclick="document.getElementById('openMessage').style.display='none';return true;">×</a>
<div class="inner-dialog">
<span id="dialog-description">Message Box</span>
<p><span class="info-sign"><strong>ℹ</strong></span> This is a sample modal message box suitable for infos. ✌</p>
</div> <!-- /inner-dialog -->
</div> <!-- /modal -->
</div> <!-- /modal-dialog -->
<div class="wrapper">
<p class="first-line">
<a href="#open" class="button">A simple link</a>
<a href="#openModal" class="button" onclick="document.getElementById('openModal').style.display='block';return true;">Open Modal Box</a>
<a href="#openMessage" class="button" onclick="document.getElementById('openMessage').style.display='block';return true;">Open Modal Message</a>
</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
<p>This is a sample modal box that can be created using the powers of CSS3.</p>
</div> <!-- /wrapper -->
<script>
/*! Simple Scrollbar - https://github.com/buzinas/simple-scrollbar - MIT license */
(function(n,t){function u(n){n.hasOwnProperty("data-simple-scrollbar")||Object.defineProperty(n,"data-simple-scrollbar",new SimpleScrollbar(n))}function e(n,i){function f(n){var t=n.pageY-u;u=n.pageY;r(function(){i.el.scrollTop+=t/i.scrollRatio})}function e(){n.classList.remove("ss-grabbed");t.body.classList.remove("ss-grabbed");t.removeEventListener("mousemove",f);t.removeEventListener("mouseup",e)}var u;n.addEventListener("mousedown",function(i){return u=i.pageY,n.classList.add("ss-grabbed"),t.body.classList.add("ss-grabbed"),t.addEventListener("mousemove",f),t.addEventListener("mouseup",e),!1})}function i(n){for(this.target=n,this.bar='<div class="ss-scroll">',this.wrapper=t.createElement("div"),this.wrapper.setAttribute("class","ss-wrapper"),this.el=t.createElement("div"),this.el.setAttribute("class","ss-content"),this.wrapper.appendChild(this.el);this.target.firstChild;)this.el.appendChild(this.target.firstChild);this.target.appendChild(this.wrapper);this.target.insertAdjacentHTML("beforeend",this.bar);this.bar=this.target.lastChild;e(this.bar,this);this.moveBar();this.el.addEventListener("scroll",this.moveBar.bind(this));this.el.addEventListener("mouseenter",this.moveBar.bind(this));this.target.classList.add("ss-container")}function f(){for(var i=t.querySelectorAll("*[ss-container]"),n=0;n<i.length;n++)u(i[n])}var r=n.requestAnimationFrame||n.setImmediate||function(n){return setTimeout(n,0)};i.prototype={moveBar:function(){var t=this.el.scrollHeight,i=this.el.clientHeight,n=this;this.scrollRatio=i/t;r(function(){n.bar.style.cssText="height:"+i/t*100+"%; top:"+n.el.scrollTop/t*100+"%;right:-"+(n.target.clientWidth-n.bar.clientWidth-20)+"px;"})}};t.addEventListener("DOMContentLoaded",f);i.initEl=u;i.initAll=f;n.SimpleScrollbar=i})(window,document);
/* Init */
var el = document.querySelector('.inner-dialog');
SimpleScrollbar.initEl(el);
</script>
</body></html>