First commit
This commit is contained in:
commit
7cf3558ba7
12933 changed files with 1180047 additions and 0 deletions
22
app/Livewire/Actions/Logout.php
Normal file
22
app/Livewire/Actions/Logout.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Actions;
|
||||
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
|
||||
class Logout
|
||||
{
|
||||
/**
|
||||
* Log the current user out of the application.
|
||||
*/
|
||||
public function __invoke()
|
||||
{
|
||||
Auth::guard('web')->logout();
|
||||
|
||||
Session::invalidate();
|
||||
Session::regenerateToken();
|
||||
|
||||
return redirect('/');
|
||||
}
|
||||
}
|
||||
13
app/Livewire/Web/Components/AboutHero.php
Normal file
13
app/Livewire/Web/Components/AboutHero.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class AboutHero extends Component
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.about-hero');
|
||||
}
|
||||
}
|
||||
13
app/Livewire/Web/Components/Demo/ButtonDemo.php
Normal file
13
app/Livewire/Web/Components/Demo/ButtonDemo.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Demo;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class ButtonDemo extends Component
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.demo.button-demo');
|
||||
}
|
||||
}
|
||||
13
app/Livewire/Web/Components/Demo/ColorDemo.php
Normal file
13
app/Livewire/Web/Components/Demo/ColorDemo.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Demo;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class ColorDemo extends Component
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.demo.color-demo');
|
||||
}
|
||||
}
|
||||
24
app/Livewire/Web/Components/Demo/DemoSection.php
Normal file
24
app/Livewire/Web/Components/Demo/DemoSection.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Demo;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class DemoSection extends Component
|
||||
{
|
||||
public $title;
|
||||
public $description;
|
||||
public $component;
|
||||
|
||||
public function mount($title, $description = null, $component = null)
|
||||
{
|
||||
$this->title = $title;
|
||||
$this->description = $description;
|
||||
$this->component = $component;
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.demo.demo-section');
|
||||
}
|
||||
}
|
||||
13
app/Livewire/Web/Components/Demo/LogoDemo.php
Normal file
13
app/Livewire/Web/Components/Demo/LogoDemo.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Demo;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class LogoDemo extends Component
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.demo.logo-demo');
|
||||
}
|
||||
}
|
||||
13
app/Livewire/Web/Components/Demo/ThemeInfo.php
Normal file
13
app/Livewire/Web/Components/Demo/ThemeInfo.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Demo;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class ThemeInfo extends Component
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.demo.theme-info');
|
||||
}
|
||||
}
|
||||
25
app/Livewire/Web/Components/Demo/ThemeSwitcher.php
Normal file
25
app/Livewire/Web/Components/Demo/ThemeSwitcher.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Demo;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class ThemeSwitcher extends Component
|
||||
{
|
||||
public $domains = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->domains = config('domains.domains');
|
||||
foreach ($this->domains as $key => $domain) {
|
||||
if ($domain['domain_name'] == config('domains.domain_portal')) {
|
||||
unset($this->domains[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.demo.theme-switcher');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/AboutHero.php
Normal file
21
app/Livewire/Web/Components/Sections/AboutHero.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class AboutHero extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.about_hero", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.about-hero');
|
||||
}
|
||||
}
|
||||
29
app/Livewire/Web/Components/Sections/BrandWorlds.php
Normal file
29
app/Livewire/Web/Components/Sections/BrandWorlds.php
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class BrandWorlds extends Component
|
||||
{
|
||||
public $title;
|
||||
public $subtitle;
|
||||
public $worlds = [];
|
||||
public $bg = 'bg-background';
|
||||
|
||||
public function mount($bg = 'bg-background')
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$content = config("content.themes.{$theme}.brand_worlds");
|
||||
|
||||
$this->title = $content['title'] ?? '';
|
||||
$this->subtitle = $content['subtitle'] ?? '';
|
||||
$this->worlds = $content['worlds'] ?? [];
|
||||
$this->bg = $bg;
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.brand-worlds');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/BrokerSection.php
Normal file
21
app/Livewire/Web/Components/Sections/BrokerSection.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class BrokerSection extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.broker_section", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.broker-section');
|
||||
}
|
||||
}
|
||||
25
app/Livewire/Web/Components/Sections/CTASection.php
Normal file
25
app/Livewire/Web/Components/Sections/CTASection.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class CTASection extends Component
|
||||
{
|
||||
public $content = [];
|
||||
public $bg = '';
|
||||
public $section = '';
|
||||
|
||||
public function mount($bg = 'bg-secondary', $section = 'cta_section')
|
||||
{
|
||||
$this->section = $section;
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.{$this->section}", []);
|
||||
$this->bg = $bg;
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.c-t-a-section');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/CommitmentSection.php
Normal file
21
app/Livewire/Web/Components/Sections/CommitmentSection.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class CommitmentSection extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.commitment_section", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.commitment-section');
|
||||
}
|
||||
}
|
||||
27
app/Livewire/Web/Components/Sections/ContentSection.php
Normal file
27
app/Livewire/Web/Components/Sections/ContentSection.php
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class ContentSection extends Component
|
||||
{
|
||||
public $content = [];
|
||||
public $layout = 'left'; // Standard-Layout
|
||||
public $bg = 'bg-background';
|
||||
public $section = 'content_section_left';
|
||||
|
||||
public function mount($layout = 'left', $bg = 'bg-background', $section = 'content_section')
|
||||
{
|
||||
$this->layout = $layout;
|
||||
$this->bg = $bg;
|
||||
$this->section = $section;
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.{$this->section}", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.content-section');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/DarkStatsSection.php
Normal file
21
app/Livewire/Web/Components/Sections/DarkStatsSection.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class DarkStatsSection extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.dark_stats_section", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.dark-stats-section');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/DigitalCore.php
Normal file
21
app/Livewire/Web/Components/Sections/DigitalCore.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class DigitalCore extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.digital_core", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.digital-core');
|
||||
}
|
||||
}
|
||||
26
app/Livewire/Web/Components/Sections/EcosystemCore.php
Normal file
26
app/Livewire/Web/Components/Sections/EcosystemCore.php
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class EcosystemCore extends Component
|
||||
{
|
||||
public $content = [];
|
||||
public $bg = 'bg-background';
|
||||
public $section = 'ecosystem_core';
|
||||
|
||||
public function mount($bg = 'bg-background', $section = 'ecosystem_core')
|
||||
{
|
||||
$this->bg = $bg;
|
||||
$this->section = $section;
|
||||
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.{$this->section}", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.ecosystem-core');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/EcosystemHero.php
Normal file
21
app/Livewire/Web/Components/Sections/EcosystemHero.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class EcosystemHero extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.ecosystem_hero", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.ecosystem-hero');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/EcosystemStats.php
Normal file
21
app/Livewire/Web/Components/Sections/EcosystemStats.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class EcosystemStats extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.ecosystem_stats", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.ecosystem-stats');
|
||||
}
|
||||
}
|
||||
25
app/Livewire/Web/Components/Sections/EndCustomerSection.php
Normal file
25
app/Livewire/Web/Components/Sections/EndCustomerSection.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class EndCustomerSection extends Component
|
||||
{
|
||||
public $content = [];
|
||||
public $bg = '';
|
||||
public $section = '';
|
||||
|
||||
public function mount($bg = 'bg-accent', $section = 'end_customer_section')
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->section = $section;
|
||||
$this->bg = $bg;
|
||||
$this->content = config("content.themes.{$theme}.end_customer_section", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.end-customer-section');
|
||||
}
|
||||
}
|
||||
26
app/Livewire/Web/Components/Sections/FAQ.php
Normal file
26
app/Livewire/Web/Components/Sections/FAQ.php
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class FAQ extends Component
|
||||
{
|
||||
public $content = [];
|
||||
public $bg = '';
|
||||
public $section = '';
|
||||
|
||||
public function mount($bg = 'bg-background', $section = 'faq')
|
||||
{
|
||||
$this->bg = $bg;
|
||||
$this->section = $section;
|
||||
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.{$this->section}", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.f-a-q');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/FinalCommitment.php
Normal file
21
app/Livewire/Web/Components/Sections/FinalCommitment.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class FinalCommitment extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.final_commitment", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.final-commitment');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/Hero.php
Normal file
21
app/Livewire/Web/Components/Sections/Hero.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class Hero extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.hero", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.hero');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/HeroImage.php
Normal file
21
app/Livewire/Web/Components/Sections/HeroImage.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class HeroImage extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.hero_image", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.hero-image');
|
||||
}
|
||||
}
|
||||
44
app/Livewire/Web/Components/Sections/HeroSlider.php
Normal file
44
app/Livewire/Web/Components/Sections/HeroSlider.php
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class HeroSlider extends Component
|
||||
{
|
||||
public $content = [];
|
||||
public $currentSlide = 0;
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.hero_slider", []);
|
||||
}
|
||||
|
||||
public function nextSlide()
|
||||
{
|
||||
if (!empty($this->content['slides'])) {
|
||||
$this->currentSlide = ($this->currentSlide + 1) % count($this->content['slides']);
|
||||
}
|
||||
}
|
||||
|
||||
public function previousSlide()
|
||||
{
|
||||
if (!empty($this->content['slides'])) {
|
||||
$totalSlides = count($this->content['slides']);
|
||||
$this->currentSlide = ($this->currentSlide - 1 + $totalSlides) % $totalSlides;
|
||||
}
|
||||
}
|
||||
|
||||
public function setSlide($index)
|
||||
{
|
||||
if (!empty($this->content['slides']) && $index >= 0 && $index < count($this->content['slides'])) {
|
||||
$this->currentSlide = $index;
|
||||
}
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.hero-slider');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/HeroTiles.php
Normal file
21
app/Livewire/Web/Components/Sections/HeroTiles.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class HeroTiles extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.hero_tiles", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.hero-tiles');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/LeadershipTeam.php
Normal file
21
app/Livewire/Web/Components/Sections/LeadershipTeam.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class LeadershipTeam extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.leadership_team", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.leadership-team');
|
||||
}
|
||||
}
|
||||
56
app/Livewire/Web/Components/Sections/MagazinDetail.php
Normal file
56
app/Livewire/Web/Components/Sections/MagazinDetail.php
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class MagazinDetail extends Component
|
||||
{
|
||||
public $articleId;
|
||||
public $article;
|
||||
public $relatedArticles;
|
||||
public $content;
|
||||
|
||||
public function mount($id = 1)
|
||||
{
|
||||
$this->articleId = (int) $id;
|
||||
$this->loadArticle();
|
||||
$this->loadRelatedArticles();
|
||||
$this->loadThemeContent();
|
||||
}
|
||||
|
||||
private function loadArticle()
|
||||
{
|
||||
$articles = $this->getArticlesData();
|
||||
$this->article = $articles[$this->articleId] ?? $articles[1];
|
||||
}
|
||||
|
||||
private function loadRelatedArticles()
|
||||
{
|
||||
$articles = $this->getArticlesData();
|
||||
$this->relatedArticles = collect($articles)
|
||||
->filter(fn($article, $key) => $key != $this->articleId)
|
||||
->take(2)
|
||||
->values()
|
||||
->toArray();
|
||||
}
|
||||
|
||||
private function loadThemeContent()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.magazin_detail", []);
|
||||
}
|
||||
|
||||
private function getArticlesData()
|
||||
{
|
||||
return config('content.articles', []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.magazin-detail', [
|
||||
'article' => $this->article,
|
||||
'relatedArticles' => $this->relatedArticles
|
||||
]);
|
||||
}
|
||||
}
|
||||
43
app/Livewire/Web/Components/Sections/MagazinList.php
Normal file
43
app/Livewire/Web/Components/Sections/MagazinList.php
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class MagazinList extends Component
|
||||
{
|
||||
public $posts = [];
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->loadPosts();
|
||||
$this->loadThemeContent();
|
||||
}
|
||||
|
||||
private function loadPosts()
|
||||
{
|
||||
$articles = config('content.articles', []);
|
||||
$this->posts = collect($articles)->map(function ($article) {
|
||||
return [
|
||||
'id' => $article['id'],
|
||||
'title' => $article['title'],
|
||||
'excerpt' => $article['content']['intro'], // Using intro as excerpt
|
||||
'image' => $article['image'],
|
||||
'date' => $article['date'],
|
||||
'readTime' => $article['readTime'],
|
||||
];
|
||||
})->all();
|
||||
}
|
||||
|
||||
private function loadThemeContent()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.magazin_list", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.magazin-list');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/OurStory.php
Normal file
21
app/Livewire/Web/Components/Sections/OurStory.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class OurStory extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.our_story", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.our-story');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/OurValues.php
Normal file
21
app/Livewire/Web/Components/Sections/OurValues.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class OurValues extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.our_values", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.our-values');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/PartnerBenefits.php
Normal file
21
app/Livewire/Web/Components/Sections/PartnerBenefits.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class PartnerBenefits extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.partner_benefits", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.partner-benefits');
|
||||
}
|
||||
}
|
||||
25
app/Livewire/Web/Components/Sections/PartnerCTA.php
Normal file
25
app/Livewire/Web/Components/Sections/PartnerCTA.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class PartnerCTA extends Component
|
||||
{
|
||||
public $content = [];
|
||||
public $bg = '';
|
||||
public $section = '';
|
||||
|
||||
public function mount($bg = 'bg-secondary', $section = 'partner_cta')
|
||||
{
|
||||
$this->section = $section;
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.{$this->section}", []);
|
||||
$this->bg = $bg;
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.partner-c-t-a');
|
||||
}
|
||||
}
|
||||
45
app/Livewire/Web/Components/Sections/PartnerHero.php
Normal file
45
app/Livewire/Web/Components/Sections/PartnerHero.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class PartnerHero extends Component
|
||||
{
|
||||
public $partnerTypes = [
|
||||
[
|
||||
'title' => 'Makler',
|
||||
'description' => 'Lifetime-Vergütung',
|
||||
'icon' => 'trending-up',
|
||||
],
|
||||
[
|
||||
'title' => 'Lieferanten',
|
||||
'description' => 'Globale Märkte',
|
||||
'icon' => 'globe',
|
||||
],
|
||||
[
|
||||
'title' => 'Partnership',
|
||||
'description' => 'Faire Konditionen',
|
||||
'icon' => 'handshake',
|
||||
],
|
||||
[
|
||||
'title' => 'Erfolg',
|
||||
'description' => 'Nachhaltiges Wachstum',
|
||||
'icon' => 'award',
|
||||
],
|
||||
];
|
||||
|
||||
public $content = [];
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.partner_hero", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.partner-hero', [
|
||||
'partnerTypes' => $this->partnerTypes
|
||||
]);
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/PartnerProcess.php
Normal file
21
app/Livewire/Web/Components/Sections/PartnerProcess.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class PartnerProcess extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.partner_process", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.partner-process');
|
||||
}
|
||||
}
|
||||
66
app/Livewire/Web/Components/Sections/Portfolio.php
Normal file
66
app/Livewire/Web/Components/Sections/Portfolio.php
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
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()
|
||||
{
|
||||
$filters = [
|
||||
'alle' => 'Alle',
|
||||
'villen' => 'Villen',
|
||||
'penthouse' => 'Penthouse',
|
||||
'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);
|
||||
}
|
||||
|
||||
public function filterBy(string $category): void
|
||||
{
|
||||
$this->activeFilter = $category;
|
||||
}
|
||||
|
||||
public function openModal(array $project): void
|
||||
{
|
||||
$this->selectedProject = $project;
|
||||
$this->showModal = true;
|
||||
}
|
||||
|
||||
public function closeModal(): void
|
||||
{
|
||||
$this->showModal = false;
|
||||
$this->selectedProject = null;
|
||||
}
|
||||
|
||||
public function getFilteredProjects(): array
|
||||
{
|
||||
$projects = config("content.themes.{$this->theme}.portfolio.projects", []);
|
||||
|
||||
|
||||
if ($this->activeFilter === 'alle') {
|
||||
return $projects;
|
||||
}
|
||||
|
||||
return array_filter($projects, function ($project) {
|
||||
return strtolower($project['category']) === strtolower($this->activeFilter);
|
||||
});
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.portfolio');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/SpotlightsSection.php
Normal file
21
app/Livewire/Web/Components/Sections/SpotlightsSection.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class SpotlightsSection extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.spotlights_section", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.spotlights-section');
|
||||
}
|
||||
}
|
||||
21
app/Livewire/Web/Components/Sections/SupplierSection.php
Normal file
21
app/Livewire/Web/Components/Sections/SupplierSection.php
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class SupplierSection extends Component
|
||||
{
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.supplier_section", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.supplier-section');
|
||||
}
|
||||
}
|
||||
23
app/Livewire/Web/Components/Sections/VisionSection.php
Normal file
23
app/Livewire/Web/Components/Sections/VisionSection.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Sections;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class VisionSection extends Component
|
||||
{
|
||||
public $content = [];
|
||||
public $bg = 'bg-background';
|
||||
|
||||
public function mount($bg = 'bg-background')
|
||||
{
|
||||
$this->bg = $bg;
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.vision_section", []);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.sections.vision-section');
|
||||
}
|
||||
}
|
||||
65
app/Livewire/Web/Components/UI/ContactForm.php
Normal file
65
app/Livewire/Web/Components/UI/ContactForm.php
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Ui;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class ContactForm extends Component
|
||||
{
|
||||
public $firstName = '';
|
||||
public $lastName = '';
|
||||
public $company = '';
|
||||
public $email = '';
|
||||
public $phone = '';
|
||||
public $subject = '';
|
||||
public $message = '';
|
||||
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.contact_form", []);
|
||||
}
|
||||
|
||||
public function getSubjectsProperty()
|
||||
{
|
||||
return $this->content['form']['subjects'] ?? [];
|
||||
}
|
||||
|
||||
public function getContactInfoProperty()
|
||||
{
|
||||
return $this->content['contact_info'] ?? [];
|
||||
}
|
||||
|
||||
public function getSocialMediaProperty()
|
||||
{
|
||||
return $this->content['social_media']['platforms'] ?? [];
|
||||
}
|
||||
|
||||
public function submit()
|
||||
{
|
||||
$this->validate([
|
||||
'firstName' => 'required|string|max:255',
|
||||
'lastName' => 'required|string|max:255',
|
||||
'email' => 'required|email|max:255',
|
||||
'subject' => 'required|string',
|
||||
'message' => 'required|string|max:2000',
|
||||
'company' => 'nullable|string|max:255',
|
||||
'phone' => 'nullable|string|max:255',
|
||||
]);
|
||||
|
||||
// Here you would typically save to database or send email
|
||||
// For now, we'll just show a success message
|
||||
|
||||
$successMessage = $this->content['form']['success_message'] ?? 'Vielen Dank für Ihre Nachricht! Wir werden uns schnellstmöglich bei Ihnen melden.';
|
||||
session()->flash('message', $successMessage);
|
||||
|
||||
$this->reset(['firstName', 'lastName', 'company', 'email', 'phone', 'subject', 'message']);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.ui.contact-form');
|
||||
}
|
||||
}
|
||||
13
app/Livewire/Web/Components/UI/Footer.php
Normal file
13
app/Livewire/Web/Components/UI/Footer.php
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Ui;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class Footer extends Component
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.ui.footer');
|
||||
}
|
||||
}
|
||||
57
app/Livewire/Web/Components/UI/Header.php
Normal file
57
app/Livewire/Web/Components/UI/Header.php
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Ui;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class Header extends Component
|
||||
{
|
||||
public $isMobileMenuOpen = false;
|
||||
public $domainName;
|
||||
public $domainUrl;
|
||||
public $content = [];
|
||||
|
||||
public function mount()
|
||||
{
|
||||
$this->domainName = \App\Helpers\ThemeHelper::getDomainName();
|
||||
$this->domainUrl = \App\Helpers\ThemeHelper::getDomainUrl();
|
||||
$theme = config('app.theme', 'b2in');
|
||||
$this->content = config("content.themes.{$theme}.header", []);
|
||||
}
|
||||
|
||||
public function toggleMobileMenu()
|
||||
{
|
||||
$this->isMobileMenuOpen = ! $this->isMobileMenuOpen;
|
||||
}
|
||||
|
||||
public function closeMobileMenu()
|
||||
{
|
||||
$this->isMobileMenuOpen = false;
|
||||
}
|
||||
public function isActiveRoute($url)
|
||||
{
|
||||
$currentPath = request()->path();
|
||||
$currentPath = '/' . ltrim($currentPath, '/');
|
||||
|
||||
// Exact match
|
||||
if ($currentPath === $url) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Special handling for home route
|
||||
if ($url === '/' && ($currentPath === '/' || $currentPath === '')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Check if current path starts with the navigation URL (for sub-pages)
|
||||
if ($url !== '/' && str_starts_with($currentPath, rtrim($url, '/'))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.ui.header');
|
||||
}
|
||||
}
|
||||
62
app/Livewire/Web/Components/UI/TopBar.php
Normal file
62
app/Livewire/Web/Components/UI/TopBar.php
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
|
||||
namespace App\Livewire\Web\Components\Ui;
|
||||
|
||||
use Livewire\Component;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class TopBar extends Component
|
||||
{
|
||||
public $currentLocale;
|
||||
public $availableLocales = [
|
||||
'de' => 'Deutsch',
|
||||
'en' => 'English',
|
||||
//'fr' => 'Français',
|
||||
//'es' => 'Español',
|
||||
];
|
||||
|
||||
public $localeFlags = [
|
||||
'de' => '🇩🇪',
|
||||
'en' => '🇬🇧',
|
||||
];
|
||||
|
||||
public $domainName;
|
||||
|
||||
public function mount()
|
||||
{
|
||||
Log::info('Mounting TopBar');
|
||||
$sessionLocale = session('locale');
|
||||
if ($sessionLocale && array_key_exists($sessionLocale, $this->availableLocales)) {
|
||||
app()->setLocale($sessionLocale);
|
||||
$this->currentLocale = $sessionLocale;
|
||||
} else {
|
||||
$this->currentLocale = app()->getLocale();
|
||||
}
|
||||
$this->domainName = \App\Helpers\ThemeHelper::getDomainName();
|
||||
}
|
||||
|
||||
public function switchLanguage($locale)
|
||||
{
|
||||
Log::info('Switching language to: ' . $locale);
|
||||
|
||||
if (array_key_exists($locale, $this->availableLocales)) {
|
||||
app()->setLocale($locale);
|
||||
session(['locale' => $locale]);
|
||||
$this->currentLocale = $locale;
|
||||
|
||||
Log::info('Language switched successfully to: ' . $locale);
|
||||
|
||||
// Wichtig: In Livewire zeigt request()->url() auf /livewire/update.
|
||||
// Für einen Seiten-Reload müssen wir den Browser-Referer nutzen.
|
||||
$referer = request()->header('Referer') ?? '/';
|
||||
return redirect()->to($referer);
|
||||
}
|
||||
|
||||
Log::warning('Invalid locale attempted: ' . $locale);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.web.components.ui.top-bar');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue