-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
92 lines (82 loc) · 2.36 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>NotificationJS example</title>
<style>
* {
margin: 0;
padding: 0;
}
body {
background: #242424;
width: 100%;
height: 100%;
color: #f39c12;
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
}
h1,
.buttons {
max-width: 800px;
margin: 25px auto;
}
.buttons {
display: flex;
flex-wrap: wrap;
border: none;
}
.buttons button {
margin-right: 50px;
background: #c0c0c0;
box-shadow: 0;
color: #111;
padding: 10px 15px;
border-radius: 4px;
font-weight: bold;
cursor: pointer;
}
.close-icon div:nth-child(2) {
transform: rotate(-45deg);
}
</style>
<link rel="stylesheet" href="examples/main.css">
</head>
<body>
<div class="close-icon">
<div></div>
<div></div>
</div>
<h1>Example of NotificationJS</h1>
<div class="buttons">
<button onClick="showInfoNotification()" class="info">INFO</button>
<button onClick="showOkNotification()" class="ok">OK</button>
<button onClick="showErrorNotification()" class="error">ERROR</button>
</div>
<script src="notificationJS.js"></script>
<script>
showInfoNotification = function () {
new NotificationJS({
"title": "This is just info",
"status": "info",
"description": "Small description about the notification",
})
}
showOkNotification = function () {
new NotificationJS({
"title": "Everything is OK!!!",
"status": "ok",
"description": "NotificationJS is awesome",
})
}
showErrorNotification = function () {
new NotificationJS({
"title": "Oh no :(",
"status": "error",
"description": "Something went wrong"
})
}
</script>
</body>
</html>