-
Couldn't load subscription status.
- Fork 0
NAVBAR #20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
NAVBAR #20
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,67 @@ | ||
| <nav class="flex items-center w-full justify-between bg-white p-1"> | ||
| --- | ||
| import ButtonFd from "@common/ButtonFd.astro" | ||
| --- | ||
|
|
||
| <nav id="main-nav" class="relative flex items-center w-full justify-between bg-white p-1"> | ||
| <div></div> | ||
| <a href="/firstdate/home/"> | ||
| <img src="/common/logo_freshmenfest.svg" alt="logo" /> | ||
| </a> | ||
| <button> | ||
| <img src="/common/logo_freshmenfest.svg" alt="logo" /> | ||
| <button id="hamburger-button-main" aria-label="Toggle menu" aria-controls="nav-menu" aria-expanded="false"> | ||
| <img src="/common/hamburger.svg" alt="menu" class="h-3 w-auto -translate-x-4" /> | ||
| </button> | ||
| </nav> | ||
| </nav> | ||
| <nav id="nav-menu" class="hidden fixed inset-0 min-h-screen z-50 bg-white"> | ||
| <div class="relative flex items-center w-full justify-between bg-white p-1"> | ||
| <div></div> | ||
| <img src="/common/logo_freshmenfest.svg" alt="logo" /> | ||
| <button id="hamburger-button-menu"> | ||
| <img src="/common/hamburger.svg" alt="menu" class="h-3 w-auto -translate-x-4" /> | ||
| </button> | ||
| </div> | ||
| <div class="flex flex-col px-6"> | ||
| <div class="flex w-full justify-center"> | ||
| <hr class="w-full h-[3px] bg-black"/> | ||
| </div> | ||
| <ul class="text-black flex flex-col gap-y-6 text-xl my-6"> | ||
| <li> | ||
| <a href="/firstdate/home">หน้าหลัก</a> | ||
| </li> | ||
| <li> | ||
| <a href="/cufest/">CU FEST</a> | ||
| </li> | ||
| <li> | ||
| <a href="/rpkm/home">รับเพื่อนก้าวใหม่</a> | ||
| </li> | ||
| <li> | ||
| <a href="/firstdate/profile">PROFILE</a> | ||
| </li> | ||
| <li> | ||
| <a href="/firstdate/qrcode">QR CODE</a> | ||
| </li> | ||
| </ul> | ||
| <div class="flex w-full justify-center mb-6"> | ||
| <hr class="w-full h-[3px] bg-black"/> | ||
| </div> | ||
| <div class="flex w-full justify-center text-black"> | ||
| <ButtonFd variant="stroke-no-shadow" color="black" href="/logout"> | ||
| ออกจากระบบ | ||
| </ButtonFd> | ||
| </div> | ||
| </div> | ||
| </nav> | ||
|
|
||
| <script is:inline type="module"> | ||
| document.addEventListener("DOMContentLoaded", () => { | ||
| const hamburgerButton = document.getElementById("hamburger-button-main"); | ||
| const hamburgerButtonMenu = document.getElementById("hamburger-button-menu"); | ||
| const navMenu = document.getElementById("nav-menu"); | ||
|
|
||
| hamburgerButton.addEventListener("click", () => { | ||
| navMenu.classList.toggle("hidden"); | ||
| }); | ||
|
|
||
| hamburgerButtonMenu.addEventListener("click", () => { | ||
| navMenu.classList.toggle("hidden"); | ||
|
|
||
| }); | ||
| }); | ||
| </script> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a GET link for logout can be susceptible to CSRF. Consider changing this to a POST form with a CSRF token to securely perform the logout action.