Skip to content

Commit 3ba0dca

Browse files
committed
New navbar.
1 parent 65d3044 commit 3ba0dca

File tree

11 files changed

+38
-1879
lines changed

11 files changed

+38
-1879
lines changed
7.88 KB
Loading

public/eps-logo.svg

Lines changed: 1 addition & 0 deletions
Loading

src/components/Footer.astro

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
---
2-
import { Fullbleed } from "./layout/fullbleed";
3-
4-
import links from "../data/links.json";
5-
import { EPSLogo } from "./logo/eps-logo";
2+
import { Image } from "astro:assets";
3+
import links from "@data/links.json";
4+
import EPSLogo from "../../public/eps-logo.svg";
65
76
const buildTimestamp = __TIMESTAMP__;
87
const gitVersion = __GIT_VERSION__;
@@ -36,7 +35,7 @@ const gitVersion = __GIT_VERSION__;
3635
class="flex flex-col lg:flex-row self-center gap-8 lg:gap-12 justify-end"
3736
>
3837
<div>
39-
<EPSLogo className="max-w-[100px] lg:max-w-[200px] h-auto w-full" />
38+
<EPSLogo width=200 height=200 class="max-w-[100px] lg:max-w-[200px] h-auto w-full" />
4039
</div>
4140
<div>
4241
<address class="not-italic mb-4">

src/components/Header.astro

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ import Search from "@components/Search.astro";
77
import links from "../data/links.json";
88
---
99

10-
<header class="p-6 flex items-center justify-between relative z-40">
10+
<section id="navbar" class="fixed top-0 z-50 transition-transform duration-300 transform-gpu w-full">
11+
<div class="container max-w-[1150px] mx-auto py-2 mt-2 lg:p-2 lg:mt-6 px-6 flex items-center justify-between relative z-40 bg-white/80 lg:rounded-lg backdrop-blur-md shadow-lg">
1112
<input
1213
type="checkbox"
1314
name="mobile-controls"
@@ -25,7 +26,7 @@ import links from "../data/links.json";
2526
<HeaderActions />
2627

2728
<div
28-
class="fixed bg-body-background top-0 left-0 w-screen h-screen overflow-scroll hidden peer-checked:block xl:peer-checked:hidden z-50 p-6"
29+
class="fixed bg-body-background top-0 left-0 w-screen h-screen overflow-scroll hidden peer-checked:block xl:peer-checked:hidden z-50 px-6 py-2 "
2930
>
3031
<div class="flex items-center justify-between">
3132
<HeaderLogo />
@@ -54,5 +55,30 @@ import links from "../data/links.json";
5455
/>
5556
</nav>
5657
</div>
58+
</div>
59+
</section>
5760
<Search />
58-
</header>
61+
62+
<script>
63+
let prevScrollPos = window.pageYOffset;
64+
const navbar = document.getElementById("navbar");
65+
66+
// Auto-hide Navbar on scroll
67+
window.onscroll = function () {
68+
let currentScrollPos = window.pageYOffset;
69+
if (prevScrollPos > currentScrollPos) {
70+
navbar.style.transform = "translateY(0)";
71+
} else {
72+
navbar.style.transform = "translateY(-100%)";
73+
}
74+
prevScrollPos = currentScrollPos;
75+
};
76+
77+
// Mobile Menu Toggle
78+
//const menuBtn = document.getElementById("menu-btn");
79+
//const mobileMenu = document.getElementById("mobile-menu");
80+
//
81+
//menuBtn.addEventListener("click", () => {
82+
// mobileMenu.classList.toggle("hidden");
83+
//});
84+
</script>

src/components/header/header-actions.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const IS_LIVE = false;
1515
//<Button id="searchButton" icon="search" iconSize="fa-xl" clear title="Search (Crtl+K)"></Button>
1616
---
1717

18-
<div class="flex items-center justify-end gap-2 h-[85px] w-1/3">
18+
<div class="flex items-center justify-end gap-2 w-1/3">
1919
<div class="ml-auto justify-end flex items-center w-full">
2020
{
2121
!mobile ?
@@ -34,7 +34,7 @@ const IS_LIVE = false;
3434
<kbd>Ctrl</kbd><kbd>K</kbd>
3535
</kbd>
3636
</button>
37-
<Button url="/tickets" icon="ticket" class="w-full max-w-48 max-xl:hidden">Register Now!</Button>
37+
<Button url="/tickets" icon="ticket" class="w-full max-w-48 max-xl:hidden">Tickets</Button>
3838
{IS_LIVE && <Button url="/live">Live</Button>}
3939
</>
4040
: null
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
---
2-
import { Logo } from "../logo";
3-
42
interface Props {
53
inverted?: boolean;
64
}
75
---
86

97
<a href="/">
10-
<img class="md:block block w-[44px] h-[44px] md:w-[85px] md:h-[85px] " src="/EuroPython2025_logo.png" />
8+
<img class="md:block block w-[44px] h-[44px]" src="/EuroPython2025_logo.png" />
119
</a>

src/components/logo/eps-logo.tsx

Lines changed: 0 additions & 128 deletions
This file was deleted.

src/components/logo/index.tsx

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)