Files
ABSDEV/resources/themes/saasland/views/partials/footer.blade.php
T
2026-07-27 13:24:42 +01:00

44 lines
2.3 KiB
PHP

@php
$footerContent = $footerContent ?? [];
$columns = collect($footerContent['columns'] ?? [])->filter(
fn (array $column): bool => filter_var($column['enabled'] ?? true, FILTER_VALIDATE_BOOL)
);
@endphp
<style>
.footer.cms-editable-footer .footer-grid{display:grid;grid-template-columns:minmax(280px,1.5fr) repeat(3,minmax(160px,1fr));gap:3rem;padding-block:4rem 2rem;align-items:start;}
.cms-editable-footer .footer-brand{max-width:36rem}.cms-editable-footer .footer-brand p{max-width:34rem;line-height:1.7;}
.cms-editable-footer .footer-column h3{margin:0 0 1rem;font-size:1rem}.cms-editable-footer .footer-column ul{display:grid;gap:.75rem;list-style:none;margin:0;padding:0;}
.cms-editable-footer .footer-column a{display:inline-flex;text-decoration:none}.cms-editable-footer .copyright{padding-block:1.5rem 2rem;}
@media(max-width:900px){.footer.cms-editable-footer .footer-grid{grid-template-columns:1fr;gap:2rem;padding-block:3rem 1.5rem}}
</style>
<footer class="footer cms-editable-footer">
<div class="wrap footer-grid">
<div class="footer-brand">
<a class="logo" href="{{ $footerContent['brand_url'] ?? url('/') }}">{{ $footerContent['brand_text'] ?? $siteTitle }}</a>
@if (! empty($footerContent['description'] ?? $siteDescription))
<p>{{ $footerContent['description'] ?? $siteDescription }}</p>
@endif
</div>
@foreach ($columns as $column)
<div class="footer-column">
<h3>{{ $column['heading'] ?? 'Links' }}</h3>
<ul>
@foreach (collect($column['links'] ?? [])->filter(fn (array $link): bool => filter_var($link['enabled'] ?? true, FILTER_VALIDATE_BOOL)) as $link)
<li><a href="{{ $link['url'] ?? '#' }}">{{ $link['label'] ?? 'Link' }}</a></li>
@endforeach
</ul>
</div>
@endforeach
</div>
<div class="wrap copyright">
<span>{{ $footerContent['copyright'] ?? ('© '.date('Y').' '.$siteTitle.'. All rights reserved.') }}</span>
@if (filter_var($footerContent['show_back_to_top'] ?? true, FILTER_VALIDATE_BOOL))
<a href="#top">{{ $footerContent['back_to_top_label'] ?? 'Back to top ↑' }}</a>
@endif
</div>
</footer>