Skip to content

Commit ac72006

Browse files
Fix Search
1 parent cf2c740 commit ac72006

File tree

4 files changed

+25
-4
lines changed

4 files changed

+25
-4
lines changed

css/search.css

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
position: fixed;
66
top: 0;
77
left: 0;
8+
right: 0;
9+
bottom: 0;
810
width: 100%;
911
height: 100%;
1012
background-color: rgba(0, 0, 0, 0.7);
1113
backdrop-filter: blur(5px);
12-
z-index: 1000;
14+
z-index: 9999;
1315
display: flex;
1416
justify-content: center;
15-
align-items: flex-start;
16-
padding-top: 5rem;
17+
align-items: center;
1718
}
1819

1920
.search-modal-content {
@@ -26,6 +27,8 @@
2627
max-height: 80vh;
2728
display: flex;
2829
flex-direction: column;
30+
margin: 0 auto; /* Ensure horizontal centering */
31+
position: relative; /* Ensure stacking context */
2932
}
3033

3134
/* Search header */

index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<title>AtlasServer - Documentation</title>
77
<link rel="stylesheet" href="css/styles.css">
88
<link rel="stylesheet" href="css/search.css">
9+
<link rel="icon" href="/static/svg/atlas.svg" />
910
<!-- Library for converting Markdown to HTML -->
1011
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
1112
<!-- Optional: for code highlighting -->

js/search.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function setupEventListeners() {
8484
// Load and index all documentation content
8585
function loadAllDocuments() {
8686
// List of all documentation files
87-
const docFiles = ['index', 'installation', 'api', 'frameworks', 'troubleshooting', 'advanced', 'contributing'];
87+
const docFiles = ['index', 'installation', 'api', 'frameworks'];
8888

8989
// Load each document and add to search index
9090
docFiles.forEach(filename => {
@@ -132,6 +132,14 @@ function openSearch() {
132132
searchModal.style.display = 'block';
133133
searchInput.focus();
134134
document.body.style.overflow = 'hidden'; // Prevent scrolling
135+
136+
// Force repaint to ensure modal is centered
137+
setTimeout(() => {
138+
searchModal.style.opacity = '0.99';
139+
setTimeout(() => {
140+
searchModal.style.opacity = '1';
141+
}, 10);
142+
}, 10);
135143
}
136144

137145
// Close search modal

static/svg/atlas.svg

Lines changed: 9 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)