Auto commit: 2025-09-17T13:30:15.962Z

This commit is contained in:
Flatlogic Bot 2025-09-17 13:30:15 +00:00
parent 08116d4507
commit 5fa7c3442b

View File

@ -1,25 +1,24 @@
// Gentle animations on scroll for job cards
document.addEventListener('DOMContentLoaded', function () {
// 1. Gentle animations on scroll for job cards
const jobCards = document.querySelectorAll('.job-card');
if (jobCards.length > 0) {
const observer = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.style.animation = 'fadeInUp 0.5s ease-out forwards';
observer.unobserve(entry.target);
}
});
}, { threshold: 0.1 });
const observer = new IntersectionObserver(entries => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.style.animation = 'fadeInUp 0.5s ease-out forwards';
observer.unobserve(entry.target);
}
jobCards.forEach(card => {
card.style.opacity = '0'; // Start transparent
observer.observe(card);
});
}, { threshold: 0.1 });
jobCards.forEach(card => {
card.style.opacity = '0'; // Start transparent
observer.observe(card);
});
});
// Add keyframes for the animation
const style = document.createElement('style');
style.innerHTML = `
// Add keyframes for the animation dynamically
const style = document.createElement('style');
style.innerHTML = `
@keyframes fadeInUp {
from {
opacity: 0;
@ -31,17 +30,17 @@ style.innerHTML = `
}
}
`;
document.head.appendChild(style);
document.head.appendChild(style);
}
// Toggle for the job search form
document.addEventListener('DOMContentLoaded', function () {
// 2. Toggle for the job search form
const searchToggleBtn = document.getElementById('search-toggle-btn');
const jobSearchForm = document.getElementById('job-search-form');
if (searchToggleBtn && jobSearchForm) {
searchToggleBtn.addEventListener('click', function () {
jobSearchForm.classList.toggle('d-none');
// Optional: Change button text/icon
const isHidden = jobSearchForm.classList.contains('d-none');
if (isHidden) {
searchToggleBtn.innerHTML = `
@ -54,4 +53,4 @@ document.addEventListener('DOMContentLoaded', function () {
}
});
}
});
});