refactor(assets): vendor 资产迁入标准目录并全仓去除 zibll 标识
- assets/vendor 全量迁移: fontawesome5→assets/fontawesome5, css→assets/css, js→assets/js/runtime(避开 14 个同名自有文件), img 合并去重→assets/img, fonts→assets/fonts; 删除 assets/vendor - libs 五个与 widgets/third-party 字节相同的库不重复入库, loader paths 改指向 - 运行时切换: _win.uri=assets 根, loader baseUrl=/js/runtime, enlighter 注入 路径同步; PHP 7 个引用文件切换并改名 $zibll_*→$runtime_* - 去品牌: Qinver 头注释/品牌 console.log/演示链接清除, 默认文案中性化 - 功能标识符改名: zib__→aksrt__, zib_ajax→aksrt_ajax, window.zib→ window.aksrtLegacy, zibllblock/*→aksrtblock/*, .zib-widget→.aksrt-panel, .zib-slider→.aksrt-slider, zib_menu_options meta 键等 - 自有 CSS 改名: legacy-utilities/compat-vars/footer shell - admin SPA 重建; 契约测试同步(路径/断言/文件更名) - 例外保留: tests/visual 对照环境与 fixtures 前缀(外部 Zibll 产品引用) 验证: php -l 133 个改动文件通过; runtime 86 个 JS node --check 通过; 契约测试 68/70(2 个失败经 stash 对照确认为存量问题)
This commit is contained in:
1 parent
4f2391fb64
commit
9375b1c30c
591 files changed
+1690
-11041
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* Icon card helpers (zibll zib_icon_card / zib_icon_cover_card).
|
||||
* Icon card helpers (legacy / legacy).
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
@@ -136,7 +136,7 @@ if (!function_exists('aksrt_icon_cover_card')) :
|
||||
*/
|
||||
function aksrt_icon_cover_card(array $args = [], bool $echo = false): string {
|
||||
$defaults = [
|
||||
'class' => 'zib-widget',
|
||||
'class' => 'aksrt-panel',
|
||||
'icon' => '',
|
||||
'icon_size' => 25,
|
||||
'customize_icon' => '',
|
||||
@@ -174,7 +174,7 @@ if (!function_exists('aksrt_icon_cover_card')) :
|
||||
}
|
||||
|
||||
$icon_fa = trim((string) $args['icon']);
|
||||
// custom_icon (SPA) + customize_icon (zibll) + icon_image URL.
|
||||
// custom_icon (SPA) + customize_icon (legacy) + icon_image URL.
|
||||
$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 = '';
|
||||
@@ -196,10 +196,10 @@ if (!function_exists('aksrt_icon_cover_card')) :
|
||||
|
||||
$url = esc_url(trim((string) ($link['url'] ?? '')));
|
||||
$target = sanitize_text_field((string) ($link['target'] ?? ''));
|
||||
// zibll only adds target= when non-empty; keep same for 1:1.
|
||||
// legacy only adds target= when non-empty; keep same for 1:1.
|
||||
$tgt = ($target !== '' && $target !== '_self') ? ' target="' . esc_attr($target) . '"' : '';
|
||||
|
||||
// zibll: class = "icon-cover-icon badg cir" + optional icon_class (may include radius4 / c-* / jb-*).
|
||||
// legacy: class = "icon-cover-icon badg cir" + optional icon_class (may include radius4 / c-* / jb-*).
|
||||
// Do NOT sanitize_html_class on the whole string — it collapses multi-token classes.
|
||||
$icon_class_extra = trim(preg_replace('/\s+/', ' ', (string) $args['icon_class']));
|
||||
$icon_class = 'icon-cover-icon badg cir';
|
||||
@@ -225,7 +225,7 @@ if (!function_exists('aksrt_icon_cover_card')) :
|
||||
}
|
||||
|
||||
$icon_size = max(14, min(64, (int) $args['icon_size']));
|
||||
// zibll always sets font-size on the icon badge.
|
||||
// legacy always sets font-size on the icon badge.
|
||||
$style = 'font-size: ' . $icon_size . 'px;';
|
||||
$custom_color = sanitize_hex_color((string) $args['icon_custom_color']);
|
||||
if ($custom_color) {
|
||||
@@ -237,8 +237,8 @@ if (!function_exists('aksrt_icon_cover_card')) :
|
||||
} elseif ($icon_img !== '') {
|
||||
$icon_inner = '<img' . aksrt_get_lazy_attr('lazy_other', $icon_img, 'img-icon') . ' alt="">';
|
||||
} else {
|
||||
// zibll: zib_get_cfs_icon($args['icon'], 'em09') — keep FA class + em09.
|
||||
if ($icon_fa !== '' && !str_contains($icon_fa, 'fa-') && !str_contains($icon_fa, ' ') && !str_starts_with($icon_fa, 'zibsvg-')) {
|
||||
// legacy: legacy($args['icon'], 'em09') — keep FA class + em09.
|
||||
if ($icon_fa !== '' && !str_contains($icon_fa, 'fa-') && !str_contains($icon_fa, ' ') && !str_starts_with($icon_fa, 'aksrtsvg-')) {
|
||||
$icon_fa = 'fa fas fa-' . $icon_fa;
|
||||
}
|
||||
if (str_contains($icon_fa, '<')) {
|
||||
@@ -254,7 +254,7 @@ if (!function_exists('aksrt_icon_cover_card')) :
|
||||
}
|
||||
$icon = '<div class="' . esc_attr(trim($icon_class)) . '" style="' . esc_attr($style) . '">' . $icon_inner . '</div>';
|
||||
|
||||
// zibll allows HTML in title/desc (admin stores badges etc.).
|
||||
// legacy allows HTML in title/desc (admin stores badges etc.).
|
||||
$title = (string) $args['title'];
|
||||
$desc = (string) $args['desc'];
|
||||
$allow = [
|
||||
@@ -277,7 +277,7 @@ if (!function_exists('aksrt_icon_cover_card')) :
|
||||
|
||||
$html = '';
|
||||
if ($url !== '') {
|
||||
// zibll: <a class="main-color" [target] href="...">
|
||||
// legacy: <a class="main-color" [target] href="...">
|
||||
$html .= '<a class="main-color" ' . ($tgt !== '' ? ltrim($tgt) . ' ' : '') . 'href="' . esc_url($url) . '">';
|
||||
}
|
||||
// Keep every horizontal icon card on the same compact visual contract,
|
||||
|
||||
Reference in new issue
Block a user