diff --git a/css/pages/facilities.css b/css/pages/facilities.css index 2c412b9..33afdf9 100644 --- a/css/pages/facilities.css +++ b/css/pages/facilities.css @@ -1,24 +1,7 @@ /* Page-Specific Styles for Facilities */ -.facilities-hero { - margin-top: 44px; /* Navbar height */ - padding: 100px 20px 60px; - text-align: center; - background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); - color: #1d1d1f; -} - -.facilities-hero h1 { - font-size: 48px; - font-weight: 700; - margin-bottom: 16px; - letter-spacing: -0.02em; -} - -.hero-subtitle { - font-size: 20px; - font-weight: 400; - opacity: 0.8; +.facilities-hero-bg { + background-image: url('https://img.lunadeer.cn/i/2025/11/26/69267755e14e3.png'); } /* Container */ diff --git a/css/pages/stats.css b/css/pages/stats.css index f53c81b..978c577 100644 --- a/css/pages/stats.css +++ b/css/pages/stats.css @@ -1,9 +1,4 @@ /* Specific styles for stats page override/additions */ -.stats-hero { - height: 40vh; - min-height: 300px; -} - .stats-hero-bg { background-image: url('https://img.lunadeer.cn/i/2025/11/26/69267755e14e3.png'); } diff --git a/css/style.css b/css/style.css index 9837982..c1cfa7e 100644 --- a/css/style.css +++ b/css/style.css @@ -125,6 +125,11 @@ body { color: white; } +.page-hero { + height: 40vh; + min-height: 300px; +} + .home-hero { background-image: url('https://img.lunadeer.cn/i/2025/11/26/69267755e14e3.png'); } diff --git a/facilities.html b/facilities.html index 994334d..f17c621 100644 --- a/facilities.html +++ b/facilities.html @@ -54,10 +54,8 @@ -
-

全服共享资源

-

共同建设,共同分享,让生存更轻松。

-
+ +
diff --git a/js/components.js b/js/components.js index 4bcdf44..d40b998 100644 --- a/js/components.js +++ b/js/components.js @@ -52,6 +52,22 @@ const Components = { `, + initPageHero: function() { + const heroContainer = document.getElementById('hero-component'); + if (heroContainer) { + const title = heroContainer.dataset.title || ''; + const subtitle = heroContainer.dataset.subtitle || ''; + const extraClass = heroContainer.dataset.class || ''; + heroContainer.className = `hero page-hero ${extraClass}`; + heroContainer.innerHTML = ` +
+
+

${title}

+

${subtitle}

+
`; + } + }, + init: function() { // Inject Navbar const navContainer = document.getElementById('navbar-component'); @@ -59,6 +75,9 @@ const Components = { navContainer.innerHTML = this.navbarHTML; } + // Inject Page Hero + this.initPageHero(); + // Inject Footer const footerContainer = document.getElementById('footer-component'); if (footerContainer) { diff --git a/stats.html b/stats.html index 7cba148..6539a8a 100644 --- a/stats.html +++ b/stats.html @@ -56,13 +56,7 @@ -
-
-
-

数据中心

-

记录每一位冒险者的足迹

-
-
+