forked from siyuan-note/siyuan-chrome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.html
187 lines (171 loc) · 6.05 KB
/
options.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
<!DOCTYPE html>
<html>
<head>
<style>
.b3-text-filed {
border: 1px solid #5f6368;
border-radius: 4px;
padding: 4px 8px;
line-height: 20px;
box-sizing: border-box;
color: #202124;
transition: border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1), box-shadow 120ms 0ms cubic-bezier(0, 0, 0.2, 1);
background-color: #f8f9fa;
width: 184px;
}
.b3-text-filed:hover {
border-color: #202124;
}
.b3-text-filed:focus {
outline: none;
border-color: #4285f4;
box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.12);
}
.b3-switch {
flex-shrink: 0;
-webkit-appearance: none;
box-sizing: border-box;
width: 28px;
height: 12px;
border: 1px solid transparent;
border-radius: 7px;
margin: 0;
outline: none;
display: inline-block;
position: relative;
cursor: pointer;
background-color: rgba(0, 0, 0, .1);
overflow: inherit;
user-select: none;
}
.b3-switch:after {
box-shadow: 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
box-sizing: border-box;
width: 16px;
height: 16px;
border: 1px solid #fff;
border-radius: 50%;
pointer-events: none;
z-index: 1;
content: '';
background-color: #fff;
left: -4px;
top: -3px;
display: block;
position: absolute;
transition: transform .3s ease, opacity .2s;
}
.b3-switch:before {
content: '';
left: -14px;
right: initial;
top: -13px;
width: 36px;
height: 36px;
background-color: rgba(158, 158, 158, 0.12);
display: none;
border-radius: 24px;
position: absolute;
transition: transform .3s ease, opacity .2s;
opacity: .54;
}
.b3-switch:checked {
background-color: rgba(66, 133, 244, 0.54);
}
.b3-switch:checked:after {
background-color: #4285f4;
border-color: #4285f4;
}
.b3-switch:checked:before, .b3-switch:checked:after {
transform: translateX(19px);
transition: transform 0.6s cubic-bezier(0.2, 0.85, 0.32, 1.2), opacity 0.3s;
}
.b3-switch:disabled {
opacity: 0.38;
cursor: not-allowed;
}
.b3-switch:hover:not(:disabled):before, .b3-switch:focus:not(:disabled):before {
display: inline-block;
}
.b3-switch:focus:not(:disabled):before {
background-color: rgba(66, 133, 244, 0.12);
}
.b3-select {
border: 0;
border-radius: 4px;
padding: 4px 8px;
line-height: 20px;
box-sizing: border-box;
color: #202124;
transition: box-shadow 120ms 0ms cubic-bezier(0, 0, 0.2, 1);
background-color: #f8f9fa;
height: 28px;
font-size: 14px;
width: 184px;
}
.b3-select:focus {
box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.38);
}
.b3-button {
width: 184px;
cursor: pointer;
color: #fff;
border-radius: 4px;
line-height: 20px;
padding: 4px 8px;
background-color: #4285f4;
white-space: nowrap;
display: inline-flex;
align-items: center;
justify-content: center;
transition: box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);
border: 0;
box-sizing: border-box;
text-align: center;
}
.b3-button:hover,
.b3-button:focus {
text-decoration: none;
box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, .12);
}
.b3-button:active {
box-shadow: 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, .12);
}
</style>
</head>
<body>
<div style="max-width: 184px">
<div id="log" style="color: #d23f31;margin-bottom: 16px"></div>
<label style="display: flex;align-items: center;padding: 0 8px 16px 0;">
<div style="flex: 1">Show Tip</div>
<input class="b3-switch" id="showTip" checked type="checkbox">
</label>
<input id="ip" class="b3-text-filed" placeholder="SiYuan URL">
<div style="height: 16px;"></div>
<input id="token" class="b3-text-filed" placeholder="API token">
<div style="height: 16px;"></div>
<select class="b3-select" id="notebooks"></select>
<div style="height: 16px;"></div>
<hr/>
<label style="display: flex;align-items: center;padding: 0 8px 16px 0;">
<div style="flex: 1">tag-based features</div>
<input class="b3-switch" id="tagEnable" type="checkbox">
</label>
<div style="height: 120px;" id="tagGroup" style="display: inline;">
<input id="tagPrefix" class="b3-text-filed" placeholder="tag prefix">
<select class="b3-select" id="tags" style="margin-top: 5px;"></select>
<label style="display: flex;align-items: center;padding: 0 8px 5px 0; margin-top: 8px;">
<div style="flex: 1"> add tag to doc:</div>
<input class="b3-switch" id="addTag" type="checkbox">
</label>
<label style="display: flex;align-items: center;padding: 0 8px 5px 0;">
<div style="flex: 1"> use tag in doc path:</div>
<input class="b3-switch" id="tagToPath" type="checkbox">
</label>
</div>
<div style="height: 16px;"></div>
<button class="b3-button" id="send">Send to SiYuan</button>
</div>
<script src="popup.js"></script>
</body>
</html>