news.scss 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425
  1. @use "sass:list";
  2. @use '@/assets/scss/colors.scss' as *;
  3. //List page
  4. .news-list {
  5. position: relative;
  6. display: flex;
  7. flex-direction: column;
  8. row-gap: 20px;
  9. &.grid {
  10. row-gap: 0;
  11. .list {
  12. flex-direction: row;
  13. flex-wrap: wrap;
  14. justify-content: space-between;
  15. align-items: stretch;
  16. column-gap: 0;
  17. }
  18. .item {
  19. img {
  20. width: 200px;
  21. height: 130px;
  22. margin-right: 25px;
  23. }
  24. }
  25. }
  26. .list {
  27. position: relative;
  28. display: flex;
  29. flex-direction: column;
  30. gap: 24px;
  31. }
  32. .table-list {
  33. margin-top: 10px;
  34. table {
  35. border-collapse: collapse;
  36. width: 100%;
  37. border: 1px solid $border-grey-color;
  38. td, th {
  39. border: 1px solid $border-grey-color;
  40. background-color: #fff; /* 表头背景颜色 */
  41. padding: 8px; /* 单元格内边距,可根据需要调整 */
  42. text-align: center; /* 单元格内容居中对齐 */
  43. }
  44. th {
  45. background-color: #f2f2f2; /* 表头背景颜色 */
  46. font-weight: bold; /* 表头文字加粗 */
  47. }
  48. }
  49. }
  50. .item {
  51. display: flex;
  52. flex-direction: row;
  53. padding: 25px;
  54. border-radius: 6px;
  55. background-color: $box-color;
  56. border: 1px solid $border-split-color;
  57. width: 100%;
  58. text-decoration: none;
  59. &.row-type2 {
  60. flex-wrap: wrap;
  61. .TitleDescBlock h3 {
  62. margin-top: 10px;
  63. }
  64. img {
  65. width: 100%;
  66. height: 300px;
  67. margin-right: 0;
  68. }
  69. }
  70. &.row-type3 {
  71. img {
  72. width: 270px;
  73. height: 180px;
  74. }
  75. }
  76. &.row-type4 {
  77. img {
  78. object-fit: contain;
  79. width: 270px;
  80. height: 150px;
  81. }
  82. }
  83. &.empty {
  84. background-color: transparent;
  85. border: none;
  86. }
  87. &:hover:not(.empty) {
  88. background-color: $box-hover-color;
  89. }
  90. &:active:not(.empty) {
  91. transform: scale(0.95);
  92. }
  93. .tags {
  94. display: flex;
  95. flex-direction: row;
  96. flex-wrap: wrap;
  97. column-gap: 10px;
  98. row-gap: 10px;
  99. margin-top: 15px;
  100. margin-bottom: 10px;
  101. font-size: 0.85rem;
  102. > div {
  103. border-radius: 15px;
  104. padding: 0 15px;
  105. background-color: $primary-dark-color;
  106. color: $text-color-light;
  107. }
  108. }
  109. .extra {
  110. display: flex;
  111. flex-direction: column;
  112. flex-wrap: wrap;
  113. margin-top: 15px;
  114. font-size: 0.8rem;
  115. .desc {
  116. display: block;
  117. min-width: 70px;
  118. color: $text-second-color;
  119. }
  120. }
  121. img {
  122. flex-shrink: 0;
  123. width: 320px;
  124. height: 180px;
  125. margin-right: 25px;
  126. border-radius: 5px;
  127. object-fit: cover;
  128. background-color: $border-split-color;
  129. }
  130. }
  131. }
  132. @media (max-width: 768px) {
  133. .news-list {
  134. .item {
  135. display: flex;
  136. flex-direction: row;
  137. padding: 25px;
  138. border-radius: 6px;
  139. background-color: $box-color;
  140. &.row-type2 {
  141. img {
  142. width: 100%;
  143. height: 250px;
  144. margin-right: 0;
  145. }
  146. }
  147. &.row-type3 {
  148. img {
  149. width: 170px;
  150. height: 90px;
  151. }
  152. }
  153. &.row-type4 {
  154. img {
  155. width: 180px;
  156. height: 110px;
  157. }
  158. }
  159. img {
  160. width: 200px;
  161. height: 140px;
  162. margin-right: 25px;
  163. }
  164. }
  165. &.grid {
  166. .item {
  167. img {
  168. width: 120px;
  169. height: 90px;
  170. margin-right: 15px;
  171. }
  172. }
  173. }
  174. }
  175. }
  176. @media (max-width: 540px) {
  177. .news-list {
  178. .item {
  179. flex-direction: column;
  180. img {
  181. width: 100%;
  182. height: 180px;
  183. margin-right: 0;
  184. margin-bottom: 16px;
  185. }
  186. }
  187. }
  188. }
  189. //Detail page
  190. .news-detail {
  191. color: $text-content-color;
  192. h1 {
  193. font-size: 1.8rem;
  194. font-family: SourceHanSerifCNBold;
  195. text-align: center;
  196. }
  197. .small-info {
  198. text-align: center;
  199. font-size: 0.75rem;
  200. flex-wrap: nowrap;
  201. white-space: nowrap;
  202. overflow: hidden;
  203. text-overflow: ellipsis;
  204. &.img {
  205. width: 20px;
  206. height: 20px;
  207. }
  208. }
  209. .back-button2 {
  210. display: flex;
  211. flex-direction: row;
  212. align-items: center;
  213. column-gap: 10px;
  214. background-color: $box-inset-color;
  215. padding: 4px 5px;
  216. border-radius: 5px;
  217. cursor: pointer;
  218. img {
  219. width: 20px;
  220. height: 20px;
  221. }
  222. &:hover {
  223. background-color: $box-hover-color;
  224. }
  225. }
  226. .back-button {
  227. width: 92px;
  228. height: 92px;
  229. border-radius: 50%;
  230. text-align: center;
  231. flex-direction: column;
  232. justify-content: center;
  233. align-items: center;
  234. display: flex;
  235. background-color: $box-inset-color;
  236. cursor: pointer;
  237. &:hover {
  238. background-color: $box-hover-color;
  239. }
  240. img {
  241. width: 25px;
  242. height: 25px;
  243. margin-bottom: 5px;
  244. }
  245. span {
  246. font-size: 0.75rem;
  247. }
  248. }
  249. .news-video {
  250. position: relative;
  251. width: 100%;
  252. height: 50vh;
  253. border-radius: 8px;
  254. }
  255. .news-content {
  256. position: relative;
  257. min-height: 50vh;
  258. img {
  259. max-width: 100%;
  260. text-align: center;
  261. border-radius: 5px;
  262. }
  263. p > img {
  264. display: block;
  265. margin: 0 auto;
  266. }
  267. h1 {
  268. margin-top: 15px;
  269. }
  270. h2 {
  271. margin-top: 12px;
  272. }
  273. h3 {
  274. margin-top: 10px;
  275. }
  276. h4 {
  277. margin-top: 5px;
  278. }
  279. h5 {
  280. margin-top: 3px;
  281. }
  282. }
  283. .info-list {
  284. margin-top: 10px;
  285. display: flex;
  286. flex-direction: row;
  287. flex-wrap: wrap;
  288. row-gap: 10px;
  289. background-color: $box-color;
  290. border-radius: 8px;
  291. padding: 15px 20px;
  292. .entry {
  293. display: flex;
  294. flex-direction: row;
  295. flex-wrap: nowrap;
  296. width: 50%;
  297. &.hidden {
  298. display: none;
  299. }
  300. .label {
  301. width: 120px;
  302. color: $text-content-second-color;
  303. }
  304. .value {
  305. color: $text-color;
  306. }
  307. }
  308. img {
  309. width: 200px;
  310. max-width: 100%;
  311. }
  312. }
  313. .carousel {
  314. position: relative;
  315. border-radius: 8px;
  316. overflow: hidden;
  317. margin: 20px 0;
  318. &.float {
  319. img {
  320. width: 100%;
  321. height: 30vh;
  322. max-height: 250px;
  323. object-fit: contain;
  324. background-color: $border-split-color;
  325. }
  326. }
  327. &.large {
  328. width: 100%;
  329. height: 60vh;
  330. img {
  331. width: 50%;
  332. height: 60vh;
  333. object-fit: contain;
  334. background-color: $border-split-color;
  335. }
  336. }
  337. }
  338. }
  339. @media (max-width: 1200px) {
  340. .news-detail .carousel.float {
  341. width: 300px;
  342. }
  343. }
  344. @media (max-width: 1000px) {
  345. .news-detail .carousel.float {
  346. width: 40%;
  347. }
  348. .news-detail .carousel.large img {
  349. width: 70%;
  350. }
  351. }
  352. @media (max-width: 768px) {
  353. .news-detail .carousel.float {
  354. width: 60%;
  355. }
  356. .news-detail .carousel.large img {
  357. width: 100%;
  358. }
  359. }
  360. @media (min-width: 808px) {
  361. .news-detail .carousel.float {
  362. width: 300px;
  363. float: right;
  364. margin: 0;
  365. margin-left: 20px;
  366. }
  367. }
  368. @media (max-width: 768px) {
  369. }
  370. @media (max-width: 540px) {
  371. }