-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
363 lines (352 loc) · 14.3 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
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
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script defer src="https://cloud.umami.is/script.js" data-website-id="1d3efb40-9f3e-494d-81a3-c0c80bae621b"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Search Page</title>
<link rel="icon" href="https://export-download.canva.cn/61xHY/DAGLAc61xHY/1/0/0001-2247730525572835558.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAUMDQBKPSEKNX37XG%2F20240715%2Fcn-north-1%2Fs3%2Faws4_request&X-Amz-Date=20240715T030957Z&X-Amz-Expires=27406&X-Amz-Signature=e4a68d68dfd38c9fd8623c509639814b4745541bcd2b817716eba4747a3330b1&X-Amz-SignedHeaders=host&response-content-disposition=attachment%3B%20filename%2A%3DUTF-8%27%27%25E6%259C%25AA%25E5%2591%25BD%25E5%2590%258D%25E7%259A%2584%25E8%25AE%25BE%25E8%25AE%25A1.png&response-expires=Mon%2C%2015%20Jul%202024%2010%3A46%3A43%20GMT" type="image/webp">
<style>
body {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
font-family: 'Arial', sans-serif;
background: linear-gradient(135deg, #f5f7fa, #c3cfe2);
}
.search-container {
text-align: center;
background: rgba(255, 255, 255, 0.9);
padding: 40px;
border-radius: 20px;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
width: 80%;
}
.time {
font-size: 1.5em;
color: #333;
margin-bottom: 20px;
}
.logo {
display: inline-block;
font-size: 3em;
font-weight: bold;
color: #007BFF;
background-color: #fff;
padding: 15px 30px;
border-radius: 30px;
text-decoration: none;
transition: background-color 0.3s, color 0.3s;
margin-bottom: 30px;
}
.logo:hover {
background-color: #007BFF;
color: #fff;
}
.search-container h1 {
margin-bottom: 30px;
font-size: 2.5em;
color: #333;
}
.search-box {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 30px;
}
.search-box input[type="text"] {
width: 600px;
padding: 15px;
border: 2px solid #ddd;
border-radius: 30px 0 0 30px;
outline: none;
font-size: 1.5em;
transition: border-color 0.3s;
}
.search-box input[type="text"]:focus {
border-color: #007BFF;
}
.search-box button {
padding: 15px 30px;
border: 2px solid #007BFF;
border-radius: 0 30px 30px 0;
background-color: #007BFF;
color: white;
font-size: 1.5em;
cursor: pointer;
transition: background-color 0.3s;
}
.search-box button:hover {
background-color: #0056b3;
}
.footer {
margin-top: 40px;
font-size: 1.2em;
color: #666;
}
.search-engine {
margin-bottom: 30px;
}
.search-engine select {
padding: 15px;
border: 2px solid #ddd;
border-radius: 30px;
outline: none;
font-size: 1.5em;
transition: border-color 0.3s;
}
.search-engine select:focus {
border-color: #007BFF;
}
.settings-button {
position: absolute;
bottom: 20px;
left: 20px;
}
.settings-button button {
padding: 10px 20px;
border: 2px solid #007BFF;
border-radius: 15px;
background-color: #007BFF;
color: white;
font-size: 1em;
cursor: pointer;
transition: background-color 0.3s;
}
.settings-button button:hover {
background-color: #0056b3;
}
.settings-dropdown {
display: none;
position: absolute;
bottom: 60px;
left: 20px;
background: white;
border: 1px solid #ddd;
border-radius: 10px;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
z-index: 1000;
}
.settings-dropdown a, .settings-dropdown label {
display: block;
padding: 10px;
text-decoration: none;
color: #007BFF;
cursor: pointer;
}
.settings-dropdown a:hover, .settings-dropdown label:hover {
background-color: #f0f0f0;
}
.settings-dropdown select {
width: 100%;
padding: 10px;
border: none;
outline: none;
font-size: 1em;
cursor: pointer;
}
.settings-dropdown select:focus {
border-color: #007BFF;
}
</style>
<script>
const translations = {
en: {
logo: "Simple Search",
title: "Search",
placeholder: "Enter your search query...",
go: "Go",
settings: "Settings",
switchLanguage: "Switch Language",
feedback: "Product Feedback",
footer: "© 2024 Wu Jingbo",
google: "Google",
bing: "Bing",
baidu: "Baidu",
fso: "F搜",
yandex: "Yandex",
duckduckgo: "DuckDuckGo",
sogou: "Sogou",
s360: "360 Search"
},
zh: {
logo: "简单搜索",
title: "搜索",
placeholder: "输入您的搜索查询...",
go: "搜索",
settings: "设置",
switchLanguage: "切换语言",
feedback: "产品反馈",
footer: "© 2024 武敬博",
google: "谷歌",
bing: "必应",
baidu: "百度",
fso: "F搜",
yandex: "Yandex",
duckduckgo: "DuckDuckGo",
sogou: "搜狗",
s360: "360搜索"
},
ja: {
logo: "シンプル検索",
title: "検索",
placeholder: "検索クエリを入力してください...",
go: "検索",
settings: "設定",
switchLanguage: "言語を切り替える",
feedback: "製品フィードバック",
footer: "© 2024 武敬博",
google: "グーグル",
bing: "ビング",
baidu: "百度",
fso: "F搜",
yandex: "Yandex",
duckduckgo: "DuckDuckGo",
sogou: "Sogou",
s360: "360 Search"
}
};
function setLanguage(lang) {
const elements = {
logo: document.querySelector(".logo"),
title: document.querySelector("h1"),
placeholder: document.querySelector("input[name='q']"),
go: document.querySelector(".search-box button"),
settings: document.querySelector(".settings-button button"),
switchLanguage: document.querySelector(".settings-dropdown label"),
feedback: document.querySelector(".settings-dropdown a"),
footer: document.querySelector(".footer"),
google: document.querySelector("option[value='google']"),
bing: document.querySelector("option[value='bing']"),
baidu: document.querySelector("option[value='baidu']"),
fso: document.querySelector("option[value='fso']"),
yandex: document.querySelector("option[value='yandex']"),
duckduckgo: document.querySelector("option[value='duckduckgo']"),
sogou: document.querySelector("option[value='sogou']"),
s360: document.querySelector("option[value='s360']")
};
elements.logo.textContent = translations[lang].logo;
elements.title.textContent = translations[lang].title;
elements.placeholder.placeholder = translations[lang].placeholder;
elements.go.textContent = translations[lang].go;
elements.settings.textContent = translations[lang].settings;
elements.switchLanguage.textContent = translations[lang].switchLanguage;
elements.feedback.textContent = translations[lang].feedback;
elements.footer.innerHTML = translations[lang].footer;
elements.google.textContent = translations[lang].google;
elements.bing.textContent = translations[lang].bing;
elements.baidu.textContent = translations[lang].baidu;
elements.fso.textContent = translations[lang].fso;
elements.yandex.textContent = translations[lang].yandex;
elements.duckduckgo.textContent = translations[lang].duckduckgo;
elements.sogou.textContent = translations[lang].sogou;
elements.s360.textContent = translations[lang].s360;
const languageSwitcher = document.querySelector(".settings-dropdown select");
languageSwitcher.innerHTML = '';
if (lang !== 'en') languageSwitcher.innerHTML += '<option value="en">English</option>';
if (lang !== 'zh') languageSwitcher.innerHTML += '<option value="zh">简体中文</option>';
if (lang !== 'ja') languageSwitcher.innerHTML += '<option value="ja">日本語</option>';
languageSwitcher.value = lang;
localStorage.setItem('preferredLanguage', lang); // Save the selected language
}
function setSearchEngine(form) {
const engine = document.getElementById('engine').value;
const query = form.q.value;
let url = '';
if (engine === 'google') {
url = `https://www.google.com/search?q=${encodeURIComponent(query)}`;
} else if (engine === 'bing') {
url = `https://www.bing.com/search?q=${encodeURIComponent(query)}`;
} else if (engine === 'baidu') {
url = `https://www.baidu.com/s?wd=${encodeURIComponent(query)}`;
} else if (engine === 'fso') {
url = `https://fsoufsou.com/search?q=${encodeURIComponent(query)}`;
} else if (engine === 'yandex') {
url = `https://yandex.com/search/?text=${encodeURIComponent(query)}`;
} else if (engine === 'duckduckgo') {
url = `https://duckduckgo.com/?q=${encodeURIComponent(query)}`;
} else if (engine === 'sogou') {
url = `https://www.sogou.com/web?query=${encodeURIComponent(query)}`;
} else if (engine === 's360') {
url = `https://www.so.com/s?q=${encodeURIComponent(query)}`;
}
window.location.href = url;
return false;
}
function toggleSettings() {
const dropdown = document.querySelector('.settings-dropdown');
dropdown.style.display = dropdown.style.display === 'block' ? 'none' : 'block';
}
function updateTime() {
const timeElement = document.querySelector('.time');
const now = new Date();
const formattedTime = now.toLocaleTimeString();
timeElement.textContent = formattedTime;
}
document.addEventListener("DOMContentLoaded", () => {
const languageSwitcher = document.querySelector(".settings-dropdown select");
languageSwitcher.addEventListener("change", () => {
setLanguage(languageSwitcher.value);
});
const settingsButton = document.querySelector('.settings-button button');
settingsButton.addEventListener('click', toggleSettings);
// Load the preferred language from localStorage or default to 'en'
const preferredLanguage = localStorage.getItem('preferredLanguage') || 'en';
setLanguage(preferredLanguage);
// Update time every second
updateTime();
setInterval(updateTime, 1000);
});
</script>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?73e4ad7b67de37110190bdcd405428e3";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<script charset="UTF-8" id="LA_COLLECT" src="//sdk.51.la/js-sdk-pro.min.js?id=3IkShiWZpUnnmEBc&ck=3IkShiWZpUnnmEBc&autoTrack=true"></script>
<script defer src="https://cloud.umami.is/script.js" data-website-id="1d3efb40-9f3e-494d-81a3-c0c80bae621b"></script>
</head>
<body>
<div class="settings-button">
<button>Settings</button>
<div class="settings-dropdown">
<label for="language">Switch Language</label>
<select id="language"></select>
<a href="https://txc.qq.com/products/657050" target="_blank">Product Feedback</a>
</div>
</div>
<div class="search-container">
<div class="time"></div> <!-- 时间显示组件 -->
<a href="#" class="logo">Simple Search</a>
<h1>Search</h1>
<form onsubmit="return setSearchEngine(this)">
<div class="search-engine">
<select id="engine">
<option value="google">Google</option>
<option value="bing">Bing</option>
<option value="baidu">百度</option>
<option value="fso">F搜</option>
<option value="yandex">Yandex</option>
<option value="duckduckgo">DuckDuckGo</option>
<option value="sogou">搜狗</option>
<option value="s360">360搜索</option>
</select>
</div>
<div class="search-box">
<input type="text" name="q" placeholder="Enter your search query...">
<button type="submit">Go</button>
</div>
</form>
<div class="footer">
© 2024 武敬博 服务器:热铁盒
</div>
</div>
</body>
</html>