[add]添加HTML模板文件

[update]emc-epc风格为主体风格,首页导航选中颜色更改
dev-about
huyuanxiang 4 weeks ago
parent 720866e042
commit 72632f097b

@ -0,0 +1,106 @@
<?php
/**
* The template for displaying 404 pages (Not Found)
* Theme: NENGHUI Energy - Borderless Digital Space & 3D Typography
*/
// 强制修改标题
add_filter('pre_get_document_title', function() { return '404'; }, 9999);
add_filter('wp_title', function() { return '404'; }, 9999);
get_header(); ?>
<style>
:root {
--nh-primary: #13eca4;
--nh-dark: #121010;
--nh-bg-light: #f8fcfa;
}
/* 确保主背景通透大气 */
.nh-404-canvas {
min-height: 100vh;
background: #f8fcfa; /* 使用你定义的背景底色 */
background: linear-gradient(135deg, #f8fcfa 0%, #f0f7f5 50%, #dcfce7 60%);
font-family: 'Inter', sans-serif;
color: var(--nh-dark);
position: relative;
overflow: hidden;
}
.font-display { font-family: 'Space Grotesk', sans-serif; }
/* * 核心视觉3D 立体悬浮数字 404
* 利用多层 text-shadow 营造绿色霓虹的厚度感
*/
.text-3d-glow {
color: white; /* 亮色前景 */
/* 1层核心亮绿霓虹 */
text-shadow: 0 1px 0 #b3f3db,
0 2px 0 #83f0ca,
0 3px 0 #54eeb8,
0 4px 0 #13eca4, /* 主色层 */
/* 2层向下的柔和深色投影 */
0 6px 1px rgba(0,0,0,0.1),
0 0 5px rgba(0,0,0,0.1),
/* 3层绿色氛围发光 (Neon Glow) */
0 1px 15px rgba(19, 236, 164, 0.4),
0 3px 25px rgba(19, 236, 164, 0.2);
}
/* 微动效 */
@keyframes float-soft {
0%, 100% { transform: translateY(0); }
50% { transform: translateY(-10px); }
}
.floating-text {
animation: float-soft 5s ease-in-out infinite;
}
</style>
<main class="nh-404-canvas relative flex items-center justify-center p-8 overflow-hidden">
<div class="fixed inset-0 pointer-events-none z-0">
<div class="absolute -top-[10%] -left-[10%] w-[50%] h-[50%] bg-primary/5 rounded-full blur-[150px] animate-blob-spin"></div>
<div class="absolute bottom-[-10%] right-[-10%] w-[40%] h-[40%] bg-teal-200/20 rounded-full blur-[120px]"></div>
</div>
<div class="relative z-10 w-full max-w-4xl text-center" data-aos="fade-up" data-aos-duration="1200">
<div class="flex flex-col items-center mb-24">
<h1 class="text-3d-glow font-display text-[150px] md:text-[200px] font-black tracking-tighter leading-none floating-text">
404
</h1>
</div>
<div class="space-y-6 mb-24 flex flex-col items-center">
<h2 class="font-display text-3xl text-background-dark tracking-tight leading-tight max-w-lg">
Oops! That page can't be found.
</h2>
<p>You might have typed in the wrong address or the page has moved.</p>
</div>
<div class="flex flex-col sm:flex-row items-center justify-center gap-8 mt-12 w-full sm:w-auto">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"
class="w-full sm:w-auto px-16 h-16 bg-primary text-background-dark font-bold rounded-full flex items-center justify-center shadow-lg shadow-primary/20 hover:shadow-primary/40 hover:scale-105 transition-all duration-300 text-xs uppercase tracking-[0.2em]">
Go Homepage
</a>
<a href="<?php echo esc_url( home_url( '/contact-us/' ) ); ?>"
class="w-full sm:w-auto px-16 h-16 bg-white/60 backdrop-blur-md border border-primary/10 text-background-dark font-bold rounded-full flex items-center justify-center hover:bg-white transition-all duration-300 text-xs uppercase tracking-[0.2em]">
Contact Us
</a>
</div>
</div>
</main>
<script>
// 最终保险JS 强制修改标题
document.title = "Shanghai Nenghui Energy: Innovative ESS Solutions";
</script>
<?php get_footer(); ?>

@ -250,7 +250,7 @@ img {
.banner-title { .banner-title {
font-size: 3rem; font-size: 3rem;
font-weight: bold;
margin-bottom: 1rem; margin-bottom: 1rem;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
} }
@ -434,8 +434,7 @@ img {
} }
.news-title { .news-title {
font-size: 48px; font-size: 42px;
font-weight: bold;
color: #333; color: #333;
letter-spacing: 2px; letter-spacing: 2px;
} }

@ -299,62 +299,62 @@ document.addEventListener('DOMContentLoaded', function() {
// }); // });
// 鼠标移入移出导航栏效果 // 鼠标移入移出导航栏效果
nav.addEventListener('mouseenter', function() { // nav.addEventListener('mouseenter', function() {
nav.classList.add('scrolled'); // nav.classList.add('scrolled');
nav.style.backgroundColor = '#fff'; // nav.style.backgroundColor = '#fff';
nav.style.boxShadow = '0 2px 10px rgba(0, 0, 0, 0.1)'; // nav.style.boxShadow = '0 2px 10px rgba(0, 0, 0, 0.1)';
// 设置菜单项颜色为黑色 // // 设置菜单项颜色为黑色
const menuLinks = nav.querySelectorAll('.menu-items > li > a'); // const menuLinks = nav.querySelectorAll('.menu-items > li > a');
menuLinks.forEach(link => { // menuLinks.forEach(link => {
link.style.color = '#000'; // link.style.color = '#ddd';
}); // });
// 确保下拉菜单项保持黑色 // // 确保下拉菜单项保持黑色
const subMenuLinks = nav.querySelectorAll('.sub-menu li a'); // const subMenuLinks = nav.querySelectorAll('.sub-menu li a');
subMenuLinks.forEach(link => { // subMenuLinks.forEach(link => {
link.style.color = '#333'; // link.style.color = '#333';
}); // });
}); // });
nav.addEventListener('mouseleave', function() { // nav.addEventListener('mouseleave', function() {
const currentScroll = window.pageYOffset; // const currentScroll = window.pageYOffset;
// 根据当前滚动位置决定是否保持背景色 // // 根据当前滚动位置决定是否保持背景色
if (currentScroll <= 80) { // if (currentScroll <= 80) {
nav.classList.remove('scrolled'); // nav.classList.remove('scrolled');
nav.style.backgroundColor = ''; // nav.style.backgroundColor = '';
nav.style.boxShadow = ''; // nav.style.boxShadow = '';
// 设置菜单项颜色为白色 // // 设置菜单项颜色为白色
const menuLinks = nav.querySelectorAll('.menu-items > li > a'); // const menuLinks = nav.querySelectorAll('.menu-items > li > a');
menuLinks.forEach(link => { // menuLinks.forEach(link => {
link.style.color = '#333'; // link.style.color = '#333';
}); // });
// 确保下拉菜单项保持黑色 // // 确保下拉菜单项保持黑色
const subMenuLinks = nav.querySelectorAll('.sub-menu li a'); // const subMenuLinks = nav.querySelectorAll('.sub-menu li a');
subMenuLinks.forEach(link => { // subMenuLinks.forEach(link => {
link.style.color = '#333'; // link.style.color = '#333';
}); // });
} // }
}); // });
// 为有子菜单的项目添加特殊处理 // 为有子菜单的项目添加特殊处理
const menuItemsWithChildren = nav.querySelectorAll('.menu-item-has-children'); // const menuItemsWithChildren = nav.querySelectorAll('.menu-item-has-children');
menuItemsWithChildren.forEach(function(item) { // menuItemsWithChildren.forEach(function(item) {
item.addEventListener('mouseenter', function() { // item.addEventListener('mouseenter', function() {
// 确保导航栏有背景色以便下拉菜单显示 // // 确保导航栏有背景色以便下拉菜单显示
nav.classList.add('scrolled'); // nav.classList.add('scrolled');
nav.style.backgroundColor = '#fff'; // nav.style.backgroundColor = '#fff';
nav.style.boxShadow = '0 2px 10px rgba(0, 0, 0, 0.1)'; // nav.style.boxShadow = '0 2px 10px rgba(0, 0, 0, 0.1)';
const menuLinks = nav.querySelectorAll('.menu-items > li > a'); // const menuLinks = nav.querySelectorAll('.menu-items > li > a');
menuLinks.forEach(link => { // menuLinks.forEach(link => {
link.style.color = '#000'; // link.style.color = '#333';
}); // });
// 确保下拉菜单项保持黑色 // // 确保下拉菜单项保持黑色
const subMenuLinks = nav.querySelectorAll('.sub-menu li a'); // const subMenuLinks = nav.querySelectorAll('.sub-menu li a');
subMenuLinks.forEach(link => { // subMenuLinks.forEach(link => {
link.style.color = '#333'; // link.style.color = '#333';
}); // });
}); // });
}); // });
// 窗口大小改变时重置菜单状态 // 窗口大小改变时重置菜单状态
window.addEventListener('resize', function() { window.addEventListener('resize', function() {

@ -187,7 +187,7 @@
0 15px 20px rgba(0, 0, 0, 0.3), /* 中距离扩散阴影 */ 0 15px 20px rgba(0, 0, 0, 0.3), /* 中距离扩散阴影 */
0 25px 40px rgba(0, 0, 0, 0.8); /* 远距离环境阴影 */ 0 25px 40px rgba(0, 0, 0, 0.8); /* 远距离环境阴影 */
} }
.text-3d-ultra { .-ultra {
color: #ffffff; color: #ffffff;
/* 1. 顶部左侧的亮色高光切割边 */ /* 1. 顶部左侧的亮色高光切割边 */
text-shadow: text-shadow:

@ -43,7 +43,7 @@
position: relative; position: relative;
overflow: hidden; overflow: hidden;
/* 确保容器有高度否则图片没加载时高度为0 */ /* 确保容器有高度否则图片没加载时高度为0 */
min-height: 100px; min-height: 100px;
} }
.dark .skeleton-wrapper { .dark .skeleton-wrapper {
background-color: #374151; /* Tailwind gray-700 */ background-color: #374151; /* Tailwind gray-700 */
@ -62,7 +62,7 @@
table{ table{
width: 100%!important; width: 100%!important;
max-width: 100%!important; max-width: 100%!important;
} }
/* 防止横向滚动条 */ /* 防止横向滚动条 */
html, body { html, body {
/* overflow-x: hidden; */ /* overflow-x: hidden; */
@ -132,7 +132,7 @@
border-radius: 0 0 10px 10px; border-radius: 0 0 10px 10px;
padding: 20px; padding: 20px;
} }
/* 导航菜单样式 */ /* 导航菜单样式 */
.main-nav { .main-nav {
position: sticky; position: sticky;
@ -143,7 +143,7 @@
z-index: 1000; z-index: 1000;
transition: transform 0.3s ease; transition: transform 0.3s ease;
background-color: #fff;; background-color: #fff;;
} }
.nav-container { .nav-container {
@ -201,21 +201,22 @@
display: flex; display: flex;
align-items: center; align-items: center;
position: relative; position: relative;
cursor: pointer;
} }
.menu-items li a { .menu-items li a {
color: #333; color: #333;
text-decoration: none; text-decoration: none;
font-size: 1rem; font-size: 1rem;
font-weight: 500;
padding: 8px 0; padding: 8px 0;
border-radius: 4px; border-radius: 4px;
transition: all 0.3s ease; transition: all 0.3s ease;
} }
.menu-items li a:hover { .menu-items li a:hover, .menu-items li.menu-item-has-children > a:hover {
background: rgba(0, 0, 0, 0.05); /* background: rgba(0, 0, 0, 0.05); */
color: #000; font-weight: normal;
color: #007cba !important;;
} }
/* 下拉菜单样式 */ /* 下拉菜单样式 */
@ -506,11 +507,11 @@
form.fluent_form_3 .ff-btn-submit:not(.ff_btn_no_style) { form.fluent_form_3 .ff-btn-submit:not(.ff_btn_no_style) {
width: 100% !important; width: 100% !important;
} }
form.fluent_form_1 .ff-btn-submit:not(.ff_btn_no_style){ form.fluent_form_1 .ff-btn-submit:not(.ff_btn_no_style){
width: 100%; width: 100%;
} }
} }
/* 文章卡片网格布局 */ /* 文章卡片网格布局 */
.content-area { .content-area {
max-width: 1200px; max-width: 1200px;
@ -612,4 +613,4 @@
} }
.accordion-body{ .accordion-body{
color: #000000!important; color: #000000!important;
} }

@ -278,7 +278,6 @@ $overlay_opacity = is_numeric($overlay_opacity) ? $overlay_opacity : '0.4';
/* 文字样式 */ /* 文字样式 */
.nenghui-banner-title .banner-title { .nenghui-banner-title .banner-title {
font-size: clamp(2.5rem, 5vw, 4rem); font-size: clamp(2.5rem, 5vw, 4rem);
font-weight: 700;
line-height: 1.2; line-height: 1.2;
margin: 0 0 1.5rem 0; margin: 0 0 1.5rem 0;
letter-spacing: 3px; letter-spacing: 3px;

@ -139,7 +139,6 @@ $news_query = new WP_Query($query_args);
.news-title { .news-title {
font-size: 36px; font-size: 36px;
font-weight: bold;
color: #333; color: #333;
margin: 0; margin: 0;
} }
@ -178,7 +177,6 @@ $news_query = new WP_Query($query_args);
.news-card-title { .news-card-title {
font-size: 16px; font-size: 16px;
font-weight: 600;
color: #333; color: #333;
margin-bottom: 8px; margin-bottom: 8px;
line-height: 1.4; line-height: 1.4;
@ -189,7 +187,7 @@ $news_query = new WP_Query($query_args);
} }
.news-card-description { .news-card-description {
font-size: 14px; font-size: 12px;
color: #666; color: #666;
line-height: 1.6; line-height: 1.6;
display: -webkit-box; display: -webkit-box;

Loading…
Cancel
Save