blob: 587eb15a736393bd6fecfda1a53695ff3dc3fb90 [file] [log] [blame]
.HotResource {
max-width: 1200px;
margin: 0 auto;
padding: 0 2rem;
}
.main-header {
display: flex;
flex-direction: row;
gap: 12px;
margin: 0 auto;
margin-bottom: 2rem;
margin-top: 2rem;
}
.chart-wrapper {
flex: 1.2; // 右侧占一半
min-width: 0;
display: flex;
align-items: center;
padding: 0.5rem;
justify-content: center;
background: #fff;
border-radius: 10px;
canvas {
width: 100% !important;
height: 100% !important;
}
}
.carousel-wrapper {
flex: 0.8;
.custom-carousel {
position: relative;
.carousel-item {
position: relative;
max-width: 100px;
img {
border-radius: 10px 10px 10px 10px;
border-top-right-radius: 10px;
border-bottom-left-radius: 10px;
object-fit: cover;
cursor: pointer;
}
h3 {
width: 480px;
text-align: center;
bottom: 0;
left: 0;
color: #fff;
background: #14b8a6;
padding: 0.5rem 1rem;
font-size: 1.75rem;
margin: 0;
border-radius: 0 0 10px 10px;
position: absolute;
}
}
.p-carousel-prev,
.p-carousel-next {
position: absolute;
top: 50%;
transform: translateY(-50%);
z-index: 10;
/* 保证在图片之上 */
width: 2.5rem;
height: 2.5rem;
border-radius: 50%;
background: rgba(213, 244, 235, 0.5);
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
pointer-events: auto;
/* 确保按钮可点击 */
}
/* 左箭头靠左 */
.p-carousel-prev {
left: 0.5rem;
}
/* 右箭头靠右 */
.p-carousel-next {
right: 0.6rem;
}
}
}
// 全部社区样式
.all-resources {
width: 100%;
padding: 1rem;
&-header {
display: flex;
justify-content: space-between;
align-items: center;
}
&-card {
height: 140px;
padding: 1.5rem;
margin-bottom: 1rem;
border-radius: 0.5rem;
transition: transform 0.3s ease;
box-shadow: none !important; // 取消阴影
cursor: pointer;
//填充卡片
&.p-card.p-component {
padding: 0;
}
.p-card-body {
padding: 0;
}
&:hover {
transform: translateY(-3px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.p-card-content {
height: 140px;
display: flex;
justify-content: space-between;
padding: 0;
}
img {
border-radius: 0.5rem 0 0 0.5rem;
object-fit: cover;
}
.resource-header {
display: flex;
flex: 1;
max-width: 850px;
padding-left: 20px;
padding-right: 20px;
margin-bottom: 20px;
}
.resource-content {
flex: 1;
display: flex;
flex-direction: column;
h3 {
font-size: 1.5rem;
font-weight: bold;
color: #2c3e50;
}
.tags {
display: flex;
gap: 0.5rem;
}
.resource-introduction {
color: #666;
font-size: 1rem;
margin-bottom: 0;
}
}
.resources-states {
min-width: 120px;
display: flex;
flex-direction: column;
justify-content: flex-end;
align-items: flex-end;
gap: 0.5rem;
.state-item {
display: flex;
align-items: center;
gap: 0.5rem;
color: #666;
font-size: 1rem;
}
}
}
}