forked from Shailu4u/KnockoutJS-Toaster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
53 lines (49 loc) · 2.3 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
<!DOCTYPE html>
<html>
<head>
<title>KnockoutJS Toaster</title>
<link href="css/page.css" rel="stylesheet" />
<link href="css/toaster.css" rel="stylesheet" />
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid" style="text-align: center">
<h1>Knockout JS Toaster</h1>
</div>
</nav>
<!-- toast container custom element, add this to your index page / default template -->
<toast-container params='
timeout: 4000,
showClose: false,
pushTo: "top",
limit: 6,
toasts: toaster.toasts'> <!-- supply toasts from toaster to custom element must required -->
</toast-container>
<div class="container-fluid">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div style="margin-left:auto;margin-right:auto;margin-top:100px;width:200px">
<button class="btn btn-primary" data-bind="click:displayStandardToasts">Standard Toasts (timout 7sec)</button>
<br /><br />
<button class="btn btn-primary" data-bind="click:displayLoading">Loading Toasts</button>
<br /><br />
<button class="btn btn-primary" data-bind="click:displayLongToasts">Long Toasts (timout 25sec)</button>
<br /><br />
<button class="btn btn-info" data-bind="click:displayInfo">Info Toasts</button>
<br /><br />
<button class="btn btn-warning" data-bind="click:displayWarning">Warning Toasts</button>
<br /><br />
<button class="btn btn-danger" data-bind="click:displayError">Error Toasts</button>
<br /><br />
<button class="btn btn-success" data-bind="click:displaySuccess">Success Toasts</button>
<br /><br />
<button class="btn btn-default" data-bind="click:clear">Clear All Toasts</button>
</div>
</div>
</div>
</div>
<script src="lib/knockout-3.2.0.js"></script>
<script src="src/toaster.js"></script><!--Toaster plugin-->
<script src="src/toastVM.js"></script><!--This page view model-->
</body>
</html>