10-04-2026
This commit is contained in:
parent
4d6b4930b2
commit
4bb89aad8c
836 changed files with 52961 additions and 5950 deletions
|
|
@ -7,10 +7,15 @@ use Livewire\Component;
|
|||
class Portfolio extends Component
|
||||
{
|
||||
public string $activeFilter = 'alle';
|
||||
|
||||
public ?array $selectedProject = null;
|
||||
|
||||
public bool $showModal = false;
|
||||
|
||||
public $content = [];
|
||||
|
||||
public $theme = '';
|
||||
|
||||
public $filters = [];
|
||||
|
||||
public function mount()
|
||||
|
|
@ -19,13 +24,17 @@ class Portfolio extends Component
|
|||
'alle' => 'Alle',
|
||||
'villen' => 'Villen',
|
||||
'penthouse' => 'Penthouse',
|
||||
'loft' => 'Loft'
|
||||
'loft' => 'Loft',
|
||||
];
|
||||
$this->filters = $filters;
|
||||
$this->activeFilter = 'alle';
|
||||
$this->theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$this->theme}.portfolio", []);
|
||||
$this->filters = config("content.themes.{$this->theme}.portfolio.filters", $filters);
|
||||
$portfolio = cms_theme_section('portfolio', $this->theme);
|
||||
if (! is_array($portfolio)) {
|
||||
$portfolio = [];
|
||||
}
|
||||
$this->content = $portfolio;
|
||||
$this->filters = $portfolio['filters'] ?? $filters;
|
||||
}
|
||||
|
||||
public function filterBy(string $category): void
|
||||
|
|
@ -47,8 +56,7 @@ class Portfolio extends Component
|
|||
|
||||
public function getFilteredProjects(): array
|
||||
{
|
||||
$projects = config("content.themes.{$this->theme}.portfolio.projects", []);
|
||||
|
||||
$projects = $this->content['projects'] ?? [];
|
||||
|
||||
if ($this->activeFilter === 'alle') {
|
||||
return $projects;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue