forked from tjy-gitnub/win12
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainpage.html
97 lines (87 loc) · 2.84 KB
/
mainpage.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
* {
margin: 0px;
padding: 0px;
}
html,
body {
height: 100%;
width: 100%;
}
* {
background: transparent;
}
body {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
body>div.input {
display: flex;
width: 50%;
/* height: 10%; */
height: 2em;
font-size: 1.3em;
border-radius: 25px;
border: none;
padding: 4px 25px 5px 25px;
align-items: center;
justify-content: space-between;
border: 2px solid #6f6f6f50;
backdrop-filter: saturate(1.3);
box-shadow: 1px 3px 8px #00000045;
}
body>div.input>input {
font-size: 1em;
border: none;
height: 100%;
width: 90%;
color: #7f7f7f;
}
body>div.input>input:focus {
outline: none;
}
body>div.logo {
width: 100%;
height: 60px;
background-image: url('./img/Bing.svg');
background-size: contain;
background-repeat: no-repeat;
background-position: 50% 50%;
margin-bottom: 30px;
margin-top:-150px;
}
</style>
</head>
<body>
<div class="logo"></div>
<div class="input">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="#5F6368">
<path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" />
</svg>
<input type="text" onkeyup="if(event.keyCode==13){if (!/^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/.test(this.value)) {
window.location='https://bing.com/search?q='+encodeURIComponent(this.value); //encodeURIComponent 可以对搜索内容进行编码
//可能报错
apps.edge.rename(this.value);
}
else if (!/^https?:\/\//.test(this.value)) {
window.location='http://' + this.value;
//可能报错
apps.edge.rename('http://' + this.value);
}
else {
window.location=this.value;
//可能报错
apps.edge.rename(this.value);
}}" placeholder="在必应中搜索,或输入一个网址">
</div>
</body>
</html>