UX: add missing space and other minor search adjustments (#19899)

This commit is contained in:
Kris 2023-01-18 09:40:38 -05:00 committed by GitHub
parent 1d4c1fe002
commit 20f5a69427
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 12 deletions

View File

@ -740,8 +740,7 @@ createWidget("search-menu-assistant-item", {
// category and tag combination
if (attrs.tag && attrs.isIntersection) {
attributes.href = getURL(`/tag/${attrs.tag}`);
content.push(iconNode("tag"));
content.push(h("span.search-item-tag", attrs.tag));
content.push(h("span.search-item-tag", [iconNode("tag"), attrs.tag]));
}
} else if (attrs.tag) {
if (attrs.isIntersection && attrs.additionalTags?.length) {
@ -749,8 +748,7 @@ createWidget("search-menu-assistant-item", {
content.push(h("span.search-item-tag", `tags:${tags.join("+")}`));
} else {
attributes.href = getURL(`/tag/${attrs.tag}`);
content.push(iconNode("tag"));
content.push(h("span.search-item-tag", attrs.tag));
content.push(h("span.search-item-tag", [iconNode("tag"), attrs.tag]));
}
} else if (attrs.user) {
const userResult = [

View File

@ -194,23 +194,24 @@ $search-pad-horizontal: 0.5em;
.search-item-user img.avatar {
width: 20px;
height: 20px;
margin-right: 5px;
margin-right: 0.5em;
}
.label-suffix {
color: var(--primary-medium);
margin-right: 0.33em;
}
.search-item-tag {
color: var(--primary-high);
}
.extra-hint {
color: var(--primary-low-mid);
font-size: var(--font-down-1);
float: right;
margin-top: 2px;
}
.search-item-slug {
margin-right: 5px;
.badge-wrapper {
font-size: var(--font-0);
margin-left: 2px;
@ -230,15 +231,19 @@ $search-pad-horizontal: 0.5em;
.search-result-tag,
.search-menu-assistant {
.search-item-prefix {
padding-right: 5px;
margin-right: 0.33em;
}
.badge-wrapper {
font-size: var(--font-0);
margin-right: 0.5em;
}
.search-link {
display: flex;
flex-wrap: wrap;
align-items: center;
align-items: baseline;
@include ellipsis;
.d-icon {
margin-right: 5px;
margin-right: 0.33em;
vertical-align: middle;
}
.d-icon-tag {