+9
-4
private_search_page.js
+9
-4
private_search_page.js
···
145
/** @param {string} query */
146
147
searchInLycan(query) {
148
if (query.length == 0) {
149
-
this.results.innerHTML = '';
150
return;
151
}
152
153
-
this.results.innerHTML = '...';
154
155
let isLoading = false;
156
let firstPageLoaded = false;
···
178
}
179
180
if (response.posts.length == 0) {
181
-
this.results.append(firstPageLoaded ? "No more results." : "No results.");
182
isLoading = false;
183
finished = true;
184
return;
···
188
let posts = records.map(x => new Post(x));
189
190
if (!firstPageLoaded) {
191
-
this.results.innerHTML = '';
192
firstPageLoaded = true;
193
}
194
···
145
/** @param {string} query */
146
147
searchInLycan(query) {
148
+
this.results.innerHTML = '';
149
+
150
if (query.length == 0) {
151
return;
152
}
153
154
+
let loading = $tag('p', { text: "..." });
155
+
this.results.append(loading);
156
157
let isLoading = false;
158
let firstPageLoaded = false;
···
180
}
181
182
if (response.posts.length == 0) {
183
+
let p = $tag('p.results-end', { text: firstPageLoaded ? "No more results." : "No results." });
184
+
loading.remove();
185
+
this.results.append(p);
186
+
187
isLoading = false;
188
finished = true;
189
return;
···
193
let posts = records.map(x => new Post(x));
194
195
if (!firstPageLoaded) {
196
+
loading.remove();
197
firstPageLoaded = true;
198
}
199
+26
-1
style.css
+26
-1
style.css
···
1036
margin-left: 8px;
1037
}
1038
1039
+
#private_search_page .results {
1040
+
margin-top: 30px;
1041
+
}
1042
+
1043
#private_search_page .results > .post {
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;
1058
}
1059
1060
@media (prefers-color-scheme: dark) {
···
1277
1278
#private_search_page .search-query {
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;
1288
}
1289
}