feat(navigation): hard-switch to Zibll navigation and Font Awesome 5

This commit is contained in:
2026-08-18 20:46:21 +08:00
parent 3c3ddac8be
commit a0b84977a2
630 changed files with 101647 additions and 11293 deletions
+7 -8
View File
@@ -56,7 +56,7 @@ trait GlobalControllerPart1 {
if (!empty($item['add_items']) && is_array($item['add_items'])) {
foreach ($item['add_items'] as $sub_item) {
$label = sanitize_text_field($sub_item['label'] ?? '');
$icon = sanitize_text_field($sub_item['icon'] ?? 'fas fa-pen');
$icon = sanitize_text_field($sub_item['icon'] ?? 'fa fas fa-pen');
$url = esc_url_raw($sub_item['url'] ?? '');
if ($label === '') {
continue;
@@ -237,7 +237,7 @@ trait GlobalControllerPart1 {
$icon_dark = sanitize_text_field($item['icon_dark'] ?? '');
$icon_light = sanitize_text_field($item['icon_light'] ?? '');
if ($type === 'theme_mode') {
$icon = 'fas fa-sun';
$icon = 'fa fas fa-sun';
$icon_dark = '';
$icon_light = '';
}
@@ -247,13 +247,12 @@ trait GlobalControllerPart1 {
if ($type === 'pay_vip') {
$link = '';
$hover = '';
if ($icon === '' || str_contains($icon, 'fa-diamond') || $icon === 'fa fa-diamond') {
$icon = 'fas fa-gem';
}
// Ensure FA5 prefix when bare fa-* is stored.
if ($icon !== '' && !preg_match('/\b(fas|far|fab|fal|fad)\b/', $icon)) {
$icon = 'fas ' . ltrim(preg_replace('/^fa\s+/', '', $icon) ?? $icon);
if ($icon === '' || str_contains($icon, 'fa-gem') || $icon === 'fa fas fa-gem') {
$icon = 'fa fas fa-gem';
}
if (!preg_match('/^fa\s+(?:fas|far|fab)\s+fa-[a-z0-9-]+(?:\s+fa-[a-z0-9-]+)*$/i', $icon)) {
$icon = 'fa fas fa-gem';
}
}
return [