Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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
11 changes: 11 additions & 0 deletions support/web/css/default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,17 @@ kbd {
}
}

#article-nav-left {
display: flex;
gap: 16px;
}

#narrow-search-btn {
background-color: transparent;
border: none;
font-size: 24px;
}


@include mixins.widescreen {
.narrow-only {
Expand Down
7 changes: 3 additions & 4 deletions support/web/js/prompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,9 @@ document.addEventListener("DOMContentLoaded", () => {
}
});

const searchInputProxy = document.getElementById("search-box-proxy") as HTMLInputElement | null;
if (searchInputProxy) {
searchInputProxy.addEventListener("focus", () => startSearch());
}
document.getElementById("search-box-proxy")?.addEventListener("focus", () => startSearch())
document.getElementById("narrow-search-btn")?.addEventListener("click", () => startSearch())


document.addEventListener("keydown", e => {
if (e.key == "k" && isShortcut(e)) {
Expand Down
22 changes: 15 additions & 7 deletions support/web/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
body span.reasoning-step .alternate {
display: none;
}

.js-only {
display: none !important;
}
</style>
</noscript>

Expand Down Expand Up @@ -93,7 +97,7 @@ <h3 class="Agda" style="margin-top: 0; margin-bottom: 0; white-space: pre;">
$endif$

<!-- Navbar navigation (lol) -->
<div class="search-form search-form-proxy mathpar" role="form">
<div class="search-form search-form-proxy mathpar js-only" role="form">
<input id="search-box-proxy" type_="text" placeholder="Search..." autocomplete="off" tabindex="0" />
</div>

Expand All @@ -117,13 +121,17 @@ <h3 class="Agda" style="margin-top: 0; margin-bottom: 0; white-space: pre;">
<article>
<!-- Article navigation (narrow screens only) -->
<div class="narrow-only" id="article-nav">
<!-- Index return anchor (only if the page is not the index) -->
$if(is-index)$
$else$
<div id=return>
<a href="$base-url$/">back to index</a>
<div id="article-nav-left">
<div class="mathpar">
<a id=logo href="$base-url$/">
<img alt="1Lab" src="$base-url$/static/cube-72x.png" style="display: block; margin-bottom: 1em; margin: auto;"
width="32px" height="32px" />
</a>
</div>
<div class="mathpar js-only">
<button id="narrow-search-btn">🔍</button>
</div>
</div>
$endif$

<!-- Navbar equations control -->
<span class="equations" style="display: flex; gap: 0.25em; flex-wrap: nowrap;">
Expand Down
Loading