Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
71 changes: 43 additions & 28 deletions apps/khix/src/app/(portal)/_components/khix-dashboard.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -818,16 +818,12 @@
.main {
position: relative;
z-index: 2;
display: grid;
min-width: 0;
height: 100vh;
height: 100dvh;
min-height: 0;
grid-template-rows: minmax(0, 1fr) auto;
grid-column: 2;
grid-row: 1;
gap: clamp(1rem, 2.4vh, 1.8rem);
justify-items: center;
overflow-x: hidden;
overflow-y: auto;
overscroll-behavior: contain;
Expand All @@ -853,12 +849,22 @@
background-size:
cover,
clamp(34rem, 56vw, 74rem) clamp(34rem, 56vw, 74rem);
padding: clamp(1rem, 2.4vw, 2rem) clamp(1rem, 3.6vw, 4rem)
clamp(1.4rem, 3vw, 2.5rem) clamp(1.25rem, 3vw, 3.5rem);
animation: khixDashboardSceneEnter var(--khix-motion-page)
var(--khix-ease-soft) both;
}

.mainCanvas {
position: relative;
display: grid;
width: 100%;
min-height: 100%;
grid-template-rows: minmax(0, 1fr) auto;
gap: clamp(1rem, 2.4vh, 1.8rem);
justify-items: center;
padding: clamp(1rem, 2.4vw, 2rem) clamp(1rem, 3.6vw, 4rem)
clamp(1.4rem, 3vw, 2.5rem) clamp(1.25rem, 3vw, 3.5rem);
}

.statusMain {
grid-template-rows: minmax(min-content, 1fr) auto;
overflow-x: hidden;
Expand All @@ -869,15 +875,15 @@
scrollbar-gutter: stable;
}

.main::before,
.mainCanvas::before,
.main::after {
position: absolute;
inset: 0;
pointer-events: none;
content: "";
}

.main::before {
.mainCanvas::before {
z-index: 0;
background-image:
var(--khix-dashboard-background-image),
Expand Down Expand Up @@ -913,14 +919,16 @@
contain: paint;
}

.main > * {
.mainCanvas > * {
position: relative;
z-index: 1;
}

.main > .portalMagic {
.mainCanvas > .portalMagic {
position: absolute;
z-index: 0;
width: 100%;
height: 100%;
}

.portalMagic,
Expand Down Expand Up @@ -1649,8 +1657,8 @@
--wisp-y-end: 3.4rem;
}

.profileMain,
.loreMain {
.profileMain .mainCanvas,
.loreMain .mainCanvas {
grid-template-rows: auto;
align-content: start;
align-items: start;
Expand All @@ -1664,12 +1672,12 @@
overflow-x: hidden;
}

.profileMain {
.profileMain .mainCanvas {
padding-top: clamp(6rem, 12dvh, 8.25rem);
}

.profileMain::before,
.loreMain::before {
.profileMain .mainCanvas::before,
.loreMain .mainCanvas::before {
opacity: 0.3;
-webkit-mask-image: linear-gradient(
180deg,
Expand Down Expand Up @@ -4180,16 +4188,19 @@

.main {
min-height: 0;
}

.mainCanvas {
padding: 1rem 1rem 1rem clamp(1rem, 2.6vw, 1.8rem);
}

.statusMain,
.profileMain,
.loreMain {
.profileMain .mainCanvas,
.loreMain .mainCanvas {
padding-top: clamp(6rem, 14dvh, 9rem);
}

.profileMain {
.profileMain .mainCanvas {
padding-top: clamp(3.6rem, 8dvh, 5.25rem);
}

Expand Down Expand Up @@ -4285,7 +4296,7 @@
right 32% top 16%;
}

.main::before {
.mainCanvas::before {
background-position:
right 38% center,
center;
Expand Down Expand Up @@ -4606,14 +4617,18 @@
grid-column: 1;
grid-row: 2;
height: auto;
min-height: calc(100dvh - 4.35rem);
overflow: visible;
overscroll-behavior: auto;
scrollbar-gutter: auto;
}

.mainCanvas {
min-height: calc(100dvh - 4.35rem);
grid-template-rows: auto;
align-content: start;
gap: 1rem;
justify-items: center;
overflow: visible;
overscroll-behavior: auto;
scrollbar-gutter: auto;
padding: var(--khix-mobile-page-top-padding)
max(1.1rem, env(safe-area-inset-right))
calc(1.15rem + env(safe-area-inset-bottom))
Expand All @@ -4627,12 +4642,12 @@
overscroll-behavior: auto;
}

.profileMain,
.loreMain {
.profileMain .mainCanvas,
.loreMain .mainCanvas {
padding-top: var(--khix-mobile-page-top-padding);
}

.profileMain {
.profileMain .mainCanvas {
padding: var(--khix-mobile-page-top-padding)
max(0.85rem, env(safe-area-inset-right))
calc(1rem + env(safe-area-inset-bottom))
Expand Down Expand Up @@ -5166,12 +5181,12 @@
max(1rem, env(safe-area-inset-left));
}

.main {
.mainCanvas {
padding-right: max(1rem, env(safe-area-inset-right));
padding-left: max(1rem, env(safe-area-inset-left));
}

.profileMain {
.profileMain .mainCanvas {
padding-right: max(0.7rem, env(safe-area-inset-right));
padding-left: max(0.7rem, env(safe-area-inset-left));
}
Expand Down Expand Up @@ -5322,7 +5337,7 @@

@media (prefers-reduced-motion: reduce) {
.main,
.main::before,
.mainCanvas::before,
.main::after,
.portalMagic,
.portalMagic::before,
Expand Down
44 changes: 23 additions & 21 deletions apps/khix/src/app/(portal)/_components/khix-dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ interface CountdownState {
const WITHDRAW_HOLD_READY_MS = 1100;
const MOBILE_DRAWER_TRANSITION_MS = 280;
const KHIX_EVENT_DETAILS =
"October 9-11, 2026 at University of Central Florida";
"October 9 - 11, 2026 at University of Central Florida";
const PORTAL_FIREFLY_IDS = Array.from({ length: 24 }, (_, index) =>
String(index + 1),
);
Expand Down Expand Up @@ -1172,27 +1172,29 @@ function KhixDashboardShell({
)}
tabIndex={-1}
>
<span className={styles.portalMagic} aria-hidden="true">
<span className={styles.portalCanopyGlow} />
<span className={styles.portalFireflies}>
{PORTAL_FIREFLY_IDS.map((fireflyId) => (
<span
key={fireflyId}
className={styles.portalFirefly}
data-firefly={fireflyId}
/>
))}
<div className={styles.mainCanvas}>
<span className={styles.portalMagic} aria-hidden="true">
<span className={styles.portalCanopyGlow} />
<span className={styles.portalFireflies}>
{PORTAL_FIREFLY_IDS.map((fireflyId) => (
<span
key={fireflyId}
className={styles.portalFirefly}
data-firefly={fireflyId}
/>
))}
</span>
<span className={styles.portalWisp} data-wisp="one" />
<span className={styles.portalWisp} data-wisp="two" />
<span className={styles.portalWisp} data-wisp="three" />
<span className={styles.portalWisp} data-wisp="four" />
<span className={styles.portalWisp} data-wisp="five" />
<span className={styles.portalWisp} data-wisp="six" />
<span className={styles.portalWisp} data-wisp="seven" />
<span className={styles.portalWisp} data-wisp="eight" />
</span>
<span className={styles.portalWisp} data-wisp="one" />
<span className={styles.portalWisp} data-wisp="two" />
<span className={styles.portalWisp} data-wisp="three" />
<span className={styles.portalWisp} data-wisp="four" />
<span className={styles.portalWisp} data-wisp="five" />
<span className={styles.portalWisp} data-wisp="six" />
<span className={styles.portalWisp} data-wisp="seven" />
<span className={styles.portalWisp} data-wisp="eight" />
</span>
{children}
{children}
</div>
</div>
</div>
</main>
Expand Down
25 changes: 17 additions & 8 deletions apps/khix/src/app/_components/navbar/Navbar.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
transform: translate3d(0, 0, 0);
transform-origin: 50% 0;
transition:
opacity 220ms ease,
transform 300ms cubic-bezier(0.18, 0.7, 0.2, 1),
opacity 300ms ease-in-out,
transform 300ms ease-in-out,
filter 180ms ease;
}

Expand Down Expand Up @@ -91,9 +91,9 @@
border-radius: 999px;
background: transparent;
box-shadow: none;
backdrop-filter: blur(56px) saturate(1.22);
backdrop-filter: none;
pointer-events: auto;
-webkit-backdrop-filter: blur(56px) saturate(1.22);
-webkit-backdrop-filter: none;
}

.brand {
Expand Down Expand Up @@ -616,12 +616,19 @@

@media (max-width: 900px) {
.mlhTrustBadge {
position: absolute;
top: 0;
right: calc(env(safe-area-inset-right, 0px) + 1rem);
right: env(safe-area-inset-right, 0px);
width: clamp(3.25rem, 13vw, 4rem);
min-width: 3.25rem;
max-width: 4rem;
padding-top: calc(env(safe-area-inset-top, 0px) + 0.75rem);
padding-top: env(safe-area-inset-top, 0px);
}

.mlhTrustBadge[data-hidden="true"] {
opacity: 1;
pointer-events: auto;
transform: none;
}

.navbar {
Expand Down Expand Up @@ -672,8 +679,10 @@
}

@media (prefers-reduced-motion: reduce) {
.navbar,
.mlhTrustBadge,
.navbar {
animation: none;
}

.brand,
.link,
.link::after,
Expand Down
35 changes: 28 additions & 7 deletions apps/khix/src/app/_components/navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,19 @@ interface NavbarProps {
}

const HIDE_SCROLL_Y = 80;
const HIDE_MLH_SCROLL_Y = 50;
const SCROLL_DELTA = 6;
const CLOSE_TRANSITION_FALLBACK_MS = 620;
const REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
const MOBILE_NAV_QUERY = "(max-width: 900px)";

export function Navbar({
links,
socialLinks = [],
homeHref = "#home",
}: NavbarProps) {
const [isHidden, setIsHidden] = useState(false);
const [isMlhHidden, setIsMlhHidden] = useState(false);
const [isMenuOpen, setIsMenuOpen] = useState(false);
const [isMenuClosing, setIsMenuClosing] = useState(false);
const isMenuVisible = isMenuOpen || isMenuClosing;
Expand All @@ -54,18 +57,23 @@ export function Navbar({
}, []);

useEffect(() => {
const reducedMotion = window.matchMedia(REDUCED_MOTION_QUERY);
if (reducedMotion.matches) {
return;
}

const mobileNav = window.matchMedia(MOBILE_NAV_QUERY);
let lastScrollY = window.scrollY;
let ticking = false;

const updateVisibility = () => {
const currentScrollY = window.scrollY;
const scrollDelta = currentScrollY - lastScrollY;

setIsMlhHidden(currentScrollY > HIDE_MLH_SCROLL_Y);

if (mobileNav.matches) {
setIsHidden(false);
lastScrollY = currentScrollY;
ticking = false;
return;
}

if (currentScrollY <= HIDE_SCROLL_Y) {
setIsHidden(false);
lastScrollY = currentScrollY;
Expand All @@ -92,7 +100,20 @@ export function Navbar({

window.addEventListener("scroll", handleScroll, { passive: true });

return () => window.removeEventListener("scroll", handleScroll);
const handleMobileNavChange = (event: MediaQueryListEvent) => {
if (event.matches) {
setIsHidden(false);
}

lastScrollY = window.scrollY;
};
Comment thread
Adr1an04 marked this conversation as resolved.

mobileNav.addEventListener("change", handleMobileNavChange);

return () => {
window.removeEventListener("scroll", handleScroll);
mobileNav.removeEventListener("change", handleMobileNavChange);
};
}, [isMenuVisible]);

useEffect(() => {
Expand Down Expand Up @@ -320,7 +341,7 @@ export function Navbar({
</nav>
</div>
</header>
<MLHBadge isHidden={isNavHidden} isMenuOpen={isMenuVisible} />
<MLHBadge isHidden={isMlhHidden} isMenuOpen={isMenuVisible} />
</>
);
}
Expand Down
Loading
Loading