-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
34 lines (31 loc) · 1.15 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
<!DOCTYPE html>
<html lang="ne">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HomePage</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Mukta:wght@400;500;700&display=swap">
<link rel="stylesheet" href="style.css">
<script src="bundle.js" defer></script>
</head>
<body>
<span class="date" id="date"></span>
<form action="https://www.google.com/search" method="get" class="search" onsubmit="return validateForm()">
<input class="search-field" id="searchField" type="text" name="q" autocomplete="off" autofocus
placeholder="Google Search">
<input class="search-button" type="submit" value="Search">
</form>
<div class="developer-credit">By <a href="https://github.com/2shrestha22/start-page" target="_blank">Sangam
Shrestha</a>
</div>
<script>
function validateForm() {
const input = document.getElementById('searchField');
if (input.value.trim() === '') {
return false;
}
return true;
}
</script>
</body>
</html>