feat: 添加新闻资讯

This commit is contained in:
ZhuRui
2026-08-25 16:54:53 +08:00
parent 944005507f
commit 1cb974c662
11 changed files with 1218 additions and 0 deletions
+316
View File
@@ -0,0 +1,316 @@
/* 新闻资讯页面样式(资讯中心 / 行业资讯 / 更新日志) */
.news-page {
background-color: #fff;
}
/* 顶部 banner:复用站点 .banner 结构,图片通过 .banner__bg 填充 */
.news-page .banner {
width: 100%;
height: 400px;
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-image: none;
overflow: hidden;
}
.news-page .banner__bg {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
display: block;
z-index: 0;
}
.news-page .banner__body {
position: relative;
z-index: 1;
color: #fff;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
}
.news-page .banner__body__title {
font-size: 46px;
font-weight: bold;
line-height: 1.2;
letter-spacing: 6px;
}
.news-page .banner__body__sub {
margin-top: 14px;
font-size: 18px;
}
/* 内容容器 */
.news-main {
display: flex;
justify-content: center;
padding-bottom: 80px;
}
.news-main__inner {
width: 1200px;
}
/* 顶部导航栏(tabs + 面包屑) */
.news-main .nav_all {
margin-top: 30px;
display: flex;
align-items: center;
justify-content: space-between;
overflow: hidden;
}
.news-main .nav_all .nav {
list-style: none;
margin: 0;
padding: 0;
display: flex;
flex-wrap: wrap;
}
.news-main .nav_all .nav li {
list-style: none;
padding: 10px 30px;
color: #666;
font-size: 16px;
cursor: pointer;
margin-right: 10px;
border-radius: 50px;
transition: all 0.2s;
}
.news-main .nav_all .nav li a {
display: inline-block;
color: inherit;
text-decoration: none;
}
.news-main .nav_all .nav li.active {
background: #eb662b;
color: #fff;
}
.news-main .nav_all .nav li:hover {
background: #eb662b;
color: #fff;
}
.news-main .nav_all .buzou {
color: #666;
font-size: 14px;
}
.news-main .nav_all .buzou a {
color: #666;
text-decoration: none;
}
.news-main .nav_all .buzou a:hover {
color: #eb662b;
}
/* 内容区:左侧列表 + 右侧悬浮热文 */
.news-main .neirong {
margin-top: 20px;
display: flex;
align-items: flex-start;
}
.news-main .neirong .zuo {
flex: 1;
min-width: 0;
}
/* 简介卡片 */
.news-main .zuo .jieshao {
background: #f0f1f1;
border-radius: 6px;
padding: 30px;
margin-bottom: 10px;
}
.news-main .zuo .jieshao .name {
font-weight: bold;
color: #1a2026;
font-size: 24px;
}
.news-main .zuo .jieshao .nr {
color: #1a2026;
font-size: 14px;
margin-top: 20px;
text-align: left;
}
/* 条目列表 */
.news-main .xwzx {
text-align: left;
}
.news-main .xwzx ul {
list-style: none;
margin: 0;
padding: 0;
}
.news-main .xwzx li {
list-style: none;
border-bottom: 1px solid #ebebeb;
padding: 30px 0;
}
.news-main .xwzx .kuang {
display: flex;
}
.news-main .xwzx .kuang .img {
flex: 0 0 245px;
width: 245px;
height: 154px;
border-radius: 4px;
overflow: hidden;
background: #eceff1;
}
.news-main .xwzx .kuang .img img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.news-main .xwzx .kuang .nrs {
flex: 1;
min-width: 0;
padding: 0 20px;
color: #1a2026;
display: flex;
flex-direction: column;
}
.news-main .xwzx .kuang .nrs a {
text-decoration: none;
}
.news-main .xwzx .kuang .nrs .name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 20px;
color: #1a2026;
}
.news-main .xwzx .kuang .nrs .name:hover {
color: #eb662b;
}
.news-main .xwzx .kuang .nrs .nr {
font-size: 14px;
color: #505050;
margin-top: 16px;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.news-main .xwzx .kuang .nrs .mingchen {
font-size: 12px;
color: #505050;
margin-top: auto;
padding-top: 20px;
}
.news-main .xwzx .kuang .nrs .time {
color: #bcbec0;
font-size: 12px;
margin-left: 50px;
}
/* 分页 */
.news-main .pages {
margin-top: 50px;
text-align: center;
}
.news-main .pages ul {
list-style: none;
margin: 0;
padding: 0;
}
.news-main .pages ul li {
display: inline-block;
border: 1px solid #ddd;
border-radius: 4px;
padding: 8px 16px;
margin: 0 4px;
cursor: pointer;
transition: all 0.2s;
}
.news-main .pages ul li a {
color: #1a2026;
text-decoration: none;
}
.news-main .pages ul li.active {
background: #eb662b;
border-color: #eb662b;
}
.news-main .pages ul li.active a {
color: #fff;
}
.news-main .pages ul li:hover {
background: #eb662b;
border-color: #eb662b;
}
.news-main .pages ul li:hover a {
color: #fff;
}
/* 右侧悬浮热文推荐 */
.news-main .neirong .you {
position: sticky;
top: 90px;
width: 350px;
flex: 0 0 350px;
margin-left: 30px;
text-align: left;
}
.news-main .myNew {
border-radius: 10px;
border: 1px solid #ebebeb;
padding: 20px;
background: #fff;
}
.news-main .myNew .title {
padding: 5px 10px;
border-left: 4px solid #eb662b;
font-weight: bold;
color: #505050;
font-size: 18px;
margin-bottom: 8px;
}
.news-main .myNew .tuwz {
display: flex;
margin-top: 16px;
}
.news-main .myNew .tuwz .img {
flex: 0 0 112px;
width: 112px;
}
.news-main .myNew .tuwz .img img {
width: 112px;
height: 70px;
object-fit: cover;
border-radius: 4px;
display: block;
background: #eceff1;
}
.news-main .myNew .tuwz .info {
flex: 1;
min-width: 0;
margin-left: 12px;
}
.news-main .myNew .tuwz .info a {
text-decoration: none;
}
.news-main .myNew .tuwz .info .nr {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
color: #1a2026;
font-size: 14px;
line-height: 22px;
}
.news-main .myNew .tuwz .info .nr:hover {
color: #eb662b;
}
.news-main .myNew .tuwz .info .time {
color: #999;
font-size: 12px;
margin-top: 4px;
}
+5
View File
@@ -52,6 +52,11 @@ jquery__WEBPACK_IMPORTED_MODULE_0___default()(function () {
case '/about.html':
targetName = 'about';
break;
case '/news/news.html':
case '/hangye/hangye.html':
case '/updatelog/updatelog.html':
targetName = 'news';
break;
}
} else if (hash) {
switch (hash) {