обновлен модуль оформления
This commit is contained in:
parent
1babe189ec
commit
3094b90e16
@ -69,6 +69,25 @@
|
||||
name="menu_btn_hover_text_color" value="{{ ($parameters['menu_btn_hover_text_color'] ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
<h5 class="mt-3">Заголовки и надписи</h5>
|
||||
<div class="d-flex flex-column gap-3">
|
||||
<div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
|
||||
<label for="title" class="form-label m-0 w-25">Название</label>
|
||||
<input type="text" class="form-control" id="title" name="title" value="{{ ($parameters['title'] ?? '') }}">
|
||||
</div>
|
||||
<div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
|
||||
<label for="phone" class="form-label m-0 w-25">Телефон</label>
|
||||
<input type="text" class="form-control" id="phone" name="phone" value="{{ ($parameters['phone'] ?? '') }}">
|
||||
</div>
|
||||
<div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
|
||||
<label for="phone_description" class="form-label m-0 w-25">Подпись телефона</label>
|
||||
<input type="text" class="form-control" id="phone_description" name="phone_description" value="{{ ($parameters['phone_description'] ?? '') }}">
|
||||
</div>
|
||||
<div class="col d-flex flex-row justify-content-start align-items-center gap-2 bg-light rounded p-2">
|
||||
<label for="copyright" class="form-label m-0 w-25">Copyright</label>
|
||||
<input type="text" class="form-control" id="copyright" name="copyright" value="{{ ($parameters['copyright'] ?? '') }}">
|
||||
</div>
|
||||
</div>
|
||||
<input type="submit" class="btn btn-primary mt-3" value="Сохранить" />
|
||||
</form>
|
||||
@endsection
|
||||
@ -15,6 +15,10 @@ class Design extends Model
|
||||
];
|
||||
|
||||
public const parameters = [
|
||||
'title',
|
||||
'copyright',
|
||||
'phone',
|
||||
'phone_description',
|
||||
'logo',
|
||||
'page_color',
|
||||
'text_color',
|
||||
@ -33,7 +37,7 @@ public static function getParameters() {
|
||||
}
|
||||
foreach (self::parameters as $parameter) {
|
||||
if (!array_key_exists($parameter, $parameters)) {
|
||||
$parameters[$parameter] = null;
|
||||
//$parameters[$parameter] = null;
|
||||
}
|
||||
}
|
||||
return $parameters;
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
use Livewire\Livewire;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
|
||||
use Modules\Main\Models\Design;
|
||||
|
||||
class ModuleServiceProvider extends ServiceProvider
|
||||
{
|
||||
@ -27,6 +28,11 @@ public function boot()
|
||||
$this->registerComponent();
|
||||
$this->registerLivewire();
|
||||
$this->registerHelpers();
|
||||
define('DESIGN_PARAMETERS', Design::getParameters());
|
||||
|
||||
if (array_key_exists('title', DESIGN_PARAMETERS)) {
|
||||
\Config::set('app.name', DESIGN_PARAMETERS['title']);
|
||||
}
|
||||
}
|
||||
|
||||
protected function registerViews()
|
||||
@ -83,8 +89,7 @@ protected function registerPolicies()
|
||||
protected function registerHelpers()
|
||||
{
|
||||
$files = glob(__DIR__ . '/../Helpers/' . "*.php");
|
||||
foreach ($files as $key => $file)
|
||||
{
|
||||
foreach ($files as $key => $file) {
|
||||
require_once $file;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,6 +1,11 @@
|
||||
<?php
|
||||
use Modules\Main\Models\Design;
|
||||
define('DESIGN_PARAMETERS', Design::getParameters());
|
||||
/*define('DESIGN_PARAMETERS', Design::getParameters());
|
||||
|
||||
if (array_key_exists('title', DESIGN_PARAMETERS)) {
|
||||
Config::set('app.name', DESIGN_PARAMETERS['title']);
|
||||
}*/
|
||||
|
||||
?>
|
||||
<style>
|
||||
@if(array_key_exists('page_color', DESIGN_PARAMETERS))
|
||||
|
||||
@ -68,9 +68,14 @@
|
||||
</h3>
|
||||
<div class="justify-content-center float-md-end">
|
||||
<div>
|
||||
@if(array_key_exists('phone', DESIGN_PARAMETERS))
|
||||
<span class="fw-bold py-1 px-0 fs-3 text-secondary" aria-current="page"
|
||||
href="#">8-800-222-06-10</span>
|
||||
<div>Звонок по РФ бесплатный</div>
|
||||
href="#">{{ DESIGN_PARAMETERS['phone'] }}</span>
|
||||
@if(array_key_exists('phone_description', DESIGN_PARAMETERS))
|
||||
<div>{{ DESIGN_PARAMETERS['phone_description'] }}</div>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</header>
|
||||
@ -82,7 +87,9 @@
|
||||
</main>
|
||||
<footer class="mt-auto">
|
||||
<div class="container">
|
||||
<span class="text-body-secondary">© Группа компаний «АЛЬФА»</span>
|
||||
@if(array_key_exists('copyright', DESIGN_PARAMETERS))
|
||||
<span class="text-body-secondary">© {{ DESIGN_PARAMETERS['copyright'] }}</span>
|
||||
@endif
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user