news.scss 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  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. .item {
  33. display: flex;
  34. flex-direction: row;
  35. padding: 25px;
  36. border-radius: 6px;
  37. background-color: $box-color;
  38. border: 1px solid $border-split-color;
  39. width: 100%;
  40. &.row-type2 {
  41. flex-wrap: wrap;
  42. .TitleDescBlock h3 {
  43. margin-top: 10px;
  44. }
  45. img {
  46. width: 100%;
  47. height: 300px;
  48. margin-right: 0;
  49. }
  50. }
  51. &.row-type3 {
  52. img {
  53. width: 270px;
  54. height: 180px;
  55. }
  56. }
  57. &.empty {
  58. background-color: transparent;
  59. border: none;
  60. }
  61. &:hover:not(.empty) {
  62. background-color: $box-hover-color;
  63. }
  64. &:active:not(.empty) {
  65. transform: scale(0.95);
  66. }
  67. .extra {
  68. display: flex;
  69. flex-direction: column;
  70. flex-wrap: wrap;
  71. margin-top: 15px;
  72. font-size: 0.8rem;
  73. .desc {
  74. display: block;
  75. min-width: 70px;
  76. color: $text-second-color;
  77. }
  78. }
  79. img {
  80. flex-shrink: 0;
  81. width: 320px;
  82. height: 180px;
  83. margin-right: 25px;
  84. border-radius: 5px;
  85. object-fit: cover;
  86. background-color: $border-split-color;
  87. }
  88. }
  89. }
  90. @media (max-width: 768px) {
  91. .news-list {
  92. .item {
  93. display: flex;
  94. flex-direction: row;
  95. padding: 25px;
  96. border-radius: 6px;
  97. background-color: $box-color;
  98. &.row-type2 {
  99. img {
  100. width: 100%;
  101. height: 250px;
  102. margin-right: 0;
  103. }
  104. }
  105. &.row-type3 {
  106. img {
  107. width: 170px;
  108. height: 90px;
  109. }
  110. }
  111. img {
  112. width: 200px;
  113. height: 140px;
  114. margin-right: 25px;
  115. }
  116. }
  117. &.grid {
  118. .item {
  119. img {
  120. width: 120px;
  121. height: 90px;
  122. margin-right: 15px;
  123. }
  124. }
  125. }
  126. }
  127. }
  128. @media (max-width: 540px) {
  129. .news-list {
  130. .item {
  131. flex-direction: column;
  132. img {
  133. width: 100%;
  134. height: 180px;
  135. margin-right: 0;
  136. margin-bottom: 16px;
  137. }
  138. }
  139. }
  140. }
  141. //Detail page
  142. .news-detail {
  143. color: $text-content-color;
  144. h1 {
  145. font-size: 1.8rem;
  146. font-family: SourceHanSerifCNBold;
  147. text-align: center;
  148. }
  149. .small-info {
  150. text-align: center;
  151. font-size: 0.75rem;
  152. flex-wrap: nowrap;
  153. white-space: nowrap;
  154. overflow: hidden;
  155. text-overflow: ellipsis;
  156. &.img {
  157. width: 20px;
  158. height: 20px;
  159. }
  160. }
  161. .back-button {
  162. width: 92px;
  163. height: 92px;
  164. border-radius: 50%;
  165. text-align: center;
  166. flex-direction: column;
  167. justify-content: center;
  168. align-items: center;
  169. display: flex;
  170. background-color: $box-inset-color;
  171. cursor: pointer;
  172. &:hover {
  173. background-color: $box-hover-color;
  174. }
  175. img {
  176. width: 25px;
  177. height: 25px;
  178. margin-bottom: 5px;
  179. }
  180. span {
  181. font-size: 0.75rem;
  182. }
  183. }
  184. .news-video {
  185. position: relative;
  186. width: 100%;
  187. height: 50vh;
  188. border-radius: 8px;
  189. }
  190. .news-content {
  191. position: relative;
  192. min-height: 50vh;
  193. img {
  194. max-width: 100%;
  195. text-align: center;
  196. border-radius: 5px;
  197. }
  198. p > img {
  199. display: block;
  200. margin: 0 auto;
  201. }
  202. h1 {
  203. margin-top: 15px;
  204. }
  205. h2 {
  206. margin-top: 12px;
  207. }
  208. h3 {
  209. margin-top: 10px;
  210. }
  211. h4 {
  212. margin-top: 5px;
  213. }
  214. h5 {
  215. margin-top: 3px;
  216. }
  217. }
  218. .info-list {
  219. margin-top: 10px;
  220. display: flex;
  221. flex-direction: row;
  222. flex-wrap: wrap;
  223. row-gap: 10px;
  224. background-color: $box-color;
  225. border-radius: 8px;
  226. padding: 15px 20px;
  227. .entry {
  228. display: flex;
  229. flex-direction: row;
  230. flex-wrap: wrap;
  231. width: 50%;
  232. .label {
  233. width: 120px;
  234. color: $text-content-second-color;
  235. }
  236. .value {
  237. color: $text-color;
  238. }
  239. }
  240. img {
  241. width: 200px;
  242. max-width: 100%;
  243. }
  244. }
  245. .carousel {
  246. border-radius: 8px;
  247. overflow: hidden;
  248. img {
  249. width: 100%;
  250. height: 50vh;
  251. object-fit: contain;
  252. background-color: $border-split-color;
  253. }
  254. }
  255. }
  256. @media (max-width: 768px) {
  257. }
  258. @media (max-width: 540px) {
  259. }