|
| 1 | +<?php |
| 2 | + |
| 3 | +namespace App\Manager; |
| 4 | + |
| 5 | +use App\Manager\AbstractAppManager; |
| 6 | + |
| 7 | +class AppThemeManager extends AbstractAppManager |
| 8 | +{ |
| 9 | + private $predefined = [ |
| 10 | + 'dark' => [ |
| 11 | + 'body' => 'bg-dark text-light', |
| 12 | + 'navbar' => 'sticky-top navbar-expand-lg navbar-dark bg-dark', |
| 13 | + 'nav_link' => 'text-light', |
| 14 | + 'dropdown_menu' => 'dropdown-menu-dark border border-secondary', |
| 15 | + 'block' => 'shadow p-3 mb-4 bg-dark rounded', |
| 16 | + 'modal_content' => 'bg-dark', |
| 17 | + 'form_control' => 'bg-dark text-light', |
| 18 | + 'form_required' => 'badge bg-light text-dark ml-1', |
| 19 | + 'table' => 'table-dark table-hover table-sm', |
| 20 | + 'link_primary' => 'text-info', |
| 21 | + 'link_secondary' => 'text-light', |
| 22 | + 'jumbotron' => 'mt-3 bg-secondary text-light border border-light', |
| 23 | + 'color_1' => 'dark', |
| 24 | + 'color_2' => 'light', |
| 25 | + ], |
| 26 | + 'light' => [ |
| 27 | + 'body' => 'bg-light text-dark', |
| 28 | + 'navbar' => 'sticky-top navbar-expand-lg navbar-light bg-light', |
| 29 | + 'nav_link' => 'text-dark', |
| 30 | + 'dropdown_menu' => 'dropdown-menu-light border border-secondary', |
| 31 | + 'block' => 'shadow p-3 mb-4 bg-light rounded', |
| 32 | + 'modal_content' => 'bg-light', |
| 33 | + 'form_control' => 'bg-light text-dark', |
| 34 | + 'form_required' => 'badge bg-dark text-light ml-1', |
| 35 | + 'table' => 'table-light table-hover table-sm', |
| 36 | + 'link_primary' => 'text-primary', |
| 37 | + 'link_secondary' => 'text-dark', |
| 38 | + 'jumbotron' => 'mt-3 bg-secondary text-light border border-light', |
| 39 | + 'color_1' => 'light', |
| 40 | + 'color_2' => 'dark', |
| 41 | + ], |
| 42 | + ]; |
| 43 | + |
| 44 | + public function keys(): array |
| 45 | + { |
| 46 | + return [ |
| 47 | + 'body', |
| 48 | + 'navbar', |
| 49 | + 'nav_link', |
| 50 | + 'dropdown_menu', |
| 51 | + 'block', |
| 52 | + 'modal_content', |
| 53 | + 'form_control', |
| 54 | + 'form_required', |
| 55 | + 'table', |
| 56 | + 'link_primary', |
| 57 | + 'link_secondary', |
| 58 | + 'jumbotron', |
| 59 | + 'color_1', |
| 60 | + 'color_2', |
| 61 | + ]; |
| 62 | + } |
| 63 | + |
| 64 | + public function predefinedList(): array |
| 65 | + { |
| 66 | + return $this->predefined; |
| 67 | + } |
| 68 | + |
| 69 | + public function getPredefined(string $theme): array |
| 70 | + { |
| 71 | + return $this->predefined[$theme]; |
| 72 | + } |
| 73 | +} |
0 commit comments