feat(static): 首页新增 Bento 特性卡、CTA 横幅与品牌页脚
- 特性区改 Bento 网格(首尾卡跨两列)并加底部标签胶囊 - 关于区改左文右数据面板,移动端转竖排横数据 - 新增结尾品牌渐变 CTA 横幅(含深色模式适配) - 页脚重构为品牌+导航+备案三段 - CTA 按钮改 data-cta 多按钮绑定,渐显目标同步补全
This commit is contained in:
1 parent
8a661291c0
commit
46c1fdd914
3 files changed
+311
-25
No files matched your search
@@ -13,7 +13,7 @@
|
||||
const logoutBtn = document.getElementById('logoutBtn');
|
||||
const loginBtn = document.getElementById('loginBtn');
|
||||
const registerBtn = document.getElementById('registerBtn');
|
||||
const ctaBtn = document.getElementById('ctaBtn');
|
||||
const ctaBtns = document.querySelectorAll('[data-cta]'); // 首屏与页尾 CTA 按钮
|
||||
const logoEl = document.getElementById('logo');
|
||||
|
||||
let loggedIn = false;
|
||||
@@ -24,7 +24,9 @@
|
||||
enterBtn.addEventListener('click', () => go('dnfs.html'));
|
||||
loginBtn.addEventListener('click', () => go('login.html'));
|
||||
registerBtn.addEventListener('click', () => go('register.html'));
|
||||
ctaBtn.addEventListener('click', () => go(loggedIn ? 'dnfs.html' : 'login.html'));
|
||||
ctaBtns.forEach(function (btn) {
|
||||
btn.addEventListener('click', () => go(loggedIn ? 'dnfs.html' : 'login.html'));
|
||||
});
|
||||
|
||||
async function checkLogin() {
|
||||
try {
|
||||
@@ -40,7 +42,7 @@
|
||||
logoutBtn.style.display = '';
|
||||
loginBtn.style.display = 'none';
|
||||
registerBtn.style.display = 'none';
|
||||
ctaBtn.textContent = '进入我的知识树';
|
||||
ctaBtns.forEach(function (btn) { btn.textContent = '进入我的知识树'; });
|
||||
}
|
||||
} catch (e) {
|
||||
console.warn('index: 登录态检测失败', e.message);
|
||||
@@ -67,7 +69,7 @@
|
||||
|
||||
/* 滚动进入视口渐显:由 JS 添加 .reveal 隐藏初始态,无 JS / 减弱动效时内容天然可见 */
|
||||
if (!reduceMotion && 'IntersectionObserver' in window) {
|
||||
const targets = document.querySelectorAll('.section-eyebrow, .section-title, .feature-card, .about .site-intro, .quick-links');
|
||||
const targets = document.querySelectorAll('.section-eyebrow, .section-title, .section-sub, .feature-card, .about .site-intro, .about-stats, .quick-links, .cta-band');
|
||||
targets.forEach(function (el, i) {
|
||||
el.classList.add('reveal');
|
||||
el.style.transitionDelay = (i % 4) * 70 + 'ms';
|
||||
|
||||
Reference in new issue
Block a user