UI and editing updates

This commit is contained in:
Mark Gregory
2026-07-27 13:24:42 +01:00
parent 4a32be068c
commit d297948fb9
7 changed files with 575 additions and 368 deletions
@@ -1,36 +1,43 @@
<footer class="footer">
@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="{{ url('/') }}">{{ $siteTitle }}</a>
<p>{{ $siteDescription }}</p>
</div>
<div>
<b>Explore</b>
@foreach ($footerNavigation as $item)
<a href="{{ $item['url'] }}">{{ $item['label'] }}</a>
@endforeach
</div>
<div>
<b>Account</b>
@auth
<a href="{{ route('dashboard') }}">Dashboard</a>
@if (Route::has('profile.edit'))<a href="{{ route('profile.edit') }}">Profile</a>@endif
@else
@if (Route::has('login'))<a href="{{ route('login') }}">Log in</a>@endif
@if (Route::has('register'))<a href="{{ route('register') }}">Register</a>@endif
@endauth
</div>
<div>
<b>Connect</b>
@if ($facebookUrl)<a href="{{ $facebookUrl }}" target="_blank" rel="noopener">Facebook</a>@endif
@if ($xUrl)<a href="{{ $xUrl }}" target="_blank" rel="noopener">X</a>@endif
@if ($linkedinUrl)<a href="{{ $linkedinUrl }}" target="_blank" rel="noopener">LinkedIn</a>@endif
@unless($facebookUrl || $xUrl || $linkedinUrl)<a href="mailto:{{ config('mail.from.address') }}">Contact</a>@endunless
<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>© {{ date('Y') }} {{ $siteTitle }}. All rights reserved.</span>
<a href="#top">Back to top ↑</a>
<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>