style.scss 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. // NEWS
  2. #news {
  3. padding: 1.563rem 2rem 2rem 2rem;
  4. min-width: 410px;
  5. max-width: 1920px;
  6. margin: 0 auto;
  7. > p {
  8. font-weight: 600;
  9. font-size: 1.375rem;
  10. margin-bottom: 1.25rem;
  11. &.empty {
  12. text-align: center;
  13. padding: 3rem 0;
  14. color: var(--muted-foreground);
  15. font-weight: 400;
  16. font-size: 1rem;
  17. }
  18. }
  19. > div > article {
  20. position: relative;
  21. overflow: hidden;
  22. padding: 1rem 0;
  23. // NEWS
  24. > div {
  25. // 기사 대표 이미지
  26. &:nth-of-type(1) {
  27. float: left;
  28. display: block;
  29. padding-right: 1rem;
  30. width: clamp(8.75rem, 20%, 12.125rem);
  31. > img {
  32. display: block;
  33. width: 100%;
  34. height: auto;
  35. object-fit: cover;
  36. border-radius: 0.125rem;
  37. transition: transform 0.07s ease-in-out;
  38. &:hover, &:focus {
  39. cursor: pointer;
  40. transform: scale(1.03);
  41. }
  42. }
  43. }
  44. // 기사 정보
  45. &:nth-of-type(2) {
  46. display: flex;
  47. flex-direction: column;
  48. flex-wrap: wrap;
  49. align-items: baseline;
  50. // 기사 제목
  51. > a {
  52. flex: 1 1 auto;
  53. min-width: 0;
  54. white-space: normal;
  55. font-size: 1.275rem;
  56. font-weight: 500;
  57. &:hover, &:focus {
  58. text-decoration: underline;
  59. }
  60. }
  61. // 기사 소스명 + 작성일시
  62. > span {
  63. flex: 0 0 auto;
  64. white-space: nowrap;
  65. display: flex;
  66. align-items: center;
  67. gap: 0.5rem;
  68. font-size: 0.938rem;
  69. font-weight: 300;
  70. margin-top: 0.25rem;
  71. margin-bottom: 0.625rem;
  72. > em {
  73. font-style: normal;
  74. font-weight: 500;
  75. color: var(--primary);
  76. font-size: 0.813rem;
  77. }
  78. }
  79. }
  80. // 기사 내용
  81. &.desc {
  82. font-size: 0.875rem;
  83. font-weight: 300;
  84. text-align: justify;
  85. overflow-wrap: break-word;
  86. display: -webkit-box;
  87. -webkit-line-clamp: 2;
  88. -webkit-box-orient: vertical;
  89. overflow: hidden;
  90. text-overflow: ellipsis;
  91. }
  92. }
  93. }
  94. }