Skip to content
Open
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
15 changes: 14 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h1 class="bg-title">PROJECTS</h1>
<h1 class="title">Projects</h1>
</div>
<form id="searchForm">
<input id="search" type="text" placeholder="Enter projects to search" />
<input id="search" type="text" placeholder="Search projects (Ctrl + K)" />
<button type="submit"><i class="fa-solid fa-magnifying-glass"></i></button>
</form>
</div>
Expand Down Expand Up @@ -157,6 +157,19 @@ <h1 class="title">Contributors</h1>
}
// code for preloader ends
</script>
<script>
// Focus search input on Ctrl+K or Cmd+K
document.addEventListener("keydown", function (e) {
if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "k") {
e.preventDefault(); // Prevent browser's default search (if any)
const searchInput = document.getElementById("search");
if (searchInput) {
searchInput.focus();
}
}
});
</script>

</body>

</html>
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.