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

-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();
}