-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
329 lines (290 loc) · 11.6 KB
/
index.html
File metadata and controls
329 lines (290 loc) · 11.6 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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Secure Web Solutions</title>
<!-- Manifest for app-like behavior -->
<link rel="manifest" href="/manifest.json">
<link rel="icon" href="image.png" type="image/png">
<meta name="theme-color" content="#0a192f">
<!-- Style tag or external stylesheet -->
<style>
:root {
--bg-light: #f4f4f4;
--text-light: #111;
--bg-dark: #111;
--text-dark: #eee;
--accent: gold;
}
body {
font-family: 'Arial', sans-serif;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
min-height: 100vh;
transition: background 0.3s, color 0.3s;
}
header, footer {
background: linear-gradient(to right, #444, #111);
color: var(--accent);
text-align: center;
padding: 20px;
}
.container {
width: 90%;
max-width: 800px;
margin: 20px auto;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0,0,0,0.2);
}
.service, .service-option {
background: #333;
border: 1px solid #555;
padding: 15px;
border-radius: 8px;
margin-bottom: 10px;
cursor: pointer;
transition: 0.3s;
}
.service-option:hover {
background: #444;
transform: scale(1.02);
}
.service-option.selected {
background: #28a745;
}
input, textarea {
width: 100%;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
}
button {
background: linear-gradient(to right, #d4af37, #ffd700);
color: #111;
padding: 12px 20px;
border: none;
border-radius: 8px;
cursor: pointer;
font-weight: bold;
}
.thank-you {
color: var(--accent);
text-align: center;
font-size: 1.2em;
}
a.privacy-link {
color: #aaa;
text-decoration: underline;
font-size: 0.9em;
display: block;
text-align: center;
margin-top: 10px;
}
/* Theme toggler */
@media (max-width: 768px) {
body {
background: var(--bg-dark);
color: var(--text-dark);
}
.container, .service, .service-option {
background: #222;
}
}
@media (min-width: 769px) {
body {
background: var(--bg-light);
color: var(--text-light);
}
.container, .service, .service-option {
background: #fff;
}
}
.idea-box {
background: #333;
border: 1px solid #555;
padding: 20px;
border-radius: 8px;
margin-top: 20px;
color: white;
}
.idea-input {
width: 100%;
padding: 10px;
margin-top: 10px;
border: 1px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
}
</style>
</head>
<body>
<header>
<h1>Secure Web Solutions</h1>
<p>Building Trust, One Website at a Time</p>
</header>
<div class="container">
<h2>Our Services</h2>
<div class="service">Web Development (HTML, CSS, JS)</div>
<div class="service">Domain & Hosting Setup</div>
<div class="service">Custom Code & App Logic</div>
<div class="service">Maintenance & Tech Support</div>
<div class="contact-us">
<h2>Request Services</h2>
<p>Choose services to customize your request:</p>
<div class="service-selector">
<div class="service-option" data-service="htmlcss">HTML + CSS</div>
<div class="service-option" data-service="javascript">JavaScript</div>
<div class="service-option" data-service="webapp">Web App</div>
<div class="service-option" data-service="domain">Domain & Hosting</div>
</div>
<div id="questionFlow" style="display:none;"></div>
<form id="dynamicForm" action="https://formspree.io/f/mjkylvla" method="POST" style="display:none;">
<input type="hidden" name="selectedServices" id="selectedServices">
<div id="formFields"></div>
<label for="extraMessage">Other questions or comments:</label>
<textarea name="extraMessage" id="extraMessage"></textarea>
<label for="name">Your Name:</label>
<input type="text" name="name" required>
<label for="email">Your Email:</label>
<input type="email" name="email" required>
<button type="submit">Submit Request</button>
</form>
<div class="thank-you" style="display:none;">Thanks! We'll get back to you shortly.</div>
</div>
<div class="idea-box">
<h3>New to all this? Don't know where to start?</h3>
<p>Please let us know your vision. Share your ideas with us, and we'll help bring them to life.</p>
<textarea id="ideaInput" class="idea-input" placeholder="Enter your ideas here..."></textarea>
<button id="ideaSubmit">Submit Idea</button>
</div>
<a class="privacy-link" href="#" onclick="alert(policy); return false;">Privacy Policy</a>
</div>
<footer>
© 2025 Secure Web Solutions
</footer>
<script>
const form = document.getElementById('dynamicForm');
const questionFlow = document.getElementById('questionFlow');
const thankYou = document.querySelector('.thank-you');
const selectedServices = [];
const serviceOptions = document.querySelectorAll('.service-option');
const formFields = document.getElementById('formFields');
const policy = `Secure Web Solutions Privacy Policy:\n\nWe do not collect personal data beyond what is necessary to fulfill your service request. All information submitted through our form is securely processed via Formspree. We do not share your information with third parties.\n\nYou can contact us anytime to request data deletion or for privacy inquiries.`;
serviceOptions.forEach(option => {
option.addEventListener('click', () => {
const service = option.dataset.service;
// Unselect other options
serviceOptions.forEach(otherOption => {
if (otherOption !== option) {
otherOption.classList.remove('selected');
const index = selectedServices.indexOf(otherOption.dataset.service);
if (index > -1) {
selectedServices.splice(index, 1);
}
}
});
// Toggle current option
if (!selectedServices.includes(service)) {
selectedServices.push(service);
option.classList.add('selected');
} else {
const index = selectedServices.indexOf(service);
selectedServices.splice(index, 1);
option.classList.remove('selected');
}
document.getElementById('selectedServices').value = selectedServices.join(', ');
questionFlow.innerHTML = generateQuestions(service);
questionFlow.style.display = 'block';
form.style.display = 'block';
});
});
function generateQuestions(service) {
if (service === 'htmlcss') {
return `
<label>Preferred color theme?</label>
<input type="text" name="htmlcss_theme" required>
<label>Do you need responsive design?</label>
<input type="text" name="htmlcss_responsive" required>
`;
} else if (service === 'javascript') {
return `
<label>What kind of functions or logic?</label>
<textarea name="js_features" required></textarea>
`;
} else if (service === 'webapp') {
return `
<label>App purpose & features:</label>
<textarea name="webapp_details" required></textarea>
`;
} else if (service === 'domain') {
return `
<label>Do you want a domain?</label>
<input type="text" name="need_domain" required>
<label>If yes, what's the preferred domain name?</label>
<input type="text" name="domain_name">
`;
} else {
return '';
}
}
form.addEventListener('submit', (e) => {
e.preventDefault(); // Prevent default so we can send via fetch
const formData = new FormData(form);
fetch(form.action, {
method: 'POST',
body: formData,
headers: {
'Accept': 'application/json'
}
}).then(response => {
if (response.ok) {
form.style.display = 'none';
thankYou.style.display = 'block';
form.reset();
setTimeout(() => {
thankYou.style.display = 'none';
form.style.display = 'block';
}, 5000);
} else {
alert("Oops! Something went wrong. Please try again.");
}
}).catch(error => {
alert("Error sending form. Try again later.");
console.error(error);
});
});
document.getElementById('ideaSubmit').addEventListener('click', () => {
const idea = document.getElementById('ideaInput').value;
if (!idea) {
alert("Please enter your idea before submitting.");
return;
}
const ideaForm = new FormData();
ideaForm.append('idea', idea);
fetch("https://formspree.io/f/mjkylvla", {
method: 'POST',
body: ideaForm,
headers: {
'Accept': 'application/json'
}
}).then(response => {
if (response.ok) {
alert("Idea submitted successfully!");
document.getElementById('ideaInput').value = ''; // Clear the input
} else {
alert("Oops! Something went wrong submitting your idea. Please try again.");
}
}).catch(error => {
alert("Error submitting idea. Try again later.");
console.error(error);
});
});
</script>
</body>
</html>