-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
73 lines (69 loc) · 2.52 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Modern Notifications</title>
<link href="https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Lexend', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
background: #1a1a1a;
color: white;
padding: 20px;
margin: 0;
min-height: 100vh;
}
button {
font-family: 'Lexend', sans-serif;
background: rgba(255, 255, 255, 0.1);
color: white;
border: none;
padding: 12px 24px;
border-radius: 12px;
cursor: pointer;
margin: 5px;
transition: all 0.2s;
font-size: 14px;
border: 1px solid rgba(255, 255, 255, 0.1);
}
</style>
</head>
<body>
<h1>Modern Notification Demo</h1>
<p>Click buttons to test notifications. Try dragging notifications to dismiss them!</p>
<form id="notificationForm">
<input type="text" name="title" placeholder="Title" required />
<input type="text" name="message" placeholder="Message" required />
<input type="text" name="icon" placeholder="Icon URL" />
<input type="text" name="time" placeholder="Time" />
<input type="number" name="delay" placeholder="Delay (ms)" />
<select name="theme">
<option value="dark">Dark</option>
<option value="light">Light</option>
</select>
<input type="number" name="duration" placeholder="Duration (ms)" />
<select name="imageShape">
<option value="circle">Circle</option>
<option value="square">Square</option>
</select>
<button type="submit">Show Notification</button>
</form>
<script>
document.getElementById('notificationForm').addEventListener('submit', function(e) {
e.preventDefault();
const form = e.target;
showPopup(
form.title.value,
form.message.value,
form.icon.value,
form.time.value,
parseInt(form.delay.value) || 0,
form.theme.value,
parseInt(form.duration.value),
form.imageShape.value
);
});
</script>
<script src="script.js"></script>
</body>