New search functionality
This commit is contained in:
@@ -868,6 +868,175 @@ body {
|
||||
transform: scale(0.95);
|
||||
}
|
||||
|
||||
/* Documentation Search Styles */
|
||||
.docs-search-container {
|
||||
position: relative;
|
||||
flex: 0 1 400px;
|
||||
margin: 0 1rem;
|
||||
}
|
||||
|
||||
.docs-search-wrapper {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.docs-search-input {
|
||||
width: 100%;
|
||||
padding: 0.5rem 2.5rem 0.5rem 1rem;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
background: white;
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
|
||||
.docs-search-input:focus {
|
||||
outline: none;
|
||||
border-color: #4CAF50;
|
||||
box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
|
||||
}
|
||||
|
||||
.docs-search-icon {
|
||||
position: absolute;
|
||||
right: 0.75rem;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
opacity: 0.5;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.docs-search-results {
|
||||
position: absolute;
|
||||
top: calc(100% + 0.5rem);
|
||||
left: 0;
|
||||
right: 0;
|
||||
max-height: 60vh;
|
||||
background: white;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
z-index: 1000;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.docs-search-results.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.docs-search-results-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0.75rem 1rem;
|
||||
border-bottom: 1px solid #eee;
|
||||
background: #f5f5f5;
|
||||
}
|
||||
|
||||
.results-count {
|
||||
font-size: 12px;
|
||||
color: #666;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.close-results {
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
color: #666;
|
||||
padding: 0;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 4px;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
.close-results:hover {
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
|
||||
.docs-search-results-list {
|
||||
overflow-y: auto;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.search-result {
|
||||
display: block;
|
||||
padding: 1rem;
|
||||
border-bottom: 1px solid #eee;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
transition: background-color 0.2s;
|
||||
}
|
||||
|
||||
.search-result:hover {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
.search-result:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.search-result-title {
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.search-result-snippet {
|
||||
font-size: 13px;
|
||||
color: #666;
|
||||
line-height: 1.4;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.search-result-snippet mark {
|
||||
background-color: #ffeb3b;
|
||||
color: inherit;
|
||||
font-weight: 500;
|
||||
padding: 0 2px;
|
||||
}
|
||||
|
||||
.search-result-path {
|
||||
font-size: 11px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.no-results {
|
||||
padding: 2rem;
|
||||
text-align: center;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* Mobile responsiveness */
|
||||
@media (max-width: 768px) {
|
||||
.docs-search-container {
|
||||
display: block; /* Show on mobile */
|
||||
width: 100%;
|
||||
margin: 10px 0;
|
||||
padding: 0 10px;
|
||||
}
|
||||
.docs-search-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
.docs-search-input {
|
||||
width: 100%;
|
||||
font-size: 16px;
|
||||
padding: 0.75rem 2.5rem 0.75rem 1rem;
|
||||
}
|
||||
.docs-search-results {
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100vw;
|
||||
max-width: 100vw;
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Desktop styles - show normal layout */
|
||||
@media (min-width: 769px) {
|
||||
.mobile-dropdown {
|
||||
|
||||
Reference in New Issue
Block a user