-
Notifications
You must be signed in to change notification settings - Fork 0
/
code.needapad.html
161 lines (139 loc) · 4.62 KB
/
code.needapad.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Request Sanitary Pads</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f4f4f4;
transition: background-color 0.5s ease-in-out;
}
.container {
max-width: 600px;
margin: 40px auto;
padding: 20px;
background-color: #fff;
border: 1px solid #ddd;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
transition: background-color 0.5s ease-in-out;
}
h2 {
text-align: center;
margin-bottom: 20px;
color: #333;
}
label {
display: block;
margin-bottom: 10px;
}
input, textarea, select {
width: 95%;
padding: 10px;
margin-bottom: 20px;
border: 1px solid #ddd;
border-radius: 5px;
}
input[type="number"] {
width: 50px;
}
button[type="submit"] {
background-color: #4CAF50;
color: #fff;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
}
button[type="submit"]:hover {
background-color: #45a049;
}
/* Night mode styles */
body.night-mode {
background-color: #000;
}
.container.night-mode {
background-color: #333;
border-color: #555;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
.night-mode h2, .night-mode label {
color: #fff;
}
.night-mode input, .night-mode textarea, .night-mode select {
border-color: #555;
color: #000;
background-color: #ebebeb;
}
.night-mode button[type="submit"] {
background-color: #17892c;
color: #000;
}
.night-mode button[type="submit"]:hover {
background-color: #31782b;
}
#night-mode-toggle {
position: fixed;
top: 20px;
right: 20px;
background-color: #2196F3;
color: #fff;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
display: flex;
align-items: center;
}
#night-mode-toggle:hover {
background-color: #1976D2;
}
</style>
</head>
<body>
<button id="night-mode-toggle" onclick="toggleNightMode()">🌙 <span></span></button>
<div class="container">
<h2>Request Sanitary Pads</h2>
<form>
<label for="name">Name:</label>
<input type="text" id="name" required>
<label for="address">Address:</label>
<textarea id="address" required></textarea>
<label for="email">Email:</label>
<input type="email" id="email">
<label for="phone">Phone Number:</label>
<input type="tel" id="phone">
<label for="pad-type">Type of Pad:</label>
<select id="pad-type" required>
<option value="">Select Pad Type</option>
<option value="Regular">Regular</option>
<option value="Large">Large</option>
<option value="Extra Large">Extra Large</option>
<option value="Night Time">Night Time</option>
</select>
<label for="num-pads">Number of Pads Needed:</label>
<input type="number" id="num-pads" min="1" required>
<a href="accepted.html">
<button type="submit">Request Pads</button>
</a>
</form>
</div>
<script>
function toggleNightMode() {
const body = document.body;
const toggleButton = document.getElementById('night-mode-toggle');
body.classList.toggle("night-mode");
document.querySelector(".container").classList.toggle("night-mode");
if (body.classList.contains("night-mode")) {
toggleButton.innerHTML = "☀️ <span></span>";
} else {
toggleButton.innerHTML = "🌙 <span></span>";
}
}
</script>
</body>
</html>