-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: update banners * chore: rename component
- Loading branch information
Showing
10 changed files
with
83 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace App\View\Components\Site; | ||
|
||
use Illuminate\Contracts\View\View; | ||
use Illuminate\View\Component; | ||
|
||
class BannerGovernment extends Component | ||
{ | ||
public ?string $text; | ||
|
||
public function __construct(?string $text = null) | ||
{ | ||
$this->text = $text; | ||
} | ||
|
||
public function render(): View | ||
{ | ||
return view('components.site.banner-government'); | ||
} | ||
|
||
public function shouldRender(): bool | ||
{ | ||
return ! config('website-factory.hide_banner') && ! \is_null($this->text); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
resources/views/components/site/banner-government.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<aside {{ $attributes }}> | ||
<a | ||
href="https://code4.ro" | ||
target="_blank" | ||
rel="noopener" | ||
class="flex items-center w-auto gap-3 text-sm text-white/60 hover:text-white focus-visible:text-white focus:outline-0 hover:underline focus:underline" | ||
> | ||
|
||
<span>{{ $text }}</span> | ||
|
||
<x-icon-code4 class="h-6 sm:h-8 shrink-0 fill-white/80" /> | ||
</a> | ||
</aside> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters