news.scss 7.1 KB

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