LaoeGaoci | 8f6d0db | 2025-06-03 22:57:04 +0800 | [diff] [blame^] | 1 | .HotResource { |
| 2 | max-width: 1200px; |
| 3 | margin: 0 auto; |
| 4 | padding: 0 2rem; |
| 5 | } |
| 6 | |
| 7 | .main-header { |
| 8 | display: flex; |
| 9 | flex-direction: row; |
| 10 | gap: 12px; |
| 11 | margin: 0 auto; |
| 12 | margin-bottom: 2rem; |
| 13 | margin-top: 2rem; |
| 14 | } |
| 15 | |
| 16 | .chart-wrapper { |
| 17 | flex: 1.2; // 右侧占一半 |
| 18 | min-width: 0; |
| 19 | display: flex; |
| 20 | align-items: center; |
| 21 | padding: 0.5rem; |
| 22 | justify-content: center; |
| 23 | background: #fff; |
| 24 | border-radius: 10px; |
| 25 | |
| 26 | canvas { |
| 27 | width: 100% !important; |
| 28 | height: 100% !important; |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | .carousel-wrapper { |
| 33 | flex: 0.8; |
| 34 | |
| 35 | .custom-carousel { |
| 36 | position: relative; |
| 37 | |
| 38 | .carousel-item { |
| 39 | position: relative; |
| 40 | max-width: 100px; |
| 41 | |
| 42 | img { |
| 43 | border-radius: 10px 10px 10px 10px; |
| 44 | border-top-right-radius: 10px; |
| 45 | border-bottom-left-radius: 10px; |
| 46 | object-fit: cover; |
| 47 | cursor: pointer; |
| 48 | } |
| 49 | |
| 50 | h3 { |
| 51 | width: 480px; |
| 52 | text-align: center; |
| 53 | bottom: 0; |
| 54 | left: 0; |
| 55 | color: #fff; |
| 56 | background: #14b8a6; |
| 57 | padding: 0.5rem 1rem; |
| 58 | font-size: 1.75rem; |
| 59 | margin: 0; |
| 60 | border-radius: 0 0 10px 10px; |
| 61 | position: absolute; |
| 62 | } |
| 63 | } |
| 64 | |
| 65 | .p-carousel-prev, |
| 66 | .p-carousel-next { |
| 67 | position: absolute; |
| 68 | top: 50%; |
| 69 | transform: translateY(-50%); |
| 70 | z-index: 10; |
| 71 | /* 保证在图片之上 */ |
| 72 | width: 2.5rem; |
| 73 | height: 2.5rem; |
| 74 | border-radius: 50%; |
| 75 | background: rgba(213, 244, 235, 0.5); |
| 76 | color: #ffffff; |
| 77 | display: flex; |
| 78 | align-items: center; |
| 79 | justify-content: center; |
| 80 | pointer-events: auto; |
| 81 | /* 确保按钮可点击 */ |
| 82 | } |
| 83 | |
| 84 | /* 左箭头靠左 */ |
| 85 | .p-carousel-prev { |
| 86 | left: 0.5rem; |
| 87 | } |
| 88 | |
| 89 | /* 右箭头靠右 */ |
| 90 | .p-carousel-next { |
| 91 | right: 0.6rem; |
| 92 | } |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | |
| 97 | // 全部社区样式 |
| 98 | .all-resources { |
| 99 | width: 100%; |
| 100 | padding: 1rem; |
| 101 | |
| 102 | &-header { |
| 103 | display: flex; |
| 104 | justify-content: space-between; |
| 105 | align-items: center; |
| 106 | } |
| 107 | |
| 108 | &-card { |
| 109 | height: 140px; |
| 110 | padding: 1.5rem; |
| 111 | margin-bottom: 1rem; |
| 112 | border-radius: 0.5rem; |
| 113 | transition: transform 0.3s ease; |
| 114 | box-shadow: none !important; // 取消阴影 |
| 115 | cursor: pointer; |
| 116 | |
| 117 | //填充卡片 |
| 118 | &.p-card.p-component { |
| 119 | padding: 0; |
| 120 | } |
| 121 | |
| 122 | .p-card-body { |
| 123 | padding: 0; |
| 124 | } |
| 125 | |
| 126 | &:hover { |
| 127 | transform: translateY(-3px); |
| 128 | box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); |
| 129 | } |
| 130 | |
| 131 | .p-card-content { |
| 132 | height: 140px; |
| 133 | display: flex; |
| 134 | justify-content: space-between; |
| 135 | padding: 0; |
| 136 | } |
| 137 | |
| 138 | img { |
| 139 | border-radius: 0.5rem 0 0 0.5rem; |
| 140 | object-fit: cover; |
| 141 | } |
| 142 | |
| 143 | .resource-header { |
| 144 | display: flex; |
| 145 | flex: 1; |
| 146 | max-width: 850px; |
| 147 | padding-left: 20px; |
| 148 | padding-right: 20px; |
| 149 | margin-bottom: 20px; |
| 150 | } |
| 151 | |
| 152 | .resource-content { |
| 153 | flex: 1; |
| 154 | display: flex; |
| 155 | flex-direction: column; |
| 156 | |
| 157 | h3 { |
| 158 | font-size: 1.5rem; |
| 159 | font-weight: bold; |
| 160 | color: #2c3e50; |
| 161 | } |
| 162 | |
| 163 | .tags { |
| 164 | display: flex; |
| 165 | gap: 0.5rem; |
| 166 | } |
| 167 | |
| 168 | .resource-introduction { |
| 169 | color: #666; |
| 170 | font-size: 1rem; |
| 171 | margin-bottom: 0; |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | .resources-states { |
| 176 | min-width: 120px; |
| 177 | display: flex; |
| 178 | flex-direction: column; |
| 179 | justify-content: flex-end; |
| 180 | align-items: flex-end; |
| 181 | gap: 0.5rem; |
| 182 | |
| 183 | .state-item { |
| 184 | display: flex; |
| 185 | align-items: center; |
| 186 | gap: 0.5rem; |
| 187 | color: #666; |
| 188 | font-size: 1rem; |
| 189 | } |
| 190 | } |
| 191 | } |
| 192 | } |