feat(widgets): simplify locations and paid sidebar

Remove deprecated widget locations and widgets, standardize sidebar labels, and render a compact paid-post purchase card in the article sidebar.
This commit is contained in:
kate522 committed 2026-08-14 01:49:50 +08:00
1 parent 51d2ab3aa7
commit bd7d3046a5
43 files changed
+294 -3581

No files matched your search

-92
View File
@@ -216,98 +216,6 @@
.aksrt-img-grid--4 { grid-template-columns: repeat(3, 1fr); }
}
/* ============================================================
* 4. 定价卡片 — .aksrt-pricing-card
* ============================================================ */
.aksrt-pricing-card {
position: relative;
background: var(--surface-1, #fff);
border: 1px solid var(--color-line, rgba(50, 50, 50, 0.06));
border-radius: var(--radius-lg, 8px);
padding: 28px 24px;
text-align: center;
transition: box-shadow .25s ease, transform .25s ease;
}
.aksrt-pricing-card:hover {
box-shadow: var(--shadow-lg, 0 0 10px rgba(116, 116, 116, 0.12));
transform: none;
}
/* 推荐/高亮卡片 */
.aksrt-pricing-card--featured {
border-color: var(--color-primary);
box-shadow: 0 0 0 1px var(--color-primary), var(--shadow-lg);
}
.aksrt-pricing-card__badge {
position: absolute;
top: -1px;
left: 50%;
transform: translateX(-50%);
background: var(--color-primary);
color: #fff;
padding: 2px 16px;
border-radius: 0 0 var(--radius, 8px) var(--radius, 8px);
font-size: 12px;
font-weight: 700;
}
.aksrt-pricing-card__title {
font-size: 18px;
font-weight: 700;
color: var(--color-ink, #333);
margin-bottom: 8px;
}
.aksrt-pricing-card__price {
font-size: 36px;
font-weight: 800;
color: var(--color-primary);
line-height: 1.2;
margin: 12px 0 4px;
}
.aksrt-pricing-card__price small {
font-size: 14px;
font-weight: 500;
color: var(--color-ink-3, #777);
}
.aksrt-pricing-card__desc {
font-size: 14px;
color: var(--color-ink-3, #777);
margin-bottom: 20px;
}
.aksrt-pricing-card__features {
list-style: none;
padding: 0;
margin: 0 0 24px;
text-align: left;
}
.aksrt-pricing-card__features li {
padding: 6px 0;
font-size: 14px;
color: var(--color-ink-2, #4e5358);
display: flex;
align-items: center;
gap: 8px;
}
.aksrt-pricing-card__features li::before {
content: '✓';
color: var(--color-success);
font-weight: 700;
font-size: 13px;
}
.aksrt-pricing-card__cta {
display: block;
width: 100%;
}
/* ============================================================
* 5. Toggle 开关 — .aksrt-toggle (纯 CSS + :checked)
* 保持原生 <input> 可访问性
@@ -1,15 +1,3 @@
/* Dark mode */
.theme-dark .aksrt-lang-switch__toggle,
html.dark .aksrt-lang-switch__toggle {
background: #2a2a3a;
border-color: rgba(255, 255, 255, 0.15);
}
.theme-dark .aksrt-lang-switch__dropdown,
html.dark .aksrt-lang-switch__dropdown {
background: #2a2a3a;
border-color: rgba(255, 255, 255, 0.15);
}
/* ============================================================
* 响应式
@@ -15,125 +15,3 @@
font-size: 18px;
}
}
/* ============================================================
* 22. 语言切换器
* ============================================================ */
.aksrt-lang-switch {
position: relative;
}
.aksrt-lang-switch__toggle {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 12px;
border: 1px solid var(--color-line);
border-radius: var(--radius, 10px);
background: var(--surface-1, #fff);
color: var(--color-ink-2);
font-size: 13px;
cursor: pointer;
transition: border-color 0.2s;
width: 100%;
}
.aksrt-lang-switch__toggle:hover {
border-color: var(--color-primary, var(--color-primary));
}
.aksrt-lang-switch__toggle img {
border-radius: 2px;
}
.aksrt-lang-switch__dropdown {
position: absolute;
top: 100%;
left: 0;
right: 0;
margin: 4px 0 0;
padding: 4px;
list-style: none;
background: var(--surface-1, #fff);
border: 1px solid var(--color-line);
border-radius: var(--radius, 10px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
z-index: 100;
opacity: 0;
visibility: hidden;
transform: translateY(4px);
transition: all 0.2s;
}
.aksrt-lang-switch:hover .aksrt-lang-switch__dropdown,
.aksrt-lang-switch__toggle:focus + .aksrt-lang-switch__dropdown {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.aksrt-lang-switch__item {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 10px;
border-radius: 6px;
font-size: 13px;
color: var(--color-ink-2);
text-decoration: none;
transition: background 0.15s;
}
.aksrt-lang-switch__item:hover {
background: var(--surface-2, #F4F5F7);
}
.aksrt-lang-switch__item.is-active {
color: var(--color-primary, var(--color-primary));
font-weight: 600;
}
.aksrt-lang-switch__item img {
border-radius: 2px;
}
/* 国旗模式 */
.aksrt-lang-switch--flags {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.aksrt-lang-switch__flag {
display: inline-flex;
align-items: center;
justify-content: center;
width: 32px;
height: 24px;
border: 2px solid transparent;
border-radius: 4px;
overflow: hidden;
transition: border-color 0.2s;
text-decoration: none;
}
.aksrt-lang-switch__flag:hover {
border-color: var(--color-primary, var(--color-primary));
}
.aksrt-lang-switch__flag.is-active {
border-color: var(--color-primary, var(--color-primary));
}
.aksrt-lang-switch__flag img {
width: 100%;
height: 100%;
object-fit: cover;
}
.aksrt-lang-switch__flag span {
font-size: 10px;
font-weight: 600;
color: var(--color-ink-3);
}
@@ -376,9 +376,8 @@ html.dark .article-end-separator span {
padding-left: 24px;
}
/* WidgetPostsNavs + built-in shell share .posts-nav-box.toc-widget */
.widget .posts-nav-box.toc-widget,
.widget_aksrt_posts_navs .posts-nav-box.toc-widget {
/* Built-in article TOC shell. */
.sidebar .posts-nav-box.toc-widget {
margin: 0;
box-shadow: none;
background: transparent;
@@ -386,9 +385,8 @@ html.dark .article-end-separator span {
border-radius: 0;
}
.widget .posts-nav-box.toc-widget > h3,
.widget .posts-nav-box.toc-widget .toc-widget__title,
.widget_aksrt_posts_navs .posts-nav-box.toc-widget > h3 {
.sidebar .posts-nav-box.toc-widget > h3,
.sidebar .posts-nav-box.toc-widget .toc-widget__title {
margin: 0 0 10px;
font-size: 15px;
font-weight: 700;
+1 -248
View File
@@ -1,154 +1,8 @@
/**
* Batch3 widgets: partners scroll, iframe, combo info, text title, user lists, plate widgets.
* Batch3 widgets: iframe, combo info, text title, user lists, plate widgets.
* @package AKSRT
*/
/* ---- Partners scroll ---- */
.aksrt-partners-scroll-wrap {
margin-bottom: 20px;
}
.aksrt-partners-scroll-wrap.is-bare {
background: transparent;
box-shadow: none;
padding: 0;
}
.aksrt-partners-scroll {
overflow: hidden;
position: relative;
--aksrt-ps-w: 220px;
--aksrt-ps-h: 90px;
--aksrt-ps-radius: 10px;
--aksrt-ps-speed: 3;
}
.aksrt-ps-end-fade::before,
.aksrt-ps-end-fade::after {
content: "";
position: absolute;
top: 0;
bottom: 0;
width: 48px;
z-index: 2;
pointer-events: none;
}
.aksrt-ps-end-fade::before {
left: 0;
background: linear-gradient(90deg, var(--surface-1, #fff), transparent);
}
.aksrt-ps-end-fade::after {
right: 0;
background: linear-gradient(270deg, var(--surface-1, #fff), transparent);
}
.aksrt-ps-row {
overflow: hidden;
margin-bottom: 10px;
}
.aksrt-ps-row:last-child {
margin-bottom: 0;
}
.aksrt-ps-track {
display: flex;
width: max-content;
animation: aksrt-ps-marquee calc(40s / var(--aksrt-ps-speed)) linear infinite;
}
.aksrt-ps-dir-right .aksrt-ps-track {
animation-name: aksrt-ps-marquee-rev;
}
.aksrt-ps-pause-hover:hover .aksrt-ps-track {
animation-play-state: paused;
}
.aksrt-ps-group {
display: flex;
flex-shrink: 0;
align-items: center;
}
.aksrt-ps-item {
display: flex;
align-items: center;
flex-shrink: 0;
width: var(--aksrt-ps-w);
height: var(--aksrt-ps-h);
margin-right: 12px;
border-radius: var(--aksrt-ps-radius);
overflow: hidden;
text-decoration: none;
color: inherit;
box-sizing: border-box;
padding: 8px 12px;
}
.aksrt-ps-card-bg .aksrt-ps-item {
background: var(--surface-2, #f3f4f6);
}
.aksrt-ps-img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
display: block;
}
.aksrt-ps-style-logo .aksrt-ps-item {
justify-content: center;
padding: 10px;
}
.aksrt-ps-card-icon {
width: 42px;
height: 42px;
flex-shrink: 0;
margin-right: 10px;
display: flex;
align-items: center;
justify-content: center;
}
.aksrt-ps-card-icon .aksrt-ps-img {
max-height: 42px;
}
.aksrt-ps-card-text {
min-width: 0;
flex: 1;
display: flex;
flex-direction: column;
}
.aksrt-ps-card-title {
font-weight: 700;
font-size: 13px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.aksrt-ps-card-desc {
font-size: 12px;
color: var(--muted-2-color, #999);
margin-top: 3px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.aksrt-ps-style-chip .aksrt-ps-item {
width: auto;
height: auto;
min-height: 36px;
border-radius: 999px;
padding: 6px 14px;
gap: 6px;
}
.aksrt-ps-chip-icon {
width: 22px;
height: 22px;
display: flex;
align-items: center;
margin-right: 6px;
}
.aksrt-ps-chip-title {
font-size: 13px;
white-space: nowrap;
}
@keyframes aksrt-ps-marquee {
from { transform: translateX(0); }
to { transform: translateX(-50%); }
}
@keyframes aksrt-ps-marquee-rev {
from { transform: translateX(-50%); }
to { transform: translateX(0); }
}
/* ---- Iframe embed ---- */
.aksrt-iframe-embed {
margin-bottom: 16px;
@@ -532,75 +386,6 @@
}
/* ---- Pricing plans ---- */
.aksrt-pricing { margin-bottom: 16px; }
.aksrt-pricing__cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
gap: 16px;
}
.aksrt-pricing__card {
position: relative;
border: 1px solid var(--color-line, #e5e7eb);
border-radius: 14px;
padding: 22px 18px 18px;
background: var(--surface-1, #fff);
display: flex;
flex-direction: column;
min-height: 100%;
}
.aksrt-pricing__card.is-featured {
box-shadow: 0 10px 28px rgba(0,0,0,.08);
border-color: transparent;
border-top: 3px solid var(--plan-accent, #3b82f6);
}
.aksrt-pricing__card.accent-pink { --plan-accent: #ec4899; }
.aksrt-pricing__card.accent-purple { --plan-accent: #a855f7; }
.aksrt-pricing__card.accent-blue { --plan-accent: #3b82f6; }
.aksrt-pricing__card.accent-green { --plan-accent: #22c55e; }
.aksrt-pricing__card.accent-yellow { --plan-accent: #eab308; }
.aksrt-pricing__card.accent-cyan { --plan-accent: #06b6d4; }
.aksrt-pricing__badge {
position: absolute;
top: 12px;
right: 12px;
font-size: 11px;
padding: 2px 8px;
border-radius: 999px;
background: var(--plan-accent, #3b82f6);
color: #fff;
}
.aksrt-pricing__name { font-size: 18px; font-weight: 700; margin: 0 0 6px; }
.aksrt-pricing__desc { font-size: 13px; color: var(--muted-2-color, #888); margin: 0 0 12px; }
.aksrt-pricing__price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.aksrt-pricing__main { font-size: 32px; font-weight: 800; color: var(--plan-accent, #3b82f6); line-height: 1; }
.aksrt-pricing__mark { font-size: .55em; margin-right: 2px; }
.aksrt-pricing__original { font-size: 13px; color: #999; text-decoration: line-through; }
.aksrt-pricing__features { list-style: none; margin: 0 0 16px; padding: 0; flex: 1; }
.aksrt-pricing__features li { display: flex; gap: 8px; font-size: 13px; padding: 5px 0; }
.aksrt-pricing__features i { color: var(--plan-accent, #3b82f6); margin-top: 2px; }
.aksrt-pricing__btn {
display: block;
text-align: center;
padding: 10px 14px;
border-radius: 999px;
background: var(--plan-accent, #3b82f6);
color: #fff !important;
text-decoration: none;
font-weight: 600;
}
.aksrt-pricing__trust {
display: flex;
flex-wrap: wrap;
gap: 14px 22px;
margin-top: 18px;
justify-content: center;
}
.aksrt-pricing__trust-item { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.aksrt-pricing__trust-item i { color: var(--color-primary, #3b82f6); margin-top: 2px; }
.aksrt-pricing__trust-item strong { display: block; }
.aksrt-pricing__trust-item span { color: var(--muted-2-color, #888); font-size: 12px; }
/* ---- FAQ ---- */
.aksrt-faq { margin-bottom: 16px; }
.aksrt-faq__search { display: flex; gap: 8px; margin-bottom: 14px; }
@@ -671,38 +456,6 @@
font-size: 13px;
}
/* ---- Stats ---- */
.aksrt-stats { margin-bottom: 16px; }
.aksrt-stats__intro { margin-bottom: 14px; }
.aksrt-stats__intro-title { font-size: 22px; margin: 0 0 6px; }
.aksrt-stats__intro-sub { color: var(--muted-2-color, #888); margin: 0; font-size: 13px; }
.aksrt-stats__grid {
display: grid;
grid-template-columns: repeat(var(--aksrt-stats-pc, 4), minmax(0, 1fr));
gap: 12px;
}
@media (max-width: 767.98px) {
.aksrt-stats__grid {
grid-template-columns: repeat(var(--aksrt-stats-m, 2), minmax(0, 1fr));
}
}
.aksrt-stats__item {
border-radius: 12px;
padding: 16px 14px;
background: var(--surface-1, #fff);
border: 1px solid var(--color-line, #e5e7eb);
text-align: center;
}
.aksrt-stats__item.color-pink { --stat-c: #ec4899; }
.aksrt-stats__item.color-purple { --stat-c: #a855f7; }
.aksrt-stats__item.color-orange { --stat-c: #f97316; }
.aksrt-stats__item.color-blue { --stat-c: #3b82f6; }
.aksrt-stats__item.color-green { --stat-c: #22c55e; }
.aksrt-stats__icon { font-size: 20px; color: var(--stat-c, #3b82f6); margin-bottom: 8px; }
.aksrt-stats__value { font-size: 28px; font-weight: 800; color: var(--stat-c, #3b82f6); line-height: 1.1; }
.aksrt-stats__prefix, .aksrt-stats__unit { font-size: .55em; font-weight: 600; }
.aksrt-stats__label { margin-top: 6px; font-size: 12px; color: var(--muted-2-color, #888); }
/* ---- Forum topic lists ---- */
.aksrt-ftopic-list { list-style: none; margin: 0; padding: 0; }
.aksrt-ftopic-list__item {
+1 -63
View File
@@ -1,69 +1,7 @@
/**
* Batch3c: reviews + highlights.
* Batch3c: highlights.
*/
.aksrt-reviews {
margin-bottom: 16px;
--aksrt-rev-pc: 3;
--aksrt-rev-m: 1.2;
}
.aksrt-reviews__track {
display: grid;
grid-auto-flow: column;
grid-auto-columns: calc((100% - (var(--aksrt-rev-pc) - 1) * 12px) / var(--aksrt-rev-pc));
gap: 12px;
overflow-x: auto;
scroll-snap-type: x mandatory;
padding-bottom: 6px;
-webkit-overflow-scrolling: touch;
}
@media (max-width: 767.98px) {
.aksrt-reviews__track {
grid-auto-columns: calc((100% - (var(--aksrt-rev-m) - 1) * 12px) / var(--aksrt-rev-m));
}
}
.aksrt-reviews__slide { scroll-snap-align: start; min-width: 0; }
.aksrt-reviews__card {
position: relative;
border: 1px solid var(--color-line, #e5e7eb);
border-radius: 12px;
padding: 16px;
background: var(--surface-1, #fff);
min-height: 100%;
}
.aksrt-reviews__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.aksrt-reviews__avatar {
width: 44px;
height: 44px;
border-radius: 50%;
object-fit: cover;
background: var(--surface-2, #eee);
display: inline-flex;
align-items: center;
justify-content: center;
color: #999;
flex-shrink: 0;
}
.aksrt-reviews__name { font-weight: 700; font-size: 14px; }
.aksrt-reviews__name a { color: inherit; text-decoration: none; }
.aksrt-reviews__role { font-size: 12px; color: var(--muted-2-color, #888); }
.aksrt-reviews__stars { margin-bottom: 8px; font-size: 12px; }
.aksrt-reviews__stars .is-on { color: #f5a623; }
.aksrt-reviews__stars .is-off { color: #ddd; }
.aksrt-reviews__content {
font-size: 13px;
line-height: 1.55;
color: var(--color-ink-2, #444);
margin: 0;
}
.aksrt-reviews__quote {
position: absolute;
right: 14px;
bottom: 10px;
opacity: .12;
font-size: 28px;
}
.aksrt-highlights { margin-bottom: 16px; display: flex; flex-direction: column; gap: 12px; }
.aksrt-highlights__row {
display: grid;
+1 -135
View File
@@ -1,107 +1,7 @@
/**
* Batch3d: feature intro, term cards, paid posts.
* Batch3d: term cards.
*/
.aksrt-fi {
display: grid;
grid-template-columns: 1fr 1.1fr;
gap: 28px;
align-items: center;
margin-bottom: 20px;
}
.aksrt-fi.media-left { grid-template-columns: 1.1fr 1fr; }
.aksrt-fi.media-left .aksrt-fi__text { order: 2; }
.aksrt-fi.media-left .aksrt-fi__media { order: 1; }
@media (max-width: 991.98px) {
.aksrt-fi,
.aksrt-fi.media-left {
grid-template-columns: 1fr;
}
.aksrt-fi.media-left .aksrt-fi__text,
.aksrt-fi.media-left .aksrt-fi__media { order: initial; }
}
.aksrt-fi__title {
font-size: 28px;
line-height: 1.25;
margin: 0 0 12px;
}
.aksrt-fi__desc {
font-size: 14px;
color: var(--muted-2-color, #666);
line-height: 1.7;
margin-bottom: 14px;
}
.aksrt-fi__stat {
display: flex;
align-items: baseline;
gap: 6px;
margin-bottom: 14px;
}
.aksrt-fi__stat-num {
font-size: 36px;
font-weight: 800;
color: var(--color-primary, #3b82f6);
line-height: 1;
}
.aksrt-fi__stat-plus { font-size: 22px; font-weight: 700; color: var(--color-primary, #3b82f6); }
.aksrt-fi__stat-label { font-size: 13px; color: var(--muted-2-color, #888); margin-left: 4px; }
.aksrt-fi__tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.aksrt-fi__tab {
border: 1px solid var(--color-line, #e5e7eb);
background: var(--surface-1, #fff);
border-radius: 999px;
padding: 6px 14px;
font-size: 13px;
cursor: pointer;
}
.aksrt-fi__tab.is-active {
background: var(--color-primary, #3b82f6);
border-color: transparent;
color: #fff;
}
.aksrt-fi__panel { display: none; }
.aksrt-fi__panel.is-active { display: block; }
.aksrt-fi__browser {
border-radius: 12px;
overflow: hidden;
border: 1px solid var(--color-line, #e5e7eb);
background: var(--surface-2, #f3f4f6);
box-shadow: 0 12px 32px rgba(0,0,0,.08);
}
.aksrt-fi__browser.is-plain { box-shadow: none; }
.aksrt-fi__browser-bar {
height: 28px;
background: #eef1f5;
display: flex;
align-items: center;
gap: 6px;
padding: 0 12px;
}
.aksrt-fi__browser-bar span {
width: 8px;
height: 8px;
border-radius: 50%;
background: #d0d5dd;
}
.aksrt-fi__browser-bar span:nth-child(1) { background: #ff5f57; }
.aksrt-fi__browser-bar span:nth-child(2) { background: #febc2e; }
.aksrt-fi__browser-bar span:nth-child(3) { background: #28c840; }
.aksrt-fi__browser-body {
position: relative;
width: 100%;
height: 0;
background: #111;
}
.aksrt-fi__img,
.aksrt-fi__video {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.aksrt-term-cards {
display: grid;
grid-template-columns: repeat(var(--aksrt-tc-cols, 2), minmax(0, 1fr));
@@ -127,37 +27,3 @@
.aksrt-term-card__body { padding: 10px 12px 12px; }
.aksrt-term-card__name { font-weight: 700; font-size: 14px; }
.aksrt-term-card__count { font-size: 12px; color: var(--muted-2-color, #888); margin-top: 2px; }
.aksrt-paid-posts { list-style: none; margin: 0; padding: 0; }
.aksrt-paid-posts__item {
display: flex;
gap: 10px;
padding: 8px 0;
border-bottom: 1px dashed var(--color-line, #e5e7eb);
}
.aksrt-paid-posts__item:last-child { border-bottom: 0; }
.aksrt-paid-posts__thumb {
width: 56px;
height: 56px;
border-radius: 8px;
overflow: hidden;
flex-shrink: 0;
background: var(--surface-2, #eee);
}
.aksrt-paid-posts__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aksrt-paid-posts__body { min-width: 0; flex: 1; }
.aksrt-paid-posts__title {
display: block;
color: inherit;
text-decoration: none;
font-size: 13px;
font-weight: 600;
line-height: 1.4;
}
.aksrt-paid-posts__price {
display: inline-block;
margin-top: 4px;
font-size: 12px;
color: #e11d48;
font-weight: 700;
}
+43 -139
View File
@@ -1977,7 +1977,7 @@ a.main-color > .icon-cover-card:hover {
.widget_aksrt_icon_cover_cards .col-xs-3 { width: 25%; }
}
/* ===== Batch16-18: highlights/combo/reviews/announcement/gap/pricing polish ===== */
/* ===== Batch16-18: highlights/combo/announcement/gap polish ===== */
.aksrt-highlights__row {
display: grid;
@@ -2063,80 +2063,6 @@ a.main-color > .icon-cover-card:hover {
.aksrt-combo-info .col-xs-4 { width: 33.333%; }
}
/* Reviews swiper */
.aksrt-reviews-swiper {
position: relative;
overflow: hidden;
padding: 0 28px 4px;
}
.aksrt-reviews-swiper .swiper-slide {
width: calc(100% / var(--aksrt-rev-pc, 3));
max-width: 360px;
height: auto;
padding-right: 12px;
box-sizing: border-box;
}
@media (max-width: 767px) {
.aksrt-reviews-swiper .swiper-slide {
width: calc(100% / var(--aksrt-rev-m, 1.2));
}
}
.aksrt-reviews__card {
height: 100%;
border-radius: 12px;
border: 1px solid var(--color-line, #e5e7eb);
background: var(--surface-1, #fff);
padding: 16px;
position: relative;
}
.aksrt-reviews__head {
display: flex;
align-items: center;
gap: 10px;
margin-bottom: 8px;
}
.aksrt-reviews__avatar {
width: 44px;
height: 44px;
border-radius: 50%;
object-fit: cover;
display: block;
background: var(--surface-2, #eee);
}
.aksrt-reviews__avatar.is-placeholder {
display: inline-flex;
align-items: center;
justify-content: center;
color: #999;
}
.aksrt-reviews__name { font-weight: 700; }
.aksrt-reviews__role { font-size: 12px; color: var(--muted-2-color, #888); }
.aksrt-reviews__stars .fa-star.is-on { color: #f5b301; }
.aksrt-reviews__stars .fa-star.is-off { color: #ddd; }
.aksrt-reviews__content { margin: 10px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted-color, #555); }
.aksrt-reviews__quote {
position: absolute;
right: 12px;
bottom: 10px;
opacity: .12;
font-size: 28px;
}
.aksrt-reviews-swiper .swiper-button-prev,
.aksrt-reviews-swiper .swiper-button-next {
width: 28px;
height: 28px;
margin-top: 0;
top: 42%;
border-radius: 50%;
background: var(--surface-1, #fff);
border: 1px solid var(--color-line, #e5e7eb);
color: var(--color-ink, #111);
}
.aksrt-reviews-swiper .swiper-button-prev:after,
.aksrt-reviews-swiper .swiper-button-next:after { font-size: 12px; font-weight: 700; }
.aksrt-reviews-swiper .swiper-button-prev { left: 0; }
.aksrt-reviews-swiper .swiper-button-next { right: 0; }
/* Announcement vertical swiper reuse notice styles */
.aksrt-announcement-swiper-wrap {
display: flex;
@@ -2227,36 +2153,6 @@ a.main-color > .icon-cover-card:hover {
padding: 1px 8px;
}
.aksrt-paid-posts__item.is-mini {
position: relative;
margin-bottom: 10px;
}
.aksrt-paid-posts__item.is-mini .aksrt-paid-posts__price.badge {
position: absolute;
top: 6px;
right: 6px;
z-index: 2;
background: rgba(239, 68, 68, .92);
color: #fff;
font-size: 11px;
padding: 2px 8px;
border-radius: 999px;
}
.aksrt-lang-switch-widget.hide-name .aksrt-lang-switch__toggle span,
.aksrt-lang-switch-widget.hide-name .aksrt-lang-switch__item {
font-size: 0;
}
.aksrt-lang-switch-widget.hide-current .aksrt-lang-switch__item.is-active,
.aksrt-lang-switch-widget.hide-current .aksrt-lang-switch__flag.is-active {
display: none;
}
.aksrt-lang-switch-widget.style-inline .aksrt-lang-switch--flags {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.aksrt-forum-widget__item.is-top .aksrt-forum-widget__rank {
background: var(--theme-color, #f04494);
color: #fff;
@@ -2380,8 +2276,6 @@ a.main-color > .icon-cover-card:hover {
justify-content: center;
}
.aksrt-forum-widget__rank-row badge.img-badge { position: static; flex: 0 0 auto; margin-top: 4px; }
.aksrt-stats__item[data-aksrt-animate] { will-change: transform, opacity; }
/* batch28-30 residual */
.aksrt-ftab.widget-tab-posts .aksrt-ftab__nav { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 12px; padding: 0; }
@@ -2392,14 +2286,6 @@ a.main-color > .icon-cover-card:hover {
.aksrt-ftab__btn.is-active { background: var(--theme-color, #f04494); color: #fff; }
.aksrt-ftab__panel[hidden] { display: none !important; }
.aksrt-ftab__panel.is-ajax-loading { opacity: .65; pointer-events: none; }
.aksrt-reviews__avatar.aksrt-lazy { object-fit: cover; border-radius: 50%; }
/* batch31-33 residual */
.aksrt-fi__img.aksrt-lazy { width: 100%; height: 100%; object-fit: cover; display: block; position: absolute; inset: 0; }
.aksrt-fi__video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
/* batch34-36 residual */
.widget-hot-posts--graphic .hot-posts-graphic { margin-bottom: 12px; border-radius: 8px; overflow: hidden; }
.widget-hot-posts--graphic .hot-posts-graphic .graphic { position: relative; overflow: hidden; border-radius: 8px; background: var(--surface-2, #f3f4f6); }
@@ -2448,19 +2334,49 @@ a.main-color > .icon-cover-card:hover {
.posts-mini-lists.aksrt-main-posts { /* zibll mini outer */ }
/* batch37-39 residual */
.aksrt-post-pay-box { position: relative; overflow: hidden; }
.aksrt-post-pay-box .pay-tag.abs-center {
position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
z-index: 2; padding: 2px 10px; border-radius: 999px; background: rgba(0,0,0,.35); color: #fff; font-size: 12px;
/* Compact paid-content purchase card for the article sidebar. */
.aksrt-post-pay-card {
--aksrt-pay-accent: var(--color-primary, #3b82f6);
display: grid;
gap: 12px;
padding: 16px;
border: 1px solid color-mix(in srgb, var(--aksrt-pay-accent) 26%, var(--color-line, #e5e7eb));
border-radius: 12px;
background: linear-gradient(145deg, color-mix(in srgb, var(--aksrt-pay-accent) 8%, var(--surface-1, #fff)), var(--surface-1, #fff));
}
.aksrt-post-pay-box__hero { position: relative; overflow: hidden; min-height: 120px; color: #fff; }
.aksrt-post-pay-box__blob { opacity: .55; pointer-events: none; }
.aksrt-post-pay-box__blob--a { height: 200px; left: 75%; width: 200px; top: -34%; border-radius: 100%; }
.aksrt-post-pay-box__blob--b { height: 305px; width: 337px; left: -229px; border-radius: 100%; opacity: .7; }
.aksrt-post-pay-box .box-body { position: relative; z-index: 1; }
.aksrt-post-pay-box .img-badge.hot { position: absolute; top: 8px; right: 8px; z-index: 2; }
.aksrt-post-pay-box .but.btn-block { width: 100%; justify-content: center; }
.aksrt-post-pay-card.jb-red { --aksrt-pay-accent: #ef4444; }
.aksrt-post-pay-card.jb-yellow { --aksrt-pay-accent: #f59e0b; }
.aksrt-post-pay-card.jb-blue { --aksrt-pay-accent: #3b82f6; }
.aksrt-post-pay-card.jb-green { --aksrt-pay-accent: #22c55e; }
.aksrt-post-pay-card.jb-purple { --aksrt-pay-accent: #8b5cf6; }
.aksrt-post-pay-card.jb-vip1 { --aksrt-pay-accent: #d49a25; }
.aksrt-post-pay-card.jb-vip2 { --aksrt-pay-accent: #64748b; }
.aksrt-post-pay-card__header,
.aksrt-post-pay-card__price-row,
.aksrt-post-pay-card__actions { display: flex; align-items: center; gap: 8px; }
.aksrt-post-pay-card__header { justify-content: space-between; }
.aksrt-post-pay-card__type,
.aksrt-post-pay-card__sales {
font-size: 12px;
line-height: 1;
}
.aksrt-post-pay-card__type {
padding: 5px 8px;
border-radius: 999px;
color: var(--aksrt-pay-accent);
background: color-mix(in srgb, var(--aksrt-pay-accent) 13%, transparent);
font-weight: 700;
}
.aksrt-post-pay-card__sales { color: var(--muted-2-color, #888); }
.aksrt-post-pay-card__price-row { min-height: 32px; }
.aksrt-post-pay-card__price,
.aksrt-post-pay-card__status { color: var(--aksrt-pay-accent); font-size: 25px; line-height: 1.2; }
.aksrt-post-pay-card__status { font-size: 19px; }
.aksrt-post-pay-card__status i { margin-right: 6px; }
.aksrt-post-pay-card__price-row del { color: var(--muted-2-color, #888); font-size: 13px; }
.aksrt-post-pay-card__hint { margin: -4px 0 0; color: var(--muted-2-color, #888); font-size: 12px; }
.aksrt-post-pay-card__actions { align-items: stretch; flex-direction: column; }
.aksrt-post-pay-card__actions .but { justify-content: center; width: 100%; }
.aksrt-main-posts__skeleton .placeholder-row,
.aksrt-product-tab__skeleton .placeholder-row {
display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px;
@@ -2498,10 +2414,6 @@ a.main-color > .icon-cover-card:hover {
flex: 1 1 0; min-width: 0; text-align: center;
}
.aksrt-plate-info .count-mates .em14 { font-weight: 700; line-height: 1.2; }
.aksrt-fi[data-aksrt-feature-intro] .aksrt-fi__panel { display: none; }
.aksrt-fi[data-aksrt-feature-intro] .aksrt-fi__panel.is-active { display: block; }
/* batch43-45 residual */
.aksrt-product-widget__item--mini {
gap: 10px; padding: 8px 0;
@@ -2513,14 +2425,6 @@ a.main-color > .icon-cover-card:hover {
background: var(--surface-2, #f3f4f6); display: block;
}
.aksrt-product-widget__thumb.mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.aksrt-paid-posts.style-card { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.aksrt-paid-posts.style-list .aksrt-paid-posts__item { margin-bottom: 10px; }
.aksrt-paid-posts__price.badge {
display: inline-block; margin-top: 4px; padding: 1px 6px; border-radius: 4px;
background: rgba(240,68,148,.1); color: var(--theme-color, #f04494); font-size: 12px;
}
/* batch46-48 residual */
.widget .is-affix[data-affix="true"],
.ajaxpager.is-affix[data-affix="true"],
-38
View File
@@ -95,44 +95,6 @@
setInterval(update, 1000);
}
/* ============================================================
* 3. 合作伙伴无缝滚动 (marquee)
* 用法:<div class="aksrt-marquee" data-speed="1">...内容...</div>
* ============================================================ */
function initMarquee() {
document.querySelectorAll('.aksrt-marquee').forEach(function (el) {
if (el.dataset.marqueeBound) return;
el.dataset.marqueeBound = '1';
var speed = parseFloat(el.dataset.speed || '1');
var inner = el.querySelector('.aksrt-marquee__inner') || el.children[0];
if (!inner) return;
// 克隆内容实现无缝
var clone = inner.cloneNode(true);
el.appendChild(clone);
var pos = 0;
var width = inner.scrollWidth;
function animate() {
pos -= speed;
if (Math.abs(pos) >= width) pos = 0;
inner.style.transform = 'translateX(' + pos + 'px)';
clone.style.transform = 'translateX(' + (pos + width) + 'px)';
if (!reducedMotion) requestAnimationFrame(animate);
}
if (!reducedMotion) {
requestAnimationFrame(animate);
}
// 暂停/恢复
el.addEventListener('mouseenter', function () { el.dataset.paused = '1'; });
el.addEventListener('mouseleave', function () { delete el.dataset.paused; });
});
}
/* ============================================================
* 4. 3D 悬停倾斜 (vanilla tilt)
* 用法:<div data-aksrt-tilt data-tilt-max="15">...</div>
-83
View File
@@ -1,83 +0,0 @@
/**
* AKSRT Frontend Translate — 前端即时翻译
*
* 渐进增强,默认关。通过 Settings 启用后,
* 在语言切换 Widget 中添加"翻译本页"按钮,
* 使用浏览器原生翻译或自定义翻译 API。
*
* @package AKSRT
*/
(function () {
'use strict';
var config = (window.aksrtData && window.aksrtData.translate) || {};
if (!config.enabled) return;
/**
* 触发浏览器原生翻译(Chrome/Edge 内置)
*/
function triggerBrowserTranslate(targetLang) {
// Chrome/Edge 有内置翻译功能
if (document.querySelector('.goog-te-banner-frame') || document.querySelector('#goog-gt-tt')) {
return; // 已经在翻译中
}
// 尝试使用 Google Translate Element
if (window.google && window.google.translate) {
new google.translate.TranslateElement({
pageLanguage: config.sourceLang || 'zh-CN',
includedLanguages: targetLang || '',
layout: google.translate.TranslateElement.InlineLayout.SIMPLE,
autoDisplay: false,
}, 'aksrt-translate-container');
return;
}
// 动态加载 Google Translate
var script = document.createElement('script');
script.src = '//translate.google.com/translate_a/element.js?cb=aksrtTranslateInit';
document.head.appendChild(script);
window.aksrtTranslateInit = function () {
if (!window.google || !window.google.translate) return;
new google.translate.TranslateElement({
pageLanguage: config.sourceLang || 'zh-CN',
includedLanguages: targetLang || config.targetLang || 'en',
layout: google.translate.TranslateElement.InlineLayout.SIMPLE,
autoDisplay: false,
}, 'aksrt-translate-container');
};
}
/**
* 创建翻译容器和按钮
*/
function init() {
// 检查是否有语言切换 Widget
var langWidget = document.querySelector('.aksrt-lang-switch, [data-aksrt-lang-switch]');
if (!langWidget && !config.showButton) return;
// 创建隐藏的翻译容器
var container = document.createElement('div');
container.id = 'aksrt-translate-container';
container.style.cssText = 'position:fixed;top:-9999px;left:-9999px;visibility:hidden;';
document.body.appendChild(container);
// 如果配置了显示按钮,在语言切换 Widget 旁添加
if (config.showButton && langWidget) {
var btn = document.createElement('button');
btn.type = 'button';
btn.className = 'aksrt-translate-btn';
btn.innerHTML = '<i class="fas fa-language"></i> 翻译本页';
btn.addEventListener('click', function () {
triggerBrowserTranslate(config.targetLang || 'en');
btn.textContent = '翻译中...';
btn.disabled = true;
});
langWidget.appendChild(btn);
}
}
document.addEventListener('DOMContentLoaded', init);
})();
+2 -2
View File
@@ -26,9 +26,9 @@
document.querySelector('[data-nav="posts"]') ||
document.querySelector('[data-nav]');
// Support multiple TOC shells (built-in single sidebar + WidgetPostsNavs).
// The article sidebar and mobile drawer share one built-in TOC source.
var tocWidgets = Array.prototype.slice.call(
document.querySelectorAll('.posts-nav-box.toc-widget, .posts-nav-box[data-title]')
document.querySelectorAll('.posts-nav-box.toc-widget')
);
var tocLists = [];
tocWidgets.forEach(function (box) {
-37
View File
@@ -280,42 +280,6 @@
});
}
// Feature intro media tabs.
function initFeatureIntro() {
document.querySelectorAll('[data-aksrt-feature-intro]').forEach(function (root) {
if (root.dataset.aksrtFiBound === '1') return;
root.dataset.aksrtFiBound = '1';
var tabs = [].slice.call(root.querySelectorAll('.aksrt-fi__tab'));
var panels = [].slice.call(root.querySelectorAll('.aksrt-fi__panel'));
if (!tabs.length || !panels.length) return;
function go(i) {
tabs.forEach(function (t, idx) {
t.classList.toggle('is-active', idx === i);
});
panels.forEach(function (p, idx) {
p.classList.toggle('is-active', idx === i);
var v = p.querySelector('video');
if (!v) return;
if (idx === i) {
if (!v.getAttribute('src') && v.getAttribute('data-src')) {
v.setAttribute('src', v.getAttribute('data-src'));
}
if (v.play) v.play().catch(function () {});
} else if (v.pause) {
v.pause();
}
});
}
tabs.forEach(function (t) {
t.addEventListener('click', function () {
go(parseInt(t.getAttribute('data-index') || '0', 10));
});
});
});
}
function initFloatingQRCodes() {
var wrap = document.querySelector('.float-right');
if (!wrap) return;
@@ -363,7 +327,6 @@
initCategoryTabs();
initProductTabs();
initMainPostsLazy();
initFeatureIntro();
initFloatingQRCodes();
}