-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsidepanel.html
More file actions
156 lines (138 loc) · 4.85 KB
/
sidepanel.html
File metadata and controls
156 lines (138 loc) · 4.85 KB
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
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>QuickFinder</title>
<link rel="stylesheet" href="content.css">
<style>
body {
margin: 0;
padding: 16px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: #f5f5f5;
min-height: 100vh;
box-sizing: border-box;
}
.sidepanel-container {
background: white;
border-radius: 8px;
padding: 16px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.sidepanel-header {
display: flex;
align-items: center;
margin-bottom: 16px;
padding-bottom: 12px;
border-bottom: 1px solid #eee;
}
.sidepanel-title {
font-size: 18px;
font-weight: 600;
color: #333;
margin: 0;
}
.sidepanel-search {
margin-bottom: 20px;
}
.quickfinder-search-input {
width: 100%;
padding: 16px 20px;
border: none;
border-radius: 16px;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(20px) saturate(180%);
-webkit-backdrop-filter: blur(20px) saturate(180%);
border: 1.5px solid rgba(255, 255, 255, 0.2);
box-shadow:
0 8px 32px rgba(0, 0, 0, 0.1),
0 2px 8px rgba(0, 0, 0, 0.05),
inset 0 1px 0 rgba(255, 255, 255, 0.3);
outline: none;
transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
font-size: 15px;
color: #2c3e50;
font-weight: 500;
letter-spacing: 0.3px;
box-sizing: border-box;
}
.quickfinder-search-input:focus {
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(25px) saturate(200%);
-webkit-backdrop-filter: blur(25px) saturate(200%);
border: 1.5px solid rgba(52, 152, 219, 0.5);
box-shadow:
0 12px 40px rgba(52, 152, 219, 0.2),
0 4px 16px rgba(52, 152, 219, 0.1),
0 0 0 3px rgba(52, 152, 219, 0.1),
inset 0 1px 0 rgba(255, 255, 255, 0.4);
transform: translateY(-2px) scale(1.01);
}
.quickfinder-search-input::placeholder {
color: rgba(108, 117, 125, 0.8);
font-weight: 400;
}
/* 如果检测到深色背景,使用白色文字 */
@media (prefers-color-scheme: dark) {
.sidepanel-container {
background: #2d3748;
color: white;
}
.sidepanel-title {
color: white;
}
.quickfinder-search-input {
background: rgba(255, 255, 255, 0.1);
color: white !important;
border: 1.5px solid rgba(255, 255, 255, 0.3);
}
.quickfinder-search-input::placeholder {
color: rgba(255, 255, 255, 0.7) !important;
}
}
.sidepanel-results {
max-height: calc(100vh - 200px);
overflow-y: auto;
}
.shortcut-hint {
background: rgba(0, 123, 255, 0.1);
border: 1px solid rgba(0, 123, 255, 0.2);
border-radius: 6px;
padding: 12px;
margin-bottom: 16px;
font-size: 12px;
color: #0056b3;
}
.shortcut-hint strong {
color: #004085;
}
</style>
</head>
<body>
<div class="sidepanel-container">
<div class="sidepanel-header">
<h1 class="sidepanel-title">🔍 QuickFinder</h1>
</div>
<div class="shortcut-hint">
<strong>💡 提示:</strong>在普通网页上可以使用 <strong>Ctrl+Q</strong> 快捷键快速调用搜索(所有平台统一)。
</div>
<div class="sidepanel-search">
<input
type="text"
class="quickfinder-search-input"
placeholder="搜索书签和历史记录..."
id="sidepanel-search-input"
autofocus
/>
</div>
<div class="sidepanel-results" id="sidepanel-results">
<div style="text-align: center; padding: 40px; color: #666;">
<div style="font-size: 48px; margin-bottom: 10px;">🔍</div>
<div>输入内容开始搜索...</div>
</div>
</div>
</div>
<script src="sidepanel.js"></script>
</body>
</html>