-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
136 lines (120 loc) · 4.63 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="css/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Google</title>
</head>
<body>
<header>
<nav>
<ul>
<li><a href="#">Gmail</a></li>
<li><a href="#">Images</a></li>
</ul>
<ul>
<li><a href="#">
<svg class="apps-icon" focusable="false" viewBox="0 0 24 24">
<path fill="#5f6368" ;
d="M6,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,20c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM6,20c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM6,14c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM12,14c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM16,6c0,1.1 0.9,2 2,2s2,-0.9 2,-2 -0.9,-2 -2,-2 -2,0.9 -2,2zM12,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,14c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM18,20c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2z">
</path>
</svg>
</a></li>
<li>
<a href="#">
<img src="assets/enes.jpg" alt="Profile Photo" class="avatar">
</a>
</li>
</ul>
</nav>
</header>
<section id="main">
<div class="container">
<div class="logo">
<img src="assets/logo.png" alt="Logo">
</div>
<div class="search-bar">
<input type="text" id="query">
</div>
<div class="buttons">
<button class="btn">Google Search</button>
<button class="btn" onclick="location.href = 'https://www.google.com/doodles'">I'm Feeling Lucky</button>
</div>
</div>
</section>
<footer>
<p class="location">Turkey</p>
<nav>
<ul>
<li>
<a href="https://about.google/?utm_source=google-TR&utm_medium=referral&utm_campaign=hp-footer&fg=1">About</a>
</li>
<li>
<a
href="https://ads.google.com/intl/en_tr/home/?subid=ww-ww-et-g-awa-a-g_hpafoot1_1!o2&utm_source=google.com&utm_medium=referral&utm_campaign=google_hpafooter&fg=1">Advertising</a>
</li>
<li>
<a
href="https://smallbusiness.withgoogle.com/intl/tr_tr/?subid=tr-tr-et-g-awa-a-g_hpbfoot1_1!o2&utm_source=google&utm_medium=ep&utm_campaign=google_hpbfooter&utm_content=google_hpbfooter&gmbsrc=tr-tr-et-gs-z-gmb-s-z-u~sb-g4sb_srvcs-u#!/">Business</a>
</li>
<li>
<a href="https://www.google.com/search/howsearchworks/?fg=1">How Search Works</a>
</li>
</ul>
<ul>
<li>
<a href="https://policies.google.com/privacy?hl=en-TR&fg=1">Privacy</a>
</li>
<li>
<a href="https://policies.google.com/terms?hl=en-TR&fg=1">Terms</a>
</li>
<li>
<button class="btn-settings">Settings</button>
<div class="dropdown">
<ul>
<li>Search Settings</li>
<li>Advanced Search</li>
<li>Your data in Search</li>
<li>Search History</li>
<li>Search Help</li>
<li>Search Feedback</li>
<li class="btn-theme-toggler">Dark theme: <span id="status-theme">On</span></li>
</ul>
</div>
</li>
</ul>
</nav>
</footer>
<script>
// Arama yapıldığında gerçek google arama motoruna yönlendirecek olan JS kodu.
let searchButton = document.querySelector(".buttons .btn:nth-child(1)");
searchButton.addEventListener("click", () => {
let query = document.getElementById("query").value;
location.href = "https://www.google.com/search?q=" + query;
});
let settingsButton = document.querySelector(".btn-settings");
let dropdown = document.querySelector(".dropdown");
settingsButton.addEventListener("click", () => {
dropdown.classList.toggle("active");
})
let body = document.body;
let themeTogglerButton = document.querySelector(".btn-theme-toggler");
themeTogglerButton.addEventListener("click", () => {
body.classList.toggle("dark");
themeController();
})
themeController();
function themeController() {
if (document.body.classList.contains("dark")) {
document.querySelector(".logo > img").setAttribute("src", "assets/logo-dark.png")
document.querySelector("#status-theme").textContent = "On";
} else {
document.querySelector(".logo > img").setAttribute("src", "assets/logo.png")
document.querySelector("#status-theme").textContent = "Off";
}
}
</script>
</body>
</html>