From 72632f097bffeb528a8a19c23db252391146600b Mon Sep 17 00:00:00 2001 From: huyuanxiang <273637057@qq.com> Date: Fri, 27 Mar 2026 10:48:26 +0800 Subject: [PATCH] =?UTF-8?q?[add]=E6=B7=BB=E5=8A=A0HTML=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=96=87=E4=BB=B6=20[update]emc-epc=E9=A3=8E=E6=A0=BC=E4=B8=BA?= =?UTF-8?q?=E4=B8=BB=E4=BD=93=E9=A3=8E=E6=A0=BC=EF=BC=8C=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E9=80=89=E4=B8=AD=E9=A2=9C=E8=89=B2=E6=9B=B4?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../themes/nenghui-energy-theme-4/404.php | 106 ++++++++++++++++++ .../assets/css/index.css | 5 +- .../nenghui-energy-theme-4/assets/js/index.js | 104 ++++++++--------- .../themes/nenghui-energy-theme-4/header.php | 2 +- .../themes/nenghui-energy-theme-4/style.css | 27 ++--- .../blocks/block-banner-title.php | 1 - .../template-parts/blocks/block-news.php | 4 +- 7 files changed, 176 insertions(+), 73 deletions(-) create mode 100644 wp-content/themes/nenghui-energy-theme-4/404.php diff --git a/wp-content/themes/nenghui-energy-theme-4/404.php b/wp-content/themes/nenghui-energy-theme-4/404.php new file mode 100644 index 0000000..0d4114c --- /dev/null +++ b/wp-content/themes/nenghui-energy-theme-4/404.php @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + 404 + + + + + + + + + Oops! That page can't be found. + + You might have typed in the wrong address or the page has moved. + + + + + Go Homepage + + + + Contact Us + + + + + + + + + \ No newline at end of file diff --git a/wp-content/themes/nenghui-energy-theme-4/assets/css/index.css b/wp-content/themes/nenghui-energy-theme-4/assets/css/index.css index f02fca7..92bfbb4 100644 --- a/wp-content/themes/nenghui-energy-theme-4/assets/css/index.css +++ b/wp-content/themes/nenghui-energy-theme-4/assets/css/index.css @@ -250,7 +250,7 @@ img { .banner-title { font-size: 3rem; - font-weight: bold; + margin-bottom: 1rem; text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); } @@ -434,8 +434,7 @@ img { } .news-title { - font-size: 48px; - font-weight: bold; + font-size: 42px; color: #333; letter-spacing: 2px; } diff --git a/wp-content/themes/nenghui-energy-theme-4/assets/js/index.js b/wp-content/themes/nenghui-energy-theme-4/assets/js/index.js index 3a5101f..c260992 100644 --- a/wp-content/themes/nenghui-energy-theme-4/assets/js/index.js +++ b/wp-content/themes/nenghui-energy-theme-4/assets/js/index.js @@ -299,62 +299,62 @@ document.addEventListener('DOMContentLoaded', function() { // }); // 鼠标移入移出导航栏效果 - nav.addEventListener('mouseenter', function() { - nav.classList.add('scrolled'); - nav.style.backgroundColor = '#fff'; - nav.style.boxShadow = '0 2px 10px rgba(0, 0, 0, 0.1)'; - // 设置菜单项颜色为黑色 - const menuLinks = nav.querySelectorAll('.menu-items > li > a'); - menuLinks.forEach(link => { - link.style.color = '#000'; - }); - // 确保下拉菜单项保持黑色 - const subMenuLinks = nav.querySelectorAll('.sub-menu li a'); - subMenuLinks.forEach(link => { - link.style.color = '#333'; - }); - }); + // nav.addEventListener('mouseenter', function() { + // nav.classList.add('scrolled'); + // nav.style.backgroundColor = '#fff'; + // nav.style.boxShadow = '0 2px 10px rgba(0, 0, 0, 0.1)'; + // // 设置菜单项颜色为黑色 + // const menuLinks = nav.querySelectorAll('.menu-items > li > a'); + // menuLinks.forEach(link => { + // link.style.color = '#ddd'; + // }); + // // 确保下拉菜单项保持黑色 + // const subMenuLinks = nav.querySelectorAll('.sub-menu li a'); + // subMenuLinks.forEach(link => { + // link.style.color = '#333'; + // }); + // }); - nav.addEventListener('mouseleave', function() { - const currentScroll = window.pageYOffset; - // 根据当前滚动位置决定是否保持背景色 - if (currentScroll <= 80) { - nav.classList.remove('scrolled'); - nav.style.backgroundColor = ''; - nav.style.boxShadow = ''; + // nav.addEventListener('mouseleave', function() { + // const currentScroll = window.pageYOffset; + // // 根据当前滚动位置决定是否保持背景色 + // if (currentScroll <= 80) { + // nav.classList.remove('scrolled'); + // nav.style.backgroundColor = ''; + // nav.style.boxShadow = ''; - // 设置菜单项颜色为白色 - const menuLinks = nav.querySelectorAll('.menu-items > li > a'); - menuLinks.forEach(link => { - link.style.color = '#333'; - }); - // 确保下拉菜单项保持黑色 - const subMenuLinks = nav.querySelectorAll('.sub-menu li a'); - subMenuLinks.forEach(link => { - link.style.color = '#333'; - }); - } - }); + // // 设置菜单项颜色为白色 + // const menuLinks = nav.querySelectorAll('.menu-items > li > a'); + // menuLinks.forEach(link => { + // link.style.color = '#333'; + // }); + // // 确保下拉菜单项保持黑色 + // const subMenuLinks = nav.querySelectorAll('.sub-menu li a'); + // subMenuLinks.forEach(link => { + // link.style.color = '#333'; + // }); + // } + // }); // 为有子菜单的项目添加特殊处理 - const menuItemsWithChildren = nav.querySelectorAll('.menu-item-has-children'); - menuItemsWithChildren.forEach(function(item) { - item.addEventListener('mouseenter', function() { - // 确保导航栏有背景色以便下拉菜单显示 - nav.classList.add('scrolled'); - nav.style.backgroundColor = '#fff'; - nav.style.boxShadow = '0 2px 10px rgba(0, 0, 0, 0.1)'; - const menuLinks = nav.querySelectorAll('.menu-items > li > a'); - menuLinks.forEach(link => { - link.style.color = '#000'; - }); - // 确保下拉菜单项保持黑色 - const subMenuLinks = nav.querySelectorAll('.sub-menu li a'); - subMenuLinks.forEach(link => { - link.style.color = '#333'; - }); - }); - }); + // const menuItemsWithChildren = nav.querySelectorAll('.menu-item-has-children'); + // menuItemsWithChildren.forEach(function(item) { + // item.addEventListener('mouseenter', function() { + // // 确保导航栏有背景色以便下拉菜单显示 + // nav.classList.add('scrolled'); + // nav.style.backgroundColor = '#fff'; + // nav.style.boxShadow = '0 2px 10px rgba(0, 0, 0, 0.1)'; + // const menuLinks = nav.querySelectorAll('.menu-items > li > a'); + // menuLinks.forEach(link => { + // link.style.color = '#333'; + // }); + // // 确保下拉菜单项保持黑色 + // const subMenuLinks = nav.querySelectorAll('.sub-menu li a'); + // subMenuLinks.forEach(link => { + // link.style.color = '#333'; + // }); + // }); + // }); // 窗口大小改变时重置菜单状态 window.addEventListener('resize', function() { diff --git a/wp-content/themes/nenghui-energy-theme-4/header.php b/wp-content/themes/nenghui-energy-theme-4/header.php index cde42c5..106d5f7 100644 --- a/wp-content/themes/nenghui-energy-theme-4/header.php +++ b/wp-content/themes/nenghui-energy-theme-4/header.php @@ -187,7 +187,7 @@ 0 15px 20px rgba(0, 0, 0, 0.3), /* 中距离扩散阴影 */ 0 25px 40px rgba(0, 0, 0, 0.8); /* 远距离环境阴影 */ } - .text-3d-ultra { + .-ultra { color: #ffffff; /* 1. 顶部左侧的亮色高光切割边 */ text-shadow: diff --git a/wp-content/themes/nenghui-energy-theme-4/style.css b/wp-content/themes/nenghui-energy-theme-4/style.css index 46370de..b7c1f0a 100644 --- a/wp-content/themes/nenghui-energy-theme-4/style.css +++ b/wp-content/themes/nenghui-energy-theme-4/style.css @@ -43,7 +43,7 @@ position: relative; overflow: hidden; /* 确保容器有高度,否则图片没加载时高度为0 */ - min-height: 100px; + min-height: 100px; } .dark .skeleton-wrapper { background-color: #374151; /* Tailwind gray-700 */ @@ -62,7 +62,7 @@ table{ width: 100%!important; max-width: 100%!important; - } + } /* 防止横向滚动条 */ html, body { /* overflow-x: hidden; */ @@ -132,7 +132,7 @@ border-radius: 0 0 10px 10px; padding: 20px; } - + /* 导航菜单样式 */ .main-nav { position: sticky; @@ -143,7 +143,7 @@ z-index: 1000; transition: transform 0.3s ease; background-color: #fff;; - + } .nav-container { @@ -201,21 +201,22 @@ display: flex; align-items: center; position: relative; + cursor: pointer; } .menu-items li a { color: #333; text-decoration: none; font-size: 1rem; - font-weight: 500; padding: 8px 0; border-radius: 4px; transition: all 0.3s ease; } - .menu-items li a:hover { - background: rgba(0, 0, 0, 0.05); - color: #000; + .menu-items li a:hover, .menu-items li.menu-item-has-children > a:hover { + /* background: rgba(0, 0, 0, 0.05); */ + font-weight: normal; + color: #007cba !important;; } /* 下拉菜单样式 */ @@ -506,11 +507,11 @@ form.fluent_form_3 .ff-btn-submit:not(.ff_btn_no_style) { width: 100% !important; } - form.fluent_form_1 .ff-btn-submit:not(.ff_btn_no_style){ - width: 100%; - } + form.fluent_form_1 .ff-btn-submit:not(.ff_btn_no_style){ + width: 100%; + } } - + /* 文章卡片网格布局 */ .content-area { max-width: 1200px; @@ -612,4 +613,4 @@ } .accordion-body{ color: #000000!important; - } \ No newline at end of file + } diff --git a/wp-content/themes/nenghui-energy-theme-4/template-parts/blocks/block-banner-title.php b/wp-content/themes/nenghui-energy-theme-4/template-parts/blocks/block-banner-title.php index 6cb64e2..9ce708a 100644 --- a/wp-content/themes/nenghui-energy-theme-4/template-parts/blocks/block-banner-title.php +++ b/wp-content/themes/nenghui-energy-theme-4/template-parts/blocks/block-banner-title.php @@ -278,7 +278,6 @@ $overlay_opacity = is_numeric($overlay_opacity) ? $overlay_opacity : '0.4'; /* 文字样式 */ .nenghui-banner-title .banner-title { font-size: clamp(2.5rem, 5vw, 4rem); - font-weight: 700; line-height: 1.2; margin: 0 0 1.5rem 0; letter-spacing: 3px; diff --git a/wp-content/themes/nenghui-energy-theme-4/template-parts/blocks/block-news.php b/wp-content/themes/nenghui-energy-theme-4/template-parts/blocks/block-news.php index 3bc97d0..96ba59c 100644 --- a/wp-content/themes/nenghui-energy-theme-4/template-parts/blocks/block-news.php +++ b/wp-content/themes/nenghui-energy-theme-4/template-parts/blocks/block-news.php @@ -139,7 +139,6 @@ $news_query = new WP_Query($query_args); .news-title { font-size: 36px; - font-weight: bold; color: #333; margin: 0; } @@ -178,7 +177,6 @@ $news_query = new WP_Query($query_args); .news-card-title { font-size: 16px; - font-weight: 600; color: #333; margin-bottom: 8px; line-height: 1.4; @@ -189,7 +187,7 @@ $news_query = new WP_Query($query_args); } .news-card-description { - font-size: 14px; + font-size: 12px; color: #666; line-height: 1.6; display: -webkit-box;
You might have typed in the wrong address or the page has moved.