File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 4646 </ nav >
4747 </ div >
4848 < div id ="buttons " class ="flex min-w-0 items-center justify-end gap-4 flex-shrink-0 ">
49- < div class ="topbar-button ">
49+ < div class ="topbar-button " id =" search-bar-container " >
5050 {{ partialCached "search-bar.html" "-" }}
5151 </ div >
5252 < button
Original file line number Diff line number Diff line change 4444 </ span >
4545 </ div >
4646 < div
47+ id ="search-bar-dropdown "
4748 x-show ="open "
4849 x-cloak
4950 x-ref ="dropdown "
5051 x-init ="$nextTick(() => {
5152 if (open) {
53+ const containerRect = document.getElementById('search-bar-container').getBoundingClientRect();
5254 const rect = $refs.searchBarRef.getBoundingClientRect();
5355 $el.style.top = (rect.bottom + window.scrollY + 9) + 'px';
54- $el.style.left = (rect .right - Math.max(rect.width, 400)) + 'px';
56+ $el.style.left = (containerRect .right - Math.max(rect.width, 400)) + 'px';
5557 $el.style.width = Math.max(rect.width, 400) + 'px';
5658 }
5759 }) "
5860 x-effect ="if (open) {
61+ const containerRect = document.getElementById('search-bar-container').getBoundingClientRect();
5962 const rect = $refs.searchBarRef.getBoundingClientRect();
6063 $el.style.top = (rect.bottom + window.scrollY + 9) + 'px';
61- $el.style.left = (rect .right - Math.max(rect.width, 400)) + 'px';
64+ $el.style.left = (containerRect .right - Math.max(rect.width, 400)) + 'px';
6265 $el.style.width = Math.max(rect.width, 400) + 'px';
6366 } "
6467 class ="bg-background-light dark:bg-background-dark fixed z-[999] max-w-xl rounded-sm px-6 py-4 shadow-lg "
You can’t perform that action at this time.
0 commit comments