-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
212 lines (206 loc) · 6.54 KB
/
index.html
File metadata and controls
212 lines (206 loc) · 6.54 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
200
201
202
203
204
205
206
207
208
209
210
211
212
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Congratulations!</title>
<style>
body {
background-color: #121212;
color: #fff;
font-family: 'Arial', sans-serif;
margin: 0;
padding: 20px;
text-align: center;
}
/* Made by KahlubDev */
.container {
max-width: 1200px;
margin: 0 auto;
}
.top-section {
background-color: #1e1e1e;
padding: 30px;
border-radius: 15px;
margin-bottom: 40px;
box-shadow: 0 0 20px rgba(0, 255, 255, 0.2);
transition: all 1s ease;
}
.input-area {
margin-bottom: 20px;
opacity: 1;
transition: opacity 1s ease, height 1s ease;
}
.input-area.hidden {
opacity: 0;
height: 0;
margin: 0;
padding: 0;
overflow: hidden;
}
input[type="text"] {
padding: 12px;
width: 300px;
border-radius: 20px;
border: none;
margin-right: 10px;
font-size: 16px;
}
button {
padding: 12px 24px;
background-color: #00bfff;
color: white;
border: none;
border-radius: 20px;
cursor: pointer;
font-weight: bold;
transition: background 0.3s;
}
button:hover {
background-color: #0099cc;
}
#congrats-message {
font-size: 48px;
font-weight: bold;
color: cyan;
margin-top: 20px;
opacity: 0;
transform: translateY(20px);
transition: opacity 1.5s ease, transform 1.5s ease;
}
#congrats-message.visible {
opacity: 1;
transform: translateY(0);
}
.images-section {
display: flex;
justify-content: center;
gap: 30px;
flex-wrap: wrap;
}
.image-slot {
background-color: #2d2d2d;
padding: 20px;
border-radius: 15px;
border: 2px solid #444;
width: 320px;
box-shadow: 0 0 15px rgba(0, 255, 255, 0.1);
}
.image-slot input[type="file"] {
display: block;
margin: 20px auto 10px;
color: white;
}
.preview {
width: 300px;
height: 400px;
object-fit: cover;
border-radius: 10px;
opacity: 0;
transform: scale(0.5);
filter: brightness(1);
transition: filter 0.5s;
}
.preview.loaded {
opacity: 1;
transform: scale(1);
animation: hologramSpin 8s linear forwards;
}
.preview.loaded::after {
content: '';
position: absolute;
inset: 0;
border-radius: 10px;
box-shadow: 0 0 30px cyan;
pointer-events: none;
opacity: 0;
animation: glowPulse 2s infinite alternate 8s;
}
@keyframes hologramSpin {
0% {
transform: scale(0.5) rotate(0deg);
opacity: 0;
}
50% {
opacity: 1;
}
100% {
transform: scale(1) rotate(720deg); /* 2 full spins */
opacity: 1;
}
}
@keyframes glowPulse {
from { opacity: 0.4; }
to { opacity: 0.8; }
}
.preview:hover {
filter: brightness(1.3) drop-shadow(0 0 25px cyan);
}
.placeholder {
color: #aaa;
font-size: 18px;
margin: 150px 0;
}
</style>
<!--© KahlubDev-->
</head>
<body>
<div class="container">
<div class="top-section">
<div class="input-area" id="input-area">
<h2>Enter Your Name</h2>
<input type="text" id="name-input" placeholder="Your name here">
<button onclick="showCongrats()">Submit</button>
</div>
<div id="congrats-message"></div>
</div>
<div class="images-section">
<div class="image-slot">
<div class="placeholder">No image selected</div>
<img class="preview" id="preview1" alt="Preview 1">
<input type="file" accept="image/*" onchange="previewImage(this, 'preview1')">
</div>
<div class="image-slot">
<div class="placeholder">No image selected</div>
<img class="preview" id="preview2" alt="Preview 2">
<input type="file" accept="image/*" onchange="previewImage(this, 'preview2')">
</div>
<div class="image-slot">
<div class="placeholder">No image selected</div>
<img class="preview" id="preview3" alt="Preview 3">
<input type="file" accept="image/*" onchange="previewImage(this, 'preview3')">
</div>
</div>
</div>
<script>
function showCongrats() {
const name = document.getElementById('name-input').value.trim();
const message = document.getElementById('congrats-message');
const inputArea = document.getElementById('input-area');
if (name) {
message.textContent = `Congratulations ${name}!`;
message.classList.add('visible');
inputArea.classList.add('hidden'); // Hide input + button smoothly
} else {
message.textContent = 'Please enter a name!';
message.style.color = 'red';
message.classList.add('visible');
}
}
function previewImage(input, previewId) {
const file = input.files[0];
const preview = document.getElementById(previewId);
const placeholder = input.parentElement.querySelector('.placeholder');
if (file) {
const reader = new FileReader();
reader.onload = function(e) {
preview.src = e.target.result;
preview.classList.add('loaded');
placeholder.style.display = 'none';
}
reader.readAsDataURL(file);
}
}
</script>
</body>
</html>