forked from jaredreich/notie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
105 lines (83 loc) · 3.11 KB
/
test.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name='viewport' content="width=device-width,initial-scale=1,maximum-scale=1">
<title>Notie Test Page</title>
<!-- Font -->
<link href='https://fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'>
<style>
body {
margin: 0;
padding: 0;
}
body {
font-family: 'Lato', sans-serif;
}
.div-ext {
height: 100vh;
width: 100%;
display: table;
text-align: center;
}
.div-int {
display: table-cell;
vertical-align: middle;
}
button {
cursor: pointer;
font-size: 16px;
border: 2px solid #d3d3d3;
border-radius: 5px;
background-color: transparent;
outline: 0;
margin-top: 4px;
}
</style>
</head>
<body>
<div class="div-ext">
<div class="div-int">
<span>Test notie with these buttons:</span>
<br>
<button onclick="success();">Success</button>
<button onclick="warning();">Warning</button>
<button onclick="error();">Error</button><br>
<button onclick="info();">Information</button>
<button onclick="confirm();">Confirm</button>
<button onclick="input();">Input</button>
<br>
<br>
<span>Official page:</span>
<br>
<a href="https://jaredreich.com/projects/notie.js" target="_blank">https://jaredreich.com/projects/notie</a>
</div>
</div>
<script>
function success() {
notie.alert(1, 'Success!', 2);
}
function warning() {
notie.alert(2, 'Warning<br><b>with</b><br><i>HTML</i><br><u>included.</u>', 2);
}
function error() {
notie.alert(3, 'Error.', 2);
}
function info() {
notie.alert(4, 'Information.', 2);
}
function confirm() {
notie.confirm('Are you sure you want to do that?<br><b>That\'s a bold move...</b>', 'Yes', 'Cancel', function() {
notie.alert(1, 'Good choice!', 2);
});
}
function input() {
notie.input('Please enter your email address:', 'Submit', 'Cancel', 'email', '[email protected]', function(value_entered) {
notie.alert(1, 'You entered: ' + value_entered, 2);
});
}
</script>
<!-- JavaScript -->
<script src="notie.js"></script>
</body>
</html>