-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
102 lines (92 loc) · 2.73 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Cosmic Web Search Engine</title>
<style>
/* Video background styling */
.video-background {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
z-index: -1;
}
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
background-color: #000; /* Fallback color for unsupported browsers */
color: white;
overflow: hidden;
}
.search-container {
text-align: center;
background-color: rgba(255, 255, 255, 0.9);
padding: 50px;
border-radius: 10px;
box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
z-index: 1;
}
input[type="text"] {
width: 300px;
padding: 10px;
font-size: 18px;
border-radius: 5px;
border: 1px solid #ccc;
margin-bottom: 10px;
}
input[type="submit"] {
padding: 10px 20px;
font-size: 18px;
border-radius: 5px;
border: none;
background-color: #4CAF50;
color: white;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
}
h1 {
margin-bottom: 20px;
color: #333;
}
</style>
<script>
function performSearch(event) {
event.preventDefault();
const query = document.getElementById('searchQuery').value;
if (query.trim() === '') {
alert('Please enter a search query.');
return;
}
window.location.href = `https://duckduckgo.com/?q=${encodeURIComponent(query)}`;
}
</script>
</head>
<body>
<!-- Video background element -->
<video autoplay loop muted class="video-background">
<source src="background.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
<!-- Search Container -->
<div class="search-container">
<h1>Cosmic Web Search</h1>
<form onsubmit="performSearch(event)">
<input type="text" id="searchQuery" name="q" placeholder="Search the web..." required>
<br>
<input type="submit" value="Search">
</form>
</div>
</body>
</html>