UNPKG

hexo-afdian-plugin

Version:

爱发电插件,用于展示爱发电赞助信息

571 lines (496 loc) 10.3 kB
:root { --heo-vip: linear-gradient(215deg, #ffba07, #ff6907); --heo-vip-text: #f7ba00; --heo-card-bg: #fff; --heo-card-border: #e3e8f7; --heo-fontcolor: #363636; --heo-secondtext: #767676; --style-border: 1px solid var(--heo-card-border); --style-border-always: 1px solid var(--heo-card-border); --heo-shadow-border: 0 8px 16px -4px rgba(9, 10, 11, 0.05); } [data-theme=dark] { --heo-fontcolor: #F7F7FA; --heo-card-bg: #232323; --heo-card-border: #3e3e3e; --heo-secondtext: #a1a1a1; } .afdian-container { max-width: 1200px; margin: 0 auto; padding: 2rem 15px; box-sizing: border-box; width: 100%; } .author-content { display: flex; flex-wrap: wrap; justify-content: space-between; width: 100%; margin-top: 1rem; } .author-content-item { width: 100%; border-radius: 24px; background: var(--heo-card-bg); border: var(--style-border-always); box-shadow: var(--heo-shadow-border); position: relative; padding: 1rem 2rem; overflow: hidden; opacity: 0.9; box-sizing: border-box; } .author-content-item .author-content-item-title { font-size: 36px; font-weight: bold; line-height: 1.2; word-break: break-word; margin-right: 150px; } .author-content-item .author-content-item-tips { opacity: 0.8; font-size: 0.6rem; margin-bottom: 0.5rem; } .author-content-item .author-content-item-description { font-size: 16px; margin-top: 0.5rem; line-height: 1.6; word-break: break-word; } .about-reward { position: absolute; top: 1rem; right: 2rem; } .reward #con { width: 350px; height: 85px; position: relative; border-radius: 4px; } .reward #TA-con { width: 157px; height: 50px; background-color: #f25d8e; box-shadow: 0 4px 4px rgba(255, 112, 159, .3); position: absolute; top: 50%; left: 10%; transform: translateY(-50%); border-radius: 4px; cursor: pointer; } .reward #TA-con:hover { background-color: #ff6b9a; } .reward #text-con { width: 100px; height: 100%; margin: 0 auto; position: relative; } .reward #linght { width: 0; height: 0; position: absolute; top: 36%; left: 4px; border-color: transparent; border-style: solid; border-width: 10px; border-top: 10px solid #fff; border-radius: 4px; transform: rotate(-55deg); } .reward #linght::after { position: absolute; top: -13px; left: -11px; content: ""; width: 0; height: 0; border-color: transparent; border-style: solid; border-width: 10px; border-top: 10px solid #fff; transform: rotate(180deg); border-radius: 4px; } .reward #TA { float: right; line-height: 50px; font-size: 15px; color: #fff; } .reward #tube-con { width: 157px; height: 55px; position: absolute; right: -5px; top: 15px; } .reward svg { width: 100%; height: 100%; } .reward #mask { width: 0; height: 100%; overflow: hidden; position: absolute; top: 0; left: 0; transition: all .5s; } .reward #mask svg { width: 157px; height: 55px; } .reward #TA-con:hover + #tube-con > #mask { width: 157px; } .reward #TA-con:hover + #tube-con > #orange-mask { animation: move1 .5s linear .2s infinite; } .reward #TA-con:hover + #tube-con > #orange-mask svg { animation: movetwo .5s linear .2s infinite; } .reward #orange-mask { width: 18px; height: 100%; overflow: hidden; position: absolute; left: -15px; top: 0; } .reward #orange-mask svg { position: absolute; top: 0; left: 15px; width: 157px; height: 55px; } .reward #people { position: absolute; right: 10px; top: 4px; font-size: 12px; font-family: "雅黑"; color: #aaa; } .reward #people > b { color: #777; } .reward-list-all { display: flex; flex-wrap: wrap; flex-direction: row; margin-top: 1rem; margin-bottom: 0.5rem; margin-left: -0.25rem; margin-right: -0.25rem; width: 100%; box-sizing: border-box; } .reward-list-item { padding: 1rem; border-radius: 12px; border: var(--style-border-always); width: calc((100% / 6) - 0.5rem); margin: 0rem 0.25rem 0.5rem 0.25rem; box-shadow: var(--heo-shadow-border); cursor: pointer; box-sizing: border-box; transition: all 0.3s ease; } .reward-list-item:hover { background-color: rgb(0, 108, 242); color: #FFFFFF; transform: translateY(-5px); } .reward-list-item .reward-list-item-name { font-size: 1rem; font-weight: bold; line-height: 1; margin-bottom: 0.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .reward-list-item .reward-list-bottom-group { display: flex; align-items: center; justify-content: space-between; float: left; width: 100%; } .reward-list-item .reward-list-item-avatar { width: 32%; float: left; z-index: 10; position: static; height: 40px; transform: translateY(-40%); } .reward-list-item .reward-list-item-avatar img { border-radius: 50%; width: 80%; margin-top: 0.2rem; object-fit: cover; } .reward-list-item .reward-list-item-avatar-group { width: 65%; float: left; z-index: 10; position: static; overflow: hidden; } .reward-list-item .reward-list-item-money { padding: 4px; background: var(--heo-fontcolor); color: #fff; font-size: 12px; line-height: 1; border-radius: 4px; margin-right: 4px; white-space: nowrap; } .reward-list-item .reward-list-item-time { font-size: 12px; color: var(--heo-secondtext); white-space: nowrap; } .reward-list-item:hover .reward-list-item-time { color: #FFFFFF; } .reward-list-item .reward-list-item-money.vip { background: var(--heo-vip); } /* 商店样式 */ .shop-container { margin-top: 30px; width: 100%; } .shop-header { text-align: center; margin-bottom: 30px; } .shop-header h2 { font-size: 28px; margin-bottom: 10px; } .shop-header p { color: #666; max-width: 600px; margin: 0 auto; } .shop-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; width: 100%; } .shop-item { border-radius: 12px; overflow: hidden; background-color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; cursor: pointer; display: flex; flex-direction: column; } .shop-item:hover { transform: translateY(-5px); box-shadow: 0 8px 16px rgba(0,0,0,0.1); } .shop-item-image { height: 180px; background-size: cover; background-position: center; width: 100%; } .shop-item-content { padding: 15px; flex-grow: 1; display: flex; flex-direction: column; } .shop-item-title { font-size: 18px; font-weight: bold; margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .shop-item-description { color: #666; font-size: 14px; margin-bottom: 12px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; flex-grow: 1; line-height: 1.5; } .shop-item-price { color: #f25d8e; font-size: 20px; font-weight: bold; } .shop-item-button { display: block; width: 100%; padding: 10px; background-color: #f25d8e; color: white; text-align: center; border-radius: 6px; margin-top: 15px; font-weight: bold; border: none; cursor: pointer; transition: background-color 0.3s ease; } .shop-item-button:hover { background-color: #ff6b9a; } /* 导航标签样式 */ .nav-tabs { display: flex; margin-bottom: 20px; border-bottom: 1px solid #e3e8f7; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; /* Firefox */ width: 100%; } .nav-tabs::-webkit-scrollbar { display: none; /* Chrome, Safari, Edge */ } .nav-tab { padding: 10px 20px; cursor: pointer; border-bottom: 2px solid transparent; margin-right: 10px; flex-shrink: 0; } .nav-tab.active { border-bottom: 2px solid #0066cc; color: #0066cc; font-weight: bold; } .nav-tab:hover { background-color: #f0f7ff; } /* 响应式调整 */ @media screen and (max-width: 1200px) { .reward-list-item { width: calc((100% / 4) - 0.5rem); } .shop-items { grid-template-columns: repeat(2, 1fr); } } @media screen and (max-width: 900px) { .reward-list-item { width: calc((100% / 3) - 0.5rem); } .author-content-item .author-content-item-title { font-size: 28px; margin-right: 0; } } @media screen and (max-width: 768px) { .reward-list-item { width: calc((100% / 2) - 0.5rem); } .author-content-item { padding: 1rem; } .about-reward { position: relative; top: 0; right: 0; margin-top: 1rem; width: 100%; } .reward #con { width: 100%; } .reward #TA-con { position: relative; left: 0; transform: none; margin: 0 auto; } .reward #tube-con { position: relative; margin: 20px auto; right: auto; top: auto; } .shop-items { grid-template-columns: 1fr; } } @media screen and (max-width: 480px) { .reward-list-item { width: 100%; margin-left: 0; margin-right: 0; } .author-content-item .author-content-item-title { font-size: 24px; } .shop-item-description { -webkit-line-clamp: 2; } } @keyframes move1 { 0% { left: -15px; } 50% { left: -5px; } 100% { left: -15px; } } @keyframes movetwo { 0% { left: 15px; } 50% { left: 5px; } 100% { left: 15px; } } /* 适配暗黑模式 */ @media (prefers-color-scheme: dark) { :root { --heo-card-bg: #232323; --heo-card-border: #3e3e3e; --heo-fontcolor: #F7F7FA; --heo-secondtext: #a1a1a1; } } /* 空数据提示 */ .no-sponsor { width: 100%; padding: 2rem; text-align: center; color: var(--heo-secondtext); font-size: 1rem; background: var(--heo-card-bg); border-radius: 12px; border: var(--style-border-always); }