Move item kind before the item name
This commit is contained in:
parent
7a09a688de
commit
8a35cc3ddc
6 changed files with 22 additions and 35 deletions
|
@ -1866,7 +1866,7 @@ function initSearch(rawSearchIndex) {
|
|||
const name = item.name;
|
||||
const type = itemTypes[item.ty];
|
||||
const longType = longItemTypes[item.ty];
|
||||
let extra = longType.length !== 0 ? ` <i>(${longType})</i>` : "";
|
||||
const typeName = longType.length !== 0 ? `${longType}` : "?";
|
||||
|
||||
length += 1;
|
||||
|
||||
|
@ -1878,7 +1878,6 @@ function initSearch(rawSearchIndex) {
|
|||
resultName.className = "result-name";
|
||||
|
||||
if (item.is_alias) {
|
||||
extra = "";
|
||||
const alias = document.createElement("span");
|
||||
alias.className = "alias";
|
||||
|
||||
|
@ -1892,9 +1891,15 @@ function initSearch(rawSearchIndex) {
|
|||
|
||||
resultName.appendChild(alias);
|
||||
}
|
||||
|
||||
const typeDisplay = document.createElement("div");
|
||||
typeDisplay.innerText = typeName;
|
||||
typeDisplay.className = "type-kind";
|
||||
link.appendChild(typeDisplay);
|
||||
|
||||
resultName.insertAdjacentHTML(
|
||||
"beforeend",
|
||||
item.displayPath + "<span class=\"" + type + "\">" + name + "</span>" + extra);
|
||||
item.displayPath + "<span class=\"" + type + "\">" + name + "</span>");
|
||||
link.appendChild(resultName);
|
||||
|
||||
const description = document.createElement("div");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue