Browse Source

新闻页面

zjm
suomingxiang 5 months ago
parent
commit
9893a733cf
2 changed files with 234 additions and 149 deletions
  1. 54
    49
      src/pages/news/index.html
  2. 180
    100
      src/pages/news/index.less

+ 54
- 49
src/pages/news/index.html View File

@@ -27,95 +27,100 @@
27 27
                         alt=""
28 28
                         />
29 29
                         <a class="news_content" href="../newsDetail.html">
30
-                            <div class="cont1">卡文汽车品牌标识正式发布</div>
31
-                            <div class="cont2">纵横交错的叶脉无限延展升级,恰若纵横交错的交通动脉,当阳光透过叶脉“卡”字与叶脉重合在一起。</div>
32
-                            <div class="cont3">2024.01.27</div>
30
+                            <div class="cont1">国家能源局:系统推进新型电力系统建设重点任务落地见效</div>
31
+                            <div class="cont2">2024-08-20</div>
33 32
                         </a> 
34 33
                     </div>
35 34
                     <div class="news_banner2">
36 35
                         <img src="./static/images/news/news1.png" alt="">
37
-                        <div>交通运输部、国家发展改革委联合印发
36
+                        <div class="txt1">交通运输部、国家发展改革委联合印发
38 37
                             《交通物流降本提质增效行动计化》</div>
39
-                        <div>2024-11-18</div>
40
-                        <div>《计划》提出,到2027年,交通物流降本提质增效取得显著成效,社会物流总费用与国内生产...</div>
41
-                        <a>
38
+                        <div class="txt2">2024-11-18</div>
39
+                        <div class="txt3">阿松大《计划》提出,到2027年,交通物流降本提质增效取得显著成效,社会物流总费用与国内生产</div>
40
+                        <a href="#">
42 41
                             查看详情
43 42
                             <span class="icon iconfont icon-jiantou"></span>
44 43
                         </a>
45 44
                     </div>
46 45
                     <div class="news_banner2">
47 46
                         <img src="./static/images/news/news1.png" alt="">
48
-                        <div>交通运输部、国家发展改革委联合印发
47
+                        <div class="txt1">交通运输部、国家发展改革委联合印发
49 48
                             《交通物流降本提质增效行动计化》</div>
50
-                        <div>2024-11-18</div>
51
-                        <div>《计划》提出,到2027年,交通物流降本提质增效取得显著成效,社会物流总费用与国内生产...</div>
52
-                        <a>
49
+                        <div class="txt2">2024-11-18</div>
50
+                        <div class="txt3">《计划》提出,到2027年,交通物流降本提质增效取得显著成效,社会物流总费用与国内生产...</div>
51
+                        <a href="#">
53 52
                             查看详情
54 53
                             <span class="icon iconfont icon-jiantou"></span>
55 54
                         </a>
56 55
                     </div>
57 56
                 </div>
57
+                <div class="tabs_box">
58
+                    <div class="tabs_li tabs_lis">全部</div>
59
+                    <div class="tabs_li">集团新闻</div>
60
+                    <div class="tabs_li">前沿资讯</div>
61
+                    <div class="tabs_li">政策引领</div>
62
+                    <div class="tabs_li">研发创新</div>
63
+                </div>
64
+            </div>
65
+            <div class="news_ul">
58 66
                 <div class="news_list">
59 67
                     <div class="news_li">
60 68
                         <div class="li_left">
61
-                            <span>01/27</span>
62
-                            <span>2024</span>
69
+                            <span>19</span>
70
+                            <span>24-12</span>
63 71
                         </div> 
64
-                        <div class="li_cont">
65
-                            <div>卡文汽车品牌正式发布“让每一公里更美好”</div>
66
-                            <div>2024.01.27</div>
67
-                            <a href="../newsDetail.html">查看更多</a>
68
-                        </div>
72
+                        <a class="li_cont" href="#">
73
+                            <div>中共中央办公厅 国务院办公厅关于推进新型城市基础设施建设打造韧性城市的意见</div>
74
+                            <div>为深化城市安全韧性提升行动,推进数字化、网络化、智能化新型城市基础设施建设,打造承受适应能力强、恢复速度快的韧性城市,增强城市风险防控和治理能力,经党...</div>
75
+                        </a>
69 76
                     </div>
70 77
                     <div class="news_li">
71 78
                         <div class="li_left">
72
-                            <span>01/27</span>
73
-                            <span>2024</span>
79
+                            <span>09</span>
80
+                            <span>24-12</span>
74 81
                         </div>
75 82
                         <div class="li_cont">
76 83
                             <div>卡文汽车品牌正式发布“让每一公里更美好”</div>
77
-                            <div>2024.01.27</div>
78 84
                             <a href="../newsDetail.html">查看更多</a>
79 85
                         </div>
80 86
                     </div>
81 87
                     <div class="news_li">
82 88
                         <div class="li_left">
83
-                            <span>01/27</span>
84
-                            <span>2024</span>
89
+                            <span>10</span>
90
+                            <span>24-12</span> 
85 91
                         </div>
86 92
                         <div class="li_cont">
87 93
                             <div>卡文汽车品牌正式发布“让每一公里更美好”</div>
88
-                            <div>2024.01.27</div>
89 94
                             <a href="../newsDetail.html">查看更多</a>
90 95
                         </div>
91 96
                     </div>
92 97
                 </div>
93
-                <div class="news_paging">
94
-                    <a id="previousPage" class="previousPage">
95
-                        <svg t="1679477930257" class="icon" viewBox="0 0 1024 1024" version="1.1"
96
-                            xmlns="http://www.w3.org/2000/svg" p-id="2765" xmlns:xlink="http://www.w3.org/1999/xlink"
97
-                            width="200" height="200">
98
-                            <path
99
-                                d="M917.284001 297.722752c-5.406127-5.437849-13.06762-8.396227-21.479197-8.396227-9.611915 0-18.953677 3.844561-25.713638 10.543124L511.980046 659.992589 153.873018 299.91672c-6.729262-6.745634-16.072047-10.619872-25.654286-10.619872-8.470929 0-16.131399 2.989077-21.598924 8.457626-12.301164 12.435217-11.32493 33.69031 2.192945 47.312562l376.764969 378.821815c6.758937 6.788613 15.860223 10.723226 25.052582 10.8143l3.425006 0c8.981559-0.301875 17.814738-4.205788 24.423249-10.8143l376.733247-378.852514C928.728658 331.382363 929.690566 310.113967 917.284001 297.722752"
100
-                                fill="currentColor" p-id="2766"></path>
101
-                        </svg>
102
-                    </a>
103
-                    <div id="paging" style="display: flex;align-items: center;">
104
-                        <a class="pageNum">1</a>
105
-                        <a class="pageNum">2</a>
106
-                        <a class="pageNum">3</a>
107
-                        <a class="ellipsis">...</a>
108
-                    </div>
109
-                    <a id="nextPage" class="nextPage">
110
-                        <svg t="1679477930257" class="icon" viewBox="0 0 1024 1024" version="1.1"
111
-                            xmlns="http://www.w3.org/2000/svg" p-id="2765" xmlns:xlink="http://www.w3.org/1999/xlink"
112
-                            width="200" height="200">
113
-                            <path
114
-                                d="M917.284001 297.722752c-5.406127-5.437849-13.06762-8.396227-21.479197-8.396227-9.611915 0-18.953677 3.844561-25.713638 10.543124L511.980046 659.992589 153.873018 299.91672c-6.729262-6.745634-16.072047-10.619872-25.654286-10.619872-8.470929 0-16.131399 2.989077-21.598924 8.457626-12.301164 12.435217-11.32493 33.69031 2.192945 47.312562l376.764969 378.821815c6.758937 6.788613 15.860223 10.723226 25.052582 10.8143l3.425006 0c8.981559-0.301875 17.814738-4.205788 24.423249-10.8143l376.733247-378.852514C928.728658 331.382363 929.690566 310.113967 917.284001 297.722752"
115
-                                fill="currentColor" p-id="2766"></path>
116
-                        </svg>
117
-                    </a>
98
+            </div>
99
+            <div class="news_paging">
100
+                <a id="previousPage" class="previousPage">
101
+                    <svg t="1679477930257" class="icon" viewBox="0 0 1024 1024" version="1.1"
102
+                        xmlns="http://www.w3.org/2000/svg" p-id="2765" xmlns:xlink="http://www.w3.org/1999/xlink"
103
+                        width="200" height="200">
104
+                        <path
105
+                            d="M917.284001 297.722752c-5.406127-5.437849-13.06762-8.396227-21.479197-8.396227-9.611915 0-18.953677 3.844561-25.713638 10.543124L511.980046 659.992589 153.873018 299.91672c-6.729262-6.745634-16.072047-10.619872-25.654286-10.619872-8.470929 0-16.131399 2.989077-21.598924 8.457626-12.301164 12.435217-11.32493 33.69031 2.192945 47.312562l376.764969 378.821815c6.758937 6.788613 15.860223 10.723226 25.052582 10.8143l3.425006 0c8.981559-0.301875 17.814738-4.205788 24.423249-10.8143l376.733247-378.852514C928.728658 331.382363 929.690566 310.113967 917.284001 297.722752"
106
+                            fill="currentColor" p-id="2766"></path>
107
+                    </svg>
108
+                </a>
109
+                <div id="paging" style="display: flex;align-items: center;">
110
+                    <a class="pageNum">1</a>
111
+                    <a class="pageNum">2</a>
112
+                    <a class="pageNum">3</a>
113
+                    <a class="ellipsis">...</a>
118 114
                 </div>
115
+                <a id="nextPage" class="nextPage">
116
+                    <svg t="1679477930257" class="icon" viewBox="0 0 1024 1024" version="1.1"
117
+                        xmlns="http://www.w3.org/2000/svg" p-id="2765" xmlns:xlink="http://www.w3.org/1999/xlink"
118
+                        width="200" height="200">
119
+                        <path
120
+                            d="M917.284001 297.722752c-5.406127-5.437849-13.06762-8.396227-21.479197-8.396227-9.611915 0-18.953677 3.844561-25.713638 10.543124L511.980046 659.992589 153.873018 299.91672c-6.729262-6.745634-16.072047-10.619872-25.654286-10.619872-8.470929 0-16.131399 2.989077-21.598924 8.457626-12.301164 12.435217-11.32493 33.69031 2.192945 47.312562l376.764969 378.821815c6.758937 6.788613 15.860223 10.723226 25.052582 10.8143l3.425006 0c8.981559-0.301875 17.814738-4.205788 24.423249-10.8143l376.733247-378.852514C928.728658 331.382363 929.690566 310.113967 917.284001 297.722752"
121
+                            fill="currentColor" p-id="2766"></path>
122
+                    </svg>
123
+                </a>
119 124
             </div>
120 125
         </div>
121 126
         <%= require('../common/tpl/footer.tpl') %>

+ 180
- 100
src/pages/news/index.less View File

@@ -34,6 +34,7 @@
34 34
         .banner_box{
35 35
             display: flex;
36 36
             justify-content: space-between;
37
+            margin-bottom: 120px;
37 38
             .news_banner{
38 39
                 width: 750px;
39 40
                 height: 512px;
@@ -41,26 +42,26 @@
41 42
                 img{
42 43
                     width: 100%;
43 44
                     height: 100%;
45
+                    border-radius: 12px;
44 46
                 }
45 47
 
46 48
                 .news_content{
47 49
                     position: absolute;
48
-                    top: 243px;
49 50
                     left: 0;
51
+                    bottom: 0;
50 52
                     width: 100%;
51
-                    height: 362px;
52 53
                     background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.5) 100%);
53 54
                     color: #fff;
54
-                    padding: 218px 80px 0;
55
+                    padding: 218px 30px 40px;
55 56
                     box-sizing: border-box;
56 57
                     .cont1{
57 58
                         font-weight: bold;
58
-                        font-size: 24px;
59
+                        font-size: 20px;
59 60
                     }
60 61
                     .cont2{
61 62
                         font-weight: 400;
62 63
                         font-size: 16px;
63
-                        margin-top: 28px;
64
+                        margin-top: 20px;
64 65
                     }
65 66
                     .cont3{
66 67
                         font-weight: 400;
@@ -72,37 +73,118 @@
72 73
             }
73 74
             .news_banner2{
74 75
                 width: 340px;
76
+                img{
77
+                    width: 100%;
78
+                    height: 255px;
79
+                    object-fit: cover;
80
+                    border-radius: 12px;
81
+                    margin-bottom: 30px;
82
+                }
83
+                .txt1{
84
+                    font-family: Source Han Sans CN;
85
+                    font-weight: bold;
86
+                    font-size: 20px;
87
+                    color: #333333;
88
+                    line-height: 30px;
89
+                    padding-bottom: 20px;
90
+                    border-bottom: 1px solid #E7E7E7;
91
+                    margin-bottom: 20px;
92
+                }
93
+                .txt2{
94
+                    font-family: Source Han Sans CN;
95
+                    font-size: 16px;
96
+                    color: #333333;
97
+                    margin-bottom: 20px;
98
+                }
99
+                .txt3{
100
+                    font-family: Source Han Sans CN;
101
+                    font-size: 16px;
102
+                    color: #333333;
103
+                    margin-bottom: 18px;
104
+                    display: -webkit-box;        /* 使用 Flexbox 布局 */
105
+                    -webkit-box-orient: vertical; /* 垂直方向排列 */
106
+                    -webkit-line-clamp: 2;      /* 限制显示的行数,这里是3行 */
107
+                    overflow: hidden;            /* 隐藏超出部分 */
108
+                    text-overflow: ellipsis;     /* 用省略号表示超出部分 */
109
+                }
110
+                a{
111
+                    font-family: Source Han Sans CN;
112
+                    font-size: 16px;
113
+                    color: #333333;
114
+                    display: flex;
115
+                    align-items: center;
116
+                    .icon{
117
+                        transform: rotate(90deg);
118
+                        display: inline-block;
119
+                        color: #000000;
120
+                        font-size: 24px;
121
+                        margin-top: 5px;
122
+                        margin-left: 5px;
123
+                    }
124
+                }
75 125
             }
126
+           
127
+        }
128
+        .tabs_box{
129
+            width: 1300px;
130
+            margin: 0 auto;
131
+            font-weight: 400;
132
+            font-size: 24px;
133
+            display: flex;
134
+            align-items: center;
135
+
136
+            .tabs_li{
137
+                color: #231F20;
138
+                margin-right: 80px;
139
+                cursor: pointer;
140
+                padding-bottom: 48px;
141
+            }   
142
+            .tabs_lis{
143
+                color: #B81C25;
144
+                border-bottom: 2px solid #B81C25;
145
+            }   
76 146
         }
77 147
 
148
+      
149
+    }
150
+    .news_ul{
151
+        width: 100%;
152
+        max-width: 1920px;
153
+        margin: 0 auto;
154
+        background: #F6F6F6;
155
+
78 156
         .news_list{
79
-            margin-top: 80px;
157
+            width: 1300px;
158
+            margin: 0 auto;
80 159
             .news_li{
81 160
                 display: flex;
82 161
                 align-items: center;
83 162
                 padding: 40px 0;
84 163
                 border-bottom:1px solid #DADADA;
164
+                transition: all .2s;
85 165
                 .li_left{
86
-                    width: 120px;
87
-                    height: 120px;
88
-                    background: #FFFFFF;
89
-                    border: 1px solid #DADADA;
166
+                    width: 66px;
167
+                    height: 66px;
168
+                    background: #F6F6F6;
169
+                    border: 1px solid #A7A5A5;
90 170
                     display: flex;
91 171
                     align-items: center;
92 172
                     justify-content: center;
93 173
                     flex-direction: column;
94 174
                     margin-right: 30px;
95 175
                     transition: all .5s;
176
+                    border-radius: 8px;
96 177
                     span:nth-child(1){
97
-                        font-weight: 400;
98
-                        font-size: 24px;
99
-                        color: #48A038;
178
+                        font-family: Source Han Sans CN;
179
+                        font-weight: 500;
180
+                        font-size: 30px;
181
+                        color: #B81C25;
100 182
                     }
101 183
                     span:nth-child(2){
102 184
                         font-family: Source Han Sans CN;
103 185
                         font-weight: 500;
104
-                        font-size: 28px;
105
-                        color: #003A40;
186
+                        font-size: 13px;
187
+                        color: #231F20
106 188
                     }
107 189
                     a{
108 190
                         cursor: pointer;
@@ -111,114 +193,112 @@
111 193
                 .li_cont{
112 194
                     font-family: Source Han Sans CN;
113 195
                     font-weight: 400;
114
-                    transition: all .5s;
196
+                    transition: all .2s;
115 197
 
116 198
                     div:nth-child(1){
117
-                        font-size: 18px;
118
-                        color: #282828;
199
+                        font-weight: 500;
200
+                        font-size: 20px;
201
+                        color: #231F20;
202
+                        line-height: 30px;
203
+                        margin-bottom: 10px;
204
+                        transition: all .2s;
119 205
                     }
120 206
                     div:nth-child(2){
121
-                        width: 0;
122
-                        height: 0;
123
-                        overflow: hidden;
124
-                    }
125
-                    a{
126
-                        margin-top: 30px;
207
+                        font-weight: 500;
127 208
                         font-size: 16px;
128
-                        color: #0D0D0D;
209
+                        color: #A7A5A5;
210
+                        line-height: 30px;
211
+                        display: -webkit-box;        /* 使用 Flexbox 布局 */
212
+                        -webkit-box-orient: vertical; /* 垂直方向排列 */
213
+                        -webkit-line-clamp: 1;      /* 限制显示的行数,这里是3行 */
214
+                        overflow: hidden;            /* 隐藏超出部分 */
129 215
                     }
130 216
                 }
131 217
                 &:hover{
132
-                    .li_left{
133
-                        background: #48A038;
134
-                        border: 1px solid #DADADA;
135
-                        span{
136
-                            color: #fff;
137
-                        } 
138
-                    }
218
+                    background: #EFEFEF;
139 219
                     .li_cont{
140
-                        div,a{
141
-                            color: #48A038;
220
+                        div:nth-child(1){
221
+                            color: #B81C25;
142 222
                         }
143 223
                     }
144 224
                 }
145 225
             }
146 226
         }
147
-        .news_paging{
227
+    }
228
+    .news_paging{
229
+        display: flex;
230
+        align-items: center;
231
+        justify-content: center;
232
+        margin-top: 100px;
233
+        .previousPage{
234
+            width: 40px;
235
+            height: 40px;
236
+            color: #48A038;
148 237
             display: flex;
149 238
             align-items: center;
150 239
             justify-content: center;
151
-            margin-top: 100px;
152
-            .previousPage{
153
-                width: 40px;
154
-                height: 40px;
155
-                color: #48A038;
156
-                display: flex;
157
-                align-items: center;
158
-                justify-content: center;
159
-                border: 1px solid #48A038;
160
-                margin-right: 20px;
161
-                cursor: pointer;
162
-                transition: all 0.2s;
163
-                svg{
164
-                    width: 20px;
165
-                    height: 20px;
166
-                    transform: rotate(90deg);
167
-                }
168
-                &:hover{
169
-                    background-color: #48A038;
170
-                    color: #fff;
171
-                }
240
+            border: 1px solid #48A038;
241
+            margin-right: 20px;
242
+            cursor: pointer;
243
+            transition: all 0.2s;
244
+            svg{
245
+                width: 20px;
246
+                height: 20px;
247
+                transform: rotate(90deg);
172 248
             }
173
-            .nextPage{
174
-                width: 40px;
175
-                height: 40px;
176
-                color: #48A038;
177
-                display: flex;
178
-                align-items: center;
179
-                justify-content: center;
180
-                border: 1px solid #48A038;
181
-                margin-left: 20px;
182
-                cursor: pointer;
183
-                transition: all 0.2s;
184
-                svg{
185
-                    width: 20px;
186
-                    height: 20px;
187
-                    transform: rotate(-90deg);
188
-                }
189
-                &:hover{
190
-                    background-color: #48A038;
191
-                    color: #fff;
192
-                }
249
+            &:hover{
250
+                background-color: #48A038;
251
+                color: #fff;
193 252
             }
194
-            .pageNum{
195
-                font-family: Source Han Sans CN;
196
-                font-weight: bold;
197
-                font-size: 16px;
198
-                color: #333333;
199
-                transition: all 0.2s;
200
-                padding: 10px 15px;
201
-                cursor: pointer;
202
-                &:hover{
203
-                    color: #48A038;
204
-                }
253
+        }
254
+        .nextPage{
255
+            width: 40px;
256
+            height: 40px;
257
+            color: #48A038;
258
+            display: flex;
259
+            align-items: center;
260
+            justify-content: center;
261
+            border: 1px solid #48A038;
262
+            margin-left: 20px;
263
+            cursor: pointer;
264
+            transition: all 0.2s;
265
+            svg{
266
+                width: 20px;
267
+                height: 20px;
268
+                transform: rotate(-90deg);
205 269
             }
206
-            .pageNumActive{
207
-                color: #48A038;
270
+            &:hover{
271
+                background-color: #48A038;
272
+                color: #fff;
208 273
             }
209
-            .ellipsis{
210
-                font-family: Source Han Sans CN;
211
-                font-weight: bold;
212
-                font-size: 22px;
213
-                padding: 10px 15px;
214
-                color: #333333;
215
-                // cursor: pointer;
216
-                transition: all 0.2s;
217
-                // &:hover{
218
-                //     color:#48A038
219
-                // }
274
+        }
275
+        .pageNum{
276
+            font-family: Source Han Sans CN;
277
+            font-weight: bold;
278
+            font-size: 16px;
279
+            color: #333333;
280
+            transition: all 0.2s;
281
+            padding: 10px 15px;
282
+            cursor: pointer;
283
+            &:hover{
284
+                color: #48A038;
220 285
             }
221 286
         }
287
+        .pageNumActive{
288
+            color: #48A038;
289
+        }
290
+        .ellipsis{
291
+            font-family: Source Han Sans CN;
292
+            font-weight: bold;
293
+            font-size: 22px;
294
+            padding: 10px 15px;
295
+            color: #333333;
296
+            // cursor: pointer;
297
+            transition: all 0.2s;
298
+            // &:hover{
299
+            //     color:#48A038
300
+            // }
301
+        }
222 302
     }
223 303
 }
224 304
 a{

Loading…
Cancel
Save