Skip to content

Commit 93f6f43

Browse files
committed
use flex header
1 parent 83a191b commit 93f6f43

File tree

3 files changed

+26
-14
lines changed

3 files changed

+26
-14
lines changed

hugo_stats.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"-v",
1212
"-z-10",
1313
".NET",
14+
"2xl:flex",
1415
":",
1516
"AWS-Route-53",
1617
"Admin-Console",
@@ -200,6 +201,7 @@
200201
"border-green-400",
201202
"border-l-2",
202203
"border-l-magenta-light",
204+
"border-none",
203205
"border-transparent",
204206
"border-white",
205207
"bottom-0",
@@ -291,7 +293,9 @@
291293
"flex-grow",
292294
"flex-none",
293295
"flex-shrink",
296+
"flex-shrink-0",
294297
"flex-wrap",
298+
"focus:outline-none",
295299
"focus:ring-3-blue-light",
296300
"font-bold",
297301
"font-medium",
@@ -445,6 +449,9 @@
445449
"ml-3",
446450
"ml-4",
447451
"ml-auto",
452+
"mr-15",
453+
"mr-24",
454+
"mr-4",
448455
"mt-1",
449456
"mt-1.5",
450457
"mt-2",
@@ -477,6 +484,7 @@
477484
"outline-1",
478485
"outline-gray-200",
479486
"outline-hidden",
487+
"outline-none",
480488
"outline-offset-[-1px]",
481489
"overflow-clip",
482490
"overflow-hidden",
@@ -602,15 +610,23 @@
602610
"truncate",
603611
"underline-offset-2",
604612
"w-1.5",
613+
"w-100",
605614
"w-2",
615+
"w-3",
616+
"w-30",
617+
"w-3items-center",
618+
"w-40",
606619
"w-5",
620+
"w-50",
607621
"w-65",
608622
"w-8",
609623
"w-[1200px]",
610624
"w-fit",
611625
"w-full",
612626
"w-screen",
613627
"whitespace-nowrap",
628+
"x",
629+
"xl:flex",
614630
"xl:flex-row",
615631
"xl:grid-cols-3",
616632
"xl:grid-cols-4",

layouts/partials/header.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
</div>
2727
</a>
2828
</div>
29-
<nav class="mt-1 hidden md:block">
29+
<nav class="mt-1 hidden md:flex lg:flex xl:flex 2xl:flex">
30+
{{/* main menu */}}
3031
<ul class="flex text-sm md:text-base lg:gap-4">
3132
{{ range site.Menus.main }}
3233
<li
@@ -44,8 +45,8 @@
4445
</ul>
4546
</nav>
4647
</div>
47-
<div class="flex min-w-0 items-center justify-end gap-4">
48-
<div class="topbar-button overflow-visible">
48+
<div id="buttons" class="flex min-w-0 items-center justify-end gap-4 flex-shrink-0">
49+
<div class="topbar-button">
4950
{{ partialCached "search-bar.html" "-" }}
5051
</div>
5152
<button

layouts/partials/search-bar.html

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
1-
<!-- search button, mobile (link off to the search page for now) -->
2-
<a href="/search" class="sm:hidden">
3-
<span class="icon-svg">{{ partialCached "icon" "search" "search" }}</span>
4-
</a>
5-
<!-- search button -->
61
<div
72
x-ref="searchBarRef"
83
x-data="{ open: false }"
94
@click.outside="open = false;"
105
@keyup.escape.window="open = false"
116
id="search-bar"
12-
class="relative items-center flex"
7+
class="relative w-40 items-center flex"
138
>
14-
<div id="search-bar-keyboard-shortcuts" x-cloak :class="open && 'hidden'"
15-
class="sm:hidden rounded-sm text-sm md:flex md:items-center"
9+
<div id="search-bar-keyboard-shortcuts"
10+
class="text-sm flex items-center"
1611
>
1712
<div>
1813
<span x-show="navigator.platform == 'MacIntel'" class="icon-svg icon-sm">{{ partialCached "icon"
@@ -40,7 +35,7 @@
4035
break;
4136
}
4237
}"
43-
class="min-w-0 flex-grow px-2 text-white outline-hidden order-1"
38+
class="flex-grow px-2 order-1 min-w-0 border-none outline-none focus:outline-none"
4439
tabindex="0"
4540
/>
4641
<div id="search-bar-icon" class="order-2">
@@ -56,14 +51,14 @@
5651
if (open) {
5752
const rect = $refs.searchBarRef.getBoundingClientRect();
5853
$el.style.top = (rect.bottom + window.scrollY + 9) + 'px';
59-
$el.style.left = rect.left + 'px';
54+
$el.style.left = (rect.right - Math.max(rect.width, 400)) + 'px';
6055
$el.style.width = Math.max(rect.width, 400) + 'px';
6156
}
6257
})"
6358
x-effect="if (open) {
6459
const rect = $refs.searchBarRef.getBoundingClientRect();
6560
$el.style.top = (rect.bottom + window.scrollY + 9) + 'px';
66-
$el.style.left = rect.left + 'px';
61+
$el.style.left = (rect.right - Math.max(rect.width, 400)) + 'px';
6762
$el.style.width = Math.max(rect.width, 400) + 'px';
6863
}"
6964
class="bg-background-light dark:bg-background-dark fixed z-[999] max-w-xl rounded-sm px-6 py-4 shadow-lg"

0 commit comments

Comments
 (0)