forked from abdnh/search-anki-support-links
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpopup.html
76 lines (73 loc) · 1.94 KB
/
popup.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Search Anki Support Links</title>
</head>
<style>
* {
box-sizing: border-box;
}
:root {
--item-height: 50px;
}
* {
font-size: 16px;
}
body {
margin: 0px;
width: 600px;
overflow-y: auto;
background-color: #fff;
min-height: var(--item-height);
}
#anki-search-inner {
border-radius: 8px;
box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
border: 1px solid #dfe1e5;
}
input {
border: none;
border-radius: 8px;
box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
outline: none;
padding: 8px;
width: 100%;
height: var(--item-height);
position: fixed;
top: 0px;
z-index: 1;
}
#anki-search-results {
list-style-type: none;
position: relative;
display: flex;
flex-direction: column;
outline: none;
padding: 0px;
margin: 0px;
}
.anki-search-result {
max-height: var(--item-height);
padding: 8px;
outline: none;
cursor: pointer;
}
.anki-search-result.selected {
border: 1px solid #696a6c;
border-radius: 8px;
}
.anki-search-result:hover,
.anki-search-result:focus {
background-color: #f7f8f9;
}
</style>
<body>
<div id="anki-search-inner">
<input type="text" autofocus />
<div id="anki-search-results" tabindex="-1"></div>
</div>
</body>
<script src="popup.js"></script>
</html>