Repository navigation
Expand file tree
/
Copy pathParcel Counter HTML.html
More file actions
199 lines (192 loc) · 6.27 KB
/
Copy pathParcel Counter HTML.html
File metadata and controls
199 lines (192 loc) · 6.27 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Royal Mail Parcel Organizer</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap');
html, body {
height: 100%;
margin: 0;
font-family: 'Inter', sans-serif;
background: #0b0b0b;
display: flex;
align-items: center;
justify-content: center;
color: white;
}
body::before {
content: "";
position: fixed;
top: -50%; left: -50%;
width: 200%; height: 200%;
background:
radial-gradient(ellipse at center, rgba(204,0,0,0.15) 0%, transparent 70%),
repeating-radial-gradient(circle at center, transparent 0 10px, rgba(204,0,0,0.03) 10px 20px);
filter: blur(40px);
z-index: 0;
}
body::after {
content: "";
position: fixed;
top: 0; left: 0;
width: 100%; height: 100%;
background:
linear-gradient(45deg, rgba(204,0,0,0.1) 0%, transparent 70%),
repeating-linear-gradient(135deg, transparent 0 30px, rgba(204,0,0,0.05) 30px 32px);
z-index: 0;
}
body > div {
position: relative;
background: linear-gradient(145deg, #1c1c1c, #121212);
padding: 2.5rem 3rem 3rem;
border-radius: 20px;
width: 420px;
text-align: center;
color: white;
box-shadow:
0 5px 15px rgba(204,0,0,0.3),
inset 0 0 8px rgba(204,0,0,0.1);
z-index: 1;
}
#logo img {
width: 110px;
margin-bottom: 1rem;
filter: drop-shadow(0 0 2px rgba(204,0,0,0.4));
}
h2 {
margin: 0 0 2rem 0;
color: white;
font-size: 2rem;
font-weight: 700;
text-shadow:
0 0 3px rgba(204,0,0,0.6);
}
.inputRow {
display: flex;
gap: 12px;
margin-bottom: 1.8rem;
justify-content: center;
}
label {
font-weight: 600;
color: white;
min-width: 140px;
text-align: right;
text-shadow: 0 0 2px rgba(204,0,0,0.5);
}
input[type="text"] {
flex: 1;
padding: 0.75rem 1rem;
font-size: 1.15rem;
background: #121212;
border: 2px solid #cc0000;
border-radius: 12px;
color: white;
box-shadow: inset 0 0 6px rgba(204,0,0,0.4);
transition: border-color 0.3s, box-shadow 0.3s;
font-family: 'JetBrains Mono', monospace;
letter-spacing: 0.04em;
}
input::placeholder {
color: #ffffff99;
}
input:focus {
border-color: #ff1a1a;
box-shadow: 0 0 10px #ff1a1acc, inset 0 0 8px #ff1a1aaa;
background: #1a0a0a;
color: #fff7d1;
outline: none;
}
button {
padding: 0 1.3rem;
background: linear-gradient(135deg, #cc0000, #990000);
color: white;
border: none;
border-radius: 14px;
font-size: 1.15rem;
font-weight: 700;
cursor: pointer;
box-shadow: 0 3px 12px rgba(204,0,0,0.6);
transition: background 0.3s, box-shadow 0.2s;
font-family: 'JetBrains Mono', monospace;
letter-spacing: 0.03em;
}
button:hover {
background: linear-gradient(135deg, #ff3333, #cc0000);
box-shadow: 0 5px 18px rgba(255,51,51,0.8);
}
button:active {
background: linear-gradient(135deg, #990000, #660000);
}
#numberList {
margin-bottom: 1.8rem;
font-weight: 600;
font-size: 1.25rem;
color: white;
min-height: 28px;
text-shadow: 0 0 3px rgba(204,0,0,0.4);
font-family: 'JetBrains Mono', monospace;
letter-spacing: 0.04em;
}
#missingNumbersBox {
background-color: rgba(204,0,0,0.12);
border: 2px solid #cc0000cc;
color: white;
border-radius: 18px;
padding: 16px;
min-height: 48px;
font-weight: 700;
font-size: 1.2rem;
text-shadow: none;
box-shadow: inset 0 0 10px rgba(204,0,0,0.4);
font-family: 'JetBrains Mono', monospace;
letter-spacing: 0.05em;
user-select: none;
}
</style>
</head>
<body>
<div>
<div id="logo">
<img src="https://img.favpng.com/4/3/11/royal-mail-delivery-logo-business-png-favpng-bPV0DNvCYzUfKxGhBkwz5eiUP.jpg" alt="Royal Mail Logo"/>
</div>
<h2>Parcel Organizer</h2>
<div class="inputRow" style="margin-bottom: 2.4rem;">
<label for="totalParcelsInput">Total parcels:</label>
<input id="totalParcelsInput" placeholder="Enter total number" type="text" inputmode="numeric" pattern="[0-9]*" />
</div>
<div class="inputRow" id="inputArea">
<input id="singleNumberInput" placeholder="Enter parcel number" type="text" inputmode="numeric" pattern="[0-9]*" />
<button onclick="addNumber()">Add</button>
</div>
<div id="numberList">Numbers added: None</div>
<div id="missingNumbersBox">Missing numbers: None!</div>
</div>
<script>
let numbers = [];
function addNumber() {
const total = parseInt(document.getElementById('totalParcelsInput').value, 10);
if (isNaN(total) || total < 1) { alert('Enter a valid total first.'); return; }
const numInput = document.getElementById('singleNumberInput');
const num = parseInt(numInput.value.trim(), 10);
if (isNaN(num) || num < 1) { alert('Enter a valid number.'); return; }
if (num > total) { alert(`Parcel number cannot exceed total (${total}).`); numInput.value=''; numInput.focus(); return; }
numbers.push(num);
numbers.sort((a,b)=>a-b);
numInput.value=''; numInput.focus();
updateDisplay(total);
}
function updateDisplay(total) {
const listDiv = document.getElementById('numberList');
listDiv.textContent = numbers.length ? 'Numbers added: ' + numbers.join(', ') : 'Numbers added: None';
const missing = [];
for (let m = 1; m <= total; m++) if (!numbers.includes(m)) missing.push(m);
document.getElementById('missingNumbersBox').textContent =
`Missing numbers: ${missing.length ? missing.join(', ') : 'None!'}`;
}
</script>
</body>
</html>