-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
142 lines (122 loc) · 5.33 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
<!DOCTYPE html>
<html>
<head>
<title>bil-notification</title>
<script src="js/bil.notification.js"></script>
<link rel="stylesheet" href="css/bil.notification.css">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- <style type="text/css">
html{
font-family: calibri, sans-serif;
}
.btn {
border: none; /* Remove borders */
color: white; /* Add a text color */
padding: 6px 12px; /* Add some padding */
cursor: pointer; /* Add a pointer cursor on mouse-over */
margin: 10px 0px;
outline: none;
border-radius: 4px;
line-height: 1.42857143;
}
.btn-success {border: 1px solid #398439;background-color: #449d44;} /* Green */
.btn-success:hover {background-color: #3d8f3d;}
.btn-success:active {background-color: #367d36;}
.btn-info {border: 1px solid #46b8da; background-color: #5bc0de;} /* Blue */
.btn-info:hover {background: #31b0d5;}
.btn-info:active {background: #279bbe;}
.btn-warning {border: 1px solid #d58512; background-color: #ec971f;} /* Orange */
.btn-warning:hover {background: #e68a00;}
.btn-warning:active {background: #cc7a00;}
.btn-danger {border: 1px solid #ac2925; background-color: #f44336;} /* Red */
.btn-danger:hover {background: #da190b;}
.btn-danger:active {background: #c2160a;}
.btn-default {border: 1px solid #adadad; background-color: #fff; color: black;} /* Gray */
.btn-default:hover {background: #ddd;}
.btn-default:active {background: #cccccc;}
h1.title{
text-align: center;
}
.form-input {
display: block;
width: 100%;
/*height: 34px;*/
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
color: #555;
background-color: #fff;
background-image: none;
border: 1px solid #ccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
-webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
font-family: inherit;
}
.form-input:focus {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}
hr {
border: 0;
height: 0;
border-top: 1px solid rgba(0, 0, 0, 0.1);
border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}
</style> -->
</head>
<body>
<div class="container">
<h1 class="text-center">Bil-Notification</h1>
<hr />
<div>
<b>Notification Title</b>
<input type="text" name="title" id="notificationTitle" class="form-control" style="width: 97%;" value="Title">
<br />
<b>Notification Message</b>
<br /><br />
<textarea id="notificationText" rows="4" class="form-control" style="width: 97%;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec id enim lacus. Aliquam hendrerit nisi in auctor dignissim. Quisque urna odio, laoreet sit amet diam a, rutrum egestas orci</textarea>
<div style="width: 25%; display: inline-block;">
<br />
<b>Notification Delay</b>
<br /><br />
<input id="delayTime" type="number" name="quantity" min="3000" max="500000" step="1000" class="form-control" style="width: 50%;" value="30000">
</div>
<div style="width: 25%; display: inline-block;">
<br />
<b>New On Top</b>
<br /><br />
<input id="onTop" type="checkbox" class="form-input" style="width: initial; display: initial; transform: scale(1.6, 1.6);" checked="true" onchange="toggleOnTop(this.checked)">
</div>
</div>
<br />
<button onclick="showNotification('success',document.getElementById('notificationTitle').value,document.getElementById('notificationText').value,document.getElementById('delayTime').value, onTop)" class="btn btn-success">
Show Success Notification
</button>
<button onclick="showNotification('danger',document.getElementById('notificationTitle').value,document.getElementById('notificationText').value,document.getElementById('delayTime').value, onTop)" class="btn btn-danger">
Show Danger Notification
</button>
<button onclick="showNotification('warning',document.getElementById('notificationTitle').value,document.getElementById('notificationText').value,document.getElementById('delayTime').value, onTop)" class="btn btn-warning">
Show Warning notification
</button>
<button onclick="showNotification('info',document.getElementById('notificationTitle').value,document.getElementById('notificationText').value,document.getElementById('delayTime').value, onTop)" class="btn btn-info">
Show Info Notification
</button>
<button onclick="clearNotifications()" class="btn btn-default">Clear All Notifications</button>
<br />
<button onclick="createSnackBar(document.getElementById('notificationText').value,document.getElementById('delayTime').value)" class="btn btn-default">Create Snackbar</button>
<script type="text/javascript">
var onTop = true;
function toggleOnTop(checkboxStatus) {
onTop = checkboxStatus;
}
</script>
</div>
</body>
</html>