news.scss 4.3 KB

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