meisiyu | 1d4aade | 2025-06-02 20:10:36 +0800 | [diff] [blame] | 1 | .postDetailContainer { |
| 2 | max-width: 1200px; |
| 3 | margin: 0 auto; |
| 4 | background: #f5f5f5; |
| 5 | min-height: 100vh; |
| 6 | } |
| 7 | |
| 8 | .postCoverSection { |
| 9 | margin-bottom: 24px; |
| 10 | border-radius: 0 0 16px 16px; |
| 11 | overflow: hidden; |
| 12 | box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); |
| 13 | } |
| 14 | |
| 15 | .coverImageContainer { |
| 16 | position: relative; |
| 17 | width: 100%; |
| 18 | height: 400px; |
| 19 | overflow: hidden; |
| 20 | background: #f0f0f0; |
| 21 | } |
| 22 | |
| 23 | .coverImage { |
| 24 | width: 100% !important; |
| 25 | height: 100% !important; |
| 26 | object-fit: cover !important; |
| 27 | transition: transform 0.3s ease; |
| 28 | } |
| 29 | |
| 30 | .coverImage:hover { |
| 31 | transform: scale(1.02); |
| 32 | } |
| 33 | |
| 34 | .coverOverlay { |
| 35 | position: absolute; |
| 36 | top: 0; |
| 37 | left: 0; |
| 38 | right: 0; |
| 39 | bottom: 0; |
| 40 | pointer-events: none; |
| 41 | } |
| 42 | |
| 43 | .coverGradient { |
| 44 | position: absolute; |
| 45 | bottom: 0; |
| 46 | left: 0; |
| 47 | right: 0; |
| 48 | height: 100px; |
| 49 | background: linear-gradient(transparent, rgba(0, 0, 0, 0.3)); |
| 50 | } |
| 51 | |
| 52 | .previewMask { |
| 53 | background: rgba(0, 0, 0, 0.5); |
| 54 | color: white; |
| 55 | padding: 8px 16px; |
| 56 | border-radius: 4px; |
| 57 | font-size: 14px; |
| 58 | } |
| 59 | |
| 60 | .postDetailHeader { |
| 61 | margin: 0 24px 24px; |
| 62 | border-radius: 12px; |
| 63 | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); |
| 64 | } |
| 65 | |
| 66 | .titleContainer { |
| 67 | display: flex; |
| 68 | align-items: center; |
| 69 | gap: 16px; |
| 70 | margin-bottom: 16px; |
| 71 | } |
| 72 | |
| 73 | .titleContainer h2 { |
| 74 | margin: 0; |
| 75 | flex: 1; |
| 76 | } |
| 77 | |
| 78 | .promotionBadge { |
| 79 | background: linear-gradient(45deg, #ff6b6b, #ffa500); |
| 80 | color: white; |
| 81 | padding: 6px 12px; |
| 82 | border-radius: 16px; |
| 83 | font-size: 12px; |
| 84 | font-weight: bold; |
| 85 | display: flex; |
| 86 | align-items: center; |
| 87 | gap: 6px; |
| 88 | box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); |
| 89 | white-space: nowrap; |
| 90 | } |
| 91 | |
| 92 | .postMeta { |
| 93 | display: flex; |
| 94 | flex-wrap: wrap; |
| 95 | gap: 24px; |
| 96 | margin: 16px 0; |
| 97 | padding: 16px 0; |
| 98 | border-bottom: 1px solid #f0f0f0; |
| 99 | } |
| 100 | |
| 101 | .postAuthor, |
| 102 | .postTime, |
| 103 | .postViews, |
| 104 | .postTags { |
| 105 | display: flex; |
| 106 | align-items: center; |
| 107 | gap: 8px; |
| 108 | } |
| 109 | |
| 110 | .postActions { |
| 111 | display: flex; |
| 112 | gap: 12px; |
| 113 | flex-wrap: wrap; |
| 114 | margin-top: 16px; |
| 115 | } |
| 116 | |
| 117 | .postContent { |
| 118 | margin: 0 24px 24px; |
| 119 | border-radius: 12px; |
| 120 | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); |
| 121 | } |
| 122 | |
| 123 | .postContent img { |
| 124 | max-width: 100%; |
| 125 | height: auto; |
| 126 | } |
| 127 | |
| 128 | .commentSection { |
| 129 | margin: 0 24px 24px; |
| 130 | border-radius: 12px; |
| 131 | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); |
| 132 | } |
| 133 | |
| 134 | .commentInput { |
| 135 | margin-bottom: 24px; |
| 136 | } |
| 137 | |
| 138 | .commentActions { |
| 139 | display: flex; |
| 140 | justify-content: flex-end; |
| 141 | gap: 12px; |
| 142 | margin-top: 12px; |
| 143 | } |
| 144 | |
| 145 | .commentList { |
| 146 | margin-top: 24px; |
| 147 | } |
| 148 | |
| 149 | .replyList { |
| 150 | margin-top: 16px; |
| 151 | padding-left: 24px; |
| 152 | border-left: 2px solid #f0f0f0; |
| 153 | } |
| 154 | |
| 155 | .relatedPosts { |
| 156 | margin: 0 24px 24px; |
| 157 | padding: 24px; |
| 158 | background: white; |
| 159 | border-radius: 12px; |
| 160 | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); |
| 161 | } |
| 162 | |
| 163 | .recommendHeader { |
| 164 | display: flex; |
| 165 | justify-content: space-between; |
| 166 | align-items: center; |
| 167 | margin-bottom: 24px; |
| 168 | } |
| 169 | |
| 170 | .recommendHeader h4 { |
| 171 | margin: 0; |
| 172 | } |
| 173 | |
| 174 | .postDetailLoading { |
| 175 | display: flex; |
| 176 | flex-direction: column; |
| 177 | align-items: center; |
| 178 | justify-content: center; |
| 179 | min-height: 400px; |
| 180 | color: #666; |
| 181 | } |
| 182 | |
| 183 | .postDetailError { |
| 184 | text-align: center; |
| 185 | padding: 60px 24px; |
| 186 | color: #999; |
| 187 | font-size: 16px; |
| 188 | } |
| 189 | |
| 190 | /* 响应式设计 */ |
| 191 | @media (max-width: 768px) { |
| 192 | .postDetailContainer { |
| 193 | margin: 0; |
| 194 | } |
| 195 | |
| 196 | .coverImageContainer { |
| 197 | height: 250px; |
| 198 | } |
| 199 | |
| 200 | .postDetailHeader, |
| 201 | .postContent, |
| 202 | .commentSection, |
| 203 | .relatedPosts { |
| 204 | margin: 0 12px 16px; |
| 205 | border-radius: 8px; |
| 206 | } |
| 207 | |
| 208 | .postMeta { |
| 209 | flex-direction: column; |
| 210 | gap: 12px; |
| 211 | } |
| 212 | |
| 213 | .postActions { |
| 214 | flex-direction: column; |
| 215 | } |
| 216 | |
| 217 | .postActions button { |
| 218 | width: 100%; |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | @media (max-width: 480px) { |
| 223 | .coverImageContainer { |
| 224 | height: 200px; |
| 225 | } |
| 226 | |
| 227 | .postDetailHeader, |
| 228 | .postContent, |
| 229 | .commentSection, |
| 230 | .relatedPosts { |
| 231 | margin: 0 8px 12px; |
| 232 | } |
| 233 | } |