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.
398 changes: 398 additions & 0 deletions users_microservice/src/main/resources/templates/home/index.html

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
// Mobile menu toggle
const mobileMenuBtn = document.querySelector('.mobile-menu-btn');
const navLinks = document.querySelector('.nav-links');
const navCta = document.querySelector('.nav-cta');

mobileMenuBtn.addEventListener('click', () => {
const isOpen = navLinks.classList.toggle('active');
navCta.classList.toggle('active', isOpen);
mobileMenuBtn.textContent = isOpen ? '✕' : '☰';

// Dynamically position CTA below nav-links
if (isOpen) {
setTimeout(() => {
const navLinksHeight = navLinks.offsetHeight;
navCta.style.top = `calc(100% + ${navLinksHeight}px)`;
}, 10);
}
});

// Close mobile menu when clicking a link
navLinks.querySelectorAll('a').forEach(link => {
link.addEventListener('click', () => {
navLinks.classList.remove('active');
navCta.classList.remove('active');
mobileMenuBtn.textContent = '☰';
});
});

// Pricing toggle
const PRICING = {
monthly: {
price: 30,
period: '/mo',
billed: '',
savings: ''
},
quarterly: {
price: 25.50,
period: '/mo',
billed: 'Billed $76.50 every 3 months',
savings: 'Save 15%'
},
yearly: {
price: 21,
period: '/mo',
billed: 'Billed $252 per year',
savings: 'Save 30%'
}
};

function updatePricing(billing) {
const plan = PRICING[billing];

// Update active button
document.querySelectorAll('.billing-option').forEach(btn => {
btn.classList.toggle('active', btn.dataset.billing === billing);
});

// Update price display
const priceEl = document.getElementById('proPrice');
const billedEl = document.getElementById('proBilled');
const savingsEl = document.getElementById('proSavings');

// Animate price change
priceEl.style.opacity = '0';
priceEl.style.transform = 'translateY(-10px)';

setTimeout(() => {
priceEl.textContent = plan.price % 1 === 0 ? plan.price : plan.price.toFixed(2);
billedEl.textContent = plan.billed;
savingsEl.textContent = plan.savings;

priceEl.style.opacity = '1';
priceEl.style.transform = 'translateY(0)';
}, 150);
}

document.querySelectorAll('.billing-option').forEach(btn => {
btn.addEventListener('click', () => updatePricing(btn.dataset.billing));
});

// Add transition to price element
document.getElementById('proPrice').style.transition = 'all 0.15s ease';
Loading