Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const config = {

// File processing order (dependency-aware)
cssOrder: ['base.css', 'layout.css', 'components.css', 'themes.css', 'prism.css'],
jsOrder: ['prism-core.js', 'navigation.js', 'progress.js', 'code-blocks.js', 'quiz.js', 'main.js'],
jsOrder: ['prism-core.js', 'navigation.js', 'progress.js', 'code-blocks.js', 'quiz.js', 'search.js', 'main.js'],

// Template placeholders
placeholders: {
Expand Down
26 changes: 26 additions & 0 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,32 @@
<h2>RESTful API Design</h2>
<p>7-Day Learning Module</p>
</div>

<!-- Search -->
<div class="search-container">
<div class="search-input-wrapper">
<svg class="search-icon" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<circle cx="11" cy="11" r="8"></circle>
<path d="m21 21-4.35-4.35"></path>
</svg>
<input
type="text"
id="search-input"
class="search-input"
placeholder="Search topics..."
autocomplete="off"
aria-label="Search course content"
/>
<button id="search-clear" class="search-clear" style="display: none;" aria-label="Clear search">
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</button>
</div>
<div id="search-results" class="search-results" style="display: none;"></div>
</div>

<div id="nav-container"></div>
</nav>

Expand Down
3 changes: 2 additions & 1 deletion src/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ function loadTheme() {

/**
* Initialize the application when DOM is ready
* Sets up theme, loads progress, renders navigation, and initializes code blocks
* Sets up theme, loads progress, renders navigation, initializes code blocks, and search
*/
document.addEventListener('DOMContentLoaded', () => {
loadTheme();
loadProgress();
renderNav();
updateProgress();
initializeCodeBlocks();
initializeSearch();
});
Loading