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
353 changes: 329 additions & 24 deletions frontend/index.html

Large diffs are not rendered by default.

420 changes: 54 additions & 366 deletions frontend/register.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions frontend/src/config/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export const EVENT = {
/** Countdown target, ISO 8601 with IST offset. Keep in sync with the date shown in index.html. */
startsAt: '2026-10-25T09:00:00+05:30',

/** Where every "Register" button points. Replace with the form URL once it exists. */
registerUrl: '/register.html',
/** Where every "Register" button points. Points to the inline registration section on the home page. */
registerUrl: '#registration',

/** Footer links. Empty string = link stays hidden-safe ("#"). */
socials: {
Expand Down
40 changes: 40 additions & 0 deletions frontend/src/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,43 @@ import { initHeroParallax } from './hero-parallax.js';
import { initOffscreenPause } from './motion.js';
import { initFog } from './fog/fog.js';
import { prefersReducedMotion, isLowPowerDevice } from './device.js';
import { initRegistration } from './register.js';

function scrollToRegistration(e) {
const target = document.getElementById('registration') || document.getElementById('register');
if (target) {
if (e && typeof e.preventDefault === 'function') {
e.preventDefault();
if (window.history && window.history.pushState) {
window.history.pushState(null, '', '#registration');
} else {
window.location.hash = 'registration';
}
}
target.scrollIntoView({ behavior: 'smooth', block: 'start' });
// Keep keyboard accessibility and focus the first form input smoothly
setTimeout(() => {
const firstInput = target.querySelector('input:not([disabled]), select:not([disabled])');
if (firstInput) {
firstInput.focus({ preventScroll: true });
}
}, 600);
}
}

function applyLinks() {
document.querySelectorAll('[data-register-link]').forEach((link) => {
link.setAttribute('href', EVENT.registerUrl);
link.addEventListener('click', scrollToRegistration);
});

// Also bind any in-page anchor links pointing to #registration or #register
document.querySelectorAll('a[href="#registration"], a[href="#register"]').forEach((link) => {
if (!link.hasAttribute('data-register-link')) {
link.addEventListener('click', scrollToRegistration);
}
});

document.querySelectorAll('[data-social]').forEach((link) => {
const url = EVENT.socials[link.dataset.social];
if (url) {
Expand All @@ -32,8 +64,16 @@ function init() {
initFaq(document.querySelector('[data-faq]'));
initSessions(document.querySelector('[data-sessions]'));
initEventCards();
initRegistration();
initOffscreenPause(document.querySelectorAll('main > section'));

// If page is loaded with #registration or #register hash, scroll smoothly to section
if (window.location.hash === '#registration' || window.location.hash === '#register') {
setTimeout(() => {
scrollToRegistration();
}, 150);
}

const hero = document.querySelector('[data-hero]');
const reduced = prefersReducedMotion();
if (!reduced) initHeroParallax(hero);
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/scripts/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,13 @@ export async function submitRegistration(data) {
};
}

let isInitialized = false;

/**
* Initializes the registration form interface.
*/
export function initRegistration() {
if (isInitialized) return;
const form = document.getElementById('register-form');
const successCard = document.getElementById('register-success');
const submitBtn = document.getElementById('submit-btn');
Expand All @@ -188,6 +191,7 @@ export function initRegistration() {
const emailStatusBanner = document.getElementById('email-status-banner');

if (!form) return;
isInitialized = true;

const fields = ['name', 'email', 'mobile_number', 'year', 'department', 'college_name'];
const touched = {};
Expand Down
1 change: 1 addition & 0 deletions frontend/src/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
@import './sections/faq.css';
@import './sections/sponsor.css';
@import './sections/events.css';
@import './sections/register-page.css';
@import './sections/register.css';
@import './sections/footer.css';
78 changes: 35 additions & 43 deletions frontend/src/styles/sections/register.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
.register {
position: relative;
overflow: hidden;
padding: 110px var(--gutter) 48px;
padding: 110px var(--gutter) 80px;
text-align: center;
background: var(--c-night);
}

.register-anchor {
position: absolute;
top: 0;
left: 0;
width: 1px;
height: 1px;
pointer-events: none;
visibility: hidden;
}

.register__spotlight {
position: absolute;
left: 50%;
Expand All @@ -17,6 +28,7 @@
background: radial-gradient(ellipse, rgb(138 77 255 / 0.28), transparent 65%);
pointer-events: none;
}

.register__inner {
position: relative;
z-index: 3;
Expand All @@ -27,46 +39,12 @@
align-items: center;
}

/* Floating ghost over a still base */
.haunt {
position: relative;
width: 240px;
display: flex;
flex-direction: column;
align-items: center;
}
.haunt__ghost {
position: relative;
z-index: 2;
width: 180px;
filter: drop-shadow(0 0 30px rgb(201 168 255 / 0.35));
}
.haunt__base {
position: relative;
width: 230px;
margin-top: 18px;
}
.haunt__base img {
filter: drop-shadow(0 14px 16px rgb(0 0 0 / 0.45));
}
.haunt__shadow {
position: absolute;
left: 50%;
top: 30%;
width: 120px;
height: 18px;
margin-left: -60px;
border-radius: 50%;
background: radial-gradient(ellipse, rgb(10 20 5 / 0.6), transparent 70%);
animation: shadow-breathe 5s ease-in-out infinite;
}

.register__title {
margin-top: 24px;
margin-top: 20px;
font-family: var(--font-display);
font-weight: 400;
font-size: clamp(2.75rem, 6vw, 5rem);
line-height: 1.02;
font-size: clamp(2.75rem, 6vw, 4.5rem);
line-height: 1.05;
color: var(--c-text-warm);
text-shadow:
0 1px 0 #9c6bf5,
Expand All @@ -77,13 +55,27 @@
0 6px 0 #3b1b73,
0 16px 26px rgb(5 0 15 / 0.55);
}

.register__text {
max-width: 40ch;
margin-top: 20px;
font-size: 1.25rem;
max-width: 48ch;
margin-top: 16px;
font-size: 1.1875rem;
line-height: 1.55;
color: var(--c-text-muted);
}
.register .btn {
margin-top: 34px;

/* Inline registration form card adjustments inside the section */
.register .register-card {
margin-top: 64px;
text-align: left;
}

@media (max-width: 600px) {
.register {
padding: 80px var(--gutter) 60px;
}

.register .register-card {
margin-top: 48px;
}
}
12 changes: 8 additions & 4 deletions frontend/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,21 @@ function multiPageRewritePlugin() {
return {
name: 'multi-page-rewrite',
configureServer(server) {
server.middlewares.use((req, _res, next) => {
server.middlewares.use((req, res, next) => {
if (req.url === '/register' || req.url === '/register/') {
req.url = '/register.html';
res.writeHead(302, { Location: '/#registration' });
res.end();
return;
}
next();
});
},
configurePreviewServer(server) {
server.middlewares.use((req, _res, next) => {
server.middlewares.use((req, res, next) => {
if (req.url === '/register' || req.url === '/register/') {
req.url = '/register.html';
res.writeHead(302, { Location: '/#registration' });
res.end();
return;
}
next();
});
Expand Down
Loading