hexo-afdian-plugin
Version:
爱发电插件,用于展示爱发电赞助信息
273 lines (236 loc) • 4.55 kB
CSS
/* 爱发电组件样式 */
:root {
--heo-vip: linear-gradient(215deg, #ffba07, #ff6907);
--heo-vip-text: #f7ba00;
--heo-card-bg: #fff;
--heo-card-border: #eee;
--heo-secondtext: #666;
}
.afdian-widget {
margin: 20px 0;
border-radius: 12px;
background-color: var(--heo-card-bg);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
padding: 20px;
overflow: hidden;
}
.author-content-item {
background: var(--heo-card-bg);
border-radius: 12px;
padding: 20px;
margin-bottom: 20px;
border: 1px solid var(--heo-card-border);
}
.author-content-item-tips {
font-size: 14px;
color: var(--heo-secondtext);
margin-bottom: 10px;
}
.author-content-item-title {
font-size: 24px;
font-weight: 700;
margin-bottom: 10px;
display: block;
}
.author-content-item-description {
font-size: 16px;
margin-bottom: 20px;
color: var(--heo-secondtext);
}
.about-reward {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 20px;
}
#TA-con {
position: relative;
width: 120px;
height: 40px;
background: #f25d8e;
border-radius: 20px;
cursor: pointer;
overflow: hidden;
margin-right: 20px;
}
#text-con {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-weight: bold;
}
#linght {
position: absolute;
top: -10px;
left: -30px;
width: 20px;
height: 60px;
background: rgba(255, 255, 255, 0.3);
transform: rotate(20deg);
animation: light 2s ease-in-out infinite;
}
@keyframes light {
0% {
left: -30px;
}
100% {
left: 150px;
}
}
#tube-con {
position: relative;
width: 120px;
height: 40px;
overflow: hidden;
}
#tube-con svg {
width: 100%;
height: 100%;
}
#mask {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
transition: opacity 0.3s;
}
#orange-mask {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
opacity: 0;
transition: opacity 0.3s;
}
#tube-con:hover #mask {
opacity: 1;
}
#people {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
margin: 0;
font-size: 14px;
color: #666;
}
#people b {
color: #f25d8e;
margin: 0 2px;
}
.reward-list-all {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 15px;
}
.reward-list-item {
background: #f8f8f8;
border-radius: 8px;
padding: 10px;
cursor: pointer;
transition: transform 0.3s, box-shadow 0.3s;
}
.reward-list-item:hover {
transform: translateY(-5px);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}
.reward-list-item-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
overflow: hidden;
float: left;
margin-right: 10px;
}
.reward-list-item-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
.reward-list-item-name {
font-size: 14px;
font-weight: bold;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100px;
}
.reward-list-bottom-group {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 10px;
clear: both;
}
.reward-list-item-money {
font-size: 14px;
color: #f25d8e;
}
.reward-list-item-money.vip {
background: var(--heo-vip);
-webkit-background-clip: text;
color: transparent;
}
.reward-list-item-time {
font-size: 12px;
color: #999;
}
.no-sponsor {
grid-column: span 3;
text-align: center;
padding: 20px;
color: #999;
}
.more-sponsor {
text-align: center;
margin-top: 15px;
}
.more-sponsor-link {
display: inline-block;
padding: 8px 20px;
background: #f0f0f0;
border-radius: 20px;
color: #666;
text-decoration: none;
transition: all 0.3s;
}
.more-sponsor-link:hover {
background: #e0e0e0;
color: #333;
}
@media screen and (max-width: 768px) {
.reward-list-all {
grid-template-columns: repeat(2, 1fr);
}
.no-sponsor {
grid-column: span 2;
}
}
@media screen and (max-width: 480px) {
.reward-list-all {
grid-template-columns: 1fr;
}
.no-sponsor {
grid-column: span 1;
}
.about-reward {
flex-direction: column;
}
#TA-con {
margin-right: 0;
margin-bottom: 15px;
}
}