news.scss 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  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. .item-right {
  60. flex: 1;
  61. display: flex;
  62. flex-direction: row;
  63. justify-content: flex-end;
  64. align-items: center;
  65. flex-wrap: wrap;
  66. }
  67. &.row-type2 {
  68. flex-wrap: wrap;
  69. .TitleDescBlock h3 {
  70. margin-top: 10px;
  71. }
  72. img {
  73. width: 100%;
  74. height: 300px;
  75. margin-right: 0;
  76. }
  77. }
  78. &.row-type3 {
  79. img {
  80. width: 270px;
  81. height: 180px;
  82. }
  83. }
  84. &.row-type4 {
  85. img {
  86. object-fit: contain;
  87. width: 270px;
  88. height: 150px;
  89. }
  90. }
  91. &.row-type5 {
  92. img {
  93. object-fit: cover;
  94. border-radius: 50%;
  95. width: 80px;
  96. height: 80px;
  97. }
  98. }
  99. &.row-type6 {
  100. .TitleDescBlock h3 {
  101. font-size: 15px;
  102. }
  103. img {
  104. display: none;
  105. }
  106. }
  107. &.empty {
  108. background-color: transparent;
  109. border: none;
  110. }
  111. &:hover:not(.empty) {
  112. background-color: $box-hover-color;
  113. }
  114. &:active:not(.empty) {
  115. transform: scale(0.995);
  116. }
  117. .tags {
  118. display: flex;
  119. flex-direction: row;
  120. flex-wrap: wrap;
  121. column-gap: 10px;
  122. row-gap: 10px;
  123. margin-top: 15px;
  124. margin-bottom: 10px;
  125. font-size: 0.85rem;
  126. > div {
  127. border-radius: 15px;
  128. padding: 0 15px;
  129. background-color: $primary-dark-color;
  130. color: $text-color-light;
  131. }
  132. }
  133. .extra {
  134. display: flex;
  135. flex-direction: column;
  136. flex-wrap: wrap;
  137. margin-top: 15px;
  138. font-size: 0.8rem;
  139. .desc {
  140. display: block;
  141. min-width: 70px;
  142. color: $text-second-color;
  143. }
  144. }
  145. img {
  146. flex-shrink: 0;
  147. width: 320px;
  148. height: 180px;
  149. margin-right: 25px;
  150. border-radius: 5px;
  151. object-fit: cover;
  152. background-color: $border-split-color;
  153. }
  154. }
  155. }
  156. @media (max-width: 768px) {
  157. .news-list {
  158. .item {
  159. display: flex;
  160. flex-direction: row;
  161. padding: 25px;
  162. border-radius: 6px;
  163. background-color: $box-color;
  164. &.row-type2 {
  165. img {
  166. width: 100%;
  167. height: 250px;
  168. margin-right: 0;
  169. }
  170. }
  171. &.row-type3 {
  172. img {
  173. width: 170px;
  174. height: 90px;
  175. }
  176. }
  177. &.row-type4 {
  178. img {
  179. width: 180px;
  180. height: 110px;
  181. }
  182. }
  183. &.row-type5 {
  184. img {
  185. width: 60px;
  186. height: 60px;
  187. }
  188. }
  189. img {
  190. width: 200px;
  191. height: 140px;
  192. margin-right: 25px;
  193. }
  194. }
  195. &.grid {
  196. .item {
  197. img {
  198. width: 120px;
  199. height: 90px;
  200. margin-right: 15px;
  201. }
  202. }
  203. }
  204. }
  205. }
  206. @media (max-width: 540px) {
  207. .news-list {
  208. .item {
  209. flex-direction: column;
  210. img {
  211. width: 100%;
  212. height: 180px;
  213. margin-right: 0;
  214. margin-bottom: 16px;
  215. }
  216. }
  217. }
  218. }
  219. //Detail page
  220. .news-detail {
  221. color: $text-content-color;
  222. h1 {
  223. font-size: 1.8rem;
  224. font-family: SourceHanSerifCNBold;
  225. text-align: center;
  226. }
  227. .small-info {
  228. text-align: center;
  229. font-size: 0.75rem;
  230. flex-wrap: nowrap;
  231. white-space: nowrap;
  232. overflow: hidden;
  233. text-overflow: ellipsis;
  234. &.img {
  235. width: 20px;
  236. height: 20px;
  237. }
  238. }
  239. .back-button2 {
  240. display: flex;
  241. flex-direction: row;
  242. align-items: center;
  243. column-gap: 10px;
  244. background-color: $box-inset-color;
  245. padding: 4px 5px;
  246. border-radius: 5px;
  247. cursor: pointer;
  248. img {
  249. width: 20px;
  250. height: 20px;
  251. }
  252. &:hover {
  253. background-color: $box-hover-color;
  254. }
  255. }
  256. .back-button {
  257. width: 92px;
  258. height: 92px;
  259. border-radius: 50%;
  260. text-align: center;
  261. flex-direction: column;
  262. justify-content: center;
  263. align-items: center;
  264. display: flex;
  265. background-color: $box-inset-color;
  266. cursor: pointer;
  267. &:hover {
  268. background-color: $box-hover-color;
  269. }
  270. img {
  271. width: 25px;
  272. height: 25px;
  273. margin-bottom: 5px;
  274. }
  275. span {
  276. font-size: 0.75rem;
  277. }
  278. }
  279. .news-video {
  280. position: relative;
  281. width: 100%;
  282. height: 50vh;
  283. border-radius: 8px;
  284. }
  285. .news-content {
  286. position: relative;
  287. min-height: 50vh;
  288. img {
  289. max-width: 100%;
  290. text-align: center;
  291. border-radius: 5px;
  292. }
  293. p > img {
  294. display: block;
  295. margin: 0 auto;
  296. }
  297. h1 {
  298. margin-top: 15px;
  299. }
  300. h2 {
  301. margin-top: 12px;
  302. }
  303. h3 {
  304. margin-top: 10px;
  305. }
  306. h4 {
  307. margin-top: 5px;
  308. }
  309. h5 {
  310. margin-top: 3px;
  311. }
  312. }
  313. .info-list {
  314. margin-top: 10px;
  315. display: flex;
  316. flex-direction: row;
  317. flex-wrap: wrap;
  318. row-gap: 10px;
  319. background-color: $box-color;
  320. border-radius: 8px;
  321. padding: 15px 20px;
  322. .entry {
  323. display: flex;
  324. flex-direction: row;
  325. flex-wrap: nowrap;
  326. width: 50%;
  327. &.hidden {
  328. display: none;
  329. }
  330. .label {
  331. width: 120px;
  332. color: $text-content-second-color;
  333. }
  334. .value {
  335. color: $text-color;
  336. }
  337. }
  338. img {
  339. width: 200px;
  340. max-width: 100%;
  341. }
  342. }
  343. .carousel {
  344. position: relative;
  345. border-radius: 8px;
  346. overflow: hidden;
  347. margin: 20px 0;
  348. &.float {
  349. img {
  350. width: 100%;
  351. height: 30vh;
  352. max-height: 250px;
  353. object-fit: contain;
  354. background-color: $border-split-color;
  355. }
  356. }
  357. &.large {
  358. width: 100%;
  359. height: 60vh;
  360. img {
  361. width: 50%;
  362. height: 60vh;
  363. object-fit: contain;
  364. background-color: $border-split-color;
  365. }
  366. }
  367. }
  368. }
  369. @media (max-width: 1200px) {
  370. .news-detail .carousel.float {
  371. width: 300px;
  372. }
  373. }
  374. @media (max-width: 1000px) {
  375. .news-detail .carousel.float {
  376. width: 40%;
  377. }
  378. .news-detail .carousel.large img {
  379. width: 70%;
  380. }
  381. }
  382. @media (max-width: 768px) {
  383. .news-detail .carousel.float {
  384. width: 60%;
  385. }
  386. .news-detail .carousel.large img {
  387. width: 100%;
  388. }
  389. }
  390. @media (min-width: 808px) {
  391. .news-detail .carousel.float {
  392. width: 300px;
  393. float: right;
  394. margin: 0;
  395. margin-left: 20px;
  396. }
  397. }
  398. @media (max-width: 768px) {
  399. }
  400. @media (max-width: 540px) {
  401. }