Обновление для модуля "Дизайн". При ошибке загружается дефолтная тема
This commit is contained in:
parent
6f97529615
commit
449310bd1c
@ -28,12 +28,14 @@ public function boot()
|
|||||||
$this->registerComponent();
|
$this->registerComponent();
|
||||||
$this->registerLivewire();
|
$this->registerLivewire();
|
||||||
$this->registerHelpers();
|
$this->registerHelpers();
|
||||||
|
try {
|
||||||
/*define('DESIGN_PARAMETERS', Design::getParameters());
|
define('DESIGN_PARAMETERS', Design::getParameters());
|
||||||
|
|
||||||
if (array_key_exists('title', DESIGN_PARAMETERS)) {
|
if (array_key_exists('title', DESIGN_PARAMETERS)) {
|
||||||
\Config::set('app.name', DESIGN_PARAMETERS['title']);
|
\Config::set('app.name', DESIGN_PARAMETERS['title']);
|
||||||
}*/
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
define('DESIGN_PARAMETERS', []);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function registerViews()
|
protected function registerViews()
|
||||||
|
|||||||
@ -25,7 +25,7 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="col-auto col-sm-2 text-center">
|
<div class="col-auto col-sm-2 text-center">
|
||||||
<a class="navbar-brand">
|
<a class="navbar-brand">
|
||||||
@if(DESIGN_PARAMETERS['logo'])
|
@if(array_key_exists('logo', DESIGN_PARAMETERS))
|
||||||
<img src="{{ url('/storage/' . DESIGN_PARAMETERS['logo']) }}" alt="Logo" height="70">
|
<img src="{{ url('/storage/' . DESIGN_PARAMETERS['logo']) }}" alt="Logo" height="70">
|
||||||
@else
|
@else
|
||||||
<img src={{ url('/images/logo.png') }} alt="Logo" height="70">
|
<img src={{ url('/images/logo.png') }} alt="Logo" height="70">
|
||||||
|
|||||||
@ -26,7 +26,7 @@
|
|||||||
<div class="container d-flex flex-row">
|
<div class="container d-flex flex-row">
|
||||||
<div class=" text-center">
|
<div class=" text-center">
|
||||||
<a class="navbar-brand">
|
<a class="navbar-brand">
|
||||||
@if(DESIGN_PARAMETERS['logo'])
|
@if(array_key_exists('logo', DESIGN_PARAMETERS))
|
||||||
<img src="{{ url('/storage/' . DESIGN_PARAMETERS['logo']) }}" alt="Logo" height="70">
|
<img src="{{ url('/storage/' . DESIGN_PARAMETERS['logo']) }}" alt="Logo" height="70">
|
||||||
@else
|
@else
|
||||||
<img src={{ url('/images/logo.png') }} alt="Logo" height="70">
|
<img src={{ url('/images/logo.png') }} alt="Logo" height="70">
|
||||||
|
|||||||
@ -14,13 +14,13 @@
|
|||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if(DESIGN_PARAMETERS['text_color'] && 1==2)
|
@if(array_key_exists('text_color', DESIGN_PARAMETERS) && 1==2)
|
||||||
#app *{
|
#app *{
|
||||||
color: {{ DESIGN_PARAMETERS['text_color'] }};
|
color: {{ DESIGN_PARAMETERS['text_color'] }};
|
||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if(DESIGN_PARAMETERS['primary_color'])
|
@if(array_key_exists('primary_color', DESIGN_PARAMETERS))
|
||||||
.form-control:focus, .form-select:focus {
|
.form-control:focus, .form-select:focus {
|
||||||
border-color: {{ DESIGN_PARAMETERS['primary_color'] }}60;
|
border-color: {{ DESIGN_PARAMETERS['primary_color'] }}60;
|
||||||
box-shadow: 0 0 0 .25rem {{ DESIGN_PARAMETERS['primary_color'] }}40;
|
box-shadow: 0 0 0 .25rem {{ DESIGN_PARAMETERS['primary_color'] }}40;
|
||||||
@ -71,7 +71,7 @@
|
|||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if(DESIGN_PARAMETERS['secondary_color'])
|
@if(array_key_exists('secondary_color', DESIGN_PARAMETERS))
|
||||||
.btn-secondary,
|
.btn-secondary,
|
||||||
.btn-secondary:disabled {
|
.btn-secondary:disabled {
|
||||||
background-color:
|
background-color:
|
||||||
@ -83,13 +83,13 @@
|
|||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if(DESIGN_PARAMETERS['menu_btn_color'])
|
@if(array_key_exists('menu_btn_color', DESIGN_PARAMETERS))
|
||||||
#leftPanel .nav-link {
|
#leftPanel .nav-link {
|
||||||
background-color: {{ DESIGN_PARAMETERS['menu_btn_color'] }};
|
background-color: {{ DESIGN_PARAMETERS['menu_btn_color'] }};
|
||||||
}
|
}
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if(DESIGN_PARAMETERS['menu_btn_hover_color'])
|
@if(array_key_exists('menu_btn_hover_color',DESIGN_PARAMETERS))
|
||||||
#leftPanel .nav-link:hover {
|
#leftPanel .nav-link:hover {
|
||||||
background-color: {{ DESIGN_PARAMETERS['menu_btn_hover_color'] }};
|
background-color: {{ DESIGN_PARAMETERS['menu_btn_hover_color'] }};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,7 +60,7 @@
|
|||||||
<div class="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column">
|
<div class="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column">
|
||||||
<header class="mb-auto">
|
<header class="mb-auto">
|
||||||
<h3 class="float-md-start mb-0">
|
<h3 class="float-md-start mb-0">
|
||||||
@if(DESIGN_PARAMETERS['logo'])
|
@if(array_key_exists('logo', DESIGN_PARAMETERS))
|
||||||
<img src="{{ url('/storage/' . DESIGN_PARAMETERS['logo']) }}" alt="Logo" height="100">
|
<img src="{{ url('/storage/' . DESIGN_PARAMETERS['logo']) }}" alt="Logo" height="100">
|
||||||
@else
|
@else
|
||||||
<img src={{ url('/images/logo.png') }} alt="Logo" width="100">
|
<img src={{ url('/images/logo.png') }} alt="Logo" width="100">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user