Files
yilv 5701faae72 1.1.1 /*patch*/修改了部分路径
/*add*/新增文件careers.html,以及对应css和js,上传字体资源文件和图片文件
2025-02-09 10:55:25 +08:00

38 lines
1.2 KiB
JavaScript

// ... existing code ...
document.getElementById('careers').addEventListener('click', function(e) {
e.preventDefault(); // 阻止默认锚点跳转
alert('你已经在这里啦(^• ω •^)ノ');
// 如果确实需要跳转可以添加:
// window.location.href = "/";
});
// 导航栏滚动效果
window.addEventListener('scroll', () => {
const nav = document.querySelector('nav');
window.scrollY > 100 ?
nav.classList.add('nav-scrolled') :
nav.classList.remove('nav-scrolled');
});
// 加载状态控制
window.addEventListener('DOMContentLoaded', () => {
document.documentElement.classList.remove('slideshow-loading');
});
window.addEventListener('load', () => {
const loader = document.querySelector('.loading-spinner');
if (loader) loader.style.display = 'none';
});
// 防止页面加载时的布局闪烁
document.documentElement.style.visibility = 'hidden';
window.addEventListener('load', () => {
document.documentElement.style.visibility = 'visible';
});
// ... existing code ...
window.addEventListener('scroll', () => {
const body = document.querySelector('body');
body.classList.toggle('scrolling', window.scrollY > 50);
});