feat(navigation): hard-switch to Zibll navigation and Font Awesome 5
This commit is contained in:
+18
-31
@@ -8,20 +8,20 @@
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
$aksrt_header_settings = class_exists('\AKSRT\Settings\Settings')
|
||||
? \AKSRT\Settings\Settings::get_header_nav_settings()
|
||||
: [
|
||||
'fixed' => true,
|
||||
'search_enabled' => true,
|
||||
'user_menu' => true,
|
||||
'publish_btn' => true,
|
||||
'mobile_drawer' => true,
|
||||
'nav_style' => 'default',
|
||||
'max_width' => 1200,
|
||||
'scroll_down_hide' => true,
|
||||
'layout' => '1',
|
||||
'mobile_layout' => 'center',
|
||||
'mobile_align' => 'left',
|
||||
];
|
||||
? \AKSRT\Settings\Settings::get_all()
|
||||
: [];
|
||||
$aksrt_header_layout = sanitize_key((string) ($aksrt_header_settings['header_layout'] ?? '1'));
|
||||
if (!in_array($aksrt_header_layout, ['1', '2', '3'], true)) {
|
||||
$aksrt_header_layout = '1';
|
||||
}
|
||||
$aksrt_mobile_layout = sanitize_key((string) ($aksrt_header_settings['mobile_header_layout'] ?? 'center'));
|
||||
if (!in_array($aksrt_mobile_layout, ['center', 'left'], true)) {
|
||||
$aksrt_mobile_layout = 'center';
|
||||
}
|
||||
$aksrt_mobile_align = sanitize_key((string) ($aksrt_header_settings['mobile_navbar_align'] ?? 'left'));
|
||||
if (!in_array($aksrt_mobile_align, ['top', 'left', 'right'], true)) {
|
||||
$aksrt_mobile_align = 'left';
|
||||
}
|
||||
|
||||
$aksrt_initial_theme_mode = '';
|
||||
if (class_exists('\AKSRT\Settings\Settings') && method_exists('\AKSRT\Settings\Settings', 'initial_theme_mode')) {
|
||||
@@ -31,7 +31,7 @@ $aksrt_has_initial_theme = in_array($aksrt_initial_theme_mode, ['dark', 'light']
|
||||
|
||||
$aksrt_body_classes = [];
|
||||
// Zibll: body.nav-fixed drives top padding + hero pull-under-nav.
|
||||
if (!empty($aksrt_header_settings['fixed'])) {
|
||||
if (!isset($aksrt_header_settings['nav_fixed']) || !empty($aksrt_header_settings['nav_fixed'])) {
|
||||
$aksrt_body_classes[] = 'nav-fixed';
|
||||
} else {
|
||||
$aksrt_body_classes[] = 'has-static-nav';
|
||||
@@ -43,17 +43,9 @@ if ($aksrt_initial_theme_mode === 'dark') {
|
||||
} elseif ($aksrt_initial_theme_mode === 'light') {
|
||||
$aksrt_body_classes[] = 'white-theme';
|
||||
}
|
||||
if (!empty($aksrt_header_settings['scroll_down_hide']) && !empty($aksrt_header_settings['fixed'])) {
|
||||
$aksrt_body_classes[] = 'scroll-down-hide';
|
||||
}
|
||||
$aksrt_body_classes[] = 'header-layout-' . $aksrt_header_settings['layout'];
|
||||
$aksrt_body_classes[] = 'mobile-header-' . $aksrt_header_settings['mobile_layout'];
|
||||
$aksrt_body_classes[] = 'mobile-nav-' . $aksrt_header_settings['mobile_align'];
|
||||
// header_nav_style → body class for transparent / blur chrome.
|
||||
$aksrt_nav_style = sanitize_key((string) ($aksrt_header_settings['nav_style'] ?? 'default'));
|
||||
if (in_array($aksrt_nav_style, ['transparent', 'blur'], true)) {
|
||||
$aksrt_body_classes[] = 'header-nav-style-' . $aksrt_nav_style;
|
||||
}
|
||||
$aksrt_body_classes[] = 'header-layout-' . $aksrt_header_layout;
|
||||
$aksrt_body_classes[] = 'mobile-header-' . $aksrt_mobile_layout;
|
||||
$aksrt_body_classes[] = 'mobile-nav-' . $aksrt_mobile_align;
|
||||
|
||||
// Global background system.
|
||||
$aksrt_bg_settings = class_exists('\AKSRT\Settings\Settings') ? \AKSRT\Settings\Settings::get_global_background_settings() : [];
|
||||
@@ -106,10 +98,5 @@ if (function_exists('aksrt_header')) {
|
||||
aksrt_header();
|
||||
}
|
||||
|
||||
// Zibll: header slider after </header> (+ mobile drawer), before page fluid/main.
|
||||
if (function_exists('aksrt_header_slide')) {
|
||||
aksrt_header_slide();
|
||||
}
|
||||
|
||||
\AKSRT\WidgetSystem\WidgetAreas::render('all_top_fluid', 'fluid-widget-wrap');
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user