Skip to content

Commit

Permalink
Fix overlay showing, update elements spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
rayc2045 committed May 9, 2024
1 parent 065e936 commit 932b4a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
22 changes: 11 additions & 11 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
@dragstart.prevent
>
<nav class="sticky top-0 bg-inherit border-b border-gray-300 z-[1]">
<div class="max-w-screen-xl mx-auto px-4 sm:px-8 py-2 flex items-center gap-x-2 md:gap-x-4">
<div class="max-w-screen-xl mx-auto px-6 md:pl-8 py-2 flex items-center gap-x-2 md:gap-x-4">
<button
class="p-2 rounded-full hover:bg-gray-200 transition md:hidden"
class="p-2 md:hidden"
x-html="svg('menu')"
@click="sideMenu.show()"
@click="overlay.show(); sideMenu.show()"
></button>
<a
href="#/"
Expand Down Expand Up @@ -187,14 +187,14 @@
x-transition:leave="transition ease-gentle duration-300"
x-transition:leave-start="translate-x-0"
x-transition:leave-end="-translate-x-full"
@click.outside="sideMenu.hide()"
@resize.window="sideMenu.hide()"
@click.outside="sideMenu.hide(); overlay.hide();"
@resize.window="sideMenu.hide(); overlay.hide();"
>
<section class="px-4 py-2 flex gap-x-2 bg-gray-100 border-b border-gray-300">
<section class="px-6 py-2 flex gap-x-2 bg-gray-100 border-b border-gray-300">
<button
class="p-2 aspect-square rounded-full flex justify-center items-center text-gray-700 hover:bg-gray-200 transition"
class="p-2"
x-html="svg('menu')"
@click="sideMenu.hide()"
@click="sideMenu.hide(); overlay.hide();"
></button>
<a
href="#/"
Expand Down Expand Up @@ -331,7 +331,7 @@
</aside>

<section id="announcement" class="bg-gray-200 border-b border-gray-300">
<div class="mx-auto max-w-screen-xl px-4 sm:px-8 flex text-sm font-medium">
<div class="mx-auto max-w-screen-xl px-4 sm:px-6 flex text-sm font-medium">
<a
href="https://github.com/rayc2045/Hyper"
rel="noreferrer"
Expand All @@ -354,7 +354,7 @@
<main
class="flex-1"
x-init="await router.init()"
@hashchange.window="sideMenu.hide(); await scrollToTop(); router.updatePath(); router.renderPage();"
@hashchange.window="sideMenu.hide(); overlay.hide(); await scrollToTop(); router.updatePath(); router.renderPage();"
>
<div class="max-w-screen-xl mx-auto px-4 sm:px-8 py-12">
<h1
Expand Down Expand Up @@ -470,7 +470,7 @@ <h4 class="mb-4 font-medium">Customer Care</h4>

<span
id="breakpoint"
class="fixed right-5 bottom-5 text-xl text-[indianred] font-bold pointer-events-none"
class="fixed right-6 bottom-6 text-xl text-[indianred] font-bold pointer-events-none"
x-text="getBreakpointName()"
@resize.window="$el.textContent = getBreakpointName()"
></span>
Expand Down
2 changes: 0 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,12 +176,10 @@ const overlay = {
const sideMenu = {
isShow: false,
show() {
overlay.show();
this.isShow = true;
},
hide() {
this.isShow = false;
overlay.hide();
},
};

Expand Down

0 comments on commit 932b4a3

Please sign in to comment.