|
|
@@ -409,17 +409,11 @@ class Content implements Renderable
|
|
|
{
|
|
|
// default data array
|
|
|
$defaultData = [
|
|
|
- 'main_layout_type' => 'vertical',
|
|
|
- 'theme' => 'light',
|
|
|
'sidebar_collapsed' => false,
|
|
|
'navbar_color' => '',
|
|
|
- 'horizontal_menu_type' => 'floating',
|
|
|
- 'vertical_menu_navbar_type' => 'floating',
|
|
|
- 'footer_type' => 'static', //footer
|
|
|
+ 'navbar_class' => 'floating',
|
|
|
+ 'footer_type' => '',
|
|
|
'body_class' => '',
|
|
|
- 'content_layout' => 'default',
|
|
|
- 'blank_page' => false,
|
|
|
- 'direction' => env('MIX_CONTENT_DIRECTION', 'ltr'),
|
|
|
];
|
|
|
|
|
|
$data = array_merge(
|
|
|
@@ -427,27 +421,13 @@ class Content implements Renderable
|
|
|
$this->config
|
|
|
);
|
|
|
|
|
|
- // All options available in the template
|
|
|
$allOptions = [
|
|
|
- 'main_layout_type' => ['vertical', 'horizontal'],
|
|
|
- 'theme' => ['light' => 'light', 'dark' => 'dark-layout', 'semi-dark' => 'semi-dark-layout'],
|
|
|
'sidebar_collapsed' => [true, false],
|
|
|
'navbar_color' => ['bg-primary', 'bg-info', 'bg-warning', 'bg-success', 'bg-danger', 'bg-dark'],
|
|
|
- 'content_layout' => ['default', 'content-left-sidebar', 'content-right-sidebar', 'content-detached-left-sidebar', 'content-detached-right-sidebar'],
|
|
|
- 'sidebar_position_class' => ['content-left-sidebar' => 'sidebar-left', 'content-right-sidebar' => 'sidebar-right', 'content-detached-left-sidebar' => 'sidebar-detached sidebar-left', 'content-detached-right-sidebar' => 'sidebar-detached sidebar-right', 'default' => 'default-sidebar-position'],
|
|
|
- 'content_sidebar_class' => ['content-left-sidebar' => 'content-right', 'content-right-sidebar' => 'content-left', 'content-detached-left-sidebar' => 'content-detached content-right', 'content-detached-right-sidebar' => 'content-detached content-left', 'default' => 'default-sidebar'],
|
|
|
- 'direction' => ['ltr', 'rtl'],
|
|
|
- 'horizontal_menu_type' => ['floating' => 'navbar-floating', 'static' => 'navbar-static', 'sticky' => 'navbar-sticky'],
|
|
|
- 'horizontal_menu_class' => ['static' => 'menu-static', 'sticky' => 'fixed-top', 'floating' => 'floating-nav'],
|
|
|
- 'vertical_menu_navbar_type' => ['floating' => 'navbar-floating', 'static' => 'navbar-static', 'sticky' => 'navbar-sticky', 'hidden' => 'navbar-hidden'],
|
|
|
- 'navbar_class' => ['floating' => 'floating-nav', 'static' => 'static-top', 'sticky' => 'fixed-top', 'hidden' => 'd-none'],
|
|
|
- 'footer_type' => ['static' => 'footer-static', 'sticky' => 'fixed-footer', 'hidden' => 'footer-hidden'],
|
|
|
+ 'navbar_class' => ['floating' => 'floating-nav', 'sticky' => 'fixed-top', 'hidden' => 'd-none'],
|
|
|
];
|
|
|
|
|
|
$maps = [
|
|
|
- 'content_layout' => 'sidebar_position_class',
|
|
|
- 'horizontal_menu_type' => 'horizontal_menu_type',
|
|
|
- 'vertical_menu_navbar_type' => 'vertical_menu_navbar_type',
|
|
|
'footer_type' => 'footer_type',
|
|
|
];
|
|
|
|
|
|
@@ -470,26 +450,13 @@ class Content implements Renderable
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- // layout classes
|
|
|
return [
|
|
|
'theme' => $data['theme'],
|
|
|
- 'layout_theme' => $allOptions['theme'][$data['theme']] ?? $data['theme'],
|
|
|
'sidebar_collapsed' => $data['sidebar_collapsed'],
|
|
|
- 'vertical_menu_navbar_type' => $allOptions['vertical_menu_navbar_type'][$data['vertical_menu_navbar_type']],
|
|
|
- 'navbar_class' => $allOptions['navbar_class'][$data['vertical_menu_navbar_type']],
|
|
|
'navbar_color' => $data['navbar_color'],
|
|
|
- 'horizontal_menu_type' => $allOptions['horizontal_menu_type'][$data['horizontal_menu_type']],
|
|
|
- 'horizontal_menu_class' => $allOptions['horizontal_menu_class'][$data['horizontal_menu_type']],
|
|
|
- 'footer_type' => $allOptions['footer_type'][$data['footer_type']],
|
|
|
- 'sidebar_class' => $data['sidebar_collapsed'] ? 'menu-collapsed' : 'menu-expanded',
|
|
|
+ 'navbar_class' => $allOptions['navbar_class'][$data['navbar_class']],
|
|
|
+ 'sidebar_class' => $data['sidebar_collapsed'] ? 'sidebar-collapse' : '',
|
|
|
'body_class' => $data['body_class'],
|
|
|
- 'blank_page' => $data['blank_page'],
|
|
|
- 'blank_page_class' => $data['blank_page'] ? 'blank-page' : '',
|
|
|
- 'content_layout' => $data['content_layout'],
|
|
|
- 'sidebar_position_class' => $allOptions['sidebar_position_class'][$data['content_layout']],
|
|
|
- 'content_sidebar_class' => $allOptions['content_sidebar_class'][$data['content_layout']],
|
|
|
- 'main_layout_type' => $data['main_layout_type'],
|
|
|
- 'direction' => $data['direction'],
|
|
|
];
|
|
|
}
|
|
|
|