chore(branding): remove leftover upstream theme identifiers
The theme was renamed Zibll/子比 → AKSRT → Jio, but upstream branding survived the sweeps in CSS classes, the SVG sprite prefix, a persisted widget field ID, JS events, admin Vue class names, test infrastructure and docblocks. Renames: - zib-widget / zib-widget-wrap / zib-slider → jio-widget-box / jio-widget-box-wrap / jio-slider-box (jio-widget is taken by the modern widget shell, jio-box-* by the card primitives) - zib-partners-scroll + zps-* → jio-partners-scroll + jps-* - zib-combo-info-card + zci-* → jio-combo-info-card + jci-* - zibsvg- → jiosvg-, including the exported picker helpers and the fa-zibsvg- family-prefix guard - zibpay_type → pay_type; the dual-read fallback in PostQuery collapses to a single key - [zibajax="submit"] dropped (no PHP emitter); zib_ajax.success → jio_ajax.success - aks-* admin Vue classes → jio-* - zib_palette() → palette() User-facing vendor traces are gone: the floating "more" button default no longer ships a zibll.com link or 子比主题 marketing copy, the notice widget ships no preset promo entries, and the four 官网教程 links are removed from the post-list admin schema. Test infrastructure renamed to neutral names (docker-compose.reference.yml, Caddyfile, article-baseline.json, modern-widgets-contract.test.cjs) with their DB/volume/env/slug identifiers following. Kept intentionally, documented in tests/fixtures/README.md: the golden fixture reference fingerprint (a SHA-256 record of an external directory, read by validate-widget-golden / generate-widget-golden-fixture / audit-widget-system), the doesNotMatch guards that prove the old tokens are gone, and the reference theme's own meta key in the visual fixtures. No backward-compat or data migration: saved widget configs holding old icon keys or the old field ID silently lose them, per the project's rewrite-over-compatibility rule. Verified: 132/132 node contract tests, php tests/widget-system/run.php (146 assertions), audit-admin-contracts, audit-psr4-paths and validate-widget-golden all green; tracked bundles regenerated and in sync. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
42cc64106d
commit
427968a721
188 files changed
+915
-967
No files matched your search
@@ -167,7 +167,7 @@ WordPress 后台左侧 **Admin Bar** → ⚡ **Jio 主题设置**
|
||||
### 4. 推广、邀请与佣金(用户中心 → 收益)
|
||||
|
||||
- **推广链接**:用户中心「收益」页展示带 `?ref=` 的推广链接、二维码(可下载 PNG)与推广海报(按「推广返佣」设置中的海报文案生成)。归因模式(首触/末触)在「支付&付费 → 推广返佣 → 推广归因模式」配置。
|
||||
- **一次性邀请码**:后台「用户 → 邀请码管理」三视图运营页——列表(状态筛选/搜索/批量删除/排序/分页/点击复制)、添加(系统自动生成:数量/标识/四类奖励[经验值、积分、余额、VIP]/高级选项自定义位数;或 Zibll 兼容文本导入:一行一码 `邀请码 奖励 标识`,奖励参数串 `points=20&balance=30&vip=1&vip_time=5&level_integral=100`,分隔符可自定义)、导出(状态筛选 + 文本文档[可回流导入]/Excel表格 双格式)。注册门控模式在「用户&互动 → 登录注册 → 邀请码注册」。消费为原子操作,并发注册不会超发;开启注册验证时奖励延迟到邮箱验证后发放。
|
||||
- **一次性邀请码**:后台「用户 → 邀请码管理」三视图运营页——列表(状态筛选/搜索/批量删除/排序/分页/点击复制)、添加(系统自动生成:数量/标识/四类奖励[经验值、积分、余额、VIP]/高级选项自定义位数;或行格式文本导入:一行一码 `邀请码 奖励 标识`,奖励参数串 `points=20&balance=30&vip=1&vip_time=5&level_integral=100`,分隔符可自定义)、导出(状态筛选 + 文本文档[可回流导入]/Excel表格 双格式)。注册门控模式在「用户&互动 → 登录注册 → 邀请码注册」。消费为原子操作,并发注册不会超发;开启注册验证时奖励延迟到邮箱验证后发放。
|
||||
- **佣金**:订单支付成功后按推广者等级分档比例记录到佣金账本,经「结算观察期」后自动结算入钱包,支持提现与退款联动回滚。「推广码禁用后停止返佣」开关默认关闭。
|
||||
|
||||
### 5. 部署注意事项
|
||||
|
||||
@@ -16,32 +16,21 @@ export const FLOAT_BTN_META = {
|
||||
more: { title: '更多按钮', panel: '添加更多自定义按钮' },
|
||||
}
|
||||
|
||||
const themeUri = (window.jioAdminData?.themeUri || '').replace(/\/$/, '')
|
||||
|
||||
/** 「更多按钮」出厂默认项(对齐参考主题 float_btn.more 默认值)。 */
|
||||
/** 「更多按钮」出厂默认项:不预设任何第三方指向,只给一个图标按钮。 */
|
||||
export function giftMoreButton() {
|
||||
return {
|
||||
desc: '本站同款主题模板',
|
||||
icon: 'zibsvg-gift-color',
|
||||
desc: '',
|
||||
icon: 'jiosvg-gift-color',
|
||||
link: { url: '', target: '' },
|
||||
hover: `<a href="https://www.zibll.com/" target="_blank">
|
||||
<div class="flex c-red">
|
||||
<img class="flex0" alt="zibll子比主题" src="${themeUri}/assets/img/logo.png" height="30">
|
||||
<div class="flex1 ml10">
|
||||
<dt>本站同款主题模板</dt>
|
||||
<div class="px12 mt10 muted-color">zibll子比主题是一款漂亮优雅的网站主题模板,功能强大,配置简单。</div>
|
||||
<div class="but mt10 p2-10 c-blue btn-block px12">查看详情</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>`,
|
||||
hover_width: 240,
|
||||
hover: '',
|
||||
hover_width: 200,
|
||||
pc_s: true,
|
||||
m_s: true,
|
||||
color: { color: '', bg: 'rgba(255, 111, 6, 0.2)' },
|
||||
}
|
||||
}
|
||||
|
||||
/** 「添加按钮」新增项默认值(参考主题 group 字段默认值)。 */
|
||||
/** 「添加按钮」新增项默认值。 */
|
||||
export function defaultMoreButton() {
|
||||
return {
|
||||
desc: '',
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
<span
|
||||
v-else
|
||||
class="jio-icon-picker__preview-svg"
|
||||
v-html="zibsvgMarkup(`zibsvg-${icon}`)"
|
||||
v-html="jiosvgMarkup(`jiosvg-${icon}`)"
|
||||
></span>
|
||||
</div>
|
||||
<div v-if="filteredIcons.length === 0" class="jio-icon-picker__empty">
|
||||
@@ -105,7 +105,7 @@ import IconValue from './IconValue.vue'
|
||||
import api from '@/api/index.js'
|
||||
import {
|
||||
cleanSvg,
|
||||
zibsvgMarkup,
|
||||
jiosvgMarkup,
|
||||
composeIconValue,
|
||||
} from '@/utils/icons.js'
|
||||
|
||||
@@ -120,7 +120,7 @@ const FALLBACK_TABS = [
|
||||
{ id: 'fas', title: 'Solid', type: 'fa', icons: [] },
|
||||
{ id: 'far', title: 'Regular', type: 'fa', icons: [] },
|
||||
{ id: 'fab', title: 'Brands', type: 'fa', icons: [] },
|
||||
{ id: 'zibsvg', title: '内置 SVG', type: 'svg', icons: [] },
|
||||
{ id: 'jiosvg', title: '内置 SVG', type: 'svg', icons: [] },
|
||||
{ id: 'custom', title: '自定义', type: 'custom', icons: [] },
|
||||
]
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
<i v-if="isFaValue(value)" :class="faClass" aria-hidden="true"></i>
|
||||
<!-- Built-in sprite value -->
|
||||
<span
|
||||
v-else-if="isZibsvgValue(value)"
|
||||
v-else-if="isJiosvgValue(value)"
|
||||
class="jio-icon-value__svg"
|
||||
v-html="zibsvgMarkup(value)"
|
||||
v-html="jiosvgMarkup(value)"
|
||||
></span>
|
||||
<!-- Inline custom SVG value -->
|
||||
<span
|
||||
@@ -17,11 +17,11 @@
|
||||
|
||||
<script setup>
|
||||
/**
|
||||
* IconValue — renders any icon-picker value ("fa fas fa-star", "zibsvg-key",
|
||||
* IconValue — renders any icon-picker value ("fa fas fa-star", "jiosvg-key",
|
||||
* "customsvg-<svg>") as inline preview markup.
|
||||
*/
|
||||
import { computed } from 'vue'
|
||||
import { cleanSvg, isFaValue, isZibsvgValue, isCustomSvgValue, zibsvgMarkup } from '@/utils/icons.js'
|
||||
import { cleanSvg, isFaValue, isJiosvgValue, isCustomSvgValue, jiosvgMarkup } from '@/utils/icons.js'
|
||||
|
||||
const props = defineProps({
|
||||
value: { type: String, default: '' },
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div ref="editorRef" class="aks-code-editor" :class="{ 'is-disabled': disabled }" />
|
||||
<div ref="editorRef" class="jio-code-editor" :class="{ 'is-disabled': disabled }" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -86,19 +86,19 @@ onBeforeUnmount(() => {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.aks-code-editor {
|
||||
.jio-code-editor {
|
||||
border: 1px solid var(--n-border-color, #e0e0e6);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
min-height: calc(var(--rows, 8) * 22px);
|
||||
}
|
||||
.aks-code-editor :deep(.cm-editor) {
|
||||
.jio-code-editor :deep(.cm-editor) {
|
||||
font-size: 13px;
|
||||
}
|
||||
.aks-code-editor :deep(.cm-editor.cm-focused) {
|
||||
.jio-code-editor :deep(.cm-editor.cm-focused) {
|
||||
outline: none;
|
||||
}
|
||||
.aks-code-editor.is-disabled {
|
||||
.jio-code-editor.is-disabled {
|
||||
opacity: 0.6;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="aks-native-ops-redirect">
|
||||
<div class="jio-native-ops-redirect">
|
||||
<h2>{{ title }}</h2>
|
||||
<p class="desc">
|
||||
此运营功能已迁移到 WordPress 原生后台侧栏(对齐 legacy)。正在跳转…
|
||||
@@ -33,13 +33,13 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.aks-native-ops-redirect {
|
||||
.jio-native-ops-redirect {
|
||||
max-width: 640px;
|
||||
margin: 48px auto;
|
||||
padding: 24px;
|
||||
background: var(--aks-surface, #fff);
|
||||
background: var(--jio-surface, #fff);
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--aks-border, #e5e7eb);
|
||||
border: 1px solid var(--jio-border, #e5e7eb);
|
||||
}
|
||||
.desc {
|
||||
color: #646970;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* VIP会员 — 结构 1:1 对照参考主题 Zibll:会员等级(开关)、会员权益
|
||||
* VIP会员 — 结构 1:1 对照既有实现:会员等级(开关)、会员权益
|
||||
* (普通/一级/二级 tab)、会员购买选项(一级/二级/续费/升级 tab)、
|
||||
* 积分兑换会员与界面文案。
|
||||
*
|
||||
|
||||
@@ -22,24 +22,8 @@ export const featureSchema = {
|
||||
title: '',
|
||||
fields: [
|
||||
{ key: 'article_nav', label: '文章目录树', type: 'switch', default: true, description: '默认开关,每篇文章可单独设置。开启后请自行添加文章目录树模块到侧边栏(文章内标题超过3个才会显示)' },
|
||||
{
|
||||
key: 'article_nav_tutorial',
|
||||
label: '',
|
||||
type: 'content',
|
||||
ui_only: true,
|
||||
dependsOn: { key: 'article_nav', value: true },
|
||||
content: '<p class="jio-hint"><a href="https://www.zibll.com/1717.html" target="_blank">【查看官网教程】</a></p>',
|
||||
},
|
||||
{ key: 'article_nav_mobile_nav_s', label: '在移动端弹出菜单内显示', type: 'switch', default: true, dependsOn: { key: 'article_nav', value: true }, description: '如需显示在侧边栏等其它位置,请使用小工具模块添加' },
|
||||
{ key: 'imagelightbox', label: '图片灯箱', type: 'switch', default: true, description: '点击图片查看原图功能,共两种模式' },
|
||||
{
|
||||
key: 'imagelightbox_tutorial',
|
||||
label: '',
|
||||
type: 'content',
|
||||
ui_only: true,
|
||||
dependsOn: { key: 'imagelightbox', value: true },
|
||||
content: '<p class="jio-hint"><a href="https://www.zibll.com/683.html" target="_blank">【查看官网教程】</a></p>',
|
||||
},
|
||||
{
|
||||
key: 'imagelightbox_type',
|
||||
label: '图片灯箱模式',
|
||||
|
||||
@@ -18,7 +18,7 @@ export const filterSchema = {
|
||||
key: 'filter_intro',
|
||||
type: 'content',
|
||||
ui_only: true,
|
||||
content: '<p class="jio-hint"><b>文章高级筛选功能:</b>通过此功能可实现更加复杂、精细化的内容筛选<br/>添加筛选类型和内容值之后,编写文章时候,可以进行选择,且在前台也可以实现精准筛选<br/>例如影视网站:[类型]有[剧情/喜剧/悬疑/惊悚/犯罪],[地区]有[大陆/美国/日韩/港台/印度],[年份]有[2022/2021/2020/10年代/00年代]等<br/><span class="jio-warn">注意事项:添加类型key时候,只能使用英文加下划线,不能有空格,且尽量复杂一点(不能为tag,category等系统已存在的类型),避免与其他mate_key重复!类型名称不能为分类、标签等系统已存在的类型</span><br/><a href="https://www.zibll.com/15886.html" target="_blank">查看官网教程</a></p>',
|
||||
content: '<p class="jio-hint"><b>文章高级筛选功能:</b>通过此功能可实现更加复杂、精细化的内容筛选<br/>添加筛选类型和内容值之后,编写文章时候,可以进行选择,且在前台也可以实现精准筛选<br/>例如影视网站:[类型]有[剧情/喜剧/悬疑/惊悚/犯罪],[地区]有[大陆/美国/日韩/港台/印度],[年份]有[2022/2021/2020/10年代/00年代]等<br/><span class="jio-warn">注意事项:添加类型key时候,只能使用英文加下划线,不能有空格,且尽量复杂一点(不能为tag,category等系统已存在的类型),避免与其他mate_key重复!类型名称不能为分类、标签等系统已存在的类型</span></p>',
|
||||
},
|
||||
{
|
||||
key: 'custom_filter_show',
|
||||
|
||||
@@ -129,7 +129,7 @@ export const pageSchema = {
|
||||
type: 'fieldset',
|
||||
default: { scale: 0 },
|
||||
dependsOn: { key: 'article_video_cover', value: true },
|
||||
description: '视频封面配置 <a href="https://www.zibll.com/1900.html" target="_blank">【查看官方封面配置教程】</a>',
|
||||
description: '视频封面配置',
|
||||
fields: [
|
||||
{ key: 'scale', label: '固定长宽比例', type: 'number', default: 0, min: 0, max: 200, step: 5, unit: '%', description: '为0则不固定长宽比例' },
|
||||
],
|
||||
|
||||
@@ -544,7 +544,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* zibll-legacy "fa fab / fa far" double-prefix beats FA5's own single-class
|
||||
/* A legacy "fa fab / fa far" double-prefix beats FA5's own single-class
|
||||
declarations in the cascade — re-assert the brand family/regular weight. */
|
||||
.fa.fab{font-family:"Font Awesome 5 Brands";font-weight:400}
|
||||
.fa.far{font-weight:400}
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Supported stored formats:
|
||||
* "fa fas fa-star" — FA5 class string
|
||||
* "zibsvg-hot" — theme built-in SVG sprite key (window.jio_svgs)
|
||||
* "jiosvg-hot" — theme built-in SVG sprite key (window.jio_svgs)
|
||||
* "customsvg-<svg>" — inline user SVG markup
|
||||
*/
|
||||
|
||||
@@ -32,31 +32,31 @@ export function isFaValue(value) {
|
||||
return /^fa[\s-]/.test(String(value || '').trim())
|
||||
}
|
||||
|
||||
export function isZibsvgValue(value) {
|
||||
return String(value || '').trim().startsWith('zibsvg-')
|
||||
export function isJiosvgValue(value) {
|
||||
return String(value || '').trim().startsWith('jiosvg-')
|
||||
}
|
||||
|
||||
export function isCustomSvgValue(value) {
|
||||
return String(value || '').trim().startsWith('customsvg-')
|
||||
}
|
||||
|
||||
/** Sprite key of a zibsvg value, e.g. "zibsvg-hot" → "hot". */
|
||||
export function zibsvgKey(value) {
|
||||
/** Sprite key of a jiosvg value, e.g. "jiosvg-hot" → "hot". */
|
||||
export function jiosvgKey(value) {
|
||||
return String(value || '')
|
||||
.trim()
|
||||
.slice(7)
|
||||
.replace(/[^a-zA-Z0-9_-]/g, '')
|
||||
}
|
||||
|
||||
/** Inline markup for a zibsvg sprite preview (sprite injected by svg-icon.js). */
|
||||
export function zibsvgMarkup(value) {
|
||||
const key = zibsvgKey(value)
|
||||
/** Inline markup for a jiosvg sprite preview (sprite injected by svg-icon.js). */
|
||||
export function jiosvgMarkup(value) {
|
||||
const key = jiosvgKey(value)
|
||||
return key ? `<svg class="icon" aria-hidden="true"><use xlink:href="#icon-${key}"></use></svg>` : ''
|
||||
}
|
||||
|
||||
/** Value of a picker selection composed from a catalog group + icon name. */
|
||||
export function composeIconValue(group, name) {
|
||||
if (group.type === 'fa') return `fa ${group.id} fa-${name}`
|
||||
if (group.type === 'svg') return `zibsvg-${name}`
|
||||
if (group.type === 'svg') return `jiosvg-${name}`
|
||||
return String(name || '')
|
||||
}
|
||||
@@ -200,7 +200,7 @@
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* zibll-legacy "fa fab / fa far" double-prefix beats FA5's own single-class
|
||||
/* A legacy "fa fab / fa far" double-prefix beats FA5's own single-class
|
||||
declarations in the cascade — re-assert the brand family/regular weight. */
|
||||
.fa.fab{font-family:"Font Awesome 5 Brands";font-weight:400}
|
||||
.fa.far{font-weight:400}
|
||||
@@ -679,7 +679,7 @@
|
||||
color: var(--color-primary, #f04494);
|
||||
}
|
||||
|
||||
/* .widget a 的链接色不得覆盖 .but / .img-badge 自身配色(zibll 的 zib-widget 不设置链接色) */
|
||||
/* .widget a 的链接色不得覆盖 .but / .img-badge 自身配色(jio-widget-box 不设置链接色) */
|
||||
.widget a.but,
|
||||
.widget a.img-badge {
|
||||
color: var(--this-color, #fff);
|
||||
@@ -818,7 +818,7 @@ ul.breadcrumb > li:last-child,
|
||||
|
||||
/* Video footer breadcrumb — legacy .single-video .breadcrumb:标题在下方
|
||||
footer(flex jsb at 行)不叠加封面,只归零内边距,保留基础弱化样式
|
||||
(opacity .6 与 12px 下边距),对齐 zibll main.css。 */
|
||||
(opacity .6 与 12px 下边距)。 */
|
||||
.single-video .breadcrumb {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@@ -5697,8 +5697,8 @@ body.jio-modal-runtime-open {
|
||||
transition: opacity 0.15s ease;
|
||||
}
|
||||
|
||||
/* ---- 禁封用户弹窗(参考主题 set_user_ban 模态框几何 1:1)----
|
||||
参考主题 zib_get_edit_user_ban_link 未传 data-class → 走 Bootstrap 默认
|
||||
/* ---- 禁封用户弹窗(set_user_ban 模态框几何 1:1)----
|
||||
编辑入口未传 data-class → 走 Bootstrap 默认
|
||||
.modal-dialog(>=768px 宽 600px);data-height=360 → .modal-content 初始
|
||||
高度 360 后动画至内容高度;mobile-bottom → <769px 底部抽屉。
|
||||
此处以 min-height:360px 复刻初始高度契约,桌面宽取 600px。 */
|
||||
@@ -5750,7 +5750,7 @@ body.jio-modal-runtime-open {
|
||||
padding: 2px 6px;
|
||||
}
|
||||
|
||||
/* 解封视图多彩横幅(参考主题 zib_get_modal_colorful_header('c-yellow', ...)):
|
||||
/* 解封视图多彩横幅(多彩横幅头契约:c-yellow 配色变体):
|
||||
120px 高绝对定位横幅 + 旋转彩斑,后续表单整体下移 120px。 */
|
||||
.jio-user-ban-modal .modal-colorful-header,
|
||||
.jio-user-ban-modal .colorful-bg,
|
||||
|
||||
@@ -83,7 +83,7 @@ ul.breadcrumb > li:last-child,
|
||||
|
||||
/* Video footer breadcrumb — legacy .single-video .breadcrumb:标题在下方
|
||||
footer(flex jsb at 行)不叠加封面,只归零内边距,保留基础弱化样式
|
||||
(opacity .6 与 12px 下边距),对齐 zibll main.css。 */
|
||||
(opacity .6 与 12px 下边距)。 */
|
||||
.single-video .breadcrumb {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
@@ -286,8 +286,8 @@ body.jio-modal-runtime-open {
|
||||
transition: opacity 0.15s ease;
|
||||
}
|
||||
|
||||
/* ---- 禁封用户弹窗(参考主题 set_user_ban 模态框几何 1:1)----
|
||||
参考主题 zib_get_edit_user_ban_link 未传 data-class → 走 Bootstrap 默认
|
||||
/* ---- 禁封用户弹窗(set_user_ban 模态框几何 1:1)----
|
||||
编辑入口未传 data-class → 走 Bootstrap 默认
|
||||
.modal-dialog(>=768px 宽 600px);data-height=360 → .modal-content 初始
|
||||
高度 360 后动画至内容高度;mobile-bottom → <769px 底部抽屉。
|
||||
此处以 min-height:360px 复刻初始高度契约,桌面宽取 600px。 */
|
||||
@@ -339,7 +339,7 @@ body.jio-modal-runtime-open {
|
||||
padding: 2px 6px;
|
||||
}
|
||||
|
||||
/* 解封视图多彩横幅(参考主题 zib_get_modal_colorful_header('c-yellow', ...)):
|
||||
/* 解封视图多彩横幅(多彩横幅头契约:c-yellow 配色变体):
|
||||
120px 高绝对定位横幅 + 旋转彩斑,后续表单整体下移 120px。 */
|
||||
.jio-user-ban-modal .modal-colorful-header,
|
||||
.jio-user-ban-modal .colorful-bg,
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
display: flow-root;
|
||||
}
|
||||
|
||||
#jio-submit-form .zib-widget {
|
||||
#jio-submit-form .jio-widget-box {
|
||||
margin-bottom: 15px;
|
||||
padding: 15px;
|
||||
border-radius: var(--main-radius, 8px);
|
||||
@@ -726,7 +726,7 @@ body.jio-editor-media-open {
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.newposts-wrap .zib-widget {
|
||||
.newposts-wrap .jio-widget-box {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Canonical Zibll 9.0 paid-content card shell. */
|
||||
.zib-widget.pay-box {
|
||||
/* Paid-content card shell. */
|
||||
.jio-widget-box.pay-box {
|
||||
clear: both;
|
||||
margin-bottom: 20px;
|
||||
padding: 15px;
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
color: var(--color-primary, #f04494);
|
||||
}
|
||||
|
||||
/* .widget a 的链接色不得覆盖 .but / .img-badge 自身配色(zibll 的 zib-widget 不设置链接色) */
|
||||
/* .widget a 的链接色不得覆盖 .but / .img-badge 自身配色(jio-widget-box 不设置链接色) */
|
||||
.widget a.but,
|
||||
.widget a.img-badge {
|
||||
color: var(--this-color, #fff);
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
|
||||
|
||||
/* ===== Video footer (legacy single-video-footer) ===== */
|
||||
/* 内边距沿用 legacy 契约 .single-video-footer{padding:15px}(与 zibll 一致),
|
||||
/* 内边距沿用 legacy 契约 .single-video-footer{padding:15px},
|
||||
面包屑在 flex jsb at 行首,不再额外包装。 */
|
||||
.single-head-cover .single-video-footer .article-title {
|
||||
font-size: clamp(1.1rem, 2.4vw, 1.45rem); font-weight: 700; margin: 8px 0 0; line-height: 1.35;
|
||||
|
||||
@@ -383,8 +383,8 @@ html.dark .article-end-separator span {
|
||||
|
||||
|
||||
|
||||
/* ===== Zibll .zib-widget base (正文下方卡片堆栈依赖) ===== */
|
||||
.zib-widget {
|
||||
/* ===== .jio-widget-box base (正文下方卡片堆栈依赖) ===== */
|
||||
.jio-widget-box {
|
||||
clear: both;
|
||||
background-color: var(--main-bg-color);
|
||||
padding: 15px;
|
||||
@@ -392,7 +392,7 @@ html.dark .article-end-separator span {
|
||||
border-radius: var(--main-radius);
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.zib-widget.nobottom.notop {
|
||||
.jio-widget-box.nobottom.notop {
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*/
|
||||
|
||||
/* VIP now uses the shared modal runtime host.
|
||||
壳几何 1:1 对齐 Zibll modal_pay_uservip:
|
||||
壳几何 1:1 对齐 modal_pay_uservip:
|
||||
- 宽度 = bootstrap3 ≥768px 的 .modal-dialog 600px,配合
|
||||
.modal.flex .modal-dialog 的 max-width: calc(100% - 20px)
|
||||
- 高度 = .modal.flex .modal-content 的 max-height: calc(100vh - 20px)
|
||||
|
||||
+102
-102
@@ -3957,11 +3957,11 @@ body:has(.modal.in) .float-btn,
|
||||
}
|
||||
|
||||
/**------小工具:复合信息卡片模块--------**/
|
||||
.zib-combo-info-card {
|
||||
--zci-radius: 12px;
|
||||
--zci-band-h: 80px;
|
||||
.jio-combo-info-card {
|
||||
--jci-radius: 12px;
|
||||
--jci-band-h: 80px;
|
||||
}
|
||||
.zib-combo-info-card .zci-card {
|
||||
.jio-combo-info-card .jci-card {
|
||||
position: relative;
|
||||
height: 100%;
|
||||
min-height: 180px;
|
||||
@@ -3971,62 +3971,62 @@ body:has(.modal.in) .float-btn,
|
||||
transition: transform 0.25s ease, box-shadow 0.25s ease;
|
||||
box-shadow: 0 1px 3px var(--main-shadow);
|
||||
}
|
||||
.zib-combo-info-card .zci-card:hover {
|
||||
.jio-combo-info-card .jci-card:hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 12px 32px var(--main-shadow);
|
||||
}
|
||||
.zib-combo-info-card .zci-card::before {
|
||||
.jio-combo-info-card .jci-card::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
height: calc(var(--zci-band-h) * 1.5);
|
||||
height: calc(var(--jci-band-h) * 1.5);
|
||||
opacity: 0;
|
||||
transition: opacity 0.3s ease;
|
||||
pointer-events: none;
|
||||
}
|
||||
.zib-combo-info-card.zci-has-band .zci-card::before {
|
||||
.jio-combo-info-card.jci-has-band .jci-card::before {
|
||||
opacity: 1;
|
||||
}
|
||||
/* 色带配色(仅保留关键的渐变,无法用主题变量简写) */
|
||||
.zib-combo-info-card .zci-card.zci-band-blue::before {
|
||||
.jio-combo-info-card .jci-card.jci-band-blue::before {
|
||||
background: linear-gradient(170deg, rgba(114, 160, 255, 0.3), rgba(196, 174, 255, 0.2) 15%, transparent 60%);
|
||||
}
|
||||
.zib-combo-info-card .zci-card.zci-band-cyan::before {
|
||||
.jio-combo-info-card .jci-card.jci-band-cyan::before {
|
||||
background: linear-gradient(170deg, rgba(82, 196, 214, 0.3), rgba(130, 200, 255, 0.18) 15%, transparent 60%);
|
||||
}
|
||||
.zib-combo-info-card .zci-card.zci-band-green::before {
|
||||
.jio-combo-info-card .jci-card.jci-band-green::before {
|
||||
background: linear-gradient(170deg, rgba(92, 209, 158, 0.3), rgba(180, 230, 170, 0.2) 15%, transparent 60%);
|
||||
}
|
||||
.zib-combo-info-card .zci-card.zci-band-yellow::before {
|
||||
.jio-combo-info-card .jci-card.jci-band-yellow::before {
|
||||
background: linear-gradient(170deg, rgba(255, 190, 102, 0.3), rgba(255, 220, 132, 0.22) 15%, transparent 60%);
|
||||
}
|
||||
.zib-combo-info-card .zci-card.zci-band-pink::before {
|
||||
.jio-combo-info-card .jci-card.jci-band-pink::before {
|
||||
background: linear-gradient(170deg, rgba(255, 146, 181, 0.3), rgba(255, 190, 220, 0.2) 15%, transparent 60%);
|
||||
}
|
||||
.zib-combo-info-card .zci-card.zci-band-purple::before {
|
||||
.jio-combo-info-card .jci-card.jci-band-purple::before {
|
||||
background: linear-gradient(170deg, rgba(170, 140, 255, 0.36), rgba(220, 180, 255, 0.22) 15%, transparent 60%);
|
||||
}
|
||||
.zib-combo-info-card .zci-card.zci-band-gray::before {
|
||||
.jio-combo-info-card .jci-card.jci-band-gray::before {
|
||||
background: linear-gradient(170deg, rgba(140, 150, 170, 0.22), rgba(190, 195, 210, 0.14) 15%, transparent 60%);
|
||||
}
|
||||
/* 内容区:只控 padding 和层级,flex 布局由 HTML class 完成 */
|
||||
.zib-combo-info-card .zci-body {
|
||||
.jio-combo-info-card .jci-body {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
padding: 20px;
|
||||
}
|
||||
.zci-tags {
|
||||
.jci-tags {
|
||||
margin: -4px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.zci-tags > span {
|
||||
.jci-tags > span {
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
/* 图标盒子:尺寸与圆角,背景沿用卡片主色自动适配暗色 */
|
||||
.zib-combo-info-card .zci-icon {
|
||||
.jio-combo-info-card .jci-icon {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
border-radius: 8px;
|
||||
@@ -4034,65 +4034,65 @@ body:has(.modal.in) .float-btn,
|
||||
font-size: 42px;
|
||||
}
|
||||
|
||||
.zib-combo-info-card .zci-icon img {
|
||||
.jio-combo-info-card .jci-icon img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
display: block;
|
||||
}
|
||||
/* 标题字号(font-bold / text-ellipsis-2 / mb10 已走工具类) */
|
||||
.zib-combo-info-card .zci-title {
|
||||
.jio-combo-info-card .jci-title {
|
||||
font-size: 16px;
|
||||
}
|
||||
/* CTA 行动链接:仅保留颜色 + hover 行为 + 箭头动效 */
|
||||
.zib-combo-info-card .zci-cta {
|
||||
.jio-combo-info-card .jci-cta {
|
||||
margin-top: 20px;
|
||||
color: var(--this-color, --key-color);
|
||||
font-weight: 500;
|
||||
transition: 0.2s;
|
||||
}
|
||||
.zib-combo-info-card .zci-cta:hover {
|
||||
.jio-combo-info-card .jci-cta:hover {
|
||||
gap: 10px;
|
||||
color: var(--focus-color);
|
||||
text-decoration: none;
|
||||
}
|
||||
.zib-combo-info-card .zci-cta .zci-arrow {
|
||||
.jio-combo-info-card .jci-cta .jci-arrow {
|
||||
transform: rotate(-45deg);
|
||||
font-size: 11px;
|
||||
transition: transform 0.25s ease;
|
||||
}
|
||||
.zib-combo-info-card .zci-cta:hover .zci-arrow {
|
||||
.jio-combo-info-card .jci-cta:hover .jci-arrow {
|
||||
transform: rotate(-45deg) translateX(2px);
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.zib-combo-info-card .zci-card {
|
||||
.jio-combo-info-card .jci-card {
|
||||
min-height: 160px;
|
||||
}
|
||||
.zib-combo-info-card .zci-body {
|
||||
.jio-combo-info-card .jci-body {
|
||||
padding: 14px;
|
||||
}
|
||||
.col-xs-12 .zci-card .zci-body {
|
||||
.col-xs-12 .jci-card .jci-body {
|
||||
padding: 20px;
|
||||
}
|
||||
.zib-combo-info-card .zci-title {
|
||||
.jio-combo-info-card .jci-title {
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar .zib-combo-info-card > * {
|
||||
.sidebar .jio-combo-info-card > * {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.sidebar .zib-combo-info-card .zci-card {
|
||||
.sidebar .jio-combo-info-card .jci-card {
|
||||
min-height: 160px;
|
||||
}
|
||||
.sidebar .zib-combo-info-card .zci-body {
|
||||
.sidebar .jio-combo-info-card .jci-body {
|
||||
padding: 14px;
|
||||
}
|
||||
.sidebar .col-xs-12 .zci-card .zci-body {
|
||||
.sidebar .col-xs-12 .jci-card .jci-body {
|
||||
padding: 20px;
|
||||
}
|
||||
.sidebar .zib-combo-info-card .zci-title {
|
||||
.sidebar .jio-combo-info-card .jci-title {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
@@ -4422,52 +4422,52 @@ body:has(.modal.in) .float-btn,
|
||||
}
|
||||
|
||||
/**------小工具:横向滚动合作伙伴模块--------**/
|
||||
.zib-partners-scroll {
|
||||
--zps-card-w: 220px;
|
||||
--zps-card-h: 90px;
|
||||
--zps-card-radius: 10px;
|
||||
--zps-speed: 3;
|
||||
--zps-gap: 10px;
|
||||
.jio-partners-scroll {
|
||||
--jps-card-w: 220px;
|
||||
--jps-card-h: 90px;
|
||||
--jps-card-radius: 10px;
|
||||
--jps-speed: 3;
|
||||
--jps-gap: 10px;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
.zib-partners-scroll .zps-row {
|
||||
.jio-partners-scroll .jps-row {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
margin-bottom: var(--zps-gap);
|
||||
margin-bottom: var(--jps-gap);
|
||||
}
|
||||
.zib-partners-scroll .zps-row:last-child {
|
||||
.jio-partners-scroll .jps-row:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.zib-partners-scroll .zps-track {
|
||||
.jio-partners-scroll .jps-track {
|
||||
display: flex;
|
||||
width: max-content;
|
||||
will-change: transform;
|
||||
animation: zps-scroll-left var(--zps-duration, 30s) linear infinite;
|
||||
animation: jps-scroll-left var(--jps-duration, 30s) linear infinite;
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.zib-partners-scroll .zps-dir-right .zps-track {
|
||||
animation-name: zps-scroll-right;
|
||||
.jio-partners-scroll .jps-dir-right .jps-track {
|
||||
animation-name: jps-scroll-right;
|
||||
}
|
||||
.zib-partners-scroll .zps-track[data-zps-ready] {
|
||||
.jio-partners-scroll .jps-track[data-jps-ready] {
|
||||
animation-play-state: running;
|
||||
}
|
||||
.zib-partners-scroll .zps-group {
|
||||
gap: var(--zps-gap);
|
||||
padding-right: var(--zps-gap);
|
||||
.jio-partners-scroll .jps-group {
|
||||
gap: var(--jps-gap);
|
||||
padding-right: var(--jps-gap);
|
||||
}
|
||||
.zib-partners-scroll.zps-pause-hover .zps-row:hover .zps-track {
|
||||
.jio-partners-scroll.jps-pause-hover .jps-row:hover .jps-track {
|
||||
animation-play-state: paused;
|
||||
}
|
||||
.zib-partners-scroll .zps-item {
|
||||
width: var(--zps-card-w);
|
||||
height: var(--zps-card-h);
|
||||
.jio-partners-scroll .jps-item {
|
||||
width: var(--jps-card-w);
|
||||
height: var(--jps-card-h);
|
||||
overflow: hidden;
|
||||
padding: 8px 10px;
|
||||
color: inherit;
|
||||
}
|
||||
.zib-partners-scroll .zps-img {
|
||||
.jio-partners-scroll .jps-img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
width: auto;
|
||||
@@ -4475,71 +4475,71 @@ body:has(.modal.in) .float-btn,
|
||||
object-fit: contain;
|
||||
display: block;
|
||||
}
|
||||
.zib-partners-scroll.zps-card-bg .zps-item {
|
||||
.jio-partners-scroll.jps-card-bg .jps-item {
|
||||
background: var(--main-bg-color);
|
||||
border-radius: var(--zps-card-radius);
|
||||
border-radius: var(--jps-card-radius);
|
||||
}
|
||||
.jio-panel .zib-partners-scroll.zps-card-bg .zps-item {
|
||||
.jio-panel .jio-partners-scroll.jps-card-bg .jps-item {
|
||||
background: var(--muted-border-color);
|
||||
}
|
||||
/* 图文卡片模式 */
|
||||
.zib-partners-scroll.zps-style-card .zps-card-icon {
|
||||
width: calc(var(--zps-card-h) - 30px);
|
||||
height: calc(var(--zps-card-h) - 30px);
|
||||
.jio-partners-scroll.jps-style-card .jps-card-icon {
|
||||
width: calc(var(--jps-card-h) - 30px);
|
||||
height: calc(var(--jps-card-h) - 30px);
|
||||
min-width: 40px;
|
||||
min-height: 40px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.zib-partners-scroll.zps-style-card .zps-img {
|
||||
.jio-partners-scroll.jps-style-card .jps-img {
|
||||
object-fit: cover;
|
||||
border-radius: calc(var(--zps-card-radius) - 4px);
|
||||
border-radius: calc(var(--jps-card-radius) - 4px);
|
||||
width: 100%;
|
||||
}
|
||||
/* 纯 Logo 模式:高度固定、宽度自适应,图片保持原始比例 */
|
||||
.zib-partners-scroll.zps-style-logo .zps-item {
|
||||
.jio-partners-scroll.jps-style-logo .jps-item {
|
||||
width: auto;
|
||||
min-width: 0;
|
||||
justify-content: center;
|
||||
padding: 0 20px;
|
||||
}
|
||||
.zib-partners-scroll.zps-style-logo .zps-img {
|
||||
height: calc(var(--zps-card-h) - 24px);
|
||||
max-height: calc(var(--zps-card-h) - 24px);
|
||||
.jio-partners-scroll.jps-style-logo .jps-img {
|
||||
height: calc(var(--jps-card-h) - 24px);
|
||||
max-height: calc(var(--jps-card-h) - 24px);
|
||||
width: auto;
|
||||
max-width: none;
|
||||
filter: grayscale(40%);
|
||||
transition: filter 0.25s ease, transform 0.25s ease;
|
||||
}
|
||||
.zib-partners-scroll.zps-style-logo .zps-item:hover .zps-img {
|
||||
.jio-partners-scroll.jps-style-logo .jps-item:hover .jps-img {
|
||||
filter: grayscale(0);
|
||||
transform: scale(1.04);
|
||||
}
|
||||
/* 精简胶囊模式 */
|
||||
.zib-partners-scroll.zps-style-chip .zps-item {
|
||||
.jio-partners-scroll.jps-style-chip .jps-item {
|
||||
min-height: 40px;
|
||||
width: auto;
|
||||
height: auto;
|
||||
padding: 8px 14px;
|
||||
}
|
||||
.zib-partners-scroll.zps-card-bg.zps-style-chip .zps-item {
|
||||
.jio-partners-scroll.jps-card-bg.jps-style-chip .jps-item {
|
||||
padding: 8px 16px 8px 10px;
|
||||
}
|
||||
.zib-partners-scroll.zps-style-chip .zps-chip-icon .zps-img {
|
||||
.jio-partners-scroll.jps-style-chip .jps-chip-icon .jps-img {
|
||||
height: 22px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.zib-partners-scroll.zps-card-bg.zps-style-chip .zps-chip-icon .zps-img {
|
||||
border-radius: calc(var(--zps-card-radius) - 4px);
|
||||
.jio-partners-scroll.jps-card-bg.jps-style-chip .jps-chip-icon .jps-img {
|
||||
border-radius: calc(var(--jps-card-radius) - 4px);
|
||||
}
|
||||
.zib-partners-scroll.zps-style-chip .zps-chip-title {
|
||||
.jio-partners-scroll.jps-style-chip .jps-chip-title {
|
||||
max-width: 180px;
|
||||
}
|
||||
.zps-end-fade {
|
||||
.jps-end-fade {
|
||||
position: relative;
|
||||
--zps-end-fade-color: var(--body-bg-color);
|
||||
--jps-end-fade-color: var(--body-bg-color);
|
||||
}
|
||||
.zps-end-fade::before,
|
||||
.zps-end-fade::after {
|
||||
.jps-end-fade::before,
|
||||
.jps-end-fade::after {
|
||||
content: '';
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
@@ -4547,48 +4547,48 @@ body:has(.modal.in) .float-btn,
|
||||
width: 160px;
|
||||
height: 100%;
|
||||
}
|
||||
.zps-end-fade::before {
|
||||
.jps-end-fade::before {
|
||||
left: -10px;
|
||||
background: linear-gradient(to left, rgba(255, 255, 255, 0), var(--zps-end-fade-color) 90%);
|
||||
background: linear-gradient(to left, rgba(255, 255, 255, 0), var(--jps-end-fade-color) 90%);
|
||||
}
|
||||
.zps-end-fade::after {
|
||||
.jps-end-fade::after {
|
||||
right: -10px;
|
||||
background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--zps-end-fade-color) 90%);
|
||||
background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--jps-end-fade-color) 90%);
|
||||
}
|
||||
.jio-panel .zps-end-fade {
|
||||
--zps-end-fade-color: var(--main-bg-color);
|
||||
.jio-panel .jps-end-fade {
|
||||
--jps-end-fade-color: var(--main-bg-color);
|
||||
}
|
||||
|
||||
@keyframes zps-scroll-left {
|
||||
@keyframes jps-scroll-left {
|
||||
from {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
to {
|
||||
transform: translate3d(var(--zps-shift, -50%), 0, 0);
|
||||
transform: translate3d(var(--jps-shift, -50%), 0, 0);
|
||||
}
|
||||
}
|
||||
@keyframes zps-scroll-right {
|
||||
@keyframes jps-scroll-right {
|
||||
from {
|
||||
transform: translate3d(var(--zps-shift, -50%), 0, 0);
|
||||
transform: translate3d(var(--jps-shift, -50%), 0, 0);
|
||||
}
|
||||
to {
|
||||
transform: translate3d(0, 0, 0);
|
||||
}
|
||||
}
|
||||
@media (max-width: 767px) {
|
||||
.zib-partners-scroll {
|
||||
--zps-card-w: 160px;
|
||||
--zps-card-h: 70px;
|
||||
.jio-partners-scroll {
|
||||
--jps-card-w: 160px;
|
||||
--jps-card-h: 70px;
|
||||
}
|
||||
.zib-partners-scroll.zps-style-logo .zps-item {
|
||||
.jio-partners-scroll.jps-style-logo .jps-item {
|
||||
padding: 0 12px;
|
||||
}
|
||||
.zps-end-fade::after {
|
||||
.jps-end-fade::after {
|
||||
width: 60px;
|
||||
}
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.zib-partners-scroll .zps-track {
|
||||
.jio-partners-scroll .jps-track {
|
||||
animation: none !important;
|
||||
}
|
||||
}
|
||||
@@ -4810,7 +4810,7 @@ body:has(.modal.in) .float-btn,
|
||||
line-height: 1.42857143;
|
||||
}
|
||||
|
||||
.posts-nav-box .zib-widget {
|
||||
.posts-nav-box .jio-widget-box {
|
||||
clear: both;
|
||||
margin-bottom: 20px;
|
||||
padding: 15px;
|
||||
@@ -5134,7 +5134,7 @@ body:has(.modal.in) .float-btn,
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
/*-----zib.media-文件管理-图片上传---*/
|
||||
/*-----媒体文件管理-图片上传---*/
|
||||
.mini-media-my-box .drop-mask {
|
||||
position: absolute;
|
||||
background: rgba(33, 55, 81, 0.7);
|
||||
@@ -5755,8 +5755,8 @@ body:has(.modal.in) .float-btn,
|
||||
.payment-method-radio img {
|
||||
height: 35px;
|
||||
/* 抵消 bootstrap 全局 img{display:block;max-width:100%;height:auto}
|
||||
(Jio bootstrap 将 BS3 .img-responsive 选择器组误并入了裸 img,
|
||||
Zibll 的裸 img 不在该组):flex 压缩时 max-width:100% 会把图标
|
||||
(本主题 bootstrap 将 BS3 .img-responsive 选择器组误并入了裸 img):
|
||||
flex 压缩时 max-width:100% 会把图标
|
||||
钳制到被压窄的项宽(实测 5 渠道 400px 弹窗图标被压成 16x35 细
|
||||
条),flex:none 防不住 max-width,必须显式还原。 */
|
||||
width: auto;
|
||||
@@ -11210,7 +11210,7 @@ body.error404 {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.mobile-navbar .posts-nav-box .zib-widget {
|
||||
.mobile-navbar .posts-nav-box .jio-widget-box {
|
||||
background: var(--muted-border-color);
|
||||
box-shadow: none;
|
||||
}
|
||||
@@ -11991,7 +11991,7 @@ body.error404 {
|
||||
}
|
||||
|
||||
/* =============================================================================
|
||||
* 销售页小工具(主题并入,源自 zibaut-access widgets.css)
|
||||
* 销售页小工具(销售页访问控制相关样式并入)
|
||||
* ============================================================================= */
|
||||
|
||||
/* =============================================================
|
||||
@@ -14150,7 +14150,7 @@ body.error404 {
|
||||
/*--------------OVER---over---------OVER---over---------OVER---over---------OVER---over-----------*/
|
||||
|
||||
/*--------------FA5 family-prefix compatibility---------FA5 family-prefix compatibility-------------*/
|
||||
/* zibll-legacy "fa fab / fa far" double-prefix values beat FA5's own single-class
|
||||
/* Legacy "fa fab / fa far" double-prefix values beat FA5's own single-class
|
||||
declarations in the cascade, blanking brand icons and bolding regular ones. */
|
||||
.fa.fab{font-family:"Font Awesome 5 Brands";font-weight:400}
|
||||
.fa.far{font-weight:400}
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
body{--mian-max-width: 1200px;--posts-card-scale: 70%;--posts-list-scale: 70%;--theme-color: #f04494;--focus-color: var(--theme-color);--focus-shadow-color: rgba(253, 83, 161, .4);--key-color: #333;--main-color: #4e5358;--main-shadow: rgba(116, 116, 116, .08);--muted-color: #777;--muted-2-color: #999;--muted-3-color: #b1b1b1;--muted-4-color: #d2d2d2;--body-bg-color: #f5f6f7;--main-bg-color: #fff;--muted-bg-color: #eee;--muted-bg-2-color: #f6f7f8;--main-border-color: rgba(50, 50, 50, .06);--muted-border-color: rgba(0, 0, 0, .03);--main-radius: 8px;--mini-radius: calc(var(--main-radius) / 1.4);--blur-bg: rgba(255, 255, 255, .8);--float-btn-bg: rgba(200, 200, 200, .4);--header-bg: var(--blur-bg);--header-color: var(--main-color);--footer-bg: var(--main-bg-color);--footer-color: var(--muted-2-color)}.dark-theme{--key-color: #f8fafc;--main-color: #e5eef7;--main-shadow: rgba(24, 24, 24, .1);--muted-color: #b4b6bb;--muted-2-color: #888a8f;--muted-3-color: #636469;--muted-4-color: #43454a;--body-bg-color: #292a2d;--main-bg-color: #323335;--muted-bg-color: #2d2e31;--muted-bg-2-color: #37383a;--main-border-color: rgba(114, 114, 114, .1);--muted-border-color: rgba(184, 184, 184, .02);--blur-bg: rgba(50, 51, 53, .8);--float-btn-bg: rgba(70, 70, 70, .4);--header-bg: var(--blur-bg);--header-color: var(--main-color);--footer-bg: var(--main-bg-color);--footer-color: var(--muted-2-color)}::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}.dark::view-transition-old(root){z-index:1}.dark::view-transition-new(root){z-index:2147483646}::view-transition-old(root){z-index:2147483646}::view-transition-new(root){z-index:1}@supports not ((-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px))){body{--blur-bg: #ffffff}body.dark-theme{--blur-bg: #37383a}}body:has(.modal.in),body.modal-open{--blur-bg: #ffffff}body.dark-theme:has(.modal.in),body.dark-theme.modal-open{--blur-bg: #37383a}body.fps-accelerat{--blur-bg: #ffffff}body.fps-accelerat.dark-theme{--blur-bg: #37383a}body.fps-accelerat *{-webkit-backdrop-filter:unset!important;backdrop-filter:unset!important}a[href],.relates-thumb li a>.post-info,.more-posts a>span{transition:color .2s,background .3s,opacity .3s,box-shadow .3s,transform .3s}.main-shadow{transition:box-shadow .3s}.but:focus,.but:hover,.progress,.navbar-nav>li:before{transition:.3s}.navbar-top .sub-menu,.theme-popover,.hover-show .hover-show-con{opacity:0;transform:translateY(6px);transition:.4s}.navbar-top li:hover>.sub-menu,.hover-show:hover .hover-show-con,.hover-show:hover~.hover-show-con,.hover-show:hover~.sub-menu{opacity:1;transform:translateY(0)}.hover-show{position:relative;cursor:pointer;z-index:10}.hover-show .hover-show-con{position:absolute;visibility:hidden}.hover-show:hover .hover-show-con,.hover-show:hover~.hover-show-con,.hover-show:hover~.sub-menu{visibility:unset}.match-ok,.navbar-top .sub-menu li>a,.ic-close{transition:.3s}.ic-close:hover{transform:rotate(270deg);color:inherit}.social_loginbar a,.item-thumbnail img,.dosc-nav .fa{transition:.2s ease-out}.hover-zoom:hover,.hover-zoom-img:hover img,.social_loginbar .xh-social-item:hover,.social_loginbar .social-login-item:hover{transform:scale(1.05)}.hover-zoom-sm:hover,.hover-zoom-img-sm:hover img,.posts-mini:hover img,.posts-item:hover .item-thumbnail img,.posts-item.mult-thumb .thumb-items>span>img:hover{transform:scale(1.02)}.main-min-height{min-height:calc(100vh - 280px)}.main-shadow{box-shadow:0 0 10px var(--main-shadow)}.key-color{color:var(--key-color)}.focus-color{--this-color: var(--focus-color);color:var(--focus-color)}.muted-color{color:var(--muted-color)}.muted-2-color{color:var(--muted-2-color)}.muted-3-color{color:var(--muted-3-color)}.main-bg{background:var(--main-bg-color)}.placeholder{background:linear-gradient(118deg,#7979791a 25%,#79797933 37%,#7979791a 63%);opacity:1;border-radius:4px;-webkit-animation:placeholder 1.5s ease infinite!important;animation:placeholder 1.5s ease infinite!important;background-size:400% 100%!important}.placeholder.img{height:119px}.placeholder.t1{height:24px;width:80%}.placeholder.k1{height:20px;width:60%}.placeholder.k2{height:20px}.placeholder.k3{height:15px}.placeholder.s1{width:70px;height:15px;display:inline-block}@-webkit-keyframes placeholder{0%{background-position:100% 50%}to{background-position:0 50%}}@keyframes placeholder{0%{background-position:100% 50%}to{background-position:0 50%}}@-webkit-keyframes fade{0%{opacity:0}to{opacity:1}}@keyframes fade{0%{opacity:0}to{opacity:1}}.ani.shake{-webkit-animation:shake .3s ease-in!important;animation:shake .3s ease-in!important}@-webkit-keyframes shake{20%{transform:translate(2px)}40%{transform:translate(-4px)}60%{transform:translate(5px)}80%{transform:translate(3px)}to{transform:translate(0)}}@keyframes shake{20%{transform:translate(2px)}40%{transform:translate(-4px)}60%{transform:translate(5px)}80%{transform:translate(3px)}to{transform:translate(0)}}.obs-animate{opacity:0;transition:opacity .6sLine truncated
|
||||
body{--mian-max-width: 1200px;--posts-card-scale: 70%;--posts-list-scale: 70%;--theme-color: #f04494;--focus-color: var(--theme-color);--focus-shadow-color: rgba(253, 83, 161, .4);--key-color: #333;--main-color: #4e5358;--main-shadow: rgba(116, 116, 116, .08);--muted-color: #777;--muted-2-color: #999;--muted-3-color: #b1b1b1;--muted-4-color: #d2d2d2;--body-bg-color: #f5f6f7;--main-bg-color: #fff;--muted-bg-color: #eee;--muted-bg-2-color: #f6f7f8;--main-border-color: rgba(50, 50, 50, .06);--muted-border-color: rgba(0, 0, 0, .03);--main-radius: 8px;--mini-radius: calc(var(--main-radius) / 1.4);--blur-bg: rgba(255, 255, 255, .8);--float-btn-bg: rgba(200, 200, 200, .4);--header-bg: var(--blur-bg);--header-color: var(--main-color);--footer-bg: var(--main-bg-color);--footer-color: var(--muted-2-color)}.dark-theme{--key-color: #f8fafc;--main-color: #e5eef7;--main-shadow: rgba(24, 24, 24, .1);--muted-color: #b4b6bb;--muted-2-color: #888a8f;--muted-3-color: #636469;--muted-4-color: #43454a;--body-bg-color: #292a2d;--main-bg-color: #323335;--muted-bg-color: #2d2e31;--muted-bg-2-color: #37383a;--main-border-color: rgba(114, 114, 114, .1);--muted-border-color: rgba(184, 184, 184, .02);--blur-bg: rgba(50, 51, 53, .8);--float-btn-bg: rgba(70, 70, 70, .4);--header-bg: var(--blur-bg);--header-color: var(--main-color);--footer-bg: var(--main-bg-color);--footer-color: var(--muted-2-color)}::view-transition-old(root),::view-transition-new(root){animation:none;mix-blend-mode:normal}.dark::view-transition-old(root){z-index:1}.dark::view-transition-new(root){z-index:2147483646}::view-transition-old(root){z-index:2147483646}::view-transition-new(root){z-index:1}@supports not ((-webkit-backdrop-filter: blur(20px)) or (backdrop-filter: blur(20px))){body{--blur-bg: #ffffff}body.dark-theme{--blur-bg: #37383a}}body:has(.modal.in),body.modal-open{--blur-bg: #ffffff}body.dark-theme:has(.modal.in),body.dark-theme.modal-open{--blur-bg: #37383a}body.fps-accelerat{--blur-bg: #ffffff}body.fps-accelerat.dark-theme{--blur-bg: #37383a}body.fps-accelerat *{-webkit-backdrop-filter:unset!important;backdrop-filter:unset!important}a[href],.relates-thumb li a>.post-info,.more-posts a>span{transition:color .2s,background .3s,opacity .3s,box-shadow .3s,transform .3s}.main-shadow{transition:box-shadow .3s}.but:focus,.but:hover,.progress,.navbar-nav>li:before{transition:.3s}.navbar-top .sub-menu,.theme-popover,.hover-show .hover-show-con{opacity:0;transform:translateY(6px);transition:.4s}.navbar-top li:hover>.sub-menu,.hover-show:hover .hover-show-con,.hover-show:hover~.hover-show-con,.hover-show:hover~.sub-menu{opacity:1;transform:translateY(0)}.hover-show{position:relative;cursor:pointer;z-index:10}.hover-show .hover-show-con{position:absolute;visibility:hidden}.hover-show:hover .hover-show-con,.hover-show:hover~.hover-show-con,.hover-show:hover~.sub-menu{visibility:unset}.match-ok,.navbar-top .sub-menu li>a,.ic-close{transition:.3s}.ic-close:hover{transform:rotate(270deg);color:inherit}.social_loginbar a,.item-thumbnail img,.dosc-nav .fa{transition:.2s ease-out}.hover-zoom:hover,.hover-zoom-img:hover img,.social_loginbar .xh-social-item:hover,.social_loginbar .social-login-item:hover{transform:scale(1.05)}.hover-zoom-sm:hover,.hover-zoom-img-sm:hover img,.posts-mini:hover img,.posts-item:hover .item-thumbnail img,.posts-item.mult-thumb .thumb-items>span>img:hover{transform:scale(1.02)}.main-min-height{min-height:calc(100vh - 280px)}.main-shadow{box-shadow:0 0 10px var(--main-shadow)}.key-color{color:var(--key-color)}.focus-color{--this-color: var(--focus-color);color:var(--focus-color)}.muted-color{color:var(--muted-color)}.muted-2-color{color:var(--muted-2-color)}.muted-3-color{color:var(--muted-3-color)}.main-bg{background:var(--main-bg-color)}.placeholder{background:linear-gradient(118deg,#7979791a 25%,#79797933 37%,#7979791a 63%);opacity:1;border-radius:4px;-webkit-animation:placeholder 1.5s ease infinite!important;animation:placeholder 1.5s ease infinite!important;background-size:400% 100%!important}.placeholder.img{height:119px}.placeholder.t1{height:24px;width:80%}.placeholder.k1{height:20px;width:60%}.placeholder.k2{height:20px}.placeholder.k3{height:15px}.placeholder.s1{width:70px;height:15px;display:inline-block}@-webkit-keyframes placeholder{0%{background-position:100% 50%}to{background-position:0 50%}}@keyframes placeholder{0%{background-position:100% 50%}to{background-position:0 50%}}@-webkit-keyframes fade{0%{opacity:0}to{opacity:1}}@keyframes fade{0%{opacity:0}to{opacity:1}}.ani.shake{-webkit-animation:shake .3s ease-in!important;animation:shake .3s ease-in!important}@-webkit-keyframes shake{20%{transform:translate(2px)}40%{transform:translate(-4px)}60%{transform:translate(5px)}80%{transform:translate(3px)}to{transform:translate(0)}}@keyframes shake{20%{transform:translate(2px)}40%{transform:translate(-4px)}60%{transform:translate(5px)}80%{transform:translate(3px)}to{transform:translate(0)}}.obs-animate{opacity:0;transition:opacity .6sLine truncated
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Shared Zibll-source authentication contract: modal and /sign/. */
|
||||
/* Shared authentication contract: modal and /sign/. */
|
||||
.sign {
|
||||
max-width: 330px;
|
||||
margin: auto;
|
||||
|
||||
@@ -157,23 +157,23 @@
|
||||
margin-left: 6px;
|
||||
}
|
||||
|
||||
/* ===== 余额充值弹窗 — Zibll balance-charge modal parity =====
|
||||
.zib-widget 基础卡样式与 .vip-product/.vip-tag 的 Zibll 原值仅在充值表单内生效
|
||||
(vip-modal.css 在全局以同类名覆盖了它们,这里按 Zibll main.css 5962/5928/5990 回位)。 */
|
||||
/* ===== 余额充值弹窗 — balance-charge modal parity =====
|
||||
.jio-widget-box 基础卡样式与 .vip-product/.vip-tag 的原值仅在充值表单内生效
|
||||
(vip-modal.css 在全局以同类名覆盖了它们,这里在充值表单内按同名原值回位)。 */
|
||||
|
||||
/* 弹窗壳静止态必须隐藏。Zibll 无此问题:它的 bootstrap 无 .modal 基础规则,
|
||||
且弹窗壳由 refresh_modal JS 按需创建;本主题是服务端静态输出,若不在此
|
||||
/* 弹窗壳静止态必须隐藏。此处不存在 .modal 基础规则带来的冲突,
|
||||
且弹窗壳由服务端静态输出;若不在此
|
||||
显式隐藏,main.css 的 .flex{display:flex}(后加载、与 bootstrap 的
|
||||
.modal{display:none} 同特异性)会让弹窗永久 display:flex 铺满全屏,
|
||||
叠加 .fade 的 opacity:0 形成隐形遮罩,拦截整页点击。 */
|
||||
.modal[data-jio-charge-modal] {
|
||||
display: none;
|
||||
}
|
||||
/* 打开态必须是 flex(而非 bootstrap 的内联 display:block):无头 Chrome
|
||||
对 Zibll 真实 CSS 的几何实证显示,display:block 下 .modal.flex
|
||||
.modal-dialog{margin:0} 使对话框顶在左上角;flex 下由壳上的 .flex.jc
|
||||
(align-items:center;justify-content:center)双轴居中——Zibll 生产环境
|
||||
即此形态(其 jQuery .show() 对 computed≠none 的壳是空操作,内联
|
||||
/* 打开态必须是 flex(而非 bootstrap 的内联 display:block):实测
|
||||
显示 display:block 下 .modal.flex .modal-dialog{margin:0} 使对话框顶在左上角;
|
||||
flex 下由壳上的 .flex.jc
|
||||
(align-items:center;justify-content:center)双轴居中,即此形态(jQuery
|
||||
.show() 对 computed≠none 的壳是空操作,内联
|
||||
display 从未写入)。 */
|
||||
.modal[data-jio-charge-modal].in {
|
||||
display: flex;
|
||||
@@ -209,7 +209,7 @@
|
||||
border-radius: 5em;
|
||||
}
|
||||
|
||||
.balance-charge-form .zib-widget {
|
||||
.balance-charge-form .jio-widget-box {
|
||||
clear: both;
|
||||
background-color: var(--main-bg-color);
|
||||
padding: 15px;
|
||||
@@ -245,7 +245,7 @@
|
||||
.balance-charge-form .vip-product.active::before {
|
||||
content: '\f058';
|
||||
/* 本主题打包的是 FA5(族名 'Font Awesome 5 Free',solid 字形需 900),
|
||||
Zibll 遗留的 FA4 族名在本主题不存在 → 豆腐块(被误认破图)。 */
|
||||
legacy FA4 族名在本主题不存在 → 豆腐块(被误认破图)。 */
|
||||
font: normal normal 900 16px/1 'Font Awesome 5 Free';
|
||||
color: var(--focus-color);
|
||||
position: absolute;
|
||||
@@ -1361,9 +1361,9 @@ body.uc-modal-open {
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* 积分兑换会员入口(参考主题用户中心 VIP 页 1:1:两张档位购买卡下方的全宽横条,
|
||||
/* 积分兑换会员入口(用户中心 VIP 页 1:1:两张档位购买卡下方的全宽横条,
|
||||
左侧 points-color 图标 + 「积分兑换会员」,右侧「立即兑换」badg + 右箭头;
|
||||
结构与配色由 zibll 工具类(flex/ac/jsb/flex1/em12/c-yellow/badg)承担,
|
||||
结构与配色由工具类(flex/ac/jsb/flex1/em12/c-yellow/badg)承担,
|
||||
此处只提供与 .uc-vip-level-card 同一变量体系的表面与间距)。 */
|
||||
.uc-vip-points-entry {
|
||||
margin-top: 12px;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* User level panel — zibll-aligned single-path layout. */
|
||||
/* User level panel — single-path layout. */
|
||||
.jio-user-level-icon--admin { height: 22px; }
|
||||
|
||||
/* The level page owns its cards; do not wrap it in the generic dashboard card. */
|
||||
@@ -50,7 +50,7 @@
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Match zibll .colorful-bg / .jb-vip1, scoped to the level summary card. */
|
||||
/* Match .colorful-bg / .jb-vip1, scoped to the level summary card. */
|
||||
.jio-level-card--summary.colorful-bg {
|
||||
background: var(--this-bg);
|
||||
background-size: 120%;
|
||||
|
||||
@@ -785,7 +785,7 @@
|
||||
|
||||
|
||||
/* ==================== 官方认证面板 ==================== */
|
||||
/* 面板内容为 Zibll 同款 colorful-bg hero 卡片(参考主题 1:1),去掉外层白卡壳 */
|
||||
/* 面板内容为 colorful-bg hero 卡片(1:1 同构),去掉外层白卡壳 */
|
||||
.uc-content #panel-auth.dashboard-panel {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
@@ -794,7 +794,7 @@
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* 认证按钮(Zibll .but.jb-blue.padding-lg.btn-block 工具类) */
|
||||
/* 认证按钮(.but.jb-blue.padding-lg.btn-block 工具类) */
|
||||
.uc-content #panel-auth .but[data-auth-modal-open] {
|
||||
width: 100%;
|
||||
margin: 20px 0 0;
|
||||
|
||||
@@ -175,12 +175,12 @@ body.jio-user-center .uc-content,
|
||||
}
|
||||
|
||||
/* 侧栏卡片间距:1:1 参考主题。参考侧栏是普通块流,每张卡片自带 mb20
|
||||
(zib-widget 默认也是 20px),≤640px 由 mb10-sm 收到 10px。
|
||||
(jio-widget-box 默认也是 20px),≤640px 由 mb10-sm 收到 10px。
|
||||
本站侧栏不用 gap,间距全部由卡片自己的 margin-bottom 承担。 */
|
||||
.uc-sidebar > .uc-sidebar-statistics,
|
||||
.uc-sidebar > .uc-sidebar-vip,
|
||||
.uc-sidebar > .uc-sidebar__pair,
|
||||
.uc-sidebar-centers > .zib-widget,
|
||||
.uc-sidebar-centers > .jio-widget-box,
|
||||
.uc-sidebar > .uc-sidebar-iconbox {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
@@ -189,7 +189,7 @@ body.jio-user-center .uc-content,
|
||||
.uc-sidebar > .uc-sidebar-statistics,
|
||||
.uc-sidebar > .uc-sidebar-vip,
|
||||
.uc-sidebar > .uc-sidebar__pair,
|
||||
.uc-sidebar-centers > .zib-widget,
|
||||
.uc-sidebar-centers > .jio-widget-box,
|
||||
.uc-sidebar > .uc-sidebar-iconbox {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
@@ -410,11 +410,11 @@ body.jio-user-center .uc-content,
|
||||
}
|
||||
|
||||
|
||||
/* 文章 / 评论 / 收藏 / 粉丝:1:1 参考主题 zib_user_center_page_sidebar_statistics()。
|
||||
参考主题没有给 .user-statistics-item 写专门样式,外观全部来自 zib-widget padding-10
|
||||
/* 文章 / 评论 / 收藏 / 粉丝:1:1 同构 sidebar statistics。
|
||||
侧栏统计项没有专门样式,外观全部来自 jio-widget-box padding-10
|
||||
与 em14 / em09 opacity5 mt6;链接交互来自全局 a / a:hover 与 a[href] 过渡:
|
||||
常态正文色,悬停/聚焦切到 --focus-color,color 0.2s 过渡,无下划线、无 outline。 */
|
||||
.uc-sidebar-statistics.zib-widget {
|
||||
.uc-sidebar-statistics.jio-widget-box {
|
||||
clear: both;
|
||||
line-height: 1.42857143;
|
||||
background-color: var(--main-bg-color);
|
||||
@@ -443,7 +443,7 @@ body.jio-user-center .uc-content,
|
||||
}
|
||||
}
|
||||
|
||||
/* VIP 入口:1:1 参考主题 zib_user_center_page_sidebar_vip(),外观全部来自
|
||||
/* VIP 入口:1:1 同构 sidebar vip,外观全部来自
|
||||
payvip-icon / badg / btn-block / abs-right。这里只补 <a> 与侧栏 gap 带来的差异。 */
|
||||
.uc-sidebar .uc-sidebar-vip,
|
||||
.uc-sidebar .uc-sidebar-vip:hover,
|
||||
@@ -452,7 +452,7 @@ body.jio-user-center .uc-content,
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* legacy-utilities 把 .abs-right 改成 top:0/right:0,恢复参考主题的垂直居中几何。 */
|
||||
/* legacy-utilities 把 .abs-right 改成 top:0/right:0,恢复垂直居中几何。 */
|
||||
.uc-sidebar-vip > .abs-right {
|
||||
top: 50%;
|
||||
right: 0.7em;
|
||||
@@ -465,9 +465,9 @@ body.jio-user-center .uc-content,
|
||||
vertical-align: -0.1em;
|
||||
}
|
||||
|
||||
/* 创作中心 / 推广中心:1:1 参考主题 zib_user_center_page_sidebar_income_rebate()。
|
||||
.zib-widget 在本站不是全局类,在侧栏内按参考原值落地。 */
|
||||
.uc-sidebar-centers > .zib-widget {
|
||||
/* 创作中心 / 推广中心:1:1 同构 sidebar income/rebate 入口。
|
||||
.jio-widget-box 在本站不是全局类,在侧栏内按同名原值落地。 */
|
||||
.uc-sidebar-centers > .jio-widget-box {
|
||||
clear: both;
|
||||
background-color: var(--main-bg-color);
|
||||
padding: 10px;
|
||||
@@ -477,8 +477,8 @@ body.jio-user-center .uc-content,
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.uc-sidebar-centers > .zib-widget:hover,
|
||||
.uc-sidebar-centers > .zib-widget:focus {
|
||||
.uc-sidebar-centers > .jio-widget-box:hover,
|
||||
.uc-sidebar-centers > .jio-widget-box:focus {
|
||||
color: var(--main-color);
|
||||
}
|
||||
|
||||
@@ -542,13 +542,13 @@ body.jio-user-center .uc-content,
|
||||
.uc-summary-card--wallet .uc-summary-card__body { color: #3978d6; }
|
||||
.uc-summary-card--points .uc-summary-card__body { color: #ba7a0a; }
|
||||
|
||||
/* 我的服务 / 功能设置:1:1 参考主题 zib_user_center_page_sidebar_button_1/2()。
|
||||
外壳为 zib-widget padding-6,标题为普通字重的 padding-6 ml3;
|
||||
网格项只继承正文色,参考主题没有 hover / 选中变色。
|
||||
参考主题正文行高是 bootstrap 的 1.42857143,本站 body 为 1.6,
|
||||
/* 我的服务 / 功能设置:1:1 同构 sidebar button 1/2。
|
||||
外壳为 jio-widget-box padding-6,标题为普通字重的 padding-6 ml3;
|
||||
网格项只继承正文色,无 hover / 选中变色。
|
||||
正文行高是 bootstrap 的 1.42857143,本站 body 为 1.6,
|
||||
标题、图标、文字三行会各自被撑高,这里恢复参考行高。 */
|
||||
/* widgets/frontend.css 在 main.min.css 之后加载,其 .zib-widget{padding:15px} 会盖掉 .padding-6,这里按参考值锁回 6px。 */
|
||||
.uc-sidebar-iconbox.zib-widget {
|
||||
/* widgets/frontend.css 在 main.min.css 之后加载,其 .jio-widget-box{padding:15px} 会盖掉 .padding-6,这里按参考值锁回 6px。 */
|
||||
.uc-sidebar-iconbox.jio-widget-box {
|
||||
clear: both;
|
||||
padding: 6px;
|
||||
line-height: 1.42857143;
|
||||
|
||||
@@ -281,7 +281,7 @@
|
||||
color: var(--color-ink-3);
|
||||
}
|
||||
|
||||
/* 内容区卡片 — Zibll .author-tab.zib-widget parity(padding 15px / radius 8px) */
|
||||
/* 内容区卡片 — .author-tab.jio-widget-box parity(padding 15px / radius 8px) */
|
||||
.jio-user-home .dashboard--public {
|
||||
max-width: none;
|
||||
background: var(--main-bg-color, #fff);
|
||||
@@ -291,7 +291,7 @@
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* Tab 栏 — Zibll .author-tab .tab-nav-theme parity:纯文字导航、
|
||||
/* Tab 栏 — .author-tab .tab-nav-theme parity:纯文字导航、
|
||||
* 激活项加粗 + 主题色 + 20px 短横线,计数为小号内联文字。 */
|
||||
.jio-user-home .dashboard--public .dashboard-tabs {
|
||||
display: flex;
|
||||
@@ -368,16 +368,16 @@
|
||||
animation: panel-fade-in 0.25s ease;
|
||||
}
|
||||
|
||||
/* Public author posts/favorites follow Zibll's author-tab list
|
||||
* (zibll css/main.css: .author-tab .posts-item + the ≥992px no-sidebar
|
||||
/* Public author posts/favorites follow the author-tab list
|
||||
* (.author-tab .posts-item + the ≥992px no-sidebar
|
||||
* two-column rule .site-layout-1 .posts-item:not(.card)). */
|
||||
.jio-user-home .jio-user-home__post-list[data-view="list"] .posts-item {
|
||||
background: transparent;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
/* 宽屏双列:无侧边栏全文宽时文章卡片并排两列,视觉同 zibll site-layout-1
|
||||
* (zibll 用 inline-flex+calc(50%),对标记空白敏感,此处用等几何的 grid) */
|
||||
/* 宽屏双列:无侧边栏全文宽时文章卡片并排两列,视觉同 site-layout-1
|
||||
* (原实现对标记空白敏感,此处用等几何的 grid) */
|
||||
@media (min-width: 992px) {
|
||||
.jio-user-home .jio-user-home__post-list[data-view="list"] {
|
||||
display: grid;
|
||||
@@ -474,11 +474,10 @@
|
||||
}
|
||||
}
|
||||
|
||||
/* User-home follow tab — Zibll parity
|
||||
* 子切换复刻 zibll inc/functions/zib-author.php:407-410(list-inline splitters
|
||||
* 居中文字链接,激活 focus-color);列表项为 .author-minicard inline-block
|
||||
* 三列卡片流(卡片规则、640px 单列均在 vendored main.css),容器居中对齐
|
||||
* zibll pane 的 text-center。 */
|
||||
/* User-home follow tab
|
||||
* 子切换为居中文字链接(list-inline splitters,激活 focus-color);列表项为
|
||||
* .author-minicard inline-block 三列卡片流(卡片规则、640px 单列均在 vendored
|
||||
* main.css),容器居中对齐 pane 的 text-center。 */
|
||||
.jio-user-home .uh-follow__subtabs {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
* Jio universal icon picker — shared admin modal for FA5, the built-in
|
||||
* SVG sprite and inline custom SVG values ("fa fas fa-star" / "zibsvg-key" /
|
||||
* SVG sprite and inline custom SVG values ("fa fas fa-star" / "jiosvg-key" /
|
||||
* "customsvg-<svg>").
|
||||
*
|
||||
* Any admin screen: call jio_icon_picker_assets() (PHP) and render fields
|
||||
@@ -62,7 +62,7 @@
|
||||
value = String(value || '').trim();
|
||||
if (!value) return '';
|
||||
if (value.indexOf('customsvg-') === 0) return cleanSvg(value.slice(10));
|
||||
if (value.indexOf('zibsvg-') === 0) {
|
||||
if (value.indexOf('jiosvg-') === 0) {
|
||||
const key = value.slice(7).replace(/[^a-zA-Z0-9_-]/g, '');
|
||||
return key ? `<svg class="icon" aria-hidden="true"><use xlink:href="#icon-${key}"></use></svg>` : '';
|
||||
}
|
||||
@@ -101,7 +101,7 @@
|
||||
// Style-class-only preview: immune to the .fa family override in FA5's css.
|
||||
$grid.append(itemButton(value, name, `<i class="${group.id} fa-${escapeText(name)}" aria-hidden="true"></i>`));
|
||||
} else if (group.type === 'svg') {
|
||||
const value = `zibsvg-${name}`;
|
||||
const value = `jiosvg-${name}`;
|
||||
const key = escapeText(name).replace(/[^a-zA-Z0-9_-]/g, '');
|
||||
$grid.append(itemButton(value, name, `<svg class="icon" aria-hidden="true"><use xlink:href="#icon-${key}"></use></svg>`));
|
||||
}
|
||||
|
||||
@@ -357,8 +357,8 @@
|
||||
if (link.closest("[data-jio-ajax-list='off']")) return;
|
||||
// The canonical pagination engine exclusively owns these controls.
|
||||
if (link.closest("[data-jio-pagination], .jio-comment-pagination")) return;
|
||||
// 排序菜单与 pane 触发器是 runtime post_ajax 管线(zib_ajax_option_menu /
|
||||
// zib_index_tab 契约)的专属控件,这里不能并行处理造成双请求。
|
||||
// 排序菜单与 pane 触发器是 runtime post_ajax 管线(option-menu /
|
||||
// index-tab 契约)的专属控件,这里不能并行处理造成双请求。
|
||||
if (link.closest(".ajax-option, .post_ajax_trigger")) return;
|
||||
|
||||
var href = link.getAttribute("href") || link.getAttribute("ajax-href") || link.getAttribute("data-jio-ajax-url");
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
}
|
||||
|
||||
// 文章骨架:与 runtime/main.js 的 .ajax-next 处理器、jio_render_placeholder()
|
||||
// 同源同款(1:1 对齐参考主题 zib_get_post_placeholder)。刻意不写 ajax-item:
|
||||
// 同源同款(1:1 对齐 post placeholder 契约)。刻意不写 ajax-item:
|
||||
// 否则会被 inject() / find('.ajax-item') 当成真实条目删除或定位。
|
||||
var CARD_ITEM =
|
||||
'<div class="posts-item card"><div class="item-thumbnail">' +
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
canvas.height = height;
|
||||
var ctx = canvas.getContext('2d');
|
||||
var imgHeight = height / 2; // rebate 分支:顶部主图占上半屏
|
||||
// 站点名走「周」前缀,与参考主题 zib__('week_prefix') 一致。
|
||||
// 站点名走「周」前缀。
|
||||
var weekLabel = '周' + '日一二三四五六'.charAt(new Date().getDay());
|
||||
// 推荐人标签:参考主题 tags = `推荐人: {昵称}`,缺昵称时整层不画。
|
||||
var tags = referrerName ? '推荐人: ' + String(referrerName) : '';
|
||||
|
||||
@@ -337,7 +337,7 @@
|
||||
closeChargeModal();
|
||||
}
|
||||
});
|
||||
// Zibll data-for/data-value 选中模型:余额档位(.vip-product.product-box)
|
||||
// data-for/data-value 选中模型:余额档位(.vip-product.product-box)
|
||||
// 选中变化不产生 change 事件(隐藏 input 由程序赋值),需显式重置幂等键。
|
||||
var customInput = modal.querySelector('input[name="custom_price"]');
|
||||
function selectProduct(value) {
|
||||
@@ -621,7 +621,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
// ===== 购买积分(Zibll points-pay modal 1:1:商品/自定义 + 余额/卡密支付) =====
|
||||
// ===== 购买积分(points-pay modal:商品/自定义 + 余额/卡密支付) =====
|
||||
function initPointsPay() {
|
||||
var modal = document.querySelector('[data-jio-points-pay-modal]');
|
||||
if (!modal || modal.dataset.jioPointsPayInitialized === '1') return;
|
||||
@@ -665,7 +665,7 @@
|
||||
if (e.key === 'Escape' && modal.classList.contains('in')) closePointsModal();
|
||||
});
|
||||
|
||||
// Zibll data-for/data-value 选中模型:积分商品档位。
|
||||
// data-for/data-value 选中模型:积分商品档位。
|
||||
function selectProduct(value) {
|
||||
modal.querySelectorAll('[data-for="points_product"]').forEach(function (el) {
|
||||
el.classList.toggle('active', el.getAttribute('data-value') === value);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* Jio Enhancements — 全局 UI 增强
|
||||
*
|
||||
* 图片灯箱由 assets/js/runtime/imgbox.js(Miniimgbox,zibll 风格)唯一负责,
|
||||
* 图片灯箱由 assets/js/runtime/imgbox.js(Miniimgbox)唯一负责,
|
||||
* 此文件仅保留滚动方向感知的 legacy class 同步。
|
||||
*
|
||||
* @package Jio
|
||||
|
||||
+17
-18
@@ -64,7 +64,7 @@
|
||||
return "";
|
||||
}
|
||||
|
||||
// 会员图标(Zibll zibpay_get_vip_icon:vip_N.svg 或自定义 img_icon)。
|
||||
// 会员图标:vip_N.svg 或自定义 img_icon。
|
||||
function vipIcon(levelInfo) {
|
||||
if (levelInfo && levelInfo.img_icon) {
|
||||
var img = node("img", "img-icon");
|
||||
@@ -76,7 +76,7 @@
|
||||
return node("i", "fa fas fa-gem");
|
||||
}
|
||||
|
||||
// 价格行(Zibll:mark 小号 px12 前缀 + 数字;原价 original-price.relative)。
|
||||
// 价格行:mark 小号 px12 前缀 + 数字;原价 original-price.relative。
|
||||
function priceRow(mark, priceLabel, showLabel) {
|
||||
var row = node("div", "flex abl gap6");
|
||||
var price = node("div", "product-price c-red");
|
||||
@@ -120,10 +120,10 @@
|
||||
input.checked = index === 0;
|
||||
append(label, input);
|
||||
|
||||
// Zibll 套餐卡:zib-widget vip-product relative text-center product-box
|
||||
// 套餐卡:jio-widget-box vip-product relative text-center product-box
|
||||
// (右上 tag + 价格行 + 时长 badge,无标题行)。
|
||||
var product = node("div", "zib-widget vip-product relative text-center product-box");
|
||||
// 标签颜色取后台「标签颜色」配置,未配置时回退参考主题默认的 jb-yellow。
|
||||
var product = node("div", "jio-widget-box vip-product relative text-center product-box");
|
||||
// 标签颜色取后台「标签颜色」配置,未配置时回退默认的 jb-yellow。
|
||||
if (item.discount_tag) append(product, htmlNode("div", "abs-right vip-tag badg " + (item.tag_class || "jb-yellow"), item.discount_tag));
|
||||
append(product, priceRow(mark, item.price_label || "", item.show_price_label || ""));
|
||||
if (item.days_label) append(product, node("div", "muted-2-color c-blue em09 p2-10 badg radius", item.days_label));
|
||||
@@ -135,11 +135,11 @@
|
||||
|
||||
function renderMethods(parent, methods, cardPass, wallet) {
|
||||
methods = Array.isArray(methods) ? methods : [];
|
||||
if (!methods.length) return; // 无可用支付方式:由按钮区渲染 Zibll 同款 badg 提示。
|
||||
if (!methods.length) return; // 无可用支付方式:由按钮区渲染 badg 提示。
|
||||
wallet = wallet || {};
|
||||
var defaultMethod = text(methods[0].id || "balance");
|
||||
|
||||
// 支付方式选择行(Zibll zibpay_get_initiate_pay_input 同构:
|
||||
// 支付方式选择行(与余额充值/购买积分弹窗同构:
|
||||
// .payment-method-radio.hollow-radio + logo 图 + data-for 选中模型;
|
||||
// 与余额充值/购买积分弹窗完全一致的组件)。
|
||||
if (methods.length > 1) {
|
||||
@@ -163,7 +163,7 @@
|
||||
append(parent, row);
|
||||
}
|
||||
|
||||
// 我的余额盒(Zibll user_balance_box 同构:选中余额渠道时显示)。
|
||||
// 我的余额盒(选中余额渠道时显示)。
|
||||
if (methods.some(function (m) { return text(m.id) === "balance"; })) {
|
||||
var balanceBox = node("div", "mb10 muted-box padding-h10");
|
||||
balanceBox.setAttribute("data-controller", "payment_method");
|
||||
@@ -180,7 +180,7 @@
|
||||
append(parent, balanceBox);
|
||||
}
|
||||
|
||||
// 卡密盒(Zibll password_box 同构:mb10 padding-h10 padding-w6 +
|
||||
// 卡密盒(mb10 padding-h10 padding-w6 +
|
||||
// data-controller="payment_method" 契约 + form-control 输入)。
|
||||
if (cardPass) {
|
||||
var box = node("div", "mb10 padding-h10 padding-w6");
|
||||
@@ -372,7 +372,7 @@
|
||||
modal.setAttribute("data-jio-vip-modal", "");
|
||||
if (view.version && view.version.catalog) modal.setAttribute("data-jio-vip-version", view.version.catalog);
|
||||
|
||||
// 关闭按钮(Zibll 原版内联 SVG close 图标)。
|
||||
// 关闭按钮(内联 SVG close 图标)。
|
||||
var close = document.createElement("button");
|
||||
close.type = "button";
|
||||
close.className = "close";
|
||||
@@ -388,7 +388,7 @@
|
||||
close.appendChild(closeSvg);
|
||||
append(modal, close);
|
||||
|
||||
// 用户信息(Zibll:list-inline user-box)。
|
||||
// 用户信息(list-inline user-box)。
|
||||
var userBox = node("ul", "list-inline user-box");
|
||||
var avatarItem = node("li");
|
||||
var avatarWrap = node("div", "avatar-img");
|
||||
@@ -412,7 +412,7 @@
|
||||
append(userBox, userInfo);
|
||||
append(modal, userBox);
|
||||
|
||||
// 会员缩略卡 tabs(Zibll vip-cardminis:vip-card.vip-cardmini + active-icon 勾)。
|
||||
// 会员缩略卡 tabs(vip-cardminis:vip-card.vip-cardmini + active-icon 勾)。
|
||||
var tabs = node("ul", "flex jsb mt10 mb20 vip-cardminis gutters-5");
|
||||
var content = node("div", "tab-content mt10");
|
||||
var activeIndex = -1;
|
||||
@@ -455,7 +455,7 @@
|
||||
append(tabItem, activeIcon);
|
||||
append(tabs, tabItem);
|
||||
|
||||
// pane(Zibll tab-pane fade active in)。
|
||||
// pane(tab-pane fade active in)。
|
||||
var pane = node("div", "tab-pane fade jio-vip-pane" + (active ? " active in" : ""));
|
||||
pane.id = tabId;
|
||||
pane.hidden = !active;
|
||||
@@ -463,7 +463,7 @@
|
||||
form.setAttribute("onsubmit", "return false;");
|
||||
var row = node("div", "pay-vip-form-row");
|
||||
|
||||
// 左侧会员信息(Zibll zibpay_get_pay_vip_info_box)。
|
||||
// 会员信息卡(v-info 区块)。
|
||||
var info = node("div", "text-center pay-vip-info");
|
||||
var iconbox = node("div", "v-iconbox mb10 flex jc gap10");
|
||||
var vicon = node("div", "v-icon flex jc");
|
||||
@@ -487,7 +487,7 @@
|
||||
renderProducts(products, group.items, wallet.mark);
|
||||
var points = catalog.points_exchange || {};
|
||||
if (allowed.points_exchange !== false && points.enabled && Array.isArray(points.packages) && points.packages.length) {
|
||||
// 参考主题 zibpay_get_pay_uservip_modal 的积分兑换入口:
|
||||
// 积分兑换入口:
|
||||
// btn-block but mb10 padding-lg c-green mini-radius + points-color 图标 +
|
||||
// fa-angle-right;点击开服务端静态兑换弹窗(不再跳转用户中心)。
|
||||
var pointsLink = node("a", "btn-block but mb10 padding-lg c-green mini-radius");
|
||||
@@ -508,9 +508,8 @@
|
||||
var noMethod = methods.length === 0;
|
||||
var reason = actionReason(reasons[actionName]);
|
||||
var canPurchase = actionAllowed && !noMethod;
|
||||
// 按钮字样对齐参考主题:会员弹窗即 zibpay_get_initiate_pay_input(4)
|
||||
// 默认文案「立即支付」(开通/续费场景一致);无可用支付方式时渲染
|
||||
// Zibll 同款 badg 提示,而非禁用按钮。
|
||||
// 按钮字样对齐会员弹窗默认文案「立即支付」(开通/续费场景一致);无可用支付方式时渲染
|
||||
// badg 提示,而非禁用按钮。
|
||||
if (noMethod) {
|
||||
append(products, node("span", "badg px12 c-yellow-2", "暂时无法支付,请与客服联系"));
|
||||
} else {
|
||||
|
||||
+16
-16
@@ -3703,11 +3703,11 @@ _win.bd.on('click', '.single-pay-tabbar', function () {
|
||||
/**wp-ajax-action */
|
||||
_win.bd.on('submit', '[ajax-submit]', function () {
|
||||
var _this = jQuery(this);
|
||||
var but = _this.attr('ajax-submit') || '.wp-ajax-submit,[zibajax="submit"]';
|
||||
var but = _this.attr('ajax-submit') || '.wp-ajax-submit';
|
||||
return _this.find(but).click(), !1;
|
||||
});
|
||||
|
||||
_win.bd.on('click', '.wp-ajax-submit,[zibajax="submit"]', function () {
|
||||
_win.bd.on('click', '.wp-ajax-submit', function () {
|
||||
var _this = jQuery(this);
|
||||
var confirm_text = _this.attr('data-confirm');
|
||||
if (confirm_text && !confirm(confirm_text)) {
|
||||
@@ -3776,7 +3776,7 @@ function jio_ajax(_this, data, success, noty, no_loading) {
|
||||
notyf(n.msg, ys);
|
||||
}
|
||||
|
||||
_this.attr('disabled', false).html(_text).trigger('zib_ajax.success', n); //完成
|
||||
_this.attr('disabled', false).html(_text).trigger('jio_ajax.success', n); //完成
|
||||
jQuery.isFunction(success) && success(n, _this, data);
|
||||
|
||||
if (n.hide_modal) {
|
||||
@@ -3795,7 +3795,7 @@ function jio_ajax(_this, data, success, noty, no_loading) {
|
||||
}
|
||||
|
||||
//AJAX执行完成后自动切换到下一个tab
|
||||
_win.bd.on('zib_ajax.success', '[next-tab]', function (e, n) {
|
||||
_win.bd.on('jio_ajax.success', '[next-tab]', function (e, n) {
|
||||
var _next = jQuery(this).attr('next-tab');
|
||||
if (_next && n && !n.error) {
|
||||
jQuery('a[href="#' + _next + '"]').tab('show');
|
||||
@@ -3940,14 +3940,14 @@ function partners_scroll_init() {
|
||||
* 然后让 CSS 动画精确按照"一组宽度"进行位移,达成无缝无断层循环
|
||||
*/
|
||||
function init(widget) {
|
||||
if (!widget || widget.dataset.zpsReady === '1') return;
|
||||
var speed = parseFloat(widget.style.getPropertyValue('--zps-speed')) || 3;
|
||||
var rows = widget.querySelectorAll('[data-zps-row]');
|
||||
if (!widget || widget.dataset.jpsReady === '1') return;
|
||||
var speed = parseFloat(widget.style.getPropertyValue('--jps-speed')) || 3;
|
||||
var rows = widget.querySelectorAll('[data-jps-row]');
|
||||
|
||||
rows.forEach(function (row) {
|
||||
var track = row.querySelector('[data-zps-track]');
|
||||
var track = row.querySelector('[data-jps-track]');
|
||||
if (!track) return;
|
||||
var seed = track.querySelector('.zps-group');
|
||||
var seed = track.querySelector('.jps-group');
|
||||
if (!seed) return;
|
||||
|
||||
/**
|
||||
@@ -3956,7 +3956,7 @@ function partners_scroll_init() {
|
||||
*/
|
||||
var setup = function () {
|
||||
//先移除之前克隆的额外 group,保留最原始的那一组作为基准
|
||||
var extras = track.querySelectorAll('.zps-group.zps-clone');
|
||||
var extras = track.querySelectorAll('.jps-group.jps-clone');
|
||||
extras.forEach(function (el) {
|
||||
el.remove();
|
||||
});
|
||||
@@ -3974,21 +3974,21 @@ function partners_scroll_init() {
|
||||
//克隆到目标数量(当前只有 1 份种子 group,需要再克隆 copies - 1 份)
|
||||
for (var i = 1; i < copies; i++) {
|
||||
var clone = seed.cloneNode(true);
|
||||
clone.classList.add('zps-clone');
|
||||
clone.classList.add('jps-clone');
|
||||
clone.setAttribute('aria-hidden', 'true');
|
||||
track.appendChild(clone);
|
||||
}
|
||||
|
||||
//精确位移:每次循环移动"一组宽度",保证内容完美对齐
|
||||
track.style.setProperty('--zps-shift', '-' + groupWidth + 'px');
|
||||
track.style.setProperty('--jps-shift', '-' + groupWidth + 'px');
|
||||
|
||||
//按"每 100px 所需秒数"计算动画时长,让视觉滚动速度与卡片数量无关
|
||||
var duration = (groupWidth / 100) * speed;
|
||||
if (duration < 4) duration = 4;
|
||||
track.style.setProperty('--zps-duration', duration.toFixed(2) + 's');
|
||||
track.style.setProperty('--jps-duration', duration.toFixed(2) + 's');
|
||||
|
||||
//显示出来(避免闪烁)
|
||||
track.setAttribute('data-zps-ready', '1');
|
||||
track.setAttribute('data-jps-ready', '1');
|
||||
};
|
||||
|
||||
//初次执行
|
||||
@@ -4016,11 +4016,11 @@ function partners_scroll_init() {
|
||||
});
|
||||
});
|
||||
|
||||
widget.dataset.zpsReady = '1';
|
||||
widget.dataset.jpsReady = '1';
|
||||
}
|
||||
|
||||
function initAll() {
|
||||
document.querySelectorAll('.zib-partners-scroll').forEach(init);
|
||||
document.querySelectorAll('.jio-partners-scroll').forEach(init);
|
||||
}
|
||||
|
||||
initAll();
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
(function($,window2,document2){"use strict";function closeNotyf($element){$element.addClass("notyn-out"),window2.setTimeout(function(){$element.remove()},1e3)}function notyf2(message,type,time,id){var $body=jQuery(document2.body);jQuery(".notyn").length||$body.append('<div class="notyn"></div>'),type=type||"success",type==="error"&&(type="danger"),time=time||5e3,time=time<100?time*1e3:time;var idAttribute=id?' id="'+id+'"':"",$notification=jQuery('<div class="noty1"'+idAttribute+'><div class="notyf '+type+'">'+message+"</div></div>"),shouldClose=!id;id&&jQuery("#"+id).length?(jQuery("#"+id).find(".notyf").removeClass().addClass("notyf "+type).html(message),$notification=jQuery("#"+id),shouldClose=!0):jQuery(".notyn").append($notification),shouldClose&&window2.setTimeout(function(){closeNotyf($notification)},time)}jQuery(document2.body).on("click",".noty1",function(){closeNotyf(jQuery(this))}),window2.notyf=notyf2})(jQuery,window,document),(function(window2){"use strict";var allowedKinds={identity:!0,badges:!0,orders:!0,vip:!0},allowedEvents={click:!0,shell:!0,"first-content":!0,ready:!0,"action-start":!0,"action-end":!0,unauthorized:!0,error:!0},sessions=Object.create(null),sequence=0,maxSessions=100;function normalize(value,fallback){var normalized=String(value||fallback||"").toLowerCase().replace(/[^a-z0-9-]/g,"");return normalized||fallback}function now(){return window2.performance&&typeof window2.performance.now=="function"?window2.performance.now():0}function markName(session,event){return"jio-modal-"+session.kind+"-"+session.id+"-"+event}function emit(session,event){if(!(!window2.performance||typeof window2.performance.mark!="function")){var name=markName(session,event);if(window2.performance.mark(name),session.marks[event]=name,typeof window2.performance.measure=="function"&&session.marks.click&&event!=="click")try{window2.performance.measure("jio-modal-"+session.kind+"-"+session.id+"-click-to-"+event,session.marks.click,name)}catch{}}}function start(kind){var safeKind=normalize(kind,"unknown");allowedKinds[safeKind]||(safeKind="unknown"),sequence+=1;var id=String(sequence),session={id,kind:safeKind,startedAt:now(),marks:Object.create(null)};sessions[id]=session,emit(session,"click");for(var ids=Object.keys(sessions);ids.length>maxSessions;)delete sessions[ids.shift()];return id}function mark(id,event){var session=sessions[String(id||"")],safeEvent=normalize(event,"error");!session||!allowedEvents[safeEvent]||emit(session,safeEvent)}function finish(id){mark(id,"ready")}function fail(id){mark(id,"error")}window2.JioModalTelemetry={start,mark,finish,error:fail}})(window),(function(window2){"use strict";function data(){return window2.jioData||window2.jio||{}}function createIdempotencyKey(){if(window2.crypto&&typeof window2.crypto.randomUUID=="function")return window2.crypto.randomUUID();if(!window2.crypto||typeof window2.crypto.getRandomValues!="function")throw new Error("当前浏览器无法生成安全的操作标识");var bytes=new Uint8Array(16);window2.crypto.getRandomValues(bytes),bytes[6]=bytes[6]&15|64,bytes[8]=bytes[8]&63|128;var hex=Array.prototype.map.call(bytes,function(value){return value.toString(16).padStart(2,"0")}).join("");return hex.slice(0,8)+"-"+hex.slice(8,12)+"-"+hex.slice(12,16)+"-"+hex.slice(16,20)+"-"+hex.slice(20)}function restBase(){var config=data(),raw=config.restUrl||config.apiUrl||config.rest_url||"",siteUrl=config.siteUrl||config.homeUrl||window2.location.origin+"/";return window2.location.protocol==="https:"&&siteUrl.substring(0,5)==="http:"&&(siteUrl="https:"+siteUrl.substring(5)),raw?String(raw).replace(/\/$/,""):String(siteUrl).replace(/\/$/,"")+"/index.php?rest_route=/jio/v1"}function appendQuery(url2,query){if(!query)return url2;var parts=[];return typeof query=="string"?parts=query.replace(/^\?/,"").split("&").filter(Boolean):typeof query=="object"&&Object.keys(query).forEach(function(key){query[key]===void 0||query[key]===null||parts.push(encodeURIComponent(key)+"="+encodeURIComponent(String(query[key])))}),parts.length?url2+(url2.indexOf("?")>=0?"&":"?")+parts.join("&"):url2}function url(path,query){path=String(path||"");var inlineQuery="",queryIndex=path.indexOf("?");if(queryIndex>=0&&(inlineQuery=path.slice(queryIndex+1),path=path.slice(0,queryIndex)),/^https?:\/\//i.test(path))return appendQuery(path,query||inlineQuery);path.charAt(0)!=="/"&&(path="/"+path);var base=restBase(),result=(base.indexOf("rest_route=")>=0,base+path);return appendQuery(result,query||inlineQuery)}function headers(options){var config=data(),source=options&&options.headers||{},result={},nonce=config.restNonce||config.nonce||"";return Object.keys(source).forEach(function(key){result[key]=source[key]}),result.Accept||(result.Accept="application/json, text/html;q=0.9, */*;q=0.8"),nonce&&!result["X-WP-Nonce"]&&(result["X-WP-Nonce"]=nonce),options&&options.body!==void 0&&options.body!==null&&!(window2.FormData&&options.body instanceof window2.FormData)&&!result["Content-Type"]&&(result["CoLine truncated
|
||||
(function($,window2,document2){"use strict";function closeNotyf($element){$element.addClass("notyn-out"),window2.setTimeout(function(){$element.remove()},1e3)}function notyf2(message,type,time,id){var $body=jQuery(document2.body);jQuery(".notyn").length||$body.append('<div class="notyn"></div>'),type=type||"success",type==="error"&&(type="danger"),time=time||5e3,time=time<100?time*1e3:time;var idAttribute=id?' id="'+id+'"':"",$notification=jQuery('<div class="noty1"'+idAttribute+'><div class="notyf '+type+'">'+message+"</div></div>"),shouldClose=!id;id&&jQuery("#"+id).length?(jQuery("#"+id).find(".notyf").removeClass().addClass("notyf "+type).html(message),$notification=jQuery("#"+id),shouldClose=!0):jQuery(".notyn").append($notification),shouldClose&&window2.setTimeout(function(){closeNotyf($notification)},time)}jQuery(document2.body).on("click",".noty1",function(){closeNotyf(jQuery(this))}),window2.notyf=notyf2})(jQuery,window,document),(function(window2){"use strict";var allowedKinds={identity:!0,badges:!0,orders:!0,vip:!0},allowedEvents={click:!0,shell:!0,"first-content":!0,ready:!0,"action-start":!0,"action-end":!0,unauthorized:!0,error:!0},sessions=Object.create(null),sequence=0,maxSessions=100;function normalize(value,fallback){var normalized=String(value||fallback||"").toLowerCase().replace(/[^a-z0-9-]/g,"");return normalized||fallback}function now(){return window2.performance&&typeof window2.performance.now=="function"?window2.performance.now():0}function markName(session,event){return"jio-modal-"+session.kind+"-"+session.id+"-"+event}function emit(session,event){if(!(!window2.performance||typeof window2.performance.mark!="function")){var name=markName(session,event);if(window2.performance.mark(name),session.marks[event]=name,typeof window2.performance.measure=="function"&&session.marks.click&&event!=="click")try{window2.performance.measure("jio-modal-"+session.kind+"-"+session.id+"-click-to-"+event,session.marks.click,name)}catch{}}}function start(kind){var safeKind=normalize(kind,"unknown");allowedKinds[safeKind]||(safeKind="unknown"),sequence+=1;var id=String(sequence),session={id,kind:safeKind,startedAt:now(),marks:Object.create(null)};sessions[id]=session,emit(session,"click");for(var ids=Object.keys(sessions);ids.length>maxSessions;)delete sessions[ids.shift()];return id}function mark(id,event){var session=sessions[String(id||"")],safeEvent=normalize(event,"error");!session||!allowedEvents[safeEvent]||emit(session,safeEvent)}function finish(id){mark(id,"ready")}function fail(id){mark(id,"error")}window2.JioModalTelemetry={start,mark,finish,error:fail}})(window),(function(window2){"use strict";function data(){return window2.jioData||window2.jio||{}}function createIdempotencyKey(){if(window2.crypto&&typeof window2.crypto.randomUUID=="function")return window2.crypto.randomUUID();if(!window2.crypto||typeof window2.crypto.getRandomValues!="function")throw new Error("当前浏览器无法生成安全的操作标识");var bytes=new Uint8Array(16);window2.crypto.getRandomValues(bytes),bytes[6]=bytes[6]&15|64,bytes[8]=bytes[8]&63|128;var hex=Array.prototype.map.call(bytes,function(value){return value.toString(16).padStart(2,"0")}).join("");return hex.slice(0,8)+"-"+hex.slice(8,12)+"-"+hex.slice(12,16)+"-"+hex.slice(16,20)+"-"+hex.slice(20)}function restBase(){var config=data(),raw=config.restUrl||config.apiUrl||config.rest_url||"",siteUrl=config.siteUrl||config.homeUrl||window2.location.origin+"/";return window2.location.protocol==="https:"&&siteUrl.substring(0,5)==="http:"&&(siteUrl="https:"+siteUrl.substring(5)),raw?String(raw).replace(/\/$/,""):String(siteUrl).replace(/\/$/,"")+"/index.php?rest_route=/jio/v1"}function appendQuery(url2,query){if(!query)return url2;var parts=[];return typeof query=="string"?parts=query.replace(/^\?/,"").split("&").filter(Boolean):typeof query=="object"&&Object.keys(query).forEach(function(key){query[key]===void 0||query[key]===null||parts.push(encodeURIComponent(key)+"="+encodeURIComponent(String(query[key])))}),parts.length?url2+(url2.indexOf("?")>=0?"&":"?")+parts.join("&"):url2}function url(path,query){path=String(path||"");var inlineQuery="",queryIndex=path.indexOf("?");if(queryIndex>=0&&(inlineQuery=path.slice(queryIndex+1),path=path.slice(0,queryIndex)),/^https?:\/\//i.test(path))return appendQuery(path,query||inlineQuery);path.charAt(0)!=="/"&&(path="/"+path);var base=restBase(),result=(base.indexOf("rest_route=")>=0,base+path);return appendQuery(result,query||inlineQuery)}function headers(options){var config=data(),source=options&&options.headers||{},result={},nonce=config.restNonce||config.nonce||"";return Object.keys(source).forEach(function(key){result[key]=source[key]}),result.Accept||(result.Accept="application/json, text/html;q=0.9, */*;q=0.8"),nonce&&!result["X-WP-Nonce"]&&(result["X-WP-Nonce"]=nonce),options&&options.body!==void 0&&options.body!==null&&!(window2.FormData&&options.body instanceof window2.FormData)&&!result["Content-Type"]&&(result["CoLine truncated
|
||||
@@ -82,7 +82,7 @@
|
||||
box.appendChild(titleBody);
|
||||
}
|
||||
var widget = document.createElement('div');
|
||||
widget.className = 'zib-widget';
|
||||
widget.className = 'jio-widget-box';
|
||||
var nav = document.createElement('div');
|
||||
nav.className = 'posts-nav-lists scroll-y mini-scrollbar list-unstyled';
|
||||
var list = document.createElement('ul');
|
||||
|
||||
+21
-21
@@ -1,20 +1,20 @@
|
||||
/**
|
||||
* Jio User Ban — 前台“禁封/解封用户”弹窗
|
||||
*
|
||||
* 1:1 复刻参考主题 Zibll 前台禁封能力:
|
||||
* - zib_get_edit_user_ban_link → [data-jio-ban] 委托入口(三点菜单内)
|
||||
* - zib_get_set_user_ban_modal → REST /user-ban/modal 拉取弹窗内容
|
||||
* - zib_ajax_set_user_ban → REST /user-ban/set 提交
|
||||
* - zib_get_ban_info_modal → [data-jio-ban-info](查看禁封状态)
|
||||
* - zib_get_user_ban_appeal_modal → [data-jio-ban-appeal](禁封申诉)
|
||||
* - zib_get_ban_log_modal → [data-jio-ban-log](禁封记录)
|
||||
* - zib_user_ban_appeal(wp-ajax) → admin-ajax jio_ban_appeal_submit 提交
|
||||
* 前台用户禁封能力:
|
||||
* - 编辑禁封链接 → [data-jio-ban] 委托入口(三点菜单内)
|
||||
* - 禁封弹窗内容 → REST /user-ban/modal 拉取
|
||||
* - 禁封提交 → REST /user-ban/set
|
||||
* - 查看禁封状态弹窗 → [data-jio-ban-info]
|
||||
* - 禁封申诉弹窗 → [data-jio-ban-appeal]
|
||||
* - 禁封记录弹窗 → [data-jio-ban-log]
|
||||
* - 禁封申诉提交 → admin-ajax jio_ban_appeal_submit
|
||||
*
|
||||
* 弹窗经 JioModalRuntime.openRemote 打开(与参考主题 refresh_modal 每次刷新
|
||||
* 同语义):桌面 600px 宽(参考主题未传 data-class → Bootstrap .modal-dialog
|
||||
* 弹窗经 JioModalRuntime.openRemote 打开(每次刷新同语义):桌面 600px 宽
|
||||
* (未传 data-class → Bootstrap .modal-dialog
|
||||
* 默认宽 600px)/ min-height 360px(data-height=360 → .modal-content 初始高度),
|
||||
* 移动端底部抽屉(mobileBottom)。提交成功语义与参考主题 zib_ajax_set_user_ban
|
||||
* 返回值一致:禁封 → reload:true(整页刷新),解封 → hide_modal:true(仅关闭弹窗)。
|
||||
* 移动端底部抽屉(mobileBottom)。提交成功语义:
|
||||
* 禁封 → reload:true(整页刷新),解封 → hide_modal:true(仅关闭弹窗)。
|
||||
*
|
||||
* @package Jio
|
||||
*/
|
||||
@@ -33,7 +33,7 @@
|
||||
|| '/wp-admin/admin-ajax.php';
|
||||
|
||||
var MODAL_HEIGHT = 360;
|
||||
// 参考主题 data_class='modal-mini' + data-height=240:400px 宽、初始高 240。
|
||||
// data_class='modal-mini' + data-height=240:400px 宽、初始高 240。
|
||||
var MINI_MODAL_HEIGHT = 240;
|
||||
|
||||
function ajaxUrl() {
|
||||
@@ -64,7 +64,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
// 查看禁封状态弹窗(参考主题 zib_get_ban_info_modal / user_ban_info_modal)。
|
||||
// 查看禁封状态弹窗。
|
||||
function openInfoModal(userId) {
|
||||
openRemoteModal({
|
||||
url: API_ROOT + '/user-ban/info-modal',
|
||||
@@ -78,7 +78,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
// 禁封申诉弹窗(参考主题 zib_get_user_ban_appeal_modal;表单走 admin-ajax)。
|
||||
// 禁封申诉弹窗(表单走 admin-ajax)。
|
||||
function openAppealModal(userId) {
|
||||
openRemoteModal({
|
||||
url: API_ROOT + '/user-ban/appeal-modal',
|
||||
@@ -95,7 +95,7 @@
|
||||
});
|
||||
}
|
||||
|
||||
// 禁封记录弹窗(参考主题 zib_get_ban_log_modal)。
|
||||
// 禁封记录弹窗。
|
||||
function openLogModal(userId) {
|
||||
openRemoteModal({
|
||||
url: API_ROOT + '/user-ban/log-modal',
|
||||
@@ -114,7 +114,7 @@
|
||||
if (!form || form.dataset.jioAppealBound === '1') return;
|
||||
form.dataset.jioAppealBound = '1';
|
||||
// autoHeight 仅对显式声明 autoHeight/maxHeight 的文本框生效:
|
||||
// 申诉说明框(1:1 参考主题)为 rows=3 自然高度 + 容器滚动,
|
||||
// 申诉说明框为 rows=3 自然高度 + 容器滚动,
|
||||
// 无 maxHeight 时执行 grow 会被压成 0px。
|
||||
Array.prototype.forEach.call(
|
||||
form.querySelectorAll('textarea[autoHeight], textarea[maxHeight]'),
|
||||
@@ -219,7 +219,7 @@
|
||||
.then(function (result) {
|
||||
if (result && result.success) {
|
||||
notyf(result.message || '操作成功', 'success');
|
||||
// 参考主题 zib_ajax_set_user_ban 返回值语义:
|
||||
// 提交返回值语义:
|
||||
// 禁封 → reload:true(整页刷新,入口按钮状态随页面重渲染);
|
||||
// 解封 → hide_modal:true(仅关闭弹窗)。
|
||||
if (window.JioModalRuntime && typeof window.JioModalRuntime.close === 'function') {
|
||||
@@ -242,9 +242,9 @@
|
||||
}
|
||||
|
||||
function bindAutoHeight(textarea) {
|
||||
// 1:1 复刻参考主题 textarea[autoHeight] 行为(input/focus 触发):
|
||||
// textarea[autoHeight] 行为(input/focus 触发):
|
||||
// 高度 = scrollHeight + 上下边框;超过 maxHeight 属性则锁定 maxHeight 并
|
||||
// 打开自身滚动条(参考主题 main.js autoHeight 同语义)。
|
||||
// 打开自身滚动条(main.js autoHeight 同语义)。
|
||||
if (!textarea || textarea.dataset.jioAutoHeight === '1') return;
|
||||
textarea.dataset.jioAutoHeight = '1';
|
||||
var grow = function () {
|
||||
@@ -291,7 +291,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* 收起封面三点菜单面板(参考主题 author_header_drop_lists 菜单项点击后
|
||||
* 收起封面三点菜单面板(作者头部下拉菜单项点击后
|
||||
* 不自动收起,需手动关闭;评论区与文章作者下拉由各自脚本点击项后自动收起)。
|
||||
*/
|
||||
function closeCoverMenu(trigger) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* Sidebar toolbar: per-area export / import / template import (zibll WIE flow). */
|
||||
/* Sidebar toolbar: per-area export / import / template import. */
|
||||
(function ($) {
|
||||
'use strict';
|
||||
|
||||
|
||||
+13
-13
@@ -55,18 +55,18 @@
|
||||
.jio-widget-quote .yiyan .en { font-size: .9em; opacity: .8; }
|
||||
.jio-widget-quote.is-loading { opacity: .65; }
|
||||
|
||||
/* The Jio base stylesheet already carries Zibll's icon-card and utility rules.
|
||||
/* The Jio base stylesheet already carries the icon-card and utility rules.
|
||||
* Restore the one renamed primitive used verbatim by these two widget renderers. */
|
||||
.zib-widget { clear:both; margin-bottom:20px; padding:15px; border-radius:var(--main-radius,8px); background:var(--main-bg-color,#fff); box-shadow:0 0 10px var(--main-shadow,rgba(116,116,116,.08)); }
|
||||
.zib-widget.padding-10 { padding:10px; }
|
||||
.zib-widget.nobottom.notop { padding-top:0; padding-bottom:0; }
|
||||
.zib-widget.posts-mini-lists { padding:5px; }
|
||||
.zib-widget.posts-mini-lists .relative > .tab-nav-theme ~ .scroll-x-prev,
|
||||
.zib-widget.posts-mini-lists .relative > .tab-nav-theme ~ .scroll-x-next { top:10px; }
|
||||
.jio-widget-box { clear:both; margin-bottom:20px; padding:15px; border-radius:var(--main-radius,8px); background:var(--main-bg-color,#fff); box-shadow:0 0 10px var(--main-shadow,rgba(116,116,116,.08)); }
|
||||
.jio-widget-box.padding-10 { padding:10px; }
|
||||
.jio-widget-box.nobottom.notop { padding-top:0; padding-bottom:0; }
|
||||
.jio-widget-box.posts-mini-lists { padding:5px; }
|
||||
.jio-widget-box.posts-mini-lists .relative > .tab-nav-theme ~ .scroll-x-prev,
|
||||
.jio-widget-box.posts-mini-lists .relative > .tab-nav-theme ~ .scroll-x-next { top:10px; }
|
||||
|
||||
.zib-widget-wrap { padding:var(--jio-widget-space-top,0) var(--jio-widget-space-right,0) var(--jio-widget-space-bottom,0) var(--jio-widget-space-left,0); background-color:var(--jio-widget-bg-light,transparent); background-image:var(--jio-widget-bg-image-light,none); background-position:center; background-size:cover; }
|
||||
.dark-theme .zib-widget-wrap, [data-theme="dark"] .zib-widget-wrap { background-color:var(--jio-widget-bg-dark,var(--jio-widget-bg-light,transparent)); background-image:var(--jio-widget-bg-image-dark,var(--jio-widget-bg-image-light,none)); }
|
||||
.zib-widget-wrap .widget-container { position:relative; }
|
||||
.jio-widget-box-wrap { padding:var(--jio-widget-space-top,0) var(--jio-widget-space-right,0) var(--jio-widget-space-bottom,0) var(--jio-widget-space-left,0); background-color:var(--jio-widget-bg-light,transparent); background-image:var(--jio-widget-bg-image-light,none); background-position:center; background-size:cover; }
|
||||
.dark-theme .jio-widget-box-wrap, [data-theme="dark"] .jio-widget-box-wrap { background-color:var(--jio-widget-bg-dark,var(--jio-widget-bg-light,transparent)); background-image:var(--jio-widget-bg-image-dark,var(--jio-widget-bg-image-light,none)); }
|
||||
.jio-widget-box-wrap .widget-container { position:relative; }
|
||||
.jio-user-widget-wrap :where(a, button, input, select, textarea, [tabindex]):focus-visible,
|
||||
.jio-tab-posts-wrap :where(a, button, input, select, textarea, [tabindex]):focus-visible,
|
||||
.jio-posts-wrap :where(a, button, input, select, textarea, [tabindex]):focus-visible { outline:3px solid var(--focus-color,#ff5473) !important; outline-offset:3px; }
|
||||
@@ -74,12 +74,12 @@
|
||||
.dark-theme .jio-posts-wrap :where(a, button, input, select, textarea, [tabindex]):focus-visible,
|
||||
[data-theme="dark"] :is(.jio-user-widget-wrap, .jio-tab-posts-wrap, .jio-posts-wrap) :where(a, button, input, select, textarea, [tabindex]):focus-visible { outline-color:#ffd166 !important; }
|
||||
|
||||
.user-card.zib-widget { padding:0; overflow:hidden; }
|
||||
.user-card.jio-widget-box { padding:0; overflow:hidden; }
|
||||
.user-card.widget .user-info > .text-center > p:not(.muted-color) { white-space:nowrap; }
|
||||
.user-card.widget .user-info > .text-center > p:not(.muted-color) .but { white-space:nowrap; }
|
||||
|
||||
@media (max-width:767px) {
|
||||
.zib-widget-wrap { padding:var(--jio-widget-space-m-top,0) var(--jio-widget-space-m-right,0) var(--jio-widget-space-m-bottom,0) var(--jio-widget-space-m-left,0); }
|
||||
.jio-widget-box-wrap { padding:var(--jio-widget-space-m-top,0) var(--jio-widget-space-m-right,0) var(--jio-widget-space-m-bottom,0) var(--jio-widget-space-m-left,0); }
|
||||
}
|
||||
|
||||
.jio-widget-video { position: relative; overflow: hidden; border-radius: var(--jio-widget-radius); background: #000; aspect-ratio: 16 / 9; }
|
||||
@@ -155,7 +155,7 @@
|
||||
}
|
||||
.jio-widget--animate { animation: jio-widget-fade .55s both; }.jio-widget--animate-slideup { animation-name: jio-widget-slideup; }.jio-widget--animate-slidedown { animation-name: jio-widget-slidedown; }.jio-widget--animate-slideright { animation-name: jio-widget-slideright; }.jio-widget--animate-slideleft { animation-name: jio-widget-slideleft; }.jio-widget--animate-zoomin { animation-name: jio-widget-zoomin; }.jio-widget--animate-zoomout { animation-name: jio-widget-zoomout; }.jio-widget--animate-repeat { animation-iteration-count: infinite; animation-duration: 2s; }
|
||||
|
||||
/* Zibll modern widget contracts */
|
||||
/* Modern widget contracts */
|
||||
.widget-tab-post .tab-content > .tab-pane { display: none; }
|
||||
.widget-tab-post .tab-content > .tab-pane.active { display: block; }
|
||||
.widget-tab-post, .term-aggregation { line-height:1.42857143; }
|
||||
|
||||
@@ -333,10 +333,10 @@
|
||||
}
|
||||
|
||||
/* 幻灯片加图文视频卡片:以左侧幻灯片实际高度重算右侧卡片比例。
|
||||
* 合作伙伴滚动由运行时 main.js 初始化(.zib-partners-scroll 唯一所有者)。 */
|
||||
* 合作伙伴滚动由运行时 main.js 初始化(.jio-partners-scroll 唯一所有者)。 */
|
||||
function measureSliderGraphic(widget) {
|
||||
if (once(widget, 'Combo')) return;
|
||||
var slider = widget.querySelector('.slider-col .zib-slider') || widget.querySelector('.slider-col');
|
||||
var slider = widget.querySelector('.slider-col .jio-slider-box') || widget.querySelector('.slider-col');
|
||||
var covers = widget.querySelector('.cover-col');
|
||||
if (!slider || !covers) return;
|
||||
var row = Number(widget.dataset.row || 2);
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
/**
|
||||
* Comment sprite icons — <use> references into the runtime svg-icon sprite.
|
||||
*
|
||||
* Mirrors zib_get_svg() from the reference comments module. Symbol
|
||||
* definitions are injected by assets/js/runtime/svg-icon.js, which the
|
||||
* vendor runtime lazy-loads on every page (main.js: tbquire(['svg-icon'])).
|
||||
* Symbol definitions are injected by assets/js/runtime/svg-icon.js, which the
|
||||
* runtime lazy-loads on every page (main.js: tbquire(['svg-icon'])).
|
||||
*
|
||||
* @package Jio
|
||||
*/
|
||||
@@ -13,13 +12,13 @@ defined('ABSPATH') || exit;
|
||||
|
||||
if (!function_exists('jio_get_comment_icon')) :
|
||||
/**
|
||||
* Sprite-referenced SVG icon (legacy: zib_get_svg).
|
||||
* Sprite-referenced SVG icon.
|
||||
*
|
||||
* @param string $name Sprite key (like / topping / approve / menu_2 / signup).
|
||||
* @param string $class Classes for the svg element.
|
||||
* @return string
|
||||
*/
|
||||
function jio_get_comment_icon(string $name, string $class = 'icon'): string {
|
||||
return jio_icon_markup('zibsvg-' . $name, $class);
|
||||
return jio_icon_markup('jiosvg-' . $name, $class);
|
||||
}
|
||||
endif;
|
||||
@@ -163,7 +163,7 @@ if (!function_exists('jio_get_comment_report_html')) :
|
||||
if ($author_id > 0 && $author_id === $reporter_id) {
|
||||
return '';
|
||||
}
|
||||
// 已封禁/小黑屋用户不再显示举报入口(参考主题 zib_get_report_link 排除语义)。
|
||||
// 已封禁/小黑屋用户不再显示举报入口。
|
||||
if ($author_id > 0 && function_exists('jio_is_user_ban_restricted') && jio_is_user_ban_restricted($author_id)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ if (!function_exists('jio_homepage_get_latest_query')) {
|
||||
$query_args['category__not_in'] = $exclude_cat_ids;
|
||||
}
|
||||
|
||||
// legacy zib_sift_posts_per_orde:排序菜单的 ?orderby= 优先于后台默认排序。
|
||||
// 排序菜单的 ?orderby= 优先于后台默认排序。
|
||||
$request_sort = jio_homepage_get_request_sort();
|
||||
$query = new WP_Query(
|
||||
$request_sort !== ''
|
||||
|
||||
@@ -114,7 +114,7 @@ if (!function_exists('jio_header_slide_is_show')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Zibll only displays this component on the first archive page.
|
||||
// This component only displays on the first archive page.
|
||||
if ((int) $wp_query->get('paged') > 1) {
|
||||
return false;
|
||||
}
|
||||
@@ -441,9 +441,9 @@ if (!function_exists('jio_header_slide')) {
|
||||
$card_options = wp_parse_args((array) ($args['header_slider_card_option'] ?? []), [
|
||||
'icon_radius4' => false, 'show_widget_bg' => false, 'cards' => [],
|
||||
]);
|
||||
// legacy (Zibll): with module background the card shrinks to
|
||||
// padding-10 inside a .zib-widget wrapper (.jio-panel here); the
|
||||
// bg-less variant stretches each card in a .flex1 column.
|
||||
// With module background the card shrinks to padding-10 inside a
|
||||
// .jio-widget-box wrapper (.jio-panel here); the bg-less variant
|
||||
// stretches each card in a .flex1 column.
|
||||
$show_bg = !empty($card_options['show_widget_bg']);
|
||||
$items = '';
|
||||
foreach ((array) $card_options['cards'] as $card) {
|
||||
|
||||
@@ -71,7 +71,7 @@ if (!function_exists('jio_homepage_render_layout')) {
|
||||
|
||||
if (!function_exists('jio_homepage_get_tab_header_html')) {
|
||||
/**
|
||||
* legacy zib_index_tab_html:tab 导航 / 翻页标题条 / 空占位 三态。
|
||||
* 首页 tab 头:tab 导航 / 翻页标题条 / 空占位 三态。
|
||||
*
|
||||
* @param array<int, array<string, mixed>> $tab_configs Configured term tabs.
|
||||
*/
|
||||
@@ -108,7 +108,7 @@ if (!function_exists('jio_homepage_get_tab_header_html')) {
|
||||
|
||||
if (!function_exists('jio_homepage_get_tab_panes_html')) {
|
||||
/**
|
||||
* legacy zib_index_tab('content'):每个栏目的原位刷新 pane。
|
||||
* 每个栏目的原位刷新 pane。
|
||||
*
|
||||
* pane 本身就是 .ajaxpager;post_ajax_trigger 指向栏目页,post_ajax 加载后
|
||||
* 用栏目页自身的列表 DOM 原地替换 loader,不新建区域。
|
||||
|
||||
@@ -216,8 +216,8 @@ if (!function_exists('jio_archive_build_custom_filter_groups')) :
|
||||
/**
|
||||
* Build custom advanced-filter dimension groups.
|
||||
*
|
||||
* Reference: zib_get_option_custom_filter_but — one labeled chip group per
|
||||
* dimension; when a value is active an extra "all" chip prepends to clear it.
|
||||
* One labeled chip group per dimension; when a value is active an extra
|
||||
* "all" chip prepends to clear it.
|
||||
*
|
||||
* @param array<int,array<string,mixed>> $dimensions Dimension definitions (custom_filter settings).
|
||||
* @param mixed $keys 'all' or list of enabled dimension keys.
|
||||
|
||||
@@ -206,7 +206,7 @@ if (!function_exists('jio_archive_render_stream')) :
|
||||
<?php echo $args['filter_html']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
<?php if ($has_posts) : ?>
|
||||
<?php
|
||||
// legacy 契约:分页渲染在 .ajaxpager 内部(zib_paging 位置),
|
||||
// 分页渲染在 .ajaxpager 内部,
|
||||
// 首页更多栏目 tab 的 runtime post_ajax 依赖它提取下一页。
|
||||
ob_start();
|
||||
jio_render_pagination($query, [
|
||||
|
||||
@@ -424,8 +424,8 @@ if (!function_exists('jio_comments_render_form')) :
|
||||
if (!$is_logged_in) {
|
||||
jio_comments_render_signarea($ctx);
|
||||
} else {
|
||||
// 治理状态区分提示(参考主题 zib_get_user_ban_nocan_info 语义:
|
||||
// 禁封中/小黑屋/禁言显示状态徽章与查看入口,而非笼统的无权限文案)。
|
||||
// 治理状态区分提示:禁封中/小黑屋/禁言显示状态徽章与查看入口,
|
||||
// 而非笼统的无权限文案。
|
||||
$ban_nocan = function_exists('jio_get_user_ban_nocan_html')
|
||||
? jio_get_user_ban_nocan_html(get_current_user_id(), __('暂时无法发表评论', 'jio'))
|
||||
: '';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* 右侧悬浮按钮前台输出(结构对齐参考主题 zib_float_right())。
|
||||
* 右侧悬浮按钮前台输出。
|
||||
*
|
||||
* @package Jio
|
||||
*/
|
||||
@@ -221,7 +221,7 @@ if (!function_exists('jio_float_right')) :
|
||||
return;
|
||||
}
|
||||
|
||||
// 扩展点(对齐参考主题 zib_float_right filter):模块可注入自定义悬浮按钮。
|
||||
// 扩展点:模块可注入自定义悬浮按钮。
|
||||
$btn = (string) apply_filters('jio_float_right_buttons', $btn, $is_mobile);
|
||||
if ($btn === '') {
|
||||
return;
|
||||
|
||||
@@ -310,7 +310,7 @@ if (! function_exists('jio_cut_count')) :
|
||||
endif;
|
||||
if (! function_exists('jio_str_cut')) :
|
||||
/**
|
||||
* legacy parity: 按显示宽度截断标题(ASCII 记 1、CJK 记 2,zib_str_cut)。
|
||||
* 按显示宽度截断标题(ASCII 记 1、CJK 记 2)。
|
||||
*/
|
||||
function jio_str_cut(string $str, int $start = 0, int $width = 100, string $trimmarker = '...'): string {
|
||||
if ($str === '' || $width <= 0) {
|
||||
|
||||
@@ -39,10 +39,9 @@ endif;
|
||||
|
||||
if (!function_exists('jio_render_new_add_btns')) :
|
||||
/**
|
||||
* Publish chip (legacy newadd-btns, single action).
|
||||
* Publish chip (single action).
|
||||
*
|
||||
* Mirrors the single-button branch of the reference zib_get_new_add_btns():
|
||||
* the paint classes ride on the anchor itself and the label is emitted
|
||||
* The paint classes ride on the anchor itself and the label is emitted
|
||||
* verbatim. Only the post action exists, so there is no dropdown branch.
|
||||
*
|
||||
* @param string[] $types
|
||||
|
||||
@@ -9,7 +9,7 @@ defined('ABSPATH') || exit;
|
||||
|
||||
if (!function_exists('jio_get_user_checkin_details_link')) :
|
||||
/**
|
||||
* 已签到详情弹窗触发链接(参考主题 zib_get_user_checkin_details_link 1:1):
|
||||
* 已签到详情弹窗触发链接:
|
||||
* 打开刷新式 mini 弹窗(高 240,移动端底部弹出,每次都重新拉取)。
|
||||
*
|
||||
* @param string $class 沿用入口按钮的类。
|
||||
@@ -135,8 +135,8 @@ if (!function_exists('jio_header_user_wallet_mini')) :
|
||||
|
||||
$center = function_exists('jio_get_user_center_url') ? jio_get_user_center_url('credits') : '#';
|
||||
$box = '';
|
||||
$balance_icon = jio_icon_markup('zibsvg-money-color-2', 'em14');
|
||||
$points_icon = jio_icon_markup('zibsvg-points-color', 'em14');
|
||||
$balance_icon = jio_icon_markup('jiosvg-money-color-2', 'em14');
|
||||
$points_icon = jio_icon_markup('jiosvg-points-color', 'em14');
|
||||
|
||||
if ($balance_on) {
|
||||
$box .= '<a rel="nofollow" style="flex: 1;" class="muted-box padding-6 flex1 radius4" href="' . esc_url($center) . '">'
|
||||
@@ -199,9 +199,9 @@ if (!function_exists('jio_header_payvip_bar')) :
|
||||
if ($level > 0) {
|
||||
$levels = is_array($vip['levels'] ?? null) ? $vip['levels'] : [];
|
||||
$name = (string) ($levels[$level]['name_html'] ?? $levels[$level]['name'] ?? ($level === 2 ? __('二级会员', 'jio') : __('一级会员', 'jio')));
|
||||
// 到期徽章语义对齐参考主题 zib_get_user_vip_exp_date_text():只有真的拿到
|
||||
// 到期徽章语义:只有真的拿到
|
||||
// 到期时间才渲染这枚徽章,已过期显示「会员已过期」否则显示裸日期;显式永久
|
||||
// 会员显示「永久会员」;拿不到到期数据时参考主题返回 false,整枚徽章不渲染。
|
||||
// 会员显示「永久会员」;拿不到到期数据时整枚徽章不渲染。
|
||||
$exp_label = '';
|
||||
if (function_exists('jio_get_user_vip_state')) {
|
||||
$state = jio_get_user_vip_state($user_id);
|
||||
@@ -230,7 +230,7 @@ if (!function_exists('jio_header_payvip_bar')) :
|
||||
return '';
|
||||
}
|
||||
|
||||
// 1:1 对齐参考主题 zib_get_header_payvip_icon():通栏、radius4、vip_1 SVG 图标、裸文案。
|
||||
// 通栏、radius4、vip_1 SVG 图标、裸文案。
|
||||
return '<div class="mt10 em09" style="padding:2px;">'
|
||||
. '<a class="pay-vip but radius4 payvip-icon btn-block" href="javascript:;">'
|
||||
. '<svg class="em12 mr6" aria-hidden="true"><use xlink:href="#icon-vip_1"></use></svg>'
|
||||
|
||||
@@ -114,7 +114,7 @@ if (!function_exists('jio_homepage_get_sort_mode')) {
|
||||
|
||||
if (!function_exists('jio_homepage_get_request_sort')) {
|
||||
/**
|
||||
* Main-stream sort requested by URL (?orderby=), legacy zib_sift_posts_per_orde.
|
||||
* Main-stream sort requested by URL (?orderby=).
|
||||
*
|
||||
* 排序菜单(.ajax-option)点击后原位刷新的响应页靠它同序。
|
||||
*/
|
||||
@@ -218,7 +218,7 @@ if (!function_exists('jio_homepage_apply_named_sort_args')) {
|
||||
|
||||
if (!function_exists('jio_homepage_render_ajax_option_menu')) {
|
||||
/**
|
||||
* 首页排序菜单,1:1 zib_ajax_option_menu('home')。
|
||||
* 首页排序菜单。
|
||||
*
|
||||
* 输出 .ajax-option.ajax-replace[win-ajax-replace="filter"],点击 .ajax-next
|
||||
* 排序链接由 runtime post_ajax 原位替换 #index-tab-main 内的列表。
|
||||
@@ -248,7 +248,7 @@ if (!function_exists('jio_homepage_render_ajax_option_menu')) {
|
||||
|
||||
if (!function_exists('jio_homepage_get_option_orderby_but')) {
|
||||
/**
|
||||
* 排序方式按钮组,1:1 zib_get_option_orderby_but。
|
||||
* 排序方式按钮组。
|
||||
*
|
||||
* @param array{lists?:string[],dropdown?:bool} $option Sort option config.
|
||||
*/
|
||||
@@ -316,7 +316,7 @@ if (!function_exists('jio_homepage_get_option_orderby_but')) {
|
||||
|
||||
if (!function_exists('jio_homepage_get_current_url')) {
|
||||
/**
|
||||
* 当前页面链接,1:1 zib_get_current_url。
|
||||
* 当前页面链接。
|
||||
*/
|
||||
function jio_homepage_get_current_url(): string {
|
||||
$home_url = home_url();
|
||||
@@ -328,7 +328,7 @@ if (!function_exists('jio_homepage_get_current_url')) {
|
||||
|
||||
if (!function_exists('jio_homepage_url_del_paged')) {
|
||||
/**
|
||||
* 移除分页参数的链接,1:1 zib_url_del_paged。
|
||||
* 移除分页参数的链接。
|
||||
*/
|
||||
function jio_homepage_url_del_paged(string $url): string {
|
||||
$url = remove_query_arg(['paged', 'page'], $url);
|
||||
|
||||
@@ -11,7 +11,7 @@ if (!function_exists('jio_icon_card_kses_tags')) :
|
||||
/**
|
||||
* Inline HTML allow-list for icon card title/desc fields.
|
||||
*
|
||||
* legacy (Zibll) stores and echoes card title/desc raw, so admin-authored
|
||||
* Card title/desc are stored and echoed raw, so admin-authored
|
||||
* markup such as `<badge class="ml6 jb-blue">GO <span class="fa ..."></span></badge>`
|
||||
* renders verbatim. `badge` is a custom element missing from WP's
|
||||
* `$allowedposttags`, so `wp_kses_post()` strips it; these fields must go
|
||||
@@ -54,12 +54,12 @@ if (!function_exists('jio_card_icon_inner')) :
|
||||
*
|
||||
* The universal icon picker stores three formats:
|
||||
* - "fa fas fa-star" — FA5 class string
|
||||
* - "zibsvg-hot" — theme built-in SVG sprite key
|
||||
* - "jiosvg-hot" — theme built-in SVG sprite key
|
||||
* - "customsvg-<svg>" — inline custom SVG markup
|
||||
*
|
||||
* Every format must be routed through jio_icon_markup(); emitting a bare
|
||||
* FA class string silently produced an empty glyph for the two SVG formats
|
||||
* (e.g. `<i class="fa fas fa-zibsvg-hot">`), so the card rendered without an
|
||||
* (e.g. `<i class="fa fas fa-jiosvg-hot">`), so the card rendered without an
|
||||
* icon whenever the admin picked 内置 SVG or 自定义 SVG.
|
||||
*
|
||||
* Raw inline markup without a picker prefix is still accepted for data
|
||||
@@ -75,7 +75,7 @@ if (!function_exists('jio_card_icon_inner')) :
|
||||
return '';
|
||||
}
|
||||
|
||||
$is_picker_svg = str_starts_with($value, 'zibsvg-') || str_starts_with($value, 'customsvg-');
|
||||
$is_picker_svg = str_starts_with($value, 'jiosvg-') || str_starts_with($value, 'customsvg-');
|
||||
|
||||
if (!$is_picker_svg && str_contains($value, '<')) {
|
||||
$allowed = function_exists('jio_svg_kses_tags') ? jio_svg_kses_tags() : [];
|
||||
@@ -270,7 +270,7 @@ if (!function_exists('jio_icon_cover_card')) :
|
||||
$custom_src = (string) ($args['custom_icon'] !== '' ? $args['custom_icon'] : $args['customize_icon']);
|
||||
$icon_img = esc_url_raw(trim((string) ($args['icon_image'] !== '' ? $args['icon_image'] : '')));
|
||||
$custom_html = '';
|
||||
$custom_is_picker = str_starts_with($custom_src, 'zibsvg-') || str_starts_with($custom_src, 'customsvg-');
|
||||
$custom_is_picker = str_starts_with($custom_src, 'jiosvg-') || str_starts_with($custom_src, 'customsvg-');
|
||||
if ($icon_img === '' && $custom_is_picker) {
|
||||
// A picker value routed into the custom slot must go through the
|
||||
// shared renderer, otherwise the "customsvg-" prefix leaks as text.
|
||||
|
||||
+10
-10
@@ -53,11 +53,11 @@ function jio_brand_icon_map(): array {
|
||||
}
|
||||
|
||||
// FA5 Free ships no Gitee brand glyph and no multi-colour Google mark, so
|
||||
// those two resolve to the theme's built-in SVG sprite (zibsvg-*) instead of
|
||||
// those two resolve to the theme's built-in SVG sprite (jiosvg-*) instead of
|
||||
// a solid stand-in; every other key stays on FA5.
|
||||
$map = [
|
||||
'github' => 'fa fab fa-github',
|
||||
'google' => 'zibsvg-google-color',
|
||||
'google' => 'jiosvg-google-color',
|
||||
'x' => 'fa fab fa-twitter',
|
||||
'twitter' => 'fa fab fa-twitter',
|
||||
'email' => 'fa fas fa-envelope',
|
||||
@@ -75,7 +75,7 @@ function jio_brand_icon_map(): array {
|
||||
'instagram' => 'fa fab fa-instagram',
|
||||
'web' => 'fa fas fa-globe',
|
||||
'globe' => 'fa fas fa-globe',
|
||||
'gitee' => 'zibsvg-gitee',
|
||||
'gitee' => 'jiosvg-gitee',
|
||||
'baidu' => 'fa fas fa-paw',
|
||||
'alipay' => 'fa fab fa-alipay',
|
||||
];
|
||||
@@ -131,8 +131,8 @@ if (!function_exists('jio_brand_icon_class')) :
|
||||
/**
|
||||
* Resolve a short key, FA class string or sprite key to its icon value.
|
||||
*
|
||||
* @param string $name Short key, full FA class string or zibsvg-/customsvg- value.
|
||||
* @return string e.g. 'fa fab fa-github' or 'zibsvg-gitee', or '' if unknown.
|
||||
* @param string $name Short key, full FA class string or jiosvg-/customsvg- value.
|
||||
* @return string e.g. 'fa fab fa-github' or 'jiosvg-gitee', or '' if unknown.
|
||||
*/
|
||||
function jio_brand_icon_class(string $name): string {
|
||||
$raw = trim($name);
|
||||
@@ -142,7 +142,7 @@ function jio_brand_icon_class(string $name): string {
|
||||
|
||||
// Built-in SVG sprite and inline SVG values pass straight through; they are
|
||||
// not FA class strings and must survive to the markup renderer untouched.
|
||||
if (preg_match('/^(?:zibsvg|customsvg)-/i', $raw)) {
|
||||
if (preg_match('/^(?:jiosvg|customsvg)-/i', $raw)) {
|
||||
return $raw;
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ if (!function_exists('jio_brand_icon')) :
|
||||
/**
|
||||
* Escaped markup for a brand/contact icon (FA5 <i> or built-in SVG sprite).
|
||||
*
|
||||
* @param string $name Short key, FA class string or zibsvg-/customsvg- value.
|
||||
* @param string $name Short key, FA class string or jiosvg-/customsvg- value.
|
||||
* @param array|string $extra_classes Optional extra classes.
|
||||
* @return string Safe HTML or empty string when unknown.
|
||||
*/
|
||||
@@ -183,7 +183,7 @@ function jio_brand_icon(string $name, $extra_classes = []): string {
|
||||
|
||||
// Sprite and inline-SVG values carry their own element, so the shared icon
|
||||
// renderer owns the markup (it emits <svg class="icon"><use …>).
|
||||
if (strpos($class, 'zibsvg-') === 0 || strpos($class, 'customsvg-') === 0) {
|
||||
if (strpos($class, 'jiosvg-') === 0 || strpos($class, 'customsvg-') === 0) {
|
||||
return jio_icon_markup($class, $extra_classes);
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ if (!function_exists('jio_icon_markup')) :
|
||||
* - "fa fas fa-star" / "fa fab fa-weixin" — FA5 class string
|
||||
* - "fa-star" — bare glyph, rendered as solid FA5
|
||||
* - legacy FA4 string — double-`fa` form, upgraded to FA5
|
||||
* - "zibsvg-hot" — theme built-in SVG sprite key
|
||||
* - "jiosvg-hot" — theme built-in SVG sprite key
|
||||
* - "customsvg-<svg …>" — inline user SVG markup
|
||||
*
|
||||
* Output is always FA5 — the legacy FA4 double-`fa` prefix is never emitted.
|
||||
@@ -357,7 +357,7 @@ function jio_icon_markup(string $value, $extra_classes = []): string {
|
||||
return $svg;
|
||||
}
|
||||
|
||||
if (str_starts_with($value, 'zibsvg-')) {
|
||||
if (str_starts_with($value, 'jiosvg-')) {
|
||||
$key = sanitize_key(substr($value, 7));
|
||||
if ($key === '') {
|
||||
return '';
|
||||
|
||||
+9
-10
@@ -105,7 +105,7 @@ if (!function_exists('jio_list_cash_payment_methods')) {
|
||||
return [];
|
||||
}
|
||||
|
||||
// 渠道展示名对齐参考主题 zibpay_get_payment_method_args:
|
||||
// 渠道展示名映射:
|
||||
// 微信 / 支付宝 / 余额 / 卡密 / PayPal / Stripe(网关 get_name 仅供
|
||||
// 订单等内部场景,支付方式 UI 统一用本映射)。
|
||||
$labels = [
|
||||
@@ -163,10 +163,9 @@ if (!function_exists('jio_payment_order_slots')) {
|
||||
/**
|
||||
* 按后台「收款接口显示顺序」(pay_sdk_order)重排支付方式列表。
|
||||
*
|
||||
* 语义对齐参考主题 zibpay_get_payment_methods():按配置槽位顺序把命中的方式
|
||||
* 依次提到前面,未纳入槽位的方式保持原有相对顺序并留在末尾;未配置顺序时
|
||||
* 原样返回(即保持注册顺序)。这是排序的唯一实现,所有收银台构建支付方式
|
||||
* 列表的位置都必须经由此函数。
|
||||
* 按配置槽位顺序把命中的方式依次提到前面,未纳入槽位的方式保持原有相对顺序
|
||||
* 并留在末尾;未配置顺序时原样返回(即保持注册顺序)。这是排序的唯一实现,
|
||||
* 所有收银台构建支付方式列表的位置都必须经由此函数。
|
||||
*
|
||||
* @param array<int, array{id:string,name:string}> $methods
|
||||
* @return array<int, array{id:string,name:string}>
|
||||
@@ -1426,11 +1425,11 @@ if (!function_exists('jio_get_paywall_html')) {
|
||||
JIO_PAY_TYPE_VIDEO => '<i class="fa fas fa-play-circle fa-fw" aria-hidden="true"></i>' . esc_html__('查看视频', 'jio'),
|
||||
];
|
||||
$view_label = $view_labels[$pay_type] ?? '<i class="fa far fa-dot-circle fa-fw" aria-hidden="true"></i>' . esc_html__('查看内容', 'jio');
|
||||
return '<div class="zib-widget pay-box pay-widget paid-box order-type-' . $order_type . '" style="padding:0">' . $tag . '<div class="relative-h ' . esc_attr($theme) . '" style="background-size:120%"><div class="pay-widget__orb pay-widget__orb--right ' . esc_attr($theme) . '"></div><div class="pay-widget__orb pay-widget__orb--left ' . esc_attr($theme) . '"></div><div class="relative box-body"><div class="text-center mt10 box-body"><p><i class="fa fas fa-shopping-bag fa-3x" aria-hidden="true"></i></p><b class="em14">' . esc_html__('已购买', 'jio') . '</b></div></div></div><div class="box-body">' . $widget_service . '<div class="mt10"><a href="#posts-pay" class="but padding-lg btn-block ' . esc_attr($theme) . '">' . $view_label . '</a></div>' . $demo_row . $attrs . '</div>' . $count . '</div>';
|
||||
return '<div class="jio-widget-box pay-box pay-widget paid-box order-type-' . $order_type . '" style="padding:0">' . $tag . '<div class="relative-h ' . esc_attr($theme) . '" style="background-size:120%"><div class="pay-widget__orb pay-widget__orb--right ' . esc_attr($theme) . '"></div><div class="pay-widget__orb pay-widget__orb--left ' . esc_attr($theme) . '"></div><div class="relative box-body"><div class="text-center mt10 box-body"><p><i class="fa fas fa-shopping-bag fa-3x" aria-hidden="true"></i></p><b class="em14">' . esc_html__('已购买', 'jio') . '</b></div></div></div><div class="box-body">' . $widget_service . '<div class="mt10"><a href="#posts-pay" class="but padding-lg btn-block ' . esc_attr($theme) . '">' . $view_label . '</a></div>' . $demo_row . $attrs . '</div>' . $count . '</div>';
|
||||
}
|
||||
|
||||
if ($is_widget) {
|
||||
return '<div class="zib-widget pay-box pay-widget order-type-' . $order_type . '" style="padding:0">' . $tag . '<div class="relative-h ' . esc_attr($theme) . '" style="background-size:120%"><div class="pay-widget__orb pay-widget__orb--right ' . esc_attr($theme) . '"></div><div class="pay-widget__orb pay-widget__orb--left ' . esc_attr($theme) . '"></div><div class="relative box-body"><div class="text-center mt10">' . $price . '</div></div><div class="relative">' . $vip . '</div></div>' . $discount_banner . '<div class="box-body">' . $widget_service . '<div class="mt10">' . $button . '</div>' . $demo_row . $attrs . '</div>' . $count . '</div>';
|
||||
return '<div class="jio-widget-box pay-box pay-widget order-type-' . $order_type . '" style="padding:0">' . $tag . '<div class="relative-h ' . esc_attr($theme) . '" style="background-size:120%"><div class="pay-widget__orb pay-widget__orb--right ' . esc_attr($theme) . '"></div><div class="pay-widget__orb pay-widget__orb--left ' . esc_attr($theme) . '"></div><div class="relative box-body"><div class="text-center mt10">' . $price . '</div></div><div class="relative">' . $vip . '</div></div>' . $discount_banner . '<div class="box-body">' . $widget_service . '<div class="mt10">' . $button . '</div>' . $demo_row . $attrs . '</div>' . $count . '</div>';
|
||||
}
|
||||
|
||||
$thumb = get_the_post_thumbnail($post, 'medium', ['class' => 'fit-cover', 'alt' => '']);
|
||||
@@ -1454,7 +1453,7 @@ if (!function_exists('jio_get_paywall_html')) {
|
||||
$graphic = '<div class="flex0 relative mr20 hide-sm pay-thumb"><div class="graphic">' . $thumb . $graphic_actions . '</div></div>';
|
||||
}
|
||||
$demo_mobile = $demo !== '' ? '<div class="mt10 visible-xs-block">' . $demo . '</div>' : '';
|
||||
return '<div class="zib-widget pay-box order-type-' . $order_type . '" id="posts-pay"><div class="flex pay-flexbox">' . $graphic . '<div class="flex-auto-h flex xx jsb"><dt class="text-ellipsis pay-title">' . esc_html($title) . '</dt><div class="mt6 em09 muted-2-color">' . wp_kses_post($doc) . '</div><div>' . $price . '</div>' . $discount_mobile . ($vip !== '' ? '<div>' . $vip . '</div>' : '') . '<div class="text-right mt10">' . $button . '</div></div></div>' . $article_service . $demo_mobile . $attrs . $tag . $count . '</div>';
|
||||
return '<div class="jio-widget-box pay-box order-type-' . $order_type . '" id="posts-pay"><div class="flex pay-flexbox">' . $graphic . '<div class="flex-auto-h flex xx jsb"><dt class="text-ellipsis pay-title">' . esc_html($title) . '</dt><div class="mt6 em09 muted-2-color">' . wp_kses_post($doc) . '</div><div>' . $price . '</div>' . $discount_mobile . ($vip !== '' ? '<div>' . $vip . '</div>' : '') . '<div class="text-right mt10">' . $button . '</div></div></div>' . $article_service . $demo_mobile . $attrs . $tag . $count . '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1533,7 +1532,7 @@ if (!function_exists('jio_get_paid_download_actions_html')) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Purchased article card matching Zibll's paid-box structure.
|
||||
* Purchased article card, rendered in the paid-box structure.
|
||||
*/
|
||||
if (!function_exists('jio_get_paid_box_html')) {
|
||||
function jio_get_paid_box_html(WP_Post $post): string {
|
||||
@@ -1632,7 +1631,7 @@ if (!function_exists('jio_get_paid_box_html')) {
|
||||
$pay_extra_hide = trim((string) ($meta['pay_extra_hide'] ?? ''));
|
||||
$pay_extra_hide = $pay_extra_hide !== '' ? '<div class="pay-extra-hide">' . $pay_extra_hide . '</div>' : '';
|
||||
|
||||
return '<div class="pay-box zib-widget paid-box order-type-' . $order_type . '" id="posts-pay"' . $root_data . '>'
|
||||
return '<div class="pay-box jio-widget-box paid-box order-type-' . $order_type . '" id="posts-pay"' . $root_data . '>'
|
||||
. $header
|
||||
. $paid_box
|
||||
. '<div class="' . esc_attr($body_class) . '">'
|
||||
|
||||
@@ -24,7 +24,7 @@ if (!function_exists('jio_get_rewards_button')) {
|
||||
}
|
||||
$settings = \Jio\Settings\Settings::get_post_page_settings();
|
||||
$label = (string) ($settings['rewards_btn_text'] ?? __('赞赏', 'jio'));
|
||||
$icon = function_exists('jio_icon_markup') ? jio_icon_markup('zibsvg-money') : '';
|
||||
$icon = function_exists('jio_icon_markup') ? jio_icon_markup('jiosvg-money') : '';
|
||||
$template_id = 'jio-reward-template-' . $user_id . '-' . $post_id;
|
||||
return sprintf(
|
||||
'<button type="button" class="%1$s jio-reward-open" data-jio-reward-open data-template-id="%2$s" data-user-id="%3$d" data-post-id="%4$d">%5$s<text>%6$s</text></button>',
|
||||
@@ -62,8 +62,8 @@ if (!function_exists('jio_render_rewards_template_for_user')) {
|
||||
$recipient = get_userdata($user_id);
|
||||
$template_id = 'jio-reward-template-' . $user_id . '-' . $post_id;
|
||||
$title = (string) ($settings['rewards_text'] ?? __('赞赏', 'jio'));
|
||||
$money_icon = function_exists('jio_icon_markup') ? jio_icon_markup('zibsvg-money') : '<i class="fa fas fa-money-bill-wave" aria-hidden="true"></i>';
|
||||
$close_icon = function_exists('jio_icon_markup') ? jio_icon_markup('zibsvg-close', 'ic-close') : '<i class="fa fas fa-times" aria-hidden="true"></i>';
|
||||
$money_icon = function_exists('jio_icon_markup') ? jio_icon_markup('jiosvg-money') : '<i class="fa fas fa-money-bill-wave" aria-hidden="true"></i>';
|
||||
$close_icon = function_exists('jio_icon_markup') ? jio_icon_markup('jiosvg-close', 'ic-close') : '<i class="fa fas fa-times" aria-hidden="true"></i>';
|
||||
?>
|
||||
<template id="<?php echo esc_attr($template_id); ?>" data-user-id="<?php echo (int) $user_id; ?>" data-post-id="<?php echo (int) $post_id; ?>">
|
||||
<div class="modal-colorful-header colorful-bg jb-blue">
|
||||
|
||||
@@ -125,7 +125,7 @@ if (!function_exists('jio_get_share_buttons')) {
|
||||
continue;
|
||||
}
|
||||
$icon_key = $key === 'email' ? 'd-email' : $key . '-color';
|
||||
$icon = function_exists('jio_icon_markup') ? jio_icon_markup('zibsvg-' . $icon_key) : '';
|
||||
$icon = function_exists('jio_icon_markup') ? jio_icon_markup('jiosvg-' . $icon_key) : '';
|
||||
$attr = '';
|
||||
$target = ' target="_blank"';
|
||||
$href = jio_share_platform_href($key, $ctx);
|
||||
@@ -165,7 +165,7 @@ if (!function_exists('jio_get_post_share_btn')) {
|
||||
if (!$post instanceof WP_Post || jio_active_share_items() === []) {
|
||||
return '';
|
||||
}
|
||||
$icon = function_exists('jio_icon_markup') ? jio_icon_markup('zibsvg-share') : '<i class="fa fas fa-share-alt"></i>';
|
||||
$icon = function_exists('jio_icon_markup') ? jio_icon_markup('jiosvg-share') : '<i class="fa fas fa-share-alt"></i>';
|
||||
$text = $show_text ? '<text>' . esc_html__('分享', 'jio') . '</text>' : '';
|
||||
if ($modal || wp_is_mobile()) {
|
||||
$count = max(1, count(jio_active_share_items()));
|
||||
@@ -175,7 +175,7 @@ if (!function_exists('jio_get_post_share_btn')) {
|
||||
. '" data-jio-modal-mobile-bottom="true" data-jio-modal-cache="false">' . $icon . $text . '</a>';
|
||||
}
|
||||
return '<span class="hover-show dropup ' . esc_attr($class) . '">' . $icon . $text
|
||||
. '<div class="zib-widget hover-show-con share-button dropdown-menu">' . jio_get_share_html('', $post) . '</div></span>';
|
||||
. '<div class="jio-widget-box hover-show-con share-button dropdown-menu">' . jio_get_share_html('', $post) . '</div></span>';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,9 +188,9 @@ if (!function_exists('jio_share_modal_ajax')) {
|
||||
echo '<div class="box-body text-center">' . esc_html__('内容不存在或参数错误', 'jio') . '</div>';
|
||||
exit;
|
||||
}
|
||||
$icon = function_exists('jio_icon_markup') ? jio_icon_markup('zibsvg-share', 'em14') : '';
|
||||
$icon = function_exists('jio_icon_markup') ? jio_icon_markup('jiosvg-share', 'em14') : '';
|
||||
echo '<div class="modal-colorful-header colorful-bg jb-vip1"><button type="button" class="close" data-jio-modal-close aria-label="' . esc_attr__('关闭', 'jio') . '">'
|
||||
. (function_exists('jio_icon_markup') ? jio_icon_markup('zibsvg-close', 'ic-close') : '×')
|
||||
. (function_exists('jio_icon_markup') ? jio_icon_markup('jiosvg-close', 'ic-close') : '×')
|
||||
. '</button><div class="colorful-make"></div><div class="text-center"><div class="em2x">' . $icon
|
||||
. '</div><div class="mt10 em12 padding-w10"><span class="em09">' . esc_html__('分享内容', 'jio') . '</span></div></div></div>'
|
||||
. jio_get_share_html('horizontal', $post); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
|
||||
@@ -134,7 +134,7 @@ if (!function_exists('jio_get_single_meta_box')) :
|
||||
$more .= '<button type="button" class="but cir post-drop-meta__toggle" aria-haspopup="true" aria-controls="' . esc_attr($menu_id) . '" aria-expanded="false" aria-label="' . esc_attr__('更多', 'jio') . '">';
|
||||
$more .= '<i class="fa fas fa-ellipsis-h" aria-hidden="true"></i></button>';
|
||||
$more .= '<div id="' . esc_attr($menu_id) . '" class="post-drop-meta__menu" aria-hidden="true">';
|
||||
// 首项(参考主题 zib_get_post_more_dropdown 顺序):管理员 → 禁封用户;
|
||||
// 首项:管理员 → 禁封用户;
|
||||
// 无禁封权限时不占位,由下方举报项兜底(「禁封优先、否则举报」互斥语义)。
|
||||
$ban_item = function_exists('jio_get_post_author_ban_item')
|
||||
? jio_get_post_author_ban_item((int) get_post_field('post_author', $post_id), (string) $permalink)
|
||||
|
||||
@@ -196,7 +196,7 @@ if (!function_exists('jio_single_render_actions')) :
|
||||
<div class="post-actions-wrap relative">
|
||||
<div class="text-center post-actions">
|
||||
<?php
|
||||
$like_icon = function_exists('jio_icon_markup') ? jio_icon_markup('zibsvg-like') : '';
|
||||
$like_icon = function_exists('jio_icon_markup') ? jio_icon_markup('jiosvg-like') : '';
|
||||
$like_label = function_exists('jio_format_number') ? jio_format_number($like_count) : number_format_i18n($like_count);
|
||||
if (!empty($settings['like_enabled'])) : ?>
|
||||
<button type="button" class="action action-like<?php echo $is_liked ? ' actived' : ''; ?>" id="action-like" data-post-id="<?php echo esc_attr((string) $post_id); ?>" data-initial-active="<?php echo $is_liked ? '1' : '0'; ?>">
|
||||
@@ -221,7 +221,7 @@ if (!function_exists('jio_single_render_actions')) :
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
$favorite_icon = function_exists('jio_icon_markup') ? jio_icon_markup('zibsvg-favorite') : '';
|
||||
$favorite_icon = function_exists('jio_icon_markup') ? jio_icon_markup('jiosvg-favorite') : '';
|
||||
$favorite_label = function_exists('jio_format_number') ? jio_format_number($favorite_count) : number_format_i18n($favorite_count);
|
||||
if (!empty($settings['favorite_enabled'])) : ?>
|
||||
<button type="button" class="action action-favorite<?php echo $is_favorited ? ' actived' : ''; ?>" id="action-favorite" data-post-id="<?php echo esc_attr((string) $post_id); ?>" data-initial-active="<?php echo $is_favorited ? '1' : '0'; ?>">
|
||||
@@ -273,8 +273,8 @@ endif;
|
||||
|
||||
if (!function_exists('jio_single_render_author_card')) :
|
||||
/**
|
||||
* After-article author card (legacy zib_get_user_card_box parity:
|
||||
* show_button=false / show_img_bg=false / class="author").
|
||||
* After-article author card (show_button=false / show_img_bg=false /
|
||||
* class="author").
|
||||
*
|
||||
* @param array<string,mixed> $ctx Single context.
|
||||
*/
|
||||
@@ -308,7 +308,7 @@ if (!function_exists('jio_single_render_author_card')) :
|
||||
'exclude' => (int) get_the_ID(),
|
||||
]);
|
||||
?>
|
||||
<div class="user-card zib-widget author">
|
||||
<div class="user-card jio-widget-box author">
|
||||
<div class="card-content mt10 relative">
|
||||
<div class="user-content">
|
||||
<div class="user-avatar"><?php echo $avatar_box; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
|
||||
@@ -381,8 +381,8 @@ endif;
|
||||
|
||||
if (!function_exists('jio_single_related_query_args')) :
|
||||
/**
|
||||
* Build related-posts WP_Query args (legacy zib_posts_related parity:
|
||||
* category/topics/tag OR-terms, no current-post exclusion, meta orderby).
|
||||
* Build related-posts WP_Query args (category/topics/tag OR-terms,
|
||||
* no current-post exclusion, meta orderby).
|
||||
*
|
||||
* @param int $post_id Post ID.
|
||||
* @param array<string,mixed> $settings Single display settings.
|
||||
@@ -450,7 +450,7 @@ endif;
|
||||
|
||||
if (!function_exists('jio_single_render_related')) :
|
||||
/**
|
||||
* Related posts — legacy zib_posts_related parity (img/list/text).
|
||||
* Related posts (img/list/text).
|
||||
*
|
||||
* @param array<string,mixed> $ctx Single context.
|
||||
*/
|
||||
@@ -508,7 +508,7 @@ if (!function_exists('jio_single_render_related')) :
|
||||
<div class="box-body notop">
|
||||
<div class="title-theme"><?php echo esc_html($title); ?></div>
|
||||
</div>
|
||||
<div class="zib-widget">
|
||||
<div class="jio-widget-box">
|
||||
<?php if ($style === 'img') : ?>
|
||||
<div class="swiper-container swiper-scroll">
|
||||
<div class="swiper-wrapper"><?php echo $posts_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
|
||||
|
||||
@@ -193,7 +193,6 @@ if (!function_exists('jio_render_user_home_pagination')) {
|
||||
if (!function_exists('jio_get_user_home_follow_placeholder')) {
|
||||
/**
|
||||
* Skeleton cards used while the public home follow panel is loading.
|
||||
* Mirrors zib_get_author_tab_loader('follow').
|
||||
*/
|
||||
function jio_get_user_home_follow_placeholder(): string {
|
||||
$item = '<div class="author-minicard radius8 flex ac uh-follow__placeholder" aria-hidden="true">'
|
||||
|
||||
@@ -425,15 +425,15 @@ if (!function_exists('jio_get_vip_purchase_url')) {
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户中心 /user/vip/ 页面的积分兑换会员入口(参考主题 zibpay_user_page_tab_content_vip 1:1)。
|
||||
* 用户中心 /user/vip/ 页面的积分兑换会员入口。
|
||||
*
|
||||
* 参考主题在「我的会员」摘要与两张档位购买卡之后输出全宽入口横条:
|
||||
* .c-yellow.zib-widget.flex.ac.jsb(zib-widget → 本主题 jio-panel 表面)
|
||||
* 在「我的会员」摘要与两张档位购买卡之后输出全宽入口横条:
|
||||
* .c-yellow.jio-widget-box.flex.ac.jsb(jio-widget-box → 本主题 jio-panel 表面)
|
||||
* ├─ .flex1.em12:points-color 图标 +「{自定义货币名}兑换会员」
|
||||
* └─ .badg.radius.c-yellow:「立即兑换」+ fa-chevron-circle-right
|
||||
* 门控对齐参考主题 zibpay_get_vip_points_exchange_link:已是会员不展示
|
||||
* ($vip_level ? '' : link),且要求积分兑换会员开启、至少一个会员等级
|
||||
* 开启并存在可兑换套餐(catalog.points_exchange 已内含 credits 门控)。
|
||||
* 门控:已是会员不展示($vip_level ? '' : link),且要求积分兑换会员开启、
|
||||
* 至少一个会员等级开启并存在可兑换套餐(catalog.points_exchange 已内含
|
||||
* credits 门控)。
|
||||
*
|
||||
* 入口文案的货币名取 catalog.currency_name(后台「积分配置 → 自定义货币名称」),
|
||||
* 与它打开的兑换弹窗标题、会员弹窗内的入口保持同一命名。
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* 右上角待支付订单浮窗(结构对齐参考主题 zibpay_get_user_wait_pay_float_window())。
|
||||
* 右上角待支付订单浮窗。
|
||||
*
|
||||
* @package Jio
|
||||
*/
|
||||
@@ -9,7 +9,7 @@ defined('ABSPATH') || exit;
|
||||
|
||||
if (!function_exists('jio_get_wait_pay_float_orders')) :
|
||||
/**
|
||||
* 当前登录用户的待支付订单(最多 5 条,剩余支付时间 ≥ 3 分钟,对齐参考主题口径)。
|
||||
* 当前登录用户的待支付订单(最多 5 条,剩余支付时间 ≥ 3 分钟)。
|
||||
*
|
||||
* @return array<int,array{view:array<string,mixed>,expires:int}>
|
||||
*/
|
||||
@@ -38,7 +38,7 @@ endif;
|
||||
|
||||
if (!function_exists('jio_get_wait_pay_order_thumb')) :
|
||||
/**
|
||||
* 订单缩略图:商品图优先,否则按订单类型回退彩色图标(对齐 zibpay_get_order_order_thumb)。
|
||||
* 订单缩略图:商品图优先,否则按订单类型回退彩色图标。
|
||||
*
|
||||
* @param array<string,mixed> $view
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@ defined('ABSPATH') || exit;
|
||||
|
||||
if (!function_exists('jio_widget_str_cut')) :
|
||||
/**
|
||||
* Character-based truncation (reference zib_str_cut parity).
|
||||
* Character-based truncation.
|
||||
*/
|
||||
function jio_widget_str_cut(string $text, int $length): string {
|
||||
$text = trim($text);
|
||||
@@ -184,7 +184,7 @@ if (!function_exists('jio_widget_hot_posts')) :
|
||||
}
|
||||
wp_reset_postdata();
|
||||
|
||||
return '<div class="zib-widget hot-posts">' . $posts_html . '</div>';
|
||||
return '<div class="jio-widget-box hot-posts">' . $posts_html . '</div>';
|
||||
}
|
||||
endif;
|
||||
|
||||
@@ -285,7 +285,7 @@ if (!function_exists('jio_widget_term_aggregation')) :
|
||||
}
|
||||
wp_reset_postdata();
|
||||
|
||||
$html = '<div class="zib-widget term-aggregation mb10">';
|
||||
$html = '<div class="jio-widget-box term-aggregation mb10">';
|
||||
$html .= '<div class="mb20 hover-zoom-img flex px12-sm px12-m-s">';
|
||||
$html .= $img_html;
|
||||
$html .= '<div class="term-title ml10 flex xx flex1 jsb">' . $name . $description . $meta . '</div>';
|
||||
|
||||
@@ -28,7 +28,7 @@ function jio_menu_pz(int $id, string $key = '', $default = '') {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $icon_class Icon-picker value (FA5 class, zibsvg- or customsvg-).
|
||||
* @param string $icon_class Icon-picker value (FA5 class, jiosvg- or customsvg-).
|
||||
* @param bool $enabled Global switch.
|
||||
*/
|
||||
function jio_render_menu_icon(string $icon_class, bool $enabled = true): string {
|
||||
@@ -37,8 +37,8 @@ function jio_render_menu_icon(string $icon_class, bool $enabled = true): string
|
||||
}
|
||||
|
||||
// Sprite/inline values must reach jio_icon_markup untouched — the legacy
|
||||
// FA class padding below would corrupt them (zibsvg-hot → fa fas fa-zibsvg-hot).
|
||||
if (str_starts_with($icon_class, 'zibsvg-')) {
|
||||
// FA class padding below would corrupt them (jiosvg-hot → fa fas fa-jiosvg-hot).
|
||||
if (str_starts_with($icon_class, 'jiosvg-')) {
|
||||
return jio_icon_markup($icon_class, 'icon mr3 menu-item-icon');
|
||||
}
|
||||
if (str_starts_with($icon_class, 'customsvg-')) {
|
||||
|
||||
@@ -210,13 +210,13 @@ if (!function_exists('jio_render_mini_list')) {
|
||||
|
||||
if (!function_exists('jio_render_placeholder')) {
|
||||
/**
|
||||
* 骨架屏占位,1:1 对齐参考主题 `zib_get_post_placeholder()`。
|
||||
* 骨架屏占位。
|
||||
*
|
||||
* 骨架块复用真实卡片的 posts-item / post-graphic / item-body 结构与尺寸,
|
||||
* 只是把内容换成 .placeholder。列表模式四行(标题 t1、摘要 k1、k2、两枚 s1),
|
||||
* 卡片模式三行(标题 t1、摘要 k2、两枚 s1)。
|
||||
*
|
||||
* 刻意与真实条目不同的两点(均与参考主题一致):
|
||||
* 刻意与真实条目不同的两点:
|
||||
* - **不写 `ajax-item`**:否则 `find('.ajax-item')` / ajax-list 的 `inject()`
|
||||
* 会把骨架当成真实条目删除或定位。
|
||||
* - **元素是 `<div>` 而非 `<posts>`**,且 card 分支的缩略图是
|
||||
|
||||
@@ -225,7 +225,7 @@ if (!function_exists('jio_renderer_compact_pay_badge')) {
|
||||
$label = esc_html__('会员专属', 'jio');
|
||||
} else {
|
||||
$display = \Jio\Settings\Settings::get_paid_content_settings()['display'];
|
||||
$mark = $points ? jio_icon_markup('zibsvg-points', 'points-mark') : esc_html((string) ($display['currency_symbol'] ?? '¥'));
|
||||
$mark = $points ? jio_icon_markup('jiosvg-points', 'points-mark') : esc_html((string) ($display['currency_symbol'] ?? '¥'));
|
||||
$label = '<span class="em09">' . $mark . '</span>' . esc_html($price);
|
||||
}
|
||||
}
|
||||
@@ -280,7 +280,7 @@ if (!function_exists('jio_renderer_meta_number')) {
|
||||
|
||||
if (!function_exists('jio_renderer_svg_icon')) {
|
||||
function jio_renderer_svg_icon(string $name): string {
|
||||
return jio_icon_markup('zibsvg-' . $name);
|
||||
return jio_icon_markup('jiosvg-' . $name);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -124,7 +124,7 @@ if (!function_exists('jio_render_pagination')) {
|
||||
<div class="next-page order-ajax-next ias-btn<?php echo $auto_load ? ' lazyload' : ''; ?>"<?php echo $auto_load ? ' lazyload-action="ias"' : ''; ?>>
|
||||
<a href="<?php echo esc_url(add_query_arg($page_var, $current_page + 1)); ?>" data-jio-load-more><?php echo wp_kses_post($trigger_text); ?></a>
|
||||
</div>
|
||||
<?php // 参考主题 zib_paging() 只渲染翻页控件,不在此处预渲染骨架;否则 runtime
|
||||
<?php // 只渲染翻页控件,不在此处预渲染骨架;否则 runtime
|
||||
// post_ajax() 会先在容器内找到它并复用,丢弃调用方按视口动态拼出的骨架,
|
||||
// 排序切换于是永远是写死 2 条 list 形状。
|
||||
// 骨架由 assets/js/core/pagination.js 在请求时按视口创建。 ?>
|
||||
@@ -427,7 +427,7 @@ if (!function_exists('jio_render_footer_tabbar_single_extend')) :
|
||||
$comment_label = function_exists('jio_format_number') ? jio_format_number($comment_count) : number_format_i18n($comment_count);
|
||||
|
||||
if ($like_on) :
|
||||
$like_tabbar_icon = function_exists('jio_icon_markup') ? jio_icon_markup('zibsvg-like') : '';
|
||||
$like_tabbar_icon = function_exists('jio_icon_markup') ? jio_icon_markup('jiosvg-like') : '';
|
||||
?>
|
||||
<button type="button"
|
||||
class="tabbar-item single-action-tabbar action-like<?php echo $is_liked ? ' actived' : ''; ?>"
|
||||
@@ -442,7 +442,7 @@ if (!function_exists('jio_render_footer_tabbar_single_extend')) :
|
||||
endif;
|
||||
|
||||
if ($favorite_on) :
|
||||
$favorite_tabbar_icon = function_exists('jio_icon_markup') ? jio_icon_markup('zibsvg-favorite') : '';
|
||||
$favorite_tabbar_icon = function_exists('jio_icon_markup') ? jio_icon_markup('jiosvg-favorite') : '';
|
||||
?>
|
||||
<button type="button"
|
||||
class="tabbar-item single-action-tabbar action-favorite<?php echo $is_favorited ? ' actived' : ''; ?>"
|
||||
|
||||
@@ -476,7 +476,7 @@ endif;
|
||||
|
||||
if (!function_exists('jio_time_ago')) :
|
||||
/**
|
||||
* 将日期转为相对时间描述(中文,legacy zib_get_time_ago parity)。
|
||||
* 将日期转为相对时间描述(中文)。
|
||||
*
|
||||
* @param string $date 日期字符串(MySQL datetime 格式)
|
||||
* @return string 例如 "19天前"、"3个月前"
|
||||
@@ -486,7 +486,7 @@ if (!function_exists('jio_time_ago')) :
|
||||
$ctime = (int) strtotime(current_time('mysql'));
|
||||
$t = $ctime - $time;
|
||||
|
||||
// 关闭倒计时显示时按「系统工具」自定义时间格式输出(legacy zib_get_time_ago parity)。
|
||||
// 关闭倒计时显示时按「系统工具」自定义时间格式输出。
|
||||
$system = class_exists('\Jio\Settings\ExtensionRuntime')
|
||||
? \Jio\Settings\ExtensionRuntime::get_system_tools_settings()
|
||||
: [];
|
||||
|
||||
+47
-66
@@ -1,16 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* 前台用户禁封(小黑屋 / 封号)— 1:1 复刻参考主题 Zibll 前台禁封能力:
|
||||
* zib_get_edit_user_ban_link → jio_get_edit_user_ban_link(三点菜单入口)
|
||||
* zib_get_set_user_ban_modal → jio_get_user_ban_modal(禁封 / 解封弹窗)
|
||||
* zib_get_ban_info_modal → jio_get_user_ban_info_modal(查看禁封状态)
|
||||
* zib_get_user_ban_appeal_modal → jio_get_user_ban_appeal_modal(禁封申诉)
|
||||
* zib_get_ban_log_modal → jio_get_user_ban_log_modal(禁封记录)
|
||||
* zib_user_ban_restrict_login → jio_render_user_ban_block_page(登录后禁封页)
|
||||
* 前台用户禁封(小黑屋 / 封号)— 1:1 复刻上游参考实现的前台用户禁封能力:
|
||||
* 三点菜单入口、禁封 / 解封弹窗、查看禁封状态、禁封申诉、禁封记录、
|
||||
* 登录后禁封页。
|
||||
*
|
||||
* 数据源唯一:\Jio\User\Restriction(wp_jio_user_restriction 表)。
|
||||
* 弹窗内容经 REST /user-ban/*-modal 输出(JioModalRuntime.openRemote 拉取,
|
||||
* 与参考主题 refresh_modal 每次刷新同语义),提交走 REST /user-ban/set 与
|
||||
* 每次打开均重新拉取),提交走 REST /user-ban/set 与
|
||||
* admin-ajax jio_ban_appeal_submit。
|
||||
*
|
||||
* @package Jio
|
||||
@@ -25,10 +21,6 @@ defined('ABSPATH') || exit;
|
||||
* (颜色 / 文案 / 图标统一管理);本 helper 供身份行徽章、用户中心元信息、
|
||||
* 评论拒绝态等位置复用,避免重复查库。
|
||||
*
|
||||
* 对齐参考主题:
|
||||
* zib_user_is_ban → jio_get_user_ban_state(状态判定)
|
||||
* zib_ban_author_header_identity_filter → 资料卡/用户中心身份行徽章
|
||||
*
|
||||
* @return array{state:string,label:string,tone:string,icon:string}|array{} state 为空串表示无治理状态。
|
||||
*/
|
||||
function jio_get_user_ban_state(int $user_id): array
|
||||
@@ -60,9 +52,8 @@ function jio_get_user_ban_state(int $user_id): array
|
||||
}
|
||||
|
||||
/**
|
||||
* 目标是否处于封禁/小黑屋状态(举报入口隐藏判定,参考主题
|
||||
* zib_get_report_link 中 zib_user_is_ban($user_id) 的排除语义;
|
||||
* 禁言为轻量评论域限制,不隐藏举报入口)。
|
||||
* 目标是否处于封禁/小黑屋状态(举报入口隐藏判定:封号 / 小黑屋用户不展示
|
||||
* 举报入口;禁言为轻量评论域限制,不隐藏举报入口)。
|
||||
*/
|
||||
function jio_is_user_ban_restricted(int $user_id): bool
|
||||
{
|
||||
@@ -71,8 +62,7 @@ function jio_is_user_ban_restricted(int $user_id): bool
|
||||
}
|
||||
|
||||
/**
|
||||
* 治理状态徽章(占据身份行元信息位,参考主题 author_header_identity 钩子 /
|
||||
* zib_ban_author_header_identity_filter:badg + 图标 + 文案,红=封号、
|
||||
* 治理状态徽章(占据身份行元信息位:badg + 图标 + 文案,红=封号、
|
||||
* 黄=小黑屋、灰=禁言,字段与颜色由 Restriction::state_badges() 统一管理)。
|
||||
*/
|
||||
function jio_get_user_ban_identity_badge(int $user_id, string $class = ''): string
|
||||
@@ -88,8 +78,7 @@ function jio_get_user_ban_identity_badge(int $user_id, string $class = ''): stri
|
||||
}
|
||||
|
||||
/**
|
||||
* 「查看禁封状态」入口(用户中心元信息位,参考主题 user_page_header_desc
|
||||
* 钩子 / zib_get_user_ban_info_link:but 按钮 = 内层 badg 徽章(带色)+
|
||||
* 「查看禁封状态」入口(用户中心元信息位:but 按钮 = 内层 badg 徽章(带色)+
|
||||
* 右箭头,外层 but 为默认按钮色——不在内外两层重复着色)。
|
||||
* 点击经 data-jio-ban-info 委托打开禁封信息弹窗。
|
||||
*/
|
||||
@@ -106,7 +95,7 @@ function jio_get_user_ban_info_link(int $user_id, string $class = ''): string
|
||||
if ($badge === '') {
|
||||
return '';
|
||||
}
|
||||
// 外层 but 不重复状态色:颜色仅由内层 badg 承载(1:1 参考主题)。
|
||||
// 外层 but 不重复状态色:颜色仅由内层 badg 承载。
|
||||
$classes = trim('but p2-10' . ($class !== '' ? ' ' . $class : ''));
|
||||
return '<a class="' . esc_attr($classes) . '" href="javascript:;" role="button"'
|
||||
. ' data-jio-ban-info="' . esc_attr((string) $user_id) . '"'
|
||||
@@ -115,8 +104,7 @@ function jio_get_user_ban_info_link(int $user_id, string $class = ''): string
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁封信息弹窗(1:1 复刻参考主题 zib_get_ban_info_modal:多彩头 c-gray +
|
||||
* 禁封信息行 + 申诉入口;本人或管理员可见)。
|
||||
* 禁封信息弹窗(多彩头 c-gray + 禁封信息行 + 申诉入口;本人或管理员可见)。
|
||||
*
|
||||
* @return string 弹窗 HTML(空串 = 无权查看或用户不存在)
|
||||
*/
|
||||
@@ -137,7 +125,7 @@ function jio_get_user_ban_info_modal(int $user_id): string
|
||||
: [];
|
||||
|
||||
$html = '<div class="jio-user-ban-info-modal">';
|
||||
// 弹窗头(参考主题 zib_get_modal_colorful_header('c-gray', ban 图标, 标题))。
|
||||
// 弹窗头:灰色 colorful header,ban 图标 + 标题。
|
||||
$html .= '<div class="modal-colorful-header colorful-bg c-gray"><button type="button" class="close" data-jio-modal-close aria-label="' . esc_attr__('关闭', 'jio') . '">' . jio_user_ban_close_svg() . '</button><div class="colorful-make"></div><div class="text-center"><div class="em2x"><i class="fa fas fa-ban" aria-hidden="true"></i></div><div class="mt10 em12 padding-w10">' . esc_html__('小黑屋禁封中', 'jio') . '</div></div></div>';
|
||||
|
||||
if (empty($info)) {
|
||||
@@ -181,8 +169,8 @@ function jio_get_user_ban_info_modal(int $user_id): string
|
||||
}
|
||||
|
||||
/**
|
||||
* 「申诉」入口(参考主题 zib_get_user_ban_appeal_link:禁封申诉 modal-mini,
|
||||
* 仅本人可发起;点击经 data-jio-ban-appeal 委托打开申诉弹窗)。
|
||||
* 「申诉」入口(禁封申诉 modal-mini,仅本人可发起;
|
||||
* 点击经 data-jio-ban-appeal 委托打开申诉弹窗)。
|
||||
*/
|
||||
function jio_get_user_ban_appeal_link(int $user_id, string $class = ''): string
|
||||
{
|
||||
@@ -197,9 +185,8 @@ function jio_get_user_ban_appeal_link(int $user_id, string $class = ''): string
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁封申诉弹窗(1:1 复刻参考主题 zib_get_user_ban_appeal_modal:
|
||||
* edit-header(gavel / c-blue / 禁封申诉)+ 禁封信息行 + 申诉说明 + 资料项
|
||||
* 输入 + 审核中态 + 禁止申诉态;仅本人可见可提交)。
|
||||
* 禁封申诉弹窗(edit-header(gavel / c-blue / 禁封申诉)+ 禁封信息行 +
|
||||
* 申诉说明 + 资料项输入 + 审核中态 + 禁止申诉态;仅本人可见可提交)。
|
||||
*
|
||||
* @return string 弹窗 HTML(空串 = 非本人或用户不存在)
|
||||
*/
|
||||
@@ -218,7 +205,7 @@ function jio_get_user_ban_appeal_modal(int $user_id): string
|
||||
$status = class_exists('\Jio\User\BanAppeal') ? \Jio\User\BanAppeal::get_status($user_id) : '';
|
||||
$payload = class_exists('\Jio\User\BanAppeal') ? \Jio\User\BanAppeal::get_payload($user_id) : [];
|
||||
|
||||
// 弹窗头(参考主题 edit-header:关闭钮 + gavel 徽标 + 标题居左)。
|
||||
// 弹窗头:关闭钮 + gavel 徽标 + 标题居左。
|
||||
$html = '<div class="jio-user-ban-appeal-modal">';
|
||||
$html .= '<div class="mb10 edit-header touch"><button type="button" class="close" data-jio-modal-close aria-label="' . esc_attr__('关闭', 'jio') . '">' . jio_user_ban_close_svg() . '</button><b class="flex ac c-blue"><span class="toggle-radius mr10 c-blue"><i class="fa fas fa-gavel" aria-hidden="true"></i></span>' . esc_html__('禁封申诉', 'jio') . '</b></div>';
|
||||
|
||||
@@ -234,7 +221,7 @@ function jio_get_user_ban_appeal_modal(int $user_id): string
|
||||
return '<div class="flex"><div class="author-set-left" style="min-width: 80px;">' . esc_html($label) . '</div><div class="author-set-right mt6">' . esc_html($value) . '</div></div>';
|
||||
};
|
||||
|
||||
// 禁封信息行(参考主题申诉弹窗内嵌信息框:用户名/状态/起止时间/原因/说明)。
|
||||
// 禁封信息行:用户名/状态/起止时间/原因/说明。
|
||||
$info_box = '<div class="mb10 muted-box padding-10 em09">'
|
||||
. $set_row(__('用户名', 'jio'), $user->display_name)
|
||||
. $set_row(__('状态', 'jio'), (string) $info['status'])
|
||||
@@ -245,7 +232,7 @@ function jio_get_user_ban_appeal_modal(int $user_id): string
|
||||
. '</div>';
|
||||
|
||||
if (!empty($info['no_appeal'])) {
|
||||
// 禁止申诉态(参考主题:c-yellow box-body + 禁止申诉说明)。
|
||||
// 禁止申诉态:c-yellow box-body + 禁止申诉说明。
|
||||
$html .= '<div><div class="c-yellow box-body">' . esc_html__('抱歉!您当前已无法进行申诉', 'jio') . '</div>';
|
||||
if ((string) $info['no_appeal_desc'] !== '') {
|
||||
$html .= '<div class="muted-box mt10">' . esc_html((string) $info['no_appeal_desc']) . '</div>';
|
||||
@@ -262,7 +249,7 @@ function jio_get_user_ban_appeal_modal(int $user_id): string
|
||||
$input = '';
|
||||
$footer = '';
|
||||
if ($status === 'pending') {
|
||||
// 审核中态(参考主题:黄色 badg + 已提交资料行 + 提交时间)。
|
||||
// 审核中态:黄色 badg + 已提交资料行 + 提交时间。
|
||||
$input = '<div class="c-yellow badg block mb6">' . esc_html__('您的申诉正在审核中,请耐心等待', 'jio') . '</div>';
|
||||
$data = is_array($payload['data'] ?? null) ? $payload['data'] : [];
|
||||
if (!empty($data)) {
|
||||
@@ -274,7 +261,7 @@ function jio_get_user_ban_appeal_modal(int $user_id): string
|
||||
}
|
||||
$input .= $set_row(__('提交时间', 'jio'), (string) ($payload['time'] ?? ''));
|
||||
} else {
|
||||
// 申诉表单(参考主题:资料项逐项输入 + 申诉说明 textarea + 双按钮)。
|
||||
// 申诉表单:资料项逐项输入 + 申诉说明 textarea + 双按钮。
|
||||
foreach ((array) $settings['keys'] as $key) {
|
||||
$key = (string) $key;
|
||||
if ($key === '') {
|
||||
@@ -305,8 +292,8 @@ function jio_get_user_ban_appeal_modal(int $user_id): string
|
||||
}
|
||||
|
||||
/**
|
||||
* 「查看禁封记录」链接(参考主题 zib_get_user_ban_log_link:em09 c-yellow
|
||||
* 链接触发禁封记录弹窗;仅具备禁封权限的管理员可见)。
|
||||
* 「查看禁封记录」链接(em09 c-yellow 链接触发禁封记录弹窗;
|
||||
* 仅具备禁封权限的管理员可见)。
|
||||
*/
|
||||
function jio_get_user_ban_log_link(int $user_id, string $class = '', string $con = ''): string
|
||||
{
|
||||
@@ -322,9 +309,8 @@ function jio_get_user_ban_log_link(int $user_id, string $class = '', string $con
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁封记录弹窗(1:1 复刻参考主题 zib_get_ban_log_modal:多彩头 c-yellow +
|
||||
* 用户行 + 计数 + 逐条记录卡(类型徽章 / 结束时间 / 原因 / 说明 / 禁止申诉);
|
||||
* 仅具备禁封权限的管理员可见)。
|
||||
* 禁封记录弹窗(多彩头 c-yellow + 用户行 + 计数 + 逐条记录卡
|
||||
* (类型徽章 / 结束时间 / 原因 / 说明 / 禁止申诉);仅具备禁封权限的管理员可见)。
|
||||
*
|
||||
* @return string 弹窗 HTML(空串 = 无权查看)
|
||||
*/
|
||||
@@ -342,7 +328,7 @@ function jio_get_user_ban_log_modal(int $user_id): string
|
||||
return in_array((string) ($r['type'] ?? ''), ['ban', 'suspend'], true);
|
||||
}));
|
||||
|
||||
// 弹窗头(参考主题 zib_get_modal_colorful_header('c-yellow', ban 图标, 标题))。
|
||||
// 弹窗头:黄色 colorful header,ban 图标 + 标题。
|
||||
$html = '<div class="jio-user-ban-log-modal">';
|
||||
$html .= '<div class="modal-colorful-header colorful-bg c-yellow"><button type="button" class="close" data-jio-modal-close aria-label="' . esc_attr__('关闭', 'jio') . '">' . jio_user_ban_close_svg() . '</button><div class="colorful-make"></div><div class="text-center"><div class="em2x"><i class="fa fas fa-ban" aria-hidden="true"></i></div><div class="mt10 em12 padding-w10">' . esc_html__('禁封记录', 'jio') . '</div></div></div>';
|
||||
|
||||
@@ -395,8 +381,7 @@ function jio_get_user_ban_log_modal(int $user_id): string
|
||||
}
|
||||
|
||||
/**
|
||||
* 受限位置治理提示(评论拒绝态,参考主题 zib_get_user_ban_nocan_info 语义:
|
||||
* 状态徽章 +「暂时无法操作」+ 查看禁封状态入口)。
|
||||
* 受限位置治理提示(评论拒绝态:状态徽章 +「暂时无法操作」+ 查看禁封状态入口)。
|
||||
*
|
||||
* @param string $msg 具体受阻的操作描述,如「发表评论」。
|
||||
*/
|
||||
@@ -418,7 +403,7 @@ function jio_get_user_ban_nocan_html(int $user_id, string $msg = ''): string
|
||||
}
|
||||
|
||||
/**
|
||||
* 昵称旁禁封徽章(参考主题 user_name_badge 钩子语义:占据 VIP 图标位,
|
||||
* 昵称旁禁封徽章(占据 VIP 图标位,
|
||||
* 头像角标 user_avatar_badge 为可选项,见 jio_get_user_ban_avatar_badge)。
|
||||
*/
|
||||
function jio_get_user_ban_name_badge(int $user_id): string
|
||||
@@ -432,7 +417,7 @@ function jio_get_user_ban_name_badge(int $user_id): string
|
||||
}
|
||||
|
||||
/**
|
||||
* 头像禁封角标(参考主题 user_avatar_badge 钩子语义:覆盖 VIP 角标位)。
|
||||
* 头像禁封角标(覆盖 VIP 角标位)。
|
||||
*/
|
||||
function jio_get_user_ban_avatar_badge(int $user_id): string
|
||||
{
|
||||
@@ -446,8 +431,7 @@ function jio_get_user_ban_avatar_badge(int $user_id): string
|
||||
}
|
||||
|
||||
/**
|
||||
* 登录后禁封状态页(1:1 复刻参考主题 zib_user_ban_restrict_login /
|
||||
* zib_die_page:红盒提示 + 禁封信息行 + 申诉权限 + 退出登录/申诉按钮)。
|
||||
* 登录后禁封状态页(红盒提示 + 禁封信息行 + 申诉权限 + 退出登录/申诉按钮)。
|
||||
* 由 Restriction::restrict_frontend_access() 在 template_redirect 调用。
|
||||
*/
|
||||
function jio_render_user_ban_block_page(int $user_id): void
|
||||
@@ -489,8 +473,7 @@ function jio_render_user_ban_block_page(int $user_id): void
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁封功能开关(后台“用户&互动 → 禁封/举报 → 禁封功能”,
|
||||
* 对齐参考主题 _pz('user_ban_s', true):缺键默认开启)。
|
||||
* 禁封功能开关(后台“用户&互动 → 禁封/举报 → 禁封功能”,缺键默认开启)。
|
||||
*/
|
||||
function jio_user_ban_enabled(): bool
|
||||
{
|
||||
@@ -502,7 +485,7 @@ function jio_user_ban_enabled(): bool
|
||||
}
|
||||
|
||||
/**
|
||||
* 当前用户能否禁封目标用户(对齐参考主题 zib_current_user_can('set_user_ban') 语义)。
|
||||
* 当前用户能否禁封目标用户(需 manage_options 权限,且不能禁封自己 / 超级管理员)。
|
||||
*/
|
||||
function jio_current_user_can_ban(int $user_id): bool
|
||||
{
|
||||
@@ -535,7 +518,7 @@ function jio_get_user_current_ban(int $user_id): ?array
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁封 / 解封触发器(参考主题 zib_get_edit_user_ban_link)。
|
||||
* 禁封 / 解封触发器。
|
||||
* 输出 data-jio-ban 委托入口,由 assets/js/user-ban.js 打开禁封弹窗。
|
||||
*/
|
||||
function jio_get_edit_user_ban_link(int $user_id = 0, string $class = '', string $con = ''): string
|
||||
@@ -552,7 +535,7 @@ function jio_get_edit_user_ban_link(int $user_id = 0, string $class = '', string
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户主页封面三点菜单项(参考主题 author_header_drop_lists 钩子语义):
|
||||
* 用户主页封面三点菜单项:
|
||||
* 有禁封权限 → 禁封入口;否则(开启举报且非本人)→ 举报入口。
|
||||
*/
|
||||
function jio_get_user_cover_menu_action_html(int $user_id): string
|
||||
@@ -566,9 +549,8 @@ function jio_get_user_cover_menu_action_html(int $user_id): string
|
||||
}
|
||||
|
||||
/**
|
||||
* 评论三点菜单项(参考主题 comments_action_lists 钩子语义):
|
||||
* 管理员 → 禁封用户(固定文案,与参考主题 zib_ban_comments_action_lists_filter
|
||||
* 一致——解封态由弹窗内容呈现);否则 → 举报( Jio 既有评论举报契约)。
|
||||
* 评论三点菜单项:
|
||||
* 管理员 → 禁封用户(固定文案,解封态由弹窗内容呈现);否则 → 举报( Jio 既有评论举报契约)。
|
||||
*/
|
||||
function jio_get_comment_ban_or_report_item(\WP_Comment $comment): string
|
||||
{
|
||||
@@ -583,9 +565,9 @@ function jio_get_comment_ban_or_report_item(\WP_Comment $comment): string
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章作者资料卡三点菜单项(参考主题 zib_get_post_more_dropdown 语义,菜单首项):
|
||||
* 文章作者资料卡三点菜单项(菜单首项):
|
||||
* 管理员 → 禁封用户(固定文案,解封态由弹窗内容呈现);否则 → 空(由既有
|
||||
* 文章举报项兜底,与参考主题「禁封优先、否则举报」互斥语义一致)。
|
||||
* 文章举报项兜底,与「禁封优先、否则举报」互斥语义一致)。
|
||||
*/
|
||||
function jio_get_post_author_ban_item(int $author_id, string $post_url = ''): string
|
||||
{
|
||||
@@ -607,7 +589,7 @@ function jio_user_ban_close_svg(): string
|
||||
}
|
||||
|
||||
/**
|
||||
* 禁封 / 解封弹窗内容 — 1:1 复刻参考主题 zib_get_set_user_ban_modal:
|
||||
* 禁封 / 解封弹窗内容:
|
||||
* 未禁封 → 禁封表单(禁封方式 / 禁封时间 / 预置原因徽章 / 其它原因 /
|
||||
* 禁封说明 / 删除全部内容 / 禁止用户申诉(含说明));
|
||||
* 已禁封 → 解封视图(状态信息 + 解封留言表单)。
|
||||
@@ -623,7 +605,7 @@ function jio_get_user_ban_modal(int $user_id): string
|
||||
|
||||
$ban = jio_get_user_current_ban($user_id);
|
||||
|
||||
// 用户行(头像 + 昵称),与参考主题弹窗头部同构。
|
||||
// 用户行(头像 + 昵称)。
|
||||
$avatar_url = get_avatar_url($user_id, ['size' => 40]);
|
||||
$user_name = function_exists('jio_get_user_name')
|
||||
? jio_get_user_name(['id' => $user_id, 'vip' => false, 'medal' => false])
|
||||
@@ -635,11 +617,11 @@ function jio_get_user_ban_modal(int $user_id): string
|
||||
$html = '<div class="jio-user-ban-modal">';
|
||||
|
||||
if ($ban) {
|
||||
// ── 已禁封视图:解封(参考主题解封弹窗同构) ──
|
||||
// ── 已禁封视图:解封 ──
|
||||
$is_ban = (string) ($ban['type'] ?? '') === 'ban';
|
||||
$unban_title = $is_ban ? __('解封用户', 'jio') : __('移出小黑屋', 'jio');
|
||||
|
||||
// 用户名徽章(参考主题 zib_get_user_name(...&class=inflex ac badg p2-10 em09))。
|
||||
// 用户名徽章(inflex ac badg p2-10 em09)。
|
||||
$user_badge = function_exists('jio_get_user_name')
|
||||
? jio_get_user_name(['id' => $user_id, 'class' => 'inflex ac badg p2-10 em09', 'vip' => false, 'medal' => false, 'auth' => false, 'level' => false])
|
||||
: '<b>' . esc_html($user->display_name) . '</b>';
|
||||
@@ -657,7 +639,7 @@ function jio_get_user_ban_modal(int $user_id): string
|
||||
return '<div class="mb10 flex"><div class="author-set-left" style="min-width: 80px;">' . esc_html($label) . '</div><div class="author-set-right mt6">' . $html_value . '</div></div>';
|
||||
};
|
||||
|
||||
// 禁封记录入口(参考主题:>1 次时展示可点击记录链接,打开禁封记录弹窗)。
|
||||
// 禁封记录入口:>1 次时展示可点击记录链接,打开禁封记录弹窗。
|
||||
$log_count = 0;
|
||||
if (class_exists('\Jio\User\Restriction')) {
|
||||
$all = \Jio\User\Restriction::get_instance()->get_user_restrictions($user_id, false);
|
||||
@@ -672,8 +654,8 @@ function jio_get_user_ban_modal(int $user_id): string
|
||||
? '<div class="mb10 flex"><div class="author-set-left" style="min-width: 80px;">' . esc_html__('禁封记录', 'jio') . '</div><div class="author-set-right mt6">' . $log_link . '</div></div>'
|
||||
: '';
|
||||
|
||||
// 弹窗头(参考主题 zib_get_modal_colorful_header('c-yellow', ban 图标, 标题):
|
||||
// 120px 多彩横幅 + 大图标 + 居中标题,与禁封视图的 edit-header 头对应)。
|
||||
// 弹窗头:黄色 colorful header(120px 多彩横幅 + 大图标 + 居中标题,
|
||||
// 与禁封视图的 edit-header 头对应)。
|
||||
$html .= '<div class="modal-colorful-header colorful-bg c-yellow"><button type="button" class="close" data-jio-modal-close aria-label="' . esc_attr__('关闭', 'jio') . '">' . jio_user_ban_close_svg() . '</button><div class="colorful-make"></div><div class="text-center"><div class="em2x"><i class="fa fas fa-ban" aria-hidden="true"></i></div><div class="mt10 em12 padding-w10">' . esc_html($unban_title) . '</div></div></div>';
|
||||
$html .= '<form class="jio-user-ban-form" data-jio-ban-form data-jio-ban-mode="unban" data-jio-ban-user="' . esc_attr((string) $user_id) . '">';
|
||||
$html .= '<div class="mb20">';
|
||||
@@ -694,12 +676,11 @@ function jio_get_user_ban_modal(int $user_id): string
|
||||
return $html;
|
||||
}
|
||||
|
||||
// ── 未禁封视图:禁封表单(参考主题禁封弹窗同构) ──
|
||||
// ── 未禁封视图:禁封表单 ──
|
||||
$close_svg = jio_user_ban_close_svg();
|
||||
$html .= '<div class="mb10 edit-header touch"><button type="button" class="close" data-jio-modal-close aria-label="' . esc_attr__('关闭', 'jio') . '">' . $close_svg . '</button><b class="flex ac c-red"><span class="toggle-radius mr10 c-red"><i class="fa fas fa-ban" aria-hidden="true"></i></span>' . esc_html__('禁封用户', 'jio') . '</b></div>';
|
||||
|
||||
// 历史禁封次数提示(1:1 参考主题 zib_get_set_user_ban_modal:>1 次时
|
||||
// 展示「禁封记录」行 + 可点击的黄链(打开禁封记录弹窗))。
|
||||
// 历史禁封次数提示:>1 次时展示「禁封记录」行 + 可点击的黄链(打开禁封记录弹窗)。
|
||||
$log_count = 0;
|
||||
if (class_exists('\Jio\User\Restriction')) {
|
||||
$all = \Jio\User\Restriction::get_instance()->get_user_restrictions($user_id, false);
|
||||
@@ -729,7 +710,7 @@ function jio_get_user_ban_modal(int $user_id): string
|
||||
$html .= '<div data-jio-ban-desc="2" style="display:none;">' . esc_html__('禁封的用户将不能登录', 'jio') . '</div>';
|
||||
$html .= '</div>';
|
||||
|
||||
// 禁封时间(1/7/14/30/100/永久,默认 7 天,对齐参考主题 checked(7, ...))。
|
||||
// 禁封时间(1/7/14/30/100/永久,默认 7 天)。
|
||||
$html .= '<div class="muted-2-color mb6">' . esc_html__('禁封时间', 'jio') . '</div>';
|
||||
$html .= '<div class="form-radio mb10 form-but-radio">';
|
||||
foreach ([1 => __('1天', 'jio'), 7 => __('7天', 'jio'), 14 => __('14天', 'jio'), 30 => __('30天', 'jio'), 100 => __('100天', 'jio'), 0 => __('永久', 'jio')] as $days => $label) {
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
/**
|
||||
* Affiliate poster preview modal.
|
||||
*
|
||||
* 1:1 replica of the reference theme's poster-share modal (zibll js/poster-share.js
|
||||
* + css/main.css `.poster-share` block): a borderless 360px Bootstrap-style dialog
|
||||
* Poster-share modal: a borderless 360px Bootstrap-style dialog
|
||||
* centred by `.modal.flex.jc`, a `.loading-mask` overlay while the canvas renders,
|
||||
* and circular download/close buttons on a `.hover-show-con` layer that only fades
|
||||
* in on hover. The 推广海报 button lives in the revenue detail link row; the QR code
|
||||
|
||||
@@ -64,7 +64,7 @@ $points_signin_label = sprintf(__('签到领%s', 'jio'), $currency);
|
||||
</div>
|
||||
|
||||
<?php if ($points_exchange_on) :
|
||||
// 购买积分弹窗 — Zibll zibpay_get_points_pay_modal 1:1(商品盒 / 自定义 / 支付方式含卡密 / 立即支付)。
|
||||
// 购买积分弹窗(商品盒 / 自定义 / 支付方式含卡密 / 立即支付)。
|
||||
$pb_rate = max(1, (int) ($points_exchange['rate'] ?? 100));
|
||||
$pb_min_points = max(1, (int) ($points_exchange['min_points'] ?? 100));
|
||||
$pb_daily_max_points = max(1, (int) ($points_exchange['daily_max_points'] ?? 100000));
|
||||
@@ -109,7 +109,7 @@ $points_signin_label = sprintf(__('签到领%s', 'jio'), $currency);
|
||||
<?php if ($points_packages) : ?>
|
||||
<div class="muted-color mb6"><?php printf(esc_html__('请选择需购买的%s', 'jio'), esc_html($currency)); ?></div>
|
||||
<?php foreach ($points_packages as $pidx => $ppkg) : ?>
|
||||
<div class="zib-widget vip-product relative product-box<?php echo $pidx === 0 ? ' active' : ''; ?>" data-for="points_product" data-value="<?php echo esc_attr((string) $ppkg['key']); ?>">
|
||||
<div class="jio-widget-box vip-product relative product-box<?php echo $pidx === 0 ? ' active' : ''; ?>" data-for="points_product" data-value="<?php echo esc_attr((string) $ppkg['key']); ?>">
|
||||
<?php if (!empty($ppkg['tag'])) : ?>
|
||||
<div class="abs-right vip-tag badg jb-yellow"><?php echo esc_html((string) $ppkg['tag']); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -100,7 +100,7 @@ $mark = (string) ($charge_view['currency_mark'] ?? '元');
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<!-- Charge modal — Zibll balance-charge modal 1:1 (refresh_modal shell + zibpay_get_balance_charge_modal) -->
|
||||
<!-- Charge modal — balance-charge modal (refresh_modal shell) -->
|
||||
<?php
|
||||
$charge_method_logos = [
|
||||
'balance' => 'pay-balance-logo.svg',
|
||||
@@ -124,7 +124,7 @@ $charge_mark_html = $charge_mark_symbol
|
||||
? '<span class="px12">' . esc_html($mark) . '</span>'
|
||||
: '';
|
||||
$charge_unit = $charge_mark_symbol ? '' : (string) $mark;
|
||||
// 与 Zibll 格式对齐(mark 前缀:最低充值¥1);mark 配置为单位(元)时用后缀:最低充值1元。
|
||||
// 充值额度文案(mark 前缀:最低充值¥1);mark 配置为单位(元)时用后缀:最低充值1元。
|
||||
$charge_limit_html = $charge_mark_symbol
|
||||
? sprintf(__('最低充值%1$s1,最高充值%1$s%2$s', 'jio'), $mark, $custom_limit)
|
||||
: sprintf(__('最低充值1%1$s,最高充值%2$s%1$s', 'jio'), $charge_unit, $custom_limit);
|
||||
@@ -156,7 +156,7 @@ $charge_custom_block = static function () use ($mark, $charge_mark_html, $charge
|
||||
$package_pay = $normalize_balance($pkg['pay_price'] ?? '');
|
||||
$package_saving_minor = max(0, $package_credit->minor() - $package_pay->minor());
|
||||
?>
|
||||
<div class="zib-widget vip-product relative product-box<?php echo $idx === 0 ? ' active' : ''; ?>" data-for="balance_product" data-value="<?php echo esc_attr((string) $pkg['key']); ?>">
|
||||
<div class="jio-widget-box vip-product relative product-box<?php echo $idx === 0 ? ' active' : ''; ?>" data-for="balance_product" data-value="<?php echo esc_attr((string) $pkg['key']); ?>">
|
||||
<?php if (!empty($pkg['tag'])) : ?>
|
||||
<div class="abs-right vip-tag badg jb-yellow"><?php echo esc_html((string) $pkg['tag']); ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -14,14 +14,14 @@ $info = is_array($snapshot['info'] ?? null) ? $snapshot['info'] : [];
|
||||
$application = is_array($snapshot['application'] ?? null) ? $snapshot['application'] : [];
|
||||
$status = (string) ($snapshot['status'] ?? '');
|
||||
$can_apply = !empty($snapshot['can_apply']);
|
||||
$auth_icon = function_exists('jio_icon_markup') ? jio_icon_markup('zibsvg-user-auth') : '<i class="fa fas fa-id-badge" aria-hidden="true"></i>';
|
||||
$close_icon = function_exists('jio_icon_markup') ? jio_icon_markup('zibsvg-close', 'ic-close') : '<i class="fa fas fa-times" aria-hidden="true"></i>';
|
||||
$auth_icon = function_exists('jio_icon_markup') ? jio_icon_markup('jiosvg-user-auth') : '<i class="fa fas fa-id-badge" aria-hidden="true"></i>';
|
||||
$close_icon = function_exists('jio_icon_markup') ? jio_icon_markup('jiosvg-close', 'ic-close') : '<i class="fa fas fa-times" aria-hidden="true"></i>';
|
||||
$config = [
|
||||
'restBase' => untrailingslashit(rest_url('jio/v1/identity/applications')),
|
||||
'nonce' => wp_create_nonce('wp_rest'),
|
||||
];
|
||||
?>
|
||||
<div class="colorful-bg c-blue flex jc zib-widget" style="padding: 40px 20px;" data-identity-root data-identity-config="<?php echo esc_attr(wp_json_encode($config)); ?>">
|
||||
<div class="colorful-bg c-blue flex jc jio-widget-box" style="padding: 40px 20px;" data-identity-root data-identity-config="<?php echo esc_attr(wp_json_encode($config)); ?>">
|
||||
<div class="colorful-make"></div>
|
||||
<div class="text-center">
|
||||
<div class="em4x"><?php echo $auth_icon; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
|
||||
|
||||
@@ -47,8 +47,8 @@ extract($context, EXTR_SKIP); // phpcs:ignore WordPress.PHP.DontExtract.extract_
|
||||
</h1>
|
||||
<div class="uc-header__meta desc user-identity flex ac hh">
|
||||
<?php
|
||||
// 治理状态入口(参考主题 user_page_header_desc 钩子 / zib_get_user_ban_info_link:
|
||||
// 用户中心「封禁」元信息,点击打开查看禁封状态弹窗 → 申诉弹窗)。
|
||||
// 治理状态入口:用户中心「封禁」元信息,
|
||||
// 点击打开查看禁封状态弹窗 → 申诉弹窗。
|
||||
if (function_exists('jio_get_user_ban_info_link')) {
|
||||
echo jio_get_user_ban_info_link((int) $user_id); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- helper escapes internally.
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ $percentage = max(0, min(100, (int) ($progress['progress'] ?? 0)));
|
||||
<div class="jio-level-page">
|
||||
<div class="row jio-level-page__summary">
|
||||
<div class="col-md-5">
|
||||
<section class="zib-widget colorful-bg jb-vip1 jio-level-card jio-level-card--summary">
|
||||
<section class="jio-widget-box colorful-bg jb-vip1 jio-level-card jio-level-card--summary">
|
||||
<div class="colorful-make" aria-hidden="true"></div>
|
||||
<div class="jio-level-card__summary-inner">
|
||||
<div class="jio-level-card__identity">
|
||||
@@ -73,7 +73,7 @@ $percentage = max(0, min(100, (int) ($progress['progress'] ?? 0)));
|
||||
</section>
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<section class="zib-widget colorful-bg c-gray jio-level-card jio-level-card--growth">
|
||||
<section class="jio-widget-box colorful-bg c-gray jio-level-card jio-level-card--growth">
|
||||
<div class="colorful-make" aria-hidden="true"></div>
|
||||
<div class="jio-level-card__growth-inner">
|
||||
<div class="jio-level-card__growth-head">
|
||||
@@ -107,7 +107,7 @@ $percentage = max(0, min(100, (int) ($progress['progress'] ?? 0)));
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="zib-widget jio-level-experience">
|
||||
<section class="jio-widget-box jio-level-experience">
|
||||
<div class="box-body">
|
||||
<div class="jio-level-tabs" role="tablist" aria-label="<?php esc_attr_e('经验记录', 'jio'); ?>">
|
||||
<a id="tab-integral-get" class="but mr6 is-active" data-jio-level-tab="tab_integral_get" href="#tab_integral_get" role="tab" aria-controls="tab_integral_get" aria-selected="true"><?php esc_html_e('获取经验值', 'jio'); ?></a>
|
||||
|
||||
@@ -15,7 +15,7 @@ require __DIR__ . '/sidebar-vip.php';
|
||||
require __DIR__ . '/sidebar-commerce.php';
|
||||
require __DIR__ . '/sidebar-creator.php';
|
||||
require __DIR__ . '/sidebar-nav.php';
|
||||
$drawer_trigger_icon = jio_icon_markup('zibsvg-menu');
|
||||
$drawer_trigger_icon = jio_icon_markup('jiosvg-menu');
|
||||
?>
|
||||
<button type="button" class="uc-sidebar__drawer-trigger" id="uc-drawer-trigger" aria-label="<?php esc_attr_e('打开导航', 'jio'); ?>">
|
||||
<?php echo $drawer_trigger_icon; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||
|
||||
@@ -25,7 +25,7 @@ $can_recover_password = $sign_in_available && ($reset_channel === 'email_phone'
|
||||
: ($reset_channel === 'phone' ? $account_phone !== '' : $account_email !== ''));
|
||||
$recovery_target = $reset_channel === 'phone' ? $account_phone : ($account_email !== '' ? $account_email : $account_phone);
|
||||
$recovery_channel = $reset_channel === 'email_phone' ? '' : $reset_channel;
|
||||
$account_close_icon = function_exists('jio_icon_markup') ? jio_icon_markup('zibsvg-close', 'ic-close') : '<i class="fa fas fa-times" aria-hidden="true"></i>';
|
||||
$account_close_icon = function_exists('jio_icon_markup') ? jio_icon_markup('jiosvg-close', 'ic-close') : '<i class="fa fas fa-times" aria-hidden="true"></i>';
|
||||
|
||||
$render_row = static function (string $icon, string $title, string $value, string $action, string $modal, string $icon_tone, string $action_tone, bool $interactive = true): void {
|
||||
?>
|
||||
|
||||
@@ -26,8 +26,8 @@ foreach ((array) ($oauth_data['bindings'] ?? []) as $binding) {
|
||||
if (!$key) {
|
||||
continue;
|
||||
}
|
||||
// Reference parity: the provider type (clogin_ prefix stripped) drives the
|
||||
// .social-login-item brand colour, matching zibll's binding list.
|
||||
// The provider type (clogin_ prefix stripped) drives the
|
||||
// .social-login-item brand colour.
|
||||
$icon_type = str_starts_with($key, 'clogin_') ? substr($key, 7) : $key;
|
||||
$binding_rows[$key] = [
|
||||
'key' => $key,
|
||||
|
||||
@@ -20,9 +20,9 @@ try {
|
||||
$wallet = '0.00';
|
||||
}
|
||||
$points = max(0, (int) ($credit_balance ?? 0));
|
||||
$wallet_icon = jio_icon_markup('zibsvg-money-color-2');
|
||||
$points_icon = jio_icon_markup('zibsvg-points-color');
|
||||
$arrow_icon = jio_icon_markup('zibsvg-right');
|
||||
$wallet_icon = jio_icon_markup('jiosvg-money-color-2');
|
||||
$points_icon = jio_icon_markup('jiosvg-points-color');
|
||||
$arrow_icon = jio_icon_markup('jiosvg-right');
|
||||
?>
|
||||
<div class="uc-sidebar__pair uc-sidebar__pair--assets">
|
||||
<?php if ($show_wallet) : ?>
|
||||
|
||||
@@ -2,9 +2,8 @@
|
||||
/**
|
||||
* User center sidebar: creator center / promotion center cards.
|
||||
*
|
||||
* 1:1 port of the reference theme zib_user_center_page_sidebar_income_rebate():
|
||||
* two zib-widget cards, each with an icon title row and two centered stats.
|
||||
* Navigation keeps the Jio <a href data-tab> contract instead of the reference click proxy.
|
||||
* Two jio-widget-box cards, each with an icon title row and two centered stats.
|
||||
* Navigation uses the Jio <a href data-tab> contract.
|
||||
*
|
||||
* @package Jio
|
||||
*/
|
||||
@@ -36,7 +35,7 @@ if ($creation_url !== '') {
|
||||
$centers[] = [
|
||||
'url' => $creation_url,
|
||||
'tab' => 'creator',
|
||||
'icon' => jio_icon_markup('zibsvg-merchant-color', 'mr6'),
|
||||
'icon' => jio_icon_markup('jiosvg-merchant-color', 'mr6'),
|
||||
'title' => __('创作中心', 'jio'),
|
||||
'first' => jio_cut_count($cash_income),
|
||||
'first_l' => __('现金收益', 'jio'),
|
||||
@@ -64,7 +63,7 @@ if ($revenue_url !== '') {
|
||||
$centers[] = [
|
||||
'url' => $revenue_url,
|
||||
'tab' => 'revenue',
|
||||
'icon' => jio_icon_markup('zibsvg-money-color', 'mr6'),
|
||||
'icon' => jio_icon_markup('jiosvg-money-color', 'mr6'),
|
||||
'title' => __('推广中心', 'jio'),
|
||||
'first' => $rebate_ratio . '%',
|
||||
'first_l' => __('比例', 'jio'),
|
||||
@@ -75,7 +74,7 @@ if ($revenue_url !== '') {
|
||||
?>
|
||||
<div class="uc-sidebar-centers flex ab jsb col-ml6<?php echo $user_id <= 0 ? ' signin-loader' : ''; ?>">
|
||||
<?php foreach ($centers as $center) : ?>
|
||||
<a style="flex: 1;" class="mb10-sm zib-widget padding-10 flex1 pointer" href="<?php echo esc_url($center['url']); ?>" data-tab="<?php echo esc_attr($center['tab']); ?>">
|
||||
<a style="flex: 1;" class="mb10-sm jio-widget-box padding-10 flex1 pointer" href="<?php echo esc_url($center['url']); ?>" data-tab="<?php echo esc_attr($center['tab']); ?>">
|
||||
<div class="muted-color em09 mb6 flex ac"><div class="overflow-hidden"><div class="text-ellipsis"><?php echo $center['icon']; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?><?php echo esc_html($center['title']); ?></div></div><i class="ml6 fa fas fa-angle-right em12" aria-hidden="true"></i></div>
|
||||
<div class="flex jsa text-center"><div class=""><div class="font-bold em12"><?php echo esc_html($center['first']); ?></div><div class="px12 opacity5"><?php echo esc_html($center['first_l']); ?></div></div><div class="overflow-hidden"><div class="font-bold em12"><?php echo esc_html($center['second']); ?></div><div class="px12 opacity5 text-ellipsis"><?php echo esc_html($center['second_l']); ?></div></div></div>
|
||||
</a>
|
||||
|
||||
@@ -19,7 +19,7 @@ $orders_url = $orders_available ? (string) ($orders_url ?? '') : '';
|
||||
$tickets_available = isset($dashboard_tabs['tickets']);
|
||||
$tickets_url = $tickets_available ? jio_get_user_center_tab_url('tickets') : '';
|
||||
|
||||
// 参考主题由 zibpay 把「我的订单」前插到按钮组最前,其后才是等级 / 认证。
|
||||
// 「我的订单」位于按钮组最前,其后才是等级 / 认证。
|
||||
$services = array_values(array_filter([
|
||||
[
|
||||
'label' => __('我的订单', 'jio'),
|
||||
@@ -74,7 +74,7 @@ $render_grid = static function (array $items): void {
|
||||
<?php foreach ($items as $item) :
|
||||
$tab = (string) ($item['tab'] ?? '');
|
||||
$item_class = 'icon-but-' . ($tab !== '' ? $tab : 'item');
|
||||
$icon_html = jio_icon_markup('zibsvg-' . (string) $item['icon']);
|
||||
$icon_html = jio_icon_markup('jiosvg-' . (string) $item['icon']);
|
||||
?>
|
||||
<a class="<?php echo esc_attr($item_class); ?>" href="<?php echo esc_url((string) $item['url']); ?>"<?php if ($tab !== '') : ?> data-tab="<?php echo esc_attr($tab); ?>"<?php endif; ?>>
|
||||
<div class="em16"><?php echo $icon_html; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></div>
|
||||
@@ -86,14 +86,14 @@ $render_grid = static function (array $items): void {
|
||||
};
|
||||
?>
|
||||
<?php if ($services) : ?>
|
||||
<div class="uc-sidebar-iconbox zib-widget padding-6 mb10-sm">
|
||||
<div class="uc-sidebar-iconbox jio-widget-box padding-6 mb10-sm">
|
||||
<div class="padding-6 ml3"><?php esc_html_e('我的服务', 'jio'); ?></div>
|
||||
<?php $render_grid($services); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($settings) : ?>
|
||||
<div class="uc-sidebar-iconbox zib-widget padding-6">
|
||||
<div class="uc-sidebar-iconbox jio-widget-box padding-6">
|
||||
<div class="padding-6 ml3"><?php esc_html_e('功能设置', 'jio'); ?></div>
|
||||
<?php $render_grid($settings); ?>
|
||||
</div>
|
||||
|
||||
@@ -34,8 +34,8 @@ $stats = [
|
||||
],
|
||||
];
|
||||
?>
|
||||
<?php // 1:1 参考主题 zib_user_center_page_sidebar_statistics():单张 zib-widget,四项 space-around 平铺。 ?>
|
||||
<div class="uc-sidebar-statistics mb10-sm mb20 flex ac jsa zib-widget padding-10 text-center" aria-label="<?php esc_attr_e('账号统计', 'jio'); ?>">
|
||||
<?php // 单张 jio-widget-box,四项 space-around 平铺。 ?>
|
||||
<div class="uc-sidebar-statistics mb10-sm mb20 flex ac jsa jio-widget-box padding-10 text-center" aria-label="<?php esc_attr_e('账号统计', 'jio'); ?>">
|
||||
<?php foreach ($stats as $stat) : ?>
|
||||
<a class="user-statistics-item" href="<?php echo esc_url((string) $stat['url']); ?>"<?php if (!empty($stat['tab'])) : ?> data-tab="<?php echo esc_attr((string) $stat['tab']); ?>"<?php endif; ?>><div class="em14"><?php echo esc_html(jio_cut_count((int) $stat['value'])); ?></div><div class="em09 opacity5 mt6"><?php echo esc_html((string) $stat['label']); ?></div></a>
|
||||
<?php endforeach; ?>
|
||||
|
||||
@@ -2,10 +2,9 @@
|
||||
/**
|
||||
* User center sidebar: VIP entry.
|
||||
*
|
||||
* 1:1 port of the reference theme zib_user_center_page_sidebar_vip():
|
||||
* metallic payvip-icon bar, level icon + name + expiry badge for members,
|
||||
* Metallic payvip-icon bar, level icon + name + expiry badge for members,
|
||||
* vip_1 icon + "开通会员 尊享会员权益" otherwise, chevron pinned right.
|
||||
* Navigation keeps the Jio <a href data-tab> contract instead of the reference click proxy.
|
||||
* Navigation uses the Jio <a href data-tab> contract.
|
||||
*
|
||||
* @package Jio
|
||||
*/
|
||||
@@ -27,7 +26,7 @@ $vip_url = jio_get_user_center_tab_url('vip');
|
||||
|
||||
if ($vip_level > 0) {
|
||||
$vip_name = (string) ($vip_levels[$vip_level]['name_html'] ?? $vip_levels[$vip_level]['name'] ?? ('VIP' . $vip_level));
|
||||
// Same semantics as zib_get_user_vip_exp_date_text(): date / 会员已过期 / 永久会员,
|
||||
// Expiry badge: date / 会员已过期 / 永久会员,
|
||||
// and no badge at all when there is no expiry data.
|
||||
$expires = max(0, (int) ($vip_state['expires'] ?? 0));
|
||||
$exp_label = '';
|
||||
@@ -41,11 +40,11 @@ if ($vip_level > 0) {
|
||||
. '<span>' . wp_kses_post($vip_name) . '</span>';
|
||||
if ($exp_label !== '') {
|
||||
$button .= '<span class="ml10 badg jb-yellow vip-expdate-tag">'
|
||||
. jio_icon_markup('zibsvg-time', 'mr3')
|
||||
. jio_icon_markup('jiosvg-time', 'mr3')
|
||||
. esc_html($exp_label) . '</span>';
|
||||
}
|
||||
} else {
|
||||
$button = jio_icon_markup('zibsvg-vip_1', 'em12 mr6') . esc_html__('开通会员 尊享会员权益', 'jio');
|
||||
$button = jio_icon_markup('jiosvg-vip_1', 'em12 mr6') . esc_html__('开通会员 尊享会员权益', 'jio');
|
||||
}
|
||||
|
||||
$vip_class = 'uc-sidebar-vip mb20 mb10-sm main-radius payvip-icon btn-block badg pointer' . ($user_id <= 0 ? ' signin-loader' : '');
|
||||
|
||||
@@ -118,7 +118,7 @@ foreach ([1, 2] as $lv) {
|
||||
: '';
|
||||
$cta = __('开通', 'jio') . wp_kses_post($lv_name);
|
||||
$vip_attr = $lv;
|
||||
// 参考主题 zibpay_get_vip_card:续费/升级档位卡展示各自的一句话简介。
|
||||
// 续费/升级档位卡展示各自的一句话简介。
|
||||
$card_action = 'pay';
|
||||
$card_desc = $lv_desc;
|
||||
$lv_icon_url = esc_url((string) ($levels[$lv]['img_icon'] ?? ''));
|
||||
@@ -182,8 +182,8 @@ foreach ([1, 2] as $lv) {
|
||||
</div>
|
||||
|
||||
<?php
|
||||
// 积分兑换会员入口(参考主题 zibpay_user_page_tab_content_vip 1:1:档位购买卡
|
||||
// 下方的全宽横条;仅非会员 + 积分兑换开启 + 有可兑换套餐时输出)。
|
||||
// 积分兑换会员入口(档位购买卡下方的全宽横条;
|
||||
// 仅非会员 + 积分兑换开启 + 有可兑换套餐时输出)。
|
||||
echo jio_get_vip_points_exchange_entry_html($user_id, $level); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- 各字段已在生成时转义。
|
||||
?>
|
||||
</div>
|
||||
+1
-1
@@ -114,7 +114,7 @@ class Admin {
|
||||
jio_enqueue_fontawesome();
|
||||
|
||||
// Frontend SVG sprite (defines window.jio_svgs and injects the symbol
|
||||
// sheet) so schema icon fields can preview built-in zibsvg values.
|
||||
// sheet) so schema icon fields can preview built-in jiosvg values.
|
||||
wp_enqueue_script(
|
||||
'jio-svg-sprite',
|
||||
get_template_directory_uri() . '/assets/js/runtime/svg-icon.js',
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
* @package Jio
|
||||
*
|
||||
* 后台列表页分页条 —— 1:1 复刻「卡密管理」页的 zibpay_admin_pagenavi 结构。
|
||||
* 后台列表页分页条 —— 沿用「卡密管理」页的翻页结构。
|
||||
*
|
||||
* 支付中心各页面(订单明细 / 付费文章 / 优惠码 / 创作分成 / 提现审核 / 卡密管理)
|
||||
* 原先各写一份几乎相同的翻页代码。这里统一到一处,标记沿用卡密管理那一套:
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
/**
|
||||
* @package Jio
|
||||
*
|
||||
* 后台「卡密管理」页面 — 1:1 复刻参考主题 zibll 的 zibpay/page/charge-card.php。
|
||||
* 后台「卡密管理」页面。
|
||||
*
|
||||
* 结构:列表(过滤/搜索/排序/批量删除/分页) + 添加卡密(自动生成 / 导入) + 导出卡密(text / xls)。
|
||||
* 卡密类型与参考主题一致:余额充值 / 会员兑换 / 积分兑换 / 自定义卡密;
|
||||
* 卡密类型:余额充值 / 会员兑换 / 积分兑换 / 自定义卡密;
|
||||
* 本主题内部类型映射:balance / vip / credits / custom。
|
||||
* 差异点:Jio 无商城发货(shipped)子系统,故不含「已售」标记与链接;删除取代参考主题的批量操作语义一致。
|
||||
* 差异点:Jio 无商城发货(shipped)子系统,故不含「已售」标记与链接。
|
||||
*
|
||||
* 外壳与配色走 NativeUi(.jio-native),页面专属交互样式仍由 print_assets() 输出。
|
||||
* 类体按关注点拆成 flat sibling traits(PSR-4 要求 trait 与宿主类同目录,不能放子目录):
|
||||
@@ -114,7 +114,7 @@ class PayChargeCards {
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出处理(参考主题 zibpay_ajax_card_pass_export 同款行为)。
|
||||
* 导出处理。
|
||||
*/
|
||||
public function handle_export(): void {
|
||||
if (!current_user_can(self::CAPABILITY)) {
|
||||
@@ -193,7 +193,7 @@ class PayChargeCards {
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出 xls(参考主题 zib_export_excel 同款行为,GB2312 编码保证 Excel 兼容)。
|
||||
* 导出 xls(GB2312 编码保证 Excel 兼容)。
|
||||
*
|
||||
* @param array<int,array<int,string>> $data
|
||||
* @param array<int,string> $title
|
||||
|
||||
@@ -10,8 +10,8 @@ defined('ABSPATH') || exit;
|
||||
/**
|
||||
* 「支付&付费」设置 schema。
|
||||
*
|
||||
* 页面结构 1:1 复刻参考主题 Zibll 的「支付&付费」section(知识付费 / 余额充值 /
|
||||
* VIP会员 / 创作分成 / 推广返佣 / 收款接口),并按产品需求新增「提现策略」子页。
|
||||
* 页面结构:知识付费 / 余额充值 / VIP会员 / 创作分成 / 推广返佣 / 收款接口,
|
||||
* 另含产品需求的「提现策略」子页。
|
||||
* 收款接口仅保留支付宝、微信、PayPal、Stripe、易支付;订单、资金流水与提现
|
||||
* 统一使用同一套流水号,无可配置前缀。
|
||||
*/
|
||||
@@ -678,7 +678,7 @@ class SchemaPayment {
|
||||
}
|
||||
|
||||
/**
|
||||
* 标签颜色调色板(参考主题 zib_palette(array(), array('b','jb')))。
|
||||
* 标签颜色调色板(b / jb 前缀两类)。
|
||||
*
|
||||
* @return array<int,array<string,string>>
|
||||
*/
|
||||
|
||||
@@ -677,8 +677,8 @@ class SchemaProvider {
|
||||
return wp_kses_post((string) $value);
|
||||
case 'rich_html':
|
||||
// Inline whitelist for card title/desc: `badge` is a custom
|
||||
// element that wp_kses_post() would strip, but legacy (Zibll)
|
||||
// renders such markup verbatim.
|
||||
// element that wp_kses_post() would strip, but card title/desc
|
||||
// render such markup verbatim.
|
||||
return function_exists('jio_icon_card_kses')
|
||||
? jio_icon_card_kses((string) $value)
|
||||
: wp_kses_post((string) $value);
|
||||
|
||||
@@ -286,7 +286,7 @@ class UserController extends ControllerBase {
|
||||
'permission_callback' => [$this, 'check_permission'],
|
||||
]);
|
||||
|
||||
// 前台禁封弹窗(1:1 复刻参考主题 set_user_ban_modal / zib_get_set_user_ban_modal)。
|
||||
// 前台禁封弹窗。
|
||||
// modal 内容每次拉取(restriction 状态可能已变),不缓存。
|
||||
register_rest_route(self::API_NAMESPACE, '/user-ban/modal', [
|
||||
'methods' => 'GET',
|
||||
@@ -294,29 +294,28 @@ class UserController extends ControllerBase {
|
||||
'permission_callback' => [$this, 'check_permission'],
|
||||
]);
|
||||
|
||||
// 前台禁封 / 解封提交(对齐参考主题 wp_ajax_set_user_ban)。
|
||||
// 前台禁封 / 解封提交。
|
||||
register_rest_route(self::API_NAMESPACE, '/user-ban/set', [
|
||||
'methods' => 'POST',
|
||||
'callback' => [$this, 'set_user_ban'],
|
||||
'permission_callback' => [$this, 'check_permission'],
|
||||
]);
|
||||
|
||||
// 前台查看禁封状态弹窗(1:1 复刻参考主题 zib_get_ban_info_modal;
|
||||
// 本人或管理员可见,权限在 helper 内判定)。
|
||||
// 前台查看禁封状态弹窗(本人或管理员可见,权限在 helper 内判定)。
|
||||
register_rest_route(self::API_NAMESPACE, '/user-ban/info-modal', [
|
||||
'methods' => 'GET',
|
||||
'callback' => [$this, 'get_user_ban_info_modal'],
|
||||
'permission_callback' => static function () { return is_user_logged_in(); },
|
||||
]);
|
||||
|
||||
// 前台禁封申诉弹窗(1:1 复刻参考主题 zib_get_user_ban_appeal_modal;仅本人)。
|
||||
// 前台禁封申诉弹窗(仅本人)。
|
||||
register_rest_route(self::API_NAMESPACE, '/user-ban/appeal-modal', [
|
||||
'methods' => 'GET',
|
||||
'callback' => [$this, 'get_user_ban_appeal_modal'],
|
||||
'permission_callback' => static function () { return is_user_logged_in(); },
|
||||
]);
|
||||
|
||||
// 前台禁封记录弹窗(1:1 复刻参考主题 zib_get_ban_log_modal;仅管理员)。
|
||||
// 前台禁封记录弹窗(仅管理员)。
|
||||
register_rest_route(self::API_NAMESPACE, '/user-ban/log-modal', [
|
||||
'methods' => 'GET',
|
||||
'callback' => [$this, 'get_user_ban_log_modal'],
|
||||
|
||||
@@ -81,8 +81,7 @@ trait UserControllerRestrictionOperations {
|
||||
}
|
||||
|
||||
/**
|
||||
* 前台禁封弹窗内容(1:1 复刻参考主题 zib_get_set_user_ban_modal,
|
||||
* 经 jio_get_user_ban_modal 渲染;参考主题 refresh_modal 每次刷新同语义)。
|
||||
* 前台禁封弹窗内容(经 jio_get_user_ban_modal 渲染,每次拉取最新状态)。
|
||||
*/
|
||||
public function get_user_ban_modal(\WP_REST_Request $request): \WP_REST_Response {
|
||||
$user_id = (int) $request->get_param('user_id');
|
||||
@@ -100,8 +99,8 @@ trait UserControllerRestrictionOperations {
|
||||
}
|
||||
|
||||
/**
|
||||
* 前台查看禁封状态弹窗内容(1:1 复刻参考主题 zib_get_ban_info_modal,
|
||||
* 经 jio_get_user_ban_info_modal 渲染;本人或管理员可见)。
|
||||
* 前台查看禁封状态弹窗内容(经 jio_get_user_ban_info_modal 渲染;
|
||||
* 本人或管理员可见)。
|
||||
*/
|
||||
public function get_user_ban_info_modal(\WP_REST_Request $request): \WP_REST_Response {
|
||||
$user_id = (int) $request->get_param('user_id');
|
||||
@@ -119,8 +118,7 @@ trait UserControllerRestrictionOperations {
|
||||
}
|
||||
|
||||
/**
|
||||
* 前台禁封申诉弹窗内容(1:1 复刻参考主题 zib_get_user_ban_appeal_modal,
|
||||
* 经 jio_get_user_ban_appeal_modal 渲染;仅本人可见)。
|
||||
* 前台禁封申诉弹窗内容(经 jio_get_user_ban_appeal_modal 渲染;仅本人可见)。
|
||||
*/
|
||||
public function get_user_ban_appeal_modal(\WP_REST_Request $request): \WP_REST_Response {
|
||||
$user_id = (int) $request->get_param('user_id');
|
||||
@@ -138,8 +136,8 @@ trait UserControllerRestrictionOperations {
|
||||
}
|
||||
|
||||
/**
|
||||
* 前台禁封记录弹窗内容(1:1 复刻参考主题 zib_get_ban_log_modal,
|
||||
* 经 jio_get_user_ban_log_modal 渲染;仅具备禁封权限的管理员可见)。
|
||||
* 前台禁封记录弹窗内容(经 jio_get_user_ban_log_modal 渲染;
|
||||
* 仅具备禁封权限的管理员可见)。
|
||||
*/
|
||||
public function get_user_ban_log_modal(\WP_REST_Request $request): \WP_REST_Response {
|
||||
$user_id = (int) $request->get_param('user_id');
|
||||
@@ -157,7 +155,7 @@ trait UserControllerRestrictionOperations {
|
||||
}
|
||||
|
||||
/**
|
||||
* 前台禁封 / 解封提交(1:1 复刻参考主题 zib_ajax_set_user_ban 语义):
|
||||
* 前台禁封 / 解封提交:
|
||||
* ban=0 解封(留言站内信);ban=1 拉入小黑屋 / ban=2 禁封用户,
|
||||
* 支持禁封时长、预置/其它原因、禁封说明、删除全部内容、禁止申诉(含说明)。
|
||||
*/
|
||||
@@ -223,7 +221,7 @@ trait UserControllerRestrictionOperations {
|
||||
]);
|
||||
}
|
||||
|
||||
// 站内信(后台禁封表单 / 参考主题 zib_updata_user_ban_msg 同语义)。
|
||||
// 站内信(与后台禁封表单同语义)。
|
||||
$notice = $type === \Jio\User\Restriction::TYPE_BAN
|
||||
? __('您的账号已被禁封,将无法登录。', 'jio')
|
||||
: __('您已被拉入小黑屋,发布等相关权限已被限制。', 'jio');
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
/**
|
||||
* Upload limits, mime restrictions, auto-rename, and attachment page rules.
|
||||
*
|
||||
* Mirrors the reference theme's upload permission suite (zib-attachment.php):
|
||||
* per-user-type size limits for image / video / file uploads, allow & prohibit
|
||||
* Per-user-type size limits for image / video / file uploads, allow & prohibit
|
||||
* mime lists, upload file renaming, and hiding attachment pages from guests.
|
||||
*
|
||||
* @package Jio
|
||||
|
||||
+1
-1
@@ -229,7 +229,7 @@ final class OAuth {
|
||||
}
|
||||
|
||||
/**
|
||||
* Reference-parity social login block (legacy zib_social_login()).
|
||||
* Social login block.
|
||||
*
|
||||
* Emits the muted separator plus a .social_loginbar of .social-login-item
|
||||
* buttons, one per enabled provider. Returns '' when nothing is enabled.
|
||||
|
||||
@@ -156,9 +156,9 @@ trait VipServiceModal {
|
||||
}
|
||||
|
||||
/**
|
||||
* 积分兑换会员弹窗(参考主题 zibpay_get_vip_points_exchange_modal 1:1 移植)。
|
||||
* 积分兑换会员弹窗。
|
||||
*
|
||||
* 服务端静态输出参考主题 refresh_modal 同构外壳:
|
||||
* 服务端静态输出刷新式弹窗外壳:
|
||||
* .modal.flex.jc.fade > .modal-dialog.modal-mini.full-sm
|
||||
* > .modal-content > .modal-body
|
||||
* 与余额充值/购买积分弹窗同构(静止态由 vip-modal.css 显式隐藏,打开态由
|
||||
@@ -242,13 +242,11 @@ trait VipServiceModal {
|
||||
$desc_text = trim((string) ($vip['points_exchange']['desc'] ?? ''));
|
||||
$desc = $desc_text !== ''
|
||||
// 管理员编辑的富文本说明:保存端已 wp_kses_post,这里同级别输出
|
||||
// (参考主题 zibpay_get_vip_points_exchange_modal 原样拼接)。
|
||||
// (原样拼接)。
|
||||
? '<div class="muted-box muted-2-color padding-10 em09 mt20 jio-vip-points-desc">' . wp_kses_post($desc_text) . '</div>'
|
||||
: '';
|
||||
|
||||
// 最低价套餐仍超出用户积分 → 参考主题的 badg c-red btn-block 提示。
|
||||
// (参考主题源码写作 `!$min_val > $user_points`,因运算符优先级恒假,
|
||||
// 此处按其原意取真实比较,保证提示分支可达。)
|
||||
// 最低价套餐仍超出用户积分 → badg c-red btn-block 提示。
|
||||
if ($min_points > $user_points) {
|
||||
$form = '<div class="mt20"><div class="badg c-red btn-block">'
|
||||
. esc_html(sprintf(__('%s不足,暂时无法兑换', 'jio'), $currency))
|
||||
@@ -290,7 +288,7 @@ trait VipServiceModal {
|
||||
}
|
||||
|
||||
/**
|
||||
* 积分兑换卡片等级图标(参考主题 zibpay_get_vip_card_icon)。
|
||||
* 积分兑换卡片等级图标。
|
||||
*
|
||||
* @param array<string,mixed> $level_settings 等级设置(含 name / img_icon)。
|
||||
*/
|
||||
|
||||
Loaded 100 of 188 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user