refactor: 死代码清理 + CDN SRI 加固 + 面包屑组件 + 代码规范文档
- 删除 7 个死模板文件 (products/services/quality/process/projects/customization/rfq) - 删除 13 个旧图片素材 (jpg/png/webp) - 新增 CDN SRI 完整性校验 (Bootstrap CSS/JS) - 新增面包屑导航模板组件 - 新增代码清理方案与代码审查标准文档 - 更新 README.md
This commit is contained in:
@@ -4,8 +4,6 @@
|
||||
document.documentElement.classList.remove('no-js');
|
||||
document.documentElement.classList.add('js');
|
||||
|
||||
var reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||
|
||||
function initStickyHeader() {
|
||||
var header = document.querySelector('#header');
|
||||
if (!header) return;
|
||||
@@ -16,11 +14,6 @@
|
||||
window.addEventListener('scroll', updateHeader, { passive: true });
|
||||
}
|
||||
|
||||
function initAnimations() {
|
||||
if (!window.AOS || typeof window.AOS.init !== 'function') return;
|
||||
window.AOS.init({ duration: reducedMotion ? 0 : 700, once: true, disable: reducedMotion });
|
||||
}
|
||||
|
||||
function initVideoLightbox() {
|
||||
if (!$.fn || typeof $.fn.colorbox !== 'function') return;
|
||||
$('.youtube').colorbox({ iframe: true, innerWidth: 960, innerHeight: 585, maxWidth: '95%', maxHeight: '90%' });
|
||||
@@ -39,7 +32,6 @@
|
||||
|
||||
$(function () {
|
||||
initStickyHeader();
|
||||
initAnimations();
|
||||
initVideoLightbox();
|
||||
initNavigation();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user