mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 07:38:53 +02:00
style/quick search results: tweak layout
This commit is contained in:
parent
93f80c6837
commit
f034e8bb37
@ -2353,8 +2353,8 @@ footer.webview-footer button {
|
|||||||
.search-result-title b,
|
.search-result-title b,
|
||||||
.search-result-content b,
|
.search-result-content b,
|
||||||
.search-result-attributes b {
|
.search-result-attributes b {
|
||||||
font-weight: 900;
|
|
||||||
color: var(--admonition-warning-accent-color);
|
color: var(--admonition-warning-accent-color);
|
||||||
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Customized icons */
|
/* Customized icons */
|
||||||
|
@ -40,14 +40,11 @@ const TPL = /*html*/`
|
|||||||
.quick-search .dropdown-item:not(:last-child)::after {
|
.quick-search .dropdown-item:not(:last-child)::after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 50%;
|
width: 100%;
|
||||||
transform: translateX(-50%);
|
height: 1px;
|
||||||
width: 80%;
|
background: var(--dropdown-border-color);
|
||||||
height: 2px;
|
|
||||||
background: var(--main-border-color);
|
|
||||||
border-radius: 1px;
|
|
||||||
opacity: 0.4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-search .dropdown-item:last-child::after {
|
.quick-search .dropdown-item:last-child::after {
|
||||||
@ -67,41 +64,37 @@ const TPL = /*html*/`
|
|||||||
}
|
}
|
||||||
|
|
||||||
.quick-search .quick-search-item {
|
.quick-search .quick-search-item {
|
||||||
display: flex;
|
width: 100%;
|
||||||
flex-direction: column;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-search .quick-search-item-header {
|
.quick-search .quick-search-item-header {
|
||||||
display: flex;
|
padding: 0 8px;
|
||||||
align-items: flex-start;
|
|
||||||
gap: 6px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-search .quick-search-item-icon {
|
.quick-search .quick-search-item-icon {
|
||||||
flex-shrink: 0;
|
margin-inline-end: 2px;
|
||||||
margin-top: 1px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-search search-result-title {
|
.quick-search .search-result-title {
|
||||||
flex: 1;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-search .search-result-attributes {
|
.quick-search .search-result-attributes {
|
||||||
font-size: 0.75em;
|
opacity: .5;
|
||||||
color: var(--muted-text-color);
|
padding: 0 8px;
|
||||||
opacity: 0.5;
|
font-size: .75em;
|
||||||
margin-left: 20px;
|
}
|
||||||
margin-top: 2px;
|
|
||||||
line-height: 1.2;"
|
.quick-search .search-result-attributes br {
|
||||||
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-search .search-result-content {
|
.quick-search .search-result-content {
|
||||||
font-size: 0.85em;
|
margin-top: 8px;
|
||||||
|
padding: 8px;
|
||||||
|
background-color: var(--accented-background-color);
|
||||||
color: var(--main-text-color);
|
color: var(--main-text-color);
|
||||||
opacity: 0.7;
|
font-size: .85em;
|
||||||
margin-left: 20px;
|
|
||||||
margin-top: 4px;
|
|
||||||
line-height: 1.3;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.quick-search .dropdown-divider {
|
.quick-search .dropdown-divider {
|
||||||
@ -293,6 +286,8 @@ export default class QuickSearchWidget extends BasicWidget {
|
|||||||
itemHtml += `<div class="search-result-content">${result.highlightedContentSnippet}</div>`;
|
itemHtml += `<div class="search-result-content">${result.highlightedContentSnippet}</div>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(result);
|
||||||
|
|
||||||
itemHtml += `</div>`;
|
itemHtml += `</div>`;
|
||||||
|
|
||||||
$item.html(itemHtml);
|
$item.html(itemHtml);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user