Auto commit: 2025-09-17T13:30:15.962Z
This commit is contained in:
parent
08116d4507
commit
5fa7c3442b
@ -1,7 +1,7 @@
|
|||||||
// Gentle animations on scroll for job cards
|
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
document.addEventListener('DOMContentLoaded', function () {
|
||||||
|
// 1. Gentle animations on scroll for job cards
|
||||||
const jobCards = document.querySelectorAll('.job-card');
|
const jobCards = document.querySelectorAll('.job-card');
|
||||||
|
if (jobCards.length > 0) {
|
||||||
const observer = new IntersectionObserver(entries => {
|
const observer = new IntersectionObserver(entries => {
|
||||||
entries.forEach(entry => {
|
entries.forEach(entry => {
|
||||||
if (entry.isIntersecting) {
|
if (entry.isIntersecting) {
|
||||||
@ -15,9 +15,8 @@ document.addEventListener('DOMContentLoaded', function () {
|
|||||||
card.style.opacity = '0'; // Start transparent
|
card.style.opacity = '0'; // Start transparent
|
||||||
observer.observe(card);
|
observer.observe(card);
|
||||||
});
|
});
|
||||||
});
|
|
||||||
|
|
||||||
// Add keyframes for the animation
|
// Add keyframes for the animation dynamically
|
||||||
const style = document.createElement('style');
|
const style = document.createElement('style');
|
||||||
style.innerHTML = `
|
style.innerHTML = `
|
||||||
@keyframes fadeInUp {
|
@keyframes fadeInUp {
|
||||||
@ -32,16 +31,16 @@ style.innerHTML = `
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
document.head.appendChild(style);
|
document.head.appendChild(style);
|
||||||
|
}
|
||||||
|
|
||||||
// Toggle for the job search form
|
// 2. Toggle for the job search form
|
||||||
document.addEventListener('DOMContentLoaded', function () {
|
|
||||||
const searchToggleBtn = document.getElementById('search-toggle-btn');
|
const searchToggleBtn = document.getElementById('search-toggle-btn');
|
||||||
const jobSearchForm = document.getElementById('job-search-form');
|
const jobSearchForm = document.getElementById('job-search-form');
|
||||||
|
|
||||||
if (searchToggleBtn && jobSearchForm) {
|
if (searchToggleBtn && jobSearchForm) {
|
||||||
searchToggleBtn.addEventListener('click', function () {
|
searchToggleBtn.addEventListener('click', function () {
|
||||||
jobSearchForm.classList.toggle('d-none');
|
jobSearchForm.classList.toggle('d-none');
|
||||||
// Optional: Change button text/icon
|
|
||||||
const isHidden = jobSearchForm.classList.contains('d-none');
|
const isHidden = jobSearchForm.classList.contains('d-none');
|
||||||
if (isHidden) {
|
if (isHidden) {
|
||||||
searchToggleBtn.innerHTML = `
|
searchToggleBtn.innerHTML = `
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user