-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
349 lines (282 loc) · 12.5 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
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="style/main.css"/>
<link rel="stylesheet" href="style/ripple.css"/>
<link rel="stylesheet" href="style/ink.css"/>
<link rel="stylesheet" href="style/input.css"/>
<link rel="stylesheet" href="style/checkbox.css"/>
<link rel="stylesheet" href="style/alert.css"/>
<link rel="stylesheet" href="style/shadow.css"/>
<link rel="stylesheet" href="style/notification.css"/>
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/velocity/velocity.min.js"></script>
<script src="js/a_main.js"></script>
<script src="js/ink.js"></script>
<script src="js/input.js"></script>
<script src="js/icon.js"></script>
<script src="js/checkbox.js"></script>
<script src="js/tools.js"></script>
<!--
<link rel="stylesheet" href="dist/material.min.css"/>
<script src="dist/material.min.js"></script>-->
<script>
$(function () {
materialFramework.init();
})
function addElement() {
$('body').append('<input type="text" class="material-input" placeholder="navn" style="width: 200px;"/>')
}
var icons =
[
"plus",
"close",
"check",
"menu",
"arrow_back",
"arrow_forward"
];
function toggle() {
$("#icon").attr("data-icon", icons[Math.floor(Math.random() * icons.length)])
}
</script>
<style>
body {
font-family: 'Roboto', sans-serif;
background: #ECECEC;
}
button {
padding: 10px;
margin: 15px;
}
.red .bar .left,
.red .bar .right,
.red .input.focused.down, .red .input.focused .highlight-bar {
background-color: #d13f31 !important;
}
.red .input.focused.up label {
color: #d13f31 !important;
}
.green_ink .material-ink_e {
background-color: rgba(77, 212, 79, .5) !important;
}
.blue_ink .material-ink_e {
background-color: rgba(66, 132, 242, 1) !important;
}
textarea {
box-sizing: border-box;
}
</style>
</head>
<body>
<div class="frame" style="margin: 10px;">
<button onclick="materialFramework.setAutoupdate(true)">enable autoupdate</button>
<button onclick="materialFramework.setAutoupdate(false)">disable autoupdate</button>
<h2>Autocomplete test</h2>
<!-- test of autocompleat -->
<form action="http://posttestserver.com/post.php" method="post">
<h4>Non floating label</h4>
<input type="text" maxlength="50" class="material-input material-input_no_float" placeholder="Navn" name="u"
data-material-validation-group="te" data-material-regexp="[0-5]"
data-material-error="Mathger ikke talet"/>
<h4>Floating label</h4>
<input type="password" class="material-input" placeholder="Navn" name="p"
data-material-validation-group="te" data-material-regexp="[a-z]"
data-material-error="Mathger ikke talet"/>
<div style="clear: both">
<button class=" material-ripple material-ink material-button "> Submit</button>
</div>
</form>
<h3>Link and button</h3>
<a href="#test">
<button class="material-button">
Test
</button>
</a>
<h2>Icons</h2>
<h4>Round ink and animated icon</h4>
<!-- icon test -->
<div class=" material-ink material-ink-round material-ripple "
style=" width: 40px; height: 40px; border-radius: 100px; background-color: #db4437 "
data-material-ink-color="#ffffff"
onclick="toggle()"
>
<div id="icon" class="material-icon" data-icon="plus"
style="stroke-width: 2px; stroke: #fff;height: 22px;width: 22px; margin: 9px"></div>
</div>
<div class=" material-ink material-ink-round " style="height: 42px;width: 42px; padding: 5px;">
<div class=" material-ink material-ink-round material-icon" data-icon="check"
style="stroke-width: 2px; stroke: #000;height: 22px;width: 22px; margin: 9px"></div>
</div>
<div class="material-icon" data-icon="menu"
style="stroke-width: 2px; stroke: #000;height: 22px;width: 22px; margin: 9px"></div>
<div class="material-icon" data-icon="arrow_back"
style="stroke-width: 2px; stroke: #000;height: 22px;width: 22px; margin: 9px"></div>
<div class="material-icon" data-icon="arrow_forward"
style="stroke-width: 2px; stroke: #000;height: 22px;width: 22px; margin: 9px"></div>
<div class="material-icon" data-icon="close"
style="stroke-width: 2px; stroke: #000;height: 22px;width: 22px; margin: 9px"></div>
<h2>New material elements will automaticly be initialisied</h2>
<button onclick="
addElement()
" class=" material-ripple material-ink material-button "
style=" border-radius: 2px; background-color: #d13f31; color: #ffffff;">
Add element to dom
</button>
<h2>Tools to the libery</h2>
<!-- alert -->
<button class=" material-ink material-button blue_ink"
style="background-color: transparent; border-radius: 2px"
onclick="materialFramework.tools.alert('Alert box', 'More text if needed', 'Close')"
>
Alert
</button>
<!-- alert -->
<button class=" material-ink material-button blue_ink"
style="background-color: transparent; border-radius: 2px"
onclick="materialFramework.tools.confirm('Confirm box', 'Are you sure', 'Yes', 'No', function(a){alert('Pressed yes')}, function(a){alert('Pressed no')})"
>
Confirm
</button>
<button class=" material-ink material-button blue_ink"
style="background-color: transparent; border-radius: 2px"
onclick='materialFramework.tools.prompt("You´r name", "Skriv dit navn", "Gem", "Annuler",
function(v){alert(v); return false}, function(){alert("luk")}, "Navn", "Default text", ".","Dit navn")'>
Prompt
</button>
<button class=" material-ink material-button blue_ink"
style="background-color: transparent; border-radius: 2px"
onclick='materialFramework.tools.prompt("You´r name", "", "Gem", "Annuler",
function(v){alert(v)}, function(){alert("luk")}, "Navn")'>
Prompt no validation
</button>
<button class=" material-ink material-button blue_ink"
style="background-color: transparent; border-radius: 2px"
onclick='materialFramework.tools.prompt_form("Sign up", "We need som infomations", "Sign up", "Annuler",
function(v){alert(v)}, function(){alert("luk")}, [
{
regexp: ".",
error_msg: "Email required",
placeholder: "Email"
},
{
type: "password",
regexp: ".",
error_msg: "Password required",
placeholder: "Password"
}
])'>
Prompt form
</button>
<!-- custom -->
<button class=" material-ink material-button blue_ink"
style="background-color: transparent; border-radius: 2px"
onclick=" materialFramework.tools.custom('hej med jer børn').bindEsc()"
>
Custom
</button>
<!-- Notification -->
<button class=" material-ink material-button blue_ink"
style="background-color: transparent; border-radius: 2px"
onclick="materialFramework.tools.new_notification({text:'test'})"
>
Notification
</button>
<button class=" material-ink material-button blue_ink"
style="background-color: transparent; border-radius: 2px"
onclick="materialFramework.tools.new_notification({text:'test', time:10000, actiontext:'fortryd', action:function(){ console.log('hej') }})"
>
Notification med action
</button>
<button class=" material-ink material-button blue_ink"
style="background-color: transparent; border-radius: 2px"
onclick="materialFramework.tools.new_notification({text:'test', time:10000, actiontext:'fortryd', action:function(){ console.log('hej') }, actiontextcolor:'#69207A'})"
>
Notification med action i lilla
</button>
<h2>Ink effect</h2>
<h4>Normal speed</h4>
<div class=" material-ink material-ripple" style="width: 250px; height: 156px; border-radius: 2px"
data-material-ink-color="#ffffff">
<img
src="http://www.gokqsw.com/images/pic-of-nature/pic-of-nature-6.jpg"
width="250"
/>
</div>
<h4>Slow</h4>
<div class=" material-ink material-ripple"
style="width: 250px; height: 156px; border-radius: 2px">
<img
src="http://www.gokqsw.com/images/pic-of-nature/pic-of-nature-6.jpg"
width="250"
/>
</div>
<h4>Even more slow</h4>
<div class=" material-ink material-ripple material-ink_slower"
style="width: 250px; height: 156px; border-radius: 2px">
<img
src="http://www.gokqsw.com/images/pic-of-nature/pic-of-nature-6.jpg"
width="250"
/>
</div>
<h4>Green ink</h4>
<div class=" material-ink material-ripple material-ink_slowest green_ink"
style="width: 250px; height: 156px; border-radius: 2px">
<img
src="http://www.gokqsw.com/images/pic-of-nature/pic-of-nature-6.jpg"
width="250"
/>
</div>
<h2>Inputs</h2>
<h4>Plain inputbox (floating label is dafalt)</h4>
<input type="text" class="material-input" placeholder="Navn" style="width: 50px;"/>
<button onclick="$(this).prev().find('input').val('test').change()">Set text</button>
<h4>Fill half of the screen</h4>
<input type="text" class="material-input" placeholder="Navn" data-material-width-percent="50"/>
<h4>Full with within a div with max-with</h4>
<div style="width: 100%; max-width: 500px">
<input type="text" class="material-input material-input_no_float" placeholder="Navn"
data-material-width-percent="100"/>
</div>
<h4>Disabled input feild</h4>
<input type="text" class="material-input material-input_no_float" placeholder="Navn" disabled
style="width: 200px;"/>
<h4>Red styled input feild</h4>
<div class="red">
<input type="text" class="material-input" placeholder="Navn" style="width: 200px;"/>
</div>
<h2>Checkboxes</h2>
<input type="checkbox" class="material-checkbox"/>
<input type="checkbox" class="material-checkbox" checked/>
<input type="checkbox" class="material-checkbox" disabled/>
<input type="checkbox" class="material-checkbox" checked disabled/>
<h2>Textareas</h2>
<h4>Plain textarea</h4>
<textarea class="material-input" placeholder="test" rows="3"></textarea>
<h4>Fill half of the screen</h4>
<textarea class="material-input" placeholder="test" data-material-width-percent="50"></textarea>
<h4>Textarea with auto grow and min height</h4>
<textarea class="material-input material-autosize" placeholder="test" data-material-min-height="100"></textarea>
<h4>Textarea with auto grow without min height</h4>
<textarea class="material-input material-autosize" placeholder="test" rows="3"></textarea>
<h2>Radio buttons</h2>
<input type="radio" class="material-radio" name="rew">
<input type="radio" class="material-radio" name="rew" disabled checked>
<input type="radio" class="material-radio" name="rew" disabled>
<input type="radio" class="material-radio" name="rdsdfvcs" checked>
<input type="radio" class="material-radio" name="rdsdfvcs">
<input type="radio" class="material-radio" name="rdsdfvcs">
<div class="material-notification" data-material-place="2">
<div class="material-notification-stripe material-notification-stripe-visible ">
<div class="material-notification-stripe-inner">Notification on load</div>
</div>
<div class="material-notification-stripe material-notification-stripe-visible " data-material-duration="5000">
<div class="material-notification-stripe-inner">Notification on load for 5 sec</div>
</div>
</div>
</div>
</body>
</html>