JS version
All checks were successful
Linting and checking code / get-version (push) Successful in 2s
Build and deploy preview site / check-tag (push) Successful in 2s
Linting and checking code / astro-check (push) Successful in 14s
Build and deploy preview site / checking (push) Successful in 14s
Build and deploy preview site / build-site (push) Successful in 1m5s
Build and deploy preview site / run-unlighthouse (push) Successful in 0s
Build and deploy preview site / create-release (push) Successful in 6s
Build and deploy preview site / auto-deploy-dockge (push) Successful in 5s

This commit is contained in:
Firq 2024-10-30 21:24:21 +01:00
parent 7a3c4f14ae
commit 6ff1e5ec1c
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20
2 changed files with 15 additions and 3 deletions

View file

@ -1,7 +1,7 @@
{
"name": "@firq/fgosite",
"type": "module",
"version": "0.2.0-pre.50",
"version": "0.2.0-pre.51",
"private": true,
"scripts": {
"dev": "astro dev",

View file

@ -13,6 +13,15 @@ const hamburger_src_url = `url("${hamburger.src}")`
</label>
</div>
<script>
const dropdownBtn = document.querySelector(".dropdown-btn")!;
const dropdownContent = document.querySelector(".dropdown-content")!;
dropdownBtn.addEventListener("click", () => {
dropdownContent.classList.toggle("menu-open");
});
</script>
<style define:vars={{ hamburger_src_url }}>
input[type="checkbox"] {
opacity: 0;
@ -20,9 +29,11 @@ const hamburger_src_url = `url("${hamburger.src}")`
touch-action: manipulation;
}
input[type="checkbox"]:checked ~ .dropdown-content {
.dropdown-content.menu-open {
display: flex;
height: auto;
transform: translateY(0);
transition: transform var(--a-time-default) var(--a-animation-1);
}
.dropdown-content {
@ -33,11 +44,12 @@ const hamburger_src_url = `url("${hamburger.src}")`
justify-content: center;
background-color: var(--c-primary-background);
width: 100%;
height: 0px;
list-style-type: none;
line-height: 3em;
margin: 0.5rem 0px 0px;
padding: 0;
transform: translateY(-1em);
transition: transform var(--a-time-default) var(--a-animation-1);
}
.dropdown-btn {