mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 15:21:12 +00:00
Restyle docs search results
This commit is contained in:
parent
b456ee9592
commit
aabef9dd48
3 changed files with 49 additions and 49 deletions
|
@ -43,13 +43,13 @@
|
|||
.textContent.toLowerCase();
|
||||
const entrySignature = entry
|
||||
.querySelector(".type-ahead-signature")
|
||||
.textContent.toLowerCase()
|
||||
.replace(/\s+/g, "");
|
||||
?.textContent?.toLowerCase()
|
||||
?.replace(/\s+/g, "");
|
||||
|
||||
if (
|
||||
totalResults < 5 &&
|
||||
(entryName.includes(text) ||
|
||||
entrySignature.includes(text.replace(/\s+/g, "")))
|
||||
entrySignature?.includes(text.replace(/\s+/g, "")))
|
||||
) {
|
||||
totalResults++;
|
||||
entry.classList.remove("hidden");
|
||||
|
|
|
@ -482,8 +482,9 @@ pre>samp {
|
|||
}
|
||||
|
||||
#search-type-ahead {
|
||||
font-family: var(--font-mono);
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
gap: 0px;
|
||||
flex-direction: column;
|
||||
position: absolute;
|
||||
top: calc(var(--module-search-padding-height) + var(--module-search-height));
|
||||
|
@ -501,20 +502,23 @@ pre>samp {
|
|||
}
|
||||
|
||||
#search-type-ahead .type-ahead-link {
|
||||
font-size: 0.875rem;
|
||||
font-size: 1rem;
|
||||
color: var(--text-color);
|
||||
p {
|
||||
line-height: 2em;
|
||||
display: inline-block;
|
||||
|
||||
/* if it wraps, indent after the first line */
|
||||
padding-left: 2em;
|
||||
text-indent: -2em;
|
||||
|
||||
span {
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
p.type-ahead-def-name {
|
||||
.type-ahead-module-name, .type-ahead-def-name {
|
||||
color: var(--violet);
|
||||
font-size: 1rem;
|
||||
}
|
||||
p.type-ahead-doc-path {
|
||||
font-size: 0.75rem;
|
||||
color: var(--faded-color);
|
||||
}
|
||||
}
|
||||
#search-type-ahead li {
|
||||
box-sizing: border-box;
|
||||
|
@ -545,7 +549,7 @@ pre>samp {
|
|||
}
|
||||
|
||||
#search-shortcut-key {
|
||||
font-family: monospace;
|
||||
font-family: var(--font-mono);
|
||||
border: 1px solid #666;
|
||||
border-radius: 5px;
|
||||
padding: 1px 3px 3px;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue