-
-
Notifications
You must be signed in to change notification settings - Fork 170
/
index.html
executable file
·214 lines (197 loc) · 7.37 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
<!DOCTYPE html5>
<html>
<head>
<title>overhang.js Demo</title>
<meta charset="UTF-8" />
<meta name="author" content="Paul Krishnamurthy" />
<link rel="icon" href="demo/logo.ico" />
<link rel="stylesheet" type="text/css" href="demo/style/index.css" />
<link rel="stylesheet" type="text/css" href="dist/overhang.min.css" />
<link rel="stylesheet" type="text/css" href="demo/style/prism.css" />
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" />
<script type="text/javascript" src="//code.jquery.com/jquery-1.12.0.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
<script type="text/javascript" src="dist/overhang.min.js"></script>
<script type="text/javascript" src="demo/js/prism.js"></script>
<script type="text/javascript" src="demo/js/index.js"></script>
</head>
<body>
<div class="aligned-box">
<img src="logo.png" class="logo" />
<p class="descrip">A JQuery plugin to display sleek, instant notifications, confirmations or prompts inside a given element.</p>
<div align="center" id="Github">
<iframe src="https://ghbtns.com/github-btn.html?user=paulkr&repo=overhang.js&type=star&count=true&size=large" frameborder="0" scrolling="0" width="160px" height="30px" style="padding-left: 10px;"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=paulkr&type=follow&count=true&size=large" frameborder="0" scrolling="0" width="220px" height="30px" style="margin-right: 40px;"></iframe>
<iframe src="https://ghbtns.com/github-btn.html?user=paulkr&repo=overhang.js&type=fork&count=true&size=large" frameborder="0" scrolling="0" width="128px" height="30px"></iframe>
</div>
<button class="try-button sample">Try me</button>
<div id="Examples">
<div class="example--left">
<div class="code-info">
<p class="type">Success Message</p>
<button class="try-button example--1">Try me</button>
</div>
<div class="code-example">
<pre style="width: 290px"><code class="language-javascript">
$("body").overhang({
type: "success",
message: "Woohoo! Our message works!"
});
</code></pre>
</div>
</div>
<div class="example--right">
<div class="code-example">
<pre style="width: 370px"><code class="language-javascript">
$("body").overhang({
type: "error",
message: "Whoops! Something went wrong!",
closeConfirm: true
});
</code></pre>
</div>
<div class="code-info">
<p class="type">Closable Message</p>
<button class="try-button example--2">Try me</button>
</div>
</div>
<div class="example--left">
<div class="code-info">
<p class="type">Timed Message</p>
<button class="try-button example--3">Try me</button>
</div>
<div class="code-example">
<pre style="width: 350px"><code class="language-javascript">
$("body").overhang({
type: "info",
message: "⏲️ I will close in 5 seconds!",
duration: 5,
upper: true
});
</code></pre>
</div>
</div>
<div class="example--right">
<div class="code-example">
<pre style="width: 367px"><code class="language-javascript">
$("body").overhang({
type: "warn",
message: "A user has reported you!",
duration: 3,
overlay: true
});
</code></pre>
</div>
<div class="code-info">
<p class="type">Dim Overlay Screen</p>
<button class="try-button example--4">Try me</button>
</div>
</div>
<div class="example--left">
<div class="code-info">
<p class="type">Prompt Alert</p>
<button class="try-button example--5">Try me</button><br />
<button class="try-button example--6">View</button>
</div>
<div class="code-example">
<pre style="width: 290px"><code class="language-javascript">
$("body").overhang({
type: "prompt",
message: "What's your name?",
overlay: true
});
</code></pre>
</div>
</div>
<div class="example--right">
<div class="code-example">
<pre style="width: 270px"><code class="language-javascript">
$("body").overhang({
type: "confirm",
message: "Are you sure?",
overlay: true
});
</code></pre>
</div>
<div class="code-info">
<p class="type">Confirmation Alert</p>
<button class="try-button example--7">Try me</button><br />
<button class="try-button example--8">View</button>
</div>
</div>
<div class="example--left">
<div class="code-info">
<p class="type">Customized Alert</p>
<button class="try-button example--9">Try me</button>
</div>
<div class="code-example" style="margin-bottom: 30px;">
<pre style="width: 350px"><code class="language-javascript">
$("body").overhang({
custom: true,
textColor: "#2D3436",
primary: "#F06292",
accent: "#FF7675",
message: "This is my custom message 😜",
closeConfirm: true,
customClasses: "overhang-overrides"
});
</code></pre>
</div>
</div>
<div class="example--right">
<div class="code-example">
<pre style="width: 350px"><code class="language-javascript">
$("body").overhang({
type: "confirm",
primary: "#40D47E",
accent: "#27AE60",
yesColor: "#3498DB",
message: "Do you want to continue?",
overlay: true,
callback: function (value) {
var response = value ? "Yes" : "No";
alert("You made your selection of: " + response);
}
});
</code></pre>
</div>
<div class="code-info">
<p class="type">Using callbacks</p>
<button class="try-button example--10">Try me</button><br />
</div>
</div>
<div class="example--left">
<div class="code-info">
<p class="type">Using HTML</p>
<button class="try-button example--11">Try me</button>
</div>
<div class="code-example" style="margin-bottom: 30px;">
<pre style="width: 350px"><code class="language-javascript">
var instagramIcon = '<i class="fa fa-instagram" style="color: #FFFC00" aria-hidden="true"></i>';
var instagramNote = ' Add National Geographic on instagram!';
$("body").overhang({
type: "confirm",
primary: "#9b59b6",
accent: "#8e44ad",
message: instagramIcon + instagramNote,
custom: true,
html: true,
overlay: true,
overlayColor: "#1abc9c",
callback: function (value) {
if (value) {
window.location.href = "https://www.instagram.com/natgeo/";
} else {
alert("Maybe next time then...");
}
}
});
</code></pre>
</div>
</div>
</div>
</div>
<footer><p>© 2016 - <span class="year"></span> <a href="https://paulkr.com" target="_blank">Paul Krishnamurthy</a></footer>
<a href="https://github.com/paulkr/overhang.js"><img id="GithubBanner" style="position: absolute; top: 0; right: 0; border: 0; z-index: 100000" src="https://camo.githubusercontent.com/52760788cde945287fbb584134c4cbc2bc36f904/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f77686974655f6666666666662e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_white_ffffff.png"></a>
</body>
</html>