meisiyu | 1d4aade | 2025-06-02 20:10:36 +0800 | [diff] [blame^] | 1 | .postCardWrapper { |
| 2 | width: 100%; |
| 3 | height: 100%; |
| 4 | } |
| 5 | |
| 6 | .postCard { |
| 7 | height: 100%; |
| 8 | display: flex; |
| 9 | flex-direction: column; |
| 10 | border-radius: 12px; |
| 11 | overflow: hidden; |
| 12 | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); |
| 13 | transition: all 0.3s ease; |
| 14 | background: white; |
| 15 | } |
| 16 | |
| 17 | .postCard:hover { |
| 18 | transform: translateY(-4px); |
| 19 | box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); |
| 20 | } |
| 21 | |
| 22 | .coverContainer { |
| 23 | width: 100%; |
| 24 | height: 200px; |
| 25 | overflow: hidden; |
| 26 | position: relative; |
| 27 | background: #f5f5f5; |
| 28 | display: flex; |
| 29 | align-items: center; |
| 30 | justify-content: center; |
| 31 | } |
| 32 | |
| 33 | .coverImage { |
| 34 | width: 100%; |
| 35 | height: 100%; |
| 36 | object-fit: contain; |
| 37 | object-position: center; |
| 38 | transition: transform 0.3s ease; |
| 39 | background: #f5f5f5; |
| 40 | } |
| 41 | |
| 42 | .postCard:hover .coverImage { |
| 43 | transform: scale(1.02); |
| 44 | } |
| 45 | |
| 46 | .promotionBadge { |
| 47 | position: absolute; |
| 48 | top: 8px; |
| 49 | right: 8px; |
| 50 | background: linear-gradient(45deg, #ff6b6b, #ffa500); |
| 51 | color: white; |
| 52 | padding: 4px 8px; |
| 53 | border-radius: 12px; |
| 54 | font-size: 11px; |
| 55 | font-weight: bold; |
| 56 | display: flex; |
| 57 | align-items: center; |
| 58 | gap: 4px; |
| 59 | z-index: 10; |
| 60 | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); |
| 61 | } |
| 62 | |
| 63 | .cardContent { |
| 64 | flex: 1; |
| 65 | display: flex; |
| 66 | flex-direction: column; |
| 67 | height: 100%; |
| 68 | } |
| 69 | |
| 70 | .postTitle { |
| 71 | font-size: 16px; |
| 72 | font-weight: 600; |
| 73 | margin: 0 0 12px 0; |
| 74 | line-height: 1.4; |
| 75 | color: #262626; |
| 76 | display: -webkit-box; |
| 77 | -webkit-line-clamp: 2; |
| 78 | -webkit-box-orient: vertical; |
| 79 | overflow: hidden; |
| 80 | height: 44px; |
| 81 | } |
| 82 | |
| 83 | .postMeta { |
| 84 | display: flex; |
| 85 | align-items: center; |
| 86 | font-size: 12px; |
| 87 | color: #8c8c8c; |
| 88 | margin-bottom: 12px; |
| 89 | height: 20px; |
| 90 | } |
| 91 | |
| 92 | .authorName { |
| 93 | font-weight: 500; |
| 94 | color: #595959; |
| 95 | } |
| 96 | |
| 97 | .publishTime { |
| 98 | color: #8c8c8c; |
| 99 | } |
| 100 | |
| 101 | .tagsContainer { |
| 102 | margin-bottom: 12px; |
| 103 | height: 24px; |
| 104 | display: flex; |
| 105 | flex-wrap: wrap; |
| 106 | gap: 4px; |
| 107 | overflow: hidden; |
| 108 | } |
| 109 | |
| 110 | .tag { |
| 111 | font-size: 11px; |
| 112 | padding: 2px 6px; |
| 113 | margin: 0; |
| 114 | border-radius: 4px; |
| 115 | } |
| 116 | |
| 117 | .postSummary { |
| 118 | flex: 1; |
| 119 | font-size: 13px; |
| 120 | color: #595959; |
| 121 | line-height: 1.5; |
| 122 | margin-bottom: 16px; |
| 123 | display: -webkit-box; |
| 124 | -webkit-line-clamp: 3; |
| 125 | -webkit-box-orient: vertical; |
| 126 | overflow: hidden; |
| 127 | height: 60px; |
| 128 | } |
| 129 | |
| 130 | .postFooter { |
| 131 | display: flex; |
| 132 | align-items: center; |
| 133 | justify-content: space-between; |
| 134 | margin-top: auto; |
| 135 | padding-top: 12px; |
| 136 | border-top: 1px solid #f0f0f0; |
| 137 | height: 32px; |
| 138 | } |
| 139 | |
| 140 | .stats { |
| 141 | display: flex; |
| 142 | gap: 16px; |
| 143 | } |
| 144 | |
| 145 | .statItem { |
| 146 | display: flex; |
| 147 | align-items: center; |
| 148 | gap: 4px; |
| 149 | font-size: 12px; |
| 150 | color: #8c8c8c; |
| 151 | } |
| 152 | |
| 153 | .statItem .anticon { |
| 154 | font-size: 12px; |
| 155 | } |
| 156 | |
| 157 | .readMoreBtn { |
| 158 | padding: 0; |
| 159 | font-size: 12px; |
| 160 | color: #1890ff; |
| 161 | font-weight: 500; |
| 162 | } |
| 163 | |
| 164 | .readMoreBtn:hover { |
| 165 | color: #40a9ff; |
| 166 | } |
| 167 | |
| 168 | /* 响应式设计 */ |
| 169 | @media (max-width: 768px) { |
| 170 | .coverContainer { |
| 171 | height: 160px; |
| 172 | } |
| 173 | |
| 174 | .postTitle { |
| 175 | font-size: 14px; |
| 176 | height: 40px; |
| 177 | } |
| 178 | |
| 179 | .postSummary { |
| 180 | font-size: 12px; |
| 181 | -webkit-line-clamp: 2; |
| 182 | height: 36px; |
| 183 | } |
| 184 | |
| 185 | .stats { |
| 186 | gap: 12px; |
| 187 | } |
| 188 | |
| 189 | .statItem { |
| 190 | font-size: 11px; |
| 191 | } |
| 192 | } |