mirror of
https://github.com/litruv/Docs-Viewer.git
synced 2026-07-24 02:36:07 +10:00
updated with search
This commit is contained in:
110
styles.css
110
styles.css
@@ -61,6 +61,116 @@ body {
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.search-container {
|
||||
padding: 1rem;
|
||||
border-bottom: 1px solid var(--ifm-border-color);
|
||||
position: relative; /* Add this */
|
||||
}
|
||||
|
||||
.search-box {
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: var(--ifm-background-color);
|
||||
border: 1px solid var(--ifm-border-color);
|
||||
border-radius: 6px;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.search-box i {
|
||||
color: var(--ifm-color-content-secondary);
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.search-box .fa-search {
|
||||
margin-right: 0.5rem;
|
||||
}
|
||||
|
||||
.search-box .fa-times {
|
||||
cursor: pointer;
|
||||
opacity: 0.6;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.search-box .fa-times:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.search-box input {
|
||||
background: none;
|
||||
border: none;
|
||||
color: var(--ifm-color-content);
|
||||
font-size: 0.9rem;
|
||||
width: 100%;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.search-box input::placeholder {
|
||||
color: var(--ifm-color-content-secondary);
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
#search-results {
|
||||
position: absolute;
|
||||
top: calc(var(--title-bar-height) + 3.5rem); /* Change this */
|
||||
left: 0; /* Change this */
|
||||
right: 0; /* Change this */
|
||||
background: var(--ifm-background-surface-color);
|
||||
border: 1px solid var(--ifm-border-color);
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
||||
z-index: 1001; /* Increase z-index */
|
||||
max-height: calc(100vh - var(--title-bar-height) - 4rem);
|
||||
overflow-y: auto;
|
||||
margin: 0 1rem; /* Add margins */
|
||||
display: none;
|
||||
}
|
||||
|
||||
.search-result {
|
||||
border-bottom: 1px solid var(--ifm-border-color);
|
||||
}
|
||||
|
||||
search-result:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.search-result a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0.75rem 1rem;
|
||||
color: var(--ifm-color-content);
|
||||
text-decoration: none;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.search-result a:hover {
|
||||
background: rgba(255, 255, 255, 0.05);
|
||||
}
|
||||
|
||||
.search-result i {
|
||||
color: var(--ifm-color-content-secondary);
|
||||
font-size: 0.9rem;
|
||||
width: 16px;
|
||||
}
|
||||
|
||||
.search-result-content {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.search-result-title {
|
||||
font-weight: 500;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.search-result-path {
|
||||
font-size: 0.8rem;
|
||||
color: var(--ifm-color-content-secondary);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.right-sidebar {
|
||||
position: fixed;
|
||||
top: var(--title-bar-height);
|
||||
|
||||
Reference in New Issue
Block a user