+9
-4
private_search_page.js
+9
-4
private_search_page.js
···
145
145
/** @param {string} query */
146
146
147
147
searchInLycan(query) {
148
+
this.results.innerHTML = '';
149
+
148
150
if (query.length == 0) {
149
-
this.results.innerHTML = '';
150
151
return;
151
152
}
152
153
153
-
this.results.innerHTML = '...';
154
+
let loading = $tag('p', { text: "..." });
155
+
this.results.append(loading);
154
156
155
157
let isLoading = false;
156
158
let firstPageLoaded = false;
···
178
180
}
179
181
180
182
if (response.posts.length == 0) {
181
-
this.results.append(firstPageLoaded ? "No more results." : "No results.");
183
+
let p = $tag('p.results-end', { text: firstPageLoaded ? "No more results." : "No results." });
184
+
loading.remove();
185
+
this.results.append(p);
186
+
182
187
isLoading = false;
183
188
finished = true;
184
189
return;
···
188
193
let posts = records.map(x => new Post(x));
189
194
190
195
if (!firstPageLoaded) {
191
-
this.results.innerHTML = '';
196
+
loading.remove();
192
197
firstPageLoaded = true;
193
198
}
194
199
+26
-1
style.css
+26
-1
style.css
···
1036
1036
margin-left: 8px;
1037
1037
}
1038
1038
1039
+
#private_search_page .results {
1040
+
margin-top: 30px;
1041
+
}
1042
+
1039
1043
#private_search_page .results > .post {
1040
-
padding-left: 0;
1044
+
margin-left: -15px;
1045
+
padding-left: 15px;
1046
+
border-bottom: 1px solid #ddd;
1047
+
padding-bottom: 10px;
1048
+
margin-top: 24px;
1049
+
}
1050
+
1051
+
#private_search_page .results-end {
1052
+
font-size: 12pt;
1053
+
color: #333;
1054
+
}
1055
+
1056
+
#private_search_page .post + .results-end {
1057
+
font-size: 11pt;
1041
1058
}
1042
1059
1043
1060
@media (prefers-color-scheme: dark) {
···
1260
1277
1261
1278
#private_search_page .search-query {
1262
1279
border: 1px solid #666;
1280
+
}
1281
+
1282
+
#private_search_page .results-end {
1283
+
color: #888;
1284
+
}
1285
+
1286
+
#private_search_page .results > .post {
1287
+
border-bottom: 1px solid #555;
1263
1288
}
1264
1289
}