updated theme
This commit is contained in:
@@ -19,3 +19,6 @@
|
||||
@media(max-width:1180px){.hero-premium-grid{grid-template-columns:1fr;gap:38px;padding-top:60px}.hero-copy{text-align:center}.hero-copy h1,.hero-copy>p{margin-left:auto;margin-right:auto}.hero-actions,.hero-assurances{justify-content:center}.dashboard-preview{max-width:900px;width:100%;margin:0 auto}.feature-row{grid-template-columns:repeat(2,1fr)}.footer-grid-premium{grid-template-columns:1.25fr repeat(3,1fr)}.footer-newsletter{grid-column:1/-1;max-width:560px}}
|
||||
@media(max-width:760px){.hero-premium-grid{padding:52px 0 44px}.hero-copy h1{font-size:46px}.dashboard-preview{display:none}.features-premium{padding:42px 0}.feature-row{grid-template-columns:1fr}.footer-grid-premium{grid-template-columns:repeat(2,1fr)}.footer-brand,.footer-newsletter{grid-column:1/-1}.copyright{align-items:flex-start;flex-direction:column}.footer-bottom-links{flex-wrap:wrap}}
|
||||
@media(max-width:480px){.hero-copy h1{font-size:39px}.hero-assurances{align-items:center;flex-direction:column}.footer-grid-premium{grid-template-columns:1fr}.footer-brand,.footer-newsletter{grid-column:auto}.footer-subscribe{flex-direction:column;border:0;background:transparent;gap:8px}.footer-subscribe input{border:1px solid #454845;border-radius:8px;background:#181a18}.footer-subscribe button{min-height:44px;border-radius:8px}}
|
||||
|
||||
/* Saasland mobile navigation controller */
|
||||
.mobile-nav[hidden]{display:none!important}.mobile-nav.is-open{display:flex!important}.menu.is-open span:nth-child(1){transform:translateY(7px) rotate(45deg)}.menu.is-open span:nth-child(2){opacity:0}.menu.is-open span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}.menu span{transition:transform .2s ease,opacity .2s ease}.saasland-menu-open{overflow:hidden}@media(min-width:981px){.mobile-nav.is-open{display:none!important}.saasland-menu-open{overflow:auto}}
|
||||
|
||||
@@ -1 +1,48 @@
|
||||
// Theme JavaScript is intentionally minimal; Alpine is supplied by the Laravel application bundle.
|
||||
(() => {
|
||||
const initialise = () => {
|
||||
document.querySelectorAll('[data-saasland-header]').forEach((header) => {
|
||||
const toggle = header.querySelector('[data-saasland-menu-toggle]');
|
||||
const menu = document.querySelector('[data-saasland-mobile-nav]');
|
||||
|
||||
if (!toggle || !menu || toggle.dataset.initialised === 'true') {
|
||||
return;
|
||||
}
|
||||
|
||||
const setOpen = (open) => {
|
||||
toggle.setAttribute('aria-expanded', String(open));
|
||||
toggle.setAttribute('aria-label', open ? 'Close navigation' : 'Open navigation');
|
||||
toggle.classList.toggle('is-open', open);
|
||||
menu.hidden = !open;
|
||||
menu.classList.toggle('is-open', open);
|
||||
document.documentElement.classList.toggle('saasland-menu-open', open);
|
||||
};
|
||||
|
||||
toggle.addEventListener('click', () => {
|
||||
setOpen(toggle.getAttribute('aria-expanded') !== 'true');
|
||||
});
|
||||
|
||||
menu.querySelectorAll('a').forEach((link) => {
|
||||
link.addEventListener('click', () => setOpen(false));
|
||||
});
|
||||
|
||||
document.addEventListener('keydown', (event) => {
|
||||
if (event.key === 'Escape') setOpen(false);
|
||||
});
|
||||
|
||||
window.addEventListener('resize', () => {
|
||||
if (window.innerWidth > 980) setOpen(false);
|
||||
});
|
||||
|
||||
toggle.dataset.initialised = 'true';
|
||||
setOpen(false);
|
||||
});
|
||||
};
|
||||
|
||||
if (document.readyState === 'loading') {
|
||||
document.addEventListener('DOMContentLoaded', initialise);
|
||||
} else {
|
||||
initialise();
|
||||
}
|
||||
|
||||
document.addEventListener('livewire:navigated', initialise);
|
||||
})();
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
"manifest_version": 2,
|
||||
"name": "Saasland",
|
||||
"slug": "saasland",
|
||||
"version": "1.3.0",
|
||||
"version": "1.3.1",
|
||||
"author": "ABSDEV",
|
||||
"description": "Premium dark SaaS frontend with compact section spacing, responsive dashboard hero, CMS-driven content and an expanded lead-generation footer.",
|
||||
"description": "Premium dark SaaS frontend with CMS-driven content and a dependency-free responsive mobile navigation.",
|
||||
"type": "frontend",
|
||||
"extends": null,
|
||||
"entry_view": "home",
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
$menuLocation = $headerContent['menu_location'] ?? 'primary';
|
||||
$navigationLinks = app(\Modules\Stylist\Support\FrontendNavigation::class)->location($menuLocation, $primaryNavigation ?? []);
|
||||
$brandUrl = $siteSettings['site_url'] ?: url('/');
|
||||
$mobileMenuId = 'saasland-mobile-navigation';
|
||||
@endphp
|
||||
|
||||
<header class="nav cms-editable-header">
|
||||
<header class="nav cms-editable-header" data-saasland-header>
|
||||
<a href="{{ $brandUrl }}" class="logo cms-brand" aria-label="{{ $siteTitle }} home">
|
||||
@if ($logoUrl)<img src="{{ $logoUrl }}" alt="{{ $siteTitle }}">@else{{ $siteTitle }}@endif
|
||||
</a>
|
||||
@@ -30,7 +31,22 @@
|
||||
@if (filter_var($headerContent['show_login'] ?? true, FILTER_VALIDATE_BOOL) && Route::has('login'))<a class="nav-login" href="{{ route('login') }}">{{ $siteSettings['login_label'] }}</a>@endif
|
||||
@if (filter_var($headerContent['show_registration'] ?? true, FILTER_VALIDATE_BOOL) && Route::has('register'))<a class="btn primary nav-register" href="{{ route('register') }}">{{ $siteSettings['registration_label'] }}</a>@endif
|
||||
@endauth
|
||||
@if (filter_var($headerContent['show_mobile_menu'] ?? true, FILTER_VALIDATE_BOOL))<button class="menu" type="button" aria-label="Toggle navigation" :aria-expanded="menuOpen" @click="menuOpen=!menuOpen"><span></span><span></span><span></span></button>@endif
|
||||
@if (filter_var($headerContent['show_mobile_menu'] ?? true, FILTER_VALIDATE_BOOL))
|
||||
<button
|
||||
class="menu"
|
||||
type="button"
|
||||
aria-label="Open navigation"
|
||||
aria-controls="{{ $mobileMenuId }}"
|
||||
aria-expanded="false"
|
||||
data-saasland-menu-toggle
|
||||
><span></span><span></span><span></span></button>
|
||||
@endif
|
||||
</div>
|
||||
</header>
|
||||
@if (filter_var($headerContent['show_mobile_menu'] ?? true, FILTER_VALIDATE_BOOL))<div class="mobile-nav" x-show="menuOpen" x-cloak>@foreach($navigationLinks as $link)<a href="{{ $link['url'] }}">{{ $link['label'] }}</a>@endforeach</div>@endif
|
||||
@if (filter_var($headerContent['show_mobile_menu'] ?? true, FILTER_VALIDATE_BOOL))
|
||||
<div id="{{ $mobileMenuId }}" class="mobile-nav" data-saasland-mobile-nav hidden>
|
||||
@foreach($navigationLinks as $link)
|
||||
<a href="{{ $link['url'] }}" @if($link['target']) target="{{ $link['target'] }}" rel="noopener" @endif>{{ $link['label'] }}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -1,69 +1,52 @@
|
||||
@php($headerContent = $headerContent ?? [])
|
||||
<header class="nav">
|
||||
<a href="{{ url('/') }}" class="logo" aria-label="{{ $siteTitle }} home">
|
||||
@if ($logoUrl)
|
||||
<img src="{{ $logoUrl }}" alt="{{ $siteTitle }}">
|
||||
@else
|
||||
{{ $siteTitle }}
|
||||
@endif
|
||||
@php
|
||||
$headerContent = $headerContent ?? [];
|
||||
$menuLocation = $headerContent['menu_location'] ?? 'primary';
|
||||
$navigationLinks = app(\Modules\Stylist\Support\FrontendNavigation::class)->location($menuLocation, $primaryNavigation ?? []);
|
||||
$brandUrl = $siteSettings['site_url'] ?: url('/');
|
||||
$mobileMenuId = 'saasland-mobile-navigation';
|
||||
@endphp
|
||||
|
||||
<header class="nav cms-editable-header" data-saasland-header>
|
||||
<a href="{{ $brandUrl }}" class="logo cms-brand" aria-label="{{ $siteTitle }} home">
|
||||
@if ($logoUrl)<img src="{{ $logoUrl }}" alt="{{ $siteTitle }}">@else{{ $siteTitle }}@endif
|
||||
</a>
|
||||
|
||||
@if($headerContent['show_navigation'] ?? true)<nav class="desktop-nav" aria-label="Primary navigation">
|
||||
@include('stylist-theme-saasland::partials.navigation-items', ['items' => $primaryNavigation])
|
||||
</nav>@endif
|
||||
@if (filter_var($headerContent['show_navigation'] ?? true, FILTER_VALIDATE_BOOL) && $navigationLinks)
|
||||
<nav class="desktop-nav" aria-label="Primary navigation">
|
||||
@foreach ($navigationLinks as $link)
|
||||
<a href="{{ $link['url'] }}" @if($link['target']) target="{{ $link['target'] }}" rel="noopener" @endif>{{ $link['label'] }}</a>
|
||||
@endforeach
|
||||
</nav>
|
||||
@endif
|
||||
|
||||
<div class="nav-actions">
|
||||
@auth
|
||||
<a class="nav-account" href="{{ route('dashboard') }}">Dashboard</a>
|
||||
<div class="account-menu" x-data="{ accountOpen: false }">
|
||||
<button type="button" class="account-trigger" @click="accountOpen = ! accountOpen" :aria-expanded="accountOpen">
|
||||
<span>{{ str(auth()->user()->name)->substr(0, 1)->upper() }}</span>
|
||||
<span class="account-name">{{ auth()->user()->name }}</span>
|
||||
</button>
|
||||
<div class="account-dropdown" x-show="accountOpen" @click.outside="accountOpen = false" x-cloak>
|
||||
@if (Route::has('profile.edit'))
|
||||
<a href="{{ route('profile.edit') }}">Profile</a>
|
||||
@endif
|
||||
@if (Route::has('settings.profile'))
|
||||
<a href="{{ route('settings.profile') }}">Account settings</a>
|
||||
@endif
|
||||
<form method="POST" action="{{ route('logout') }}">
|
||||
@csrf
|
||||
<button type="submit">Log out</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@if (filter_var($headerContent['show_dashboard'] ?? true, FILTER_VALIDATE_BOOL) && Route::has('dashboard'))
|
||||
<a class="nav-account" href="{{ route('dashboard') }}">{{ $siteSettings['dashboard_label'] }}</a>
|
||||
@endif
|
||||
@if (filter_var($headerContent['show_user_name'] ?? true, FILTER_VALIDATE_BOOL))
|
||||
<div class="account-menu" x-data="{ accountOpen: false }"><button type="button" class="account-trigger" @click="accountOpen=!accountOpen"><span>{{ str(auth()->user()->name)->substr(0,1)->upper() }}</span><span class="account-name">{{ auth()->user()->name }}</span></button><div class="account-dropdown" x-show="accountOpen" @click.outside="accountOpen=false" x-cloak>@if(Route::has('profile.edit'))<a href="{{ route('profile.edit') }}">Profile</a>@endif @if(Route::has('logout'))<form method="POST" action="{{ route('logout') }}">@csrf<button type="submit">Log out</button></form>@endif</div></div>
|
||||
@endif
|
||||
@else
|
||||
@if (($headerContent['show_login'] ?? true) && Route::has('login'))
|
||||
<a class="nav-login" href="{{ route('login') }}">{{ $headerContent['login_label'] ?? 'Log in' }}</a>
|
||||
@endif
|
||||
@if (($headerContent['show_registration'] ?? true) && Route::has('register'))
|
||||
<a class="btn primary nav-register" href="{{ route('register') }}">{{ $headerContent['registration_label'] ?? 'Get started' }}</a>
|
||||
@endif
|
||||
@if (filter_var($headerContent['show_login'] ?? true, FILTER_VALIDATE_BOOL) && Route::has('login'))<a class="nav-login" href="{{ route('login') }}">{{ $siteSettings['login_label'] }}</a>@endif
|
||||
@if (filter_var($headerContent['show_registration'] ?? true, FILTER_VALIDATE_BOOL) && Route::has('register'))<a class="btn primary nav-register" href="{{ route('register') }}">{{ $siteSettings['registration_label'] }}</a>@endif
|
||||
@endauth
|
||||
|
||||
<button class="menu" type="button" aria-label="Toggle navigation" :aria-expanded="menuOpen" @click="menuOpen = ! menuOpen">
|
||||
<span></span><span></span><span></span>
|
||||
</button>
|
||||
@if (filter_var($headerContent['show_mobile_menu'] ?? true, FILTER_VALIDATE_BOOL))
|
||||
<button
|
||||
class="menu"
|
||||
type="button"
|
||||
aria-label="Open navigation"
|
||||
aria-controls="{{ $mobileMenuId }}"
|
||||
aria-expanded="false"
|
||||
data-saasland-menu-toggle
|
||||
><span></span><span></span><span></span></button>
|
||||
@endif
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="mobile-nav" x-show="menuOpen" x-cloak>
|
||||
@include('stylist-theme-saasland::partials.navigation-items', ['items' => $primaryNavigation])
|
||||
|
||||
<div class="mobile-auth">
|
||||
@auth
|
||||
<a href="{{ route('dashboard') }}">Dashboard</a>
|
||||
@if (Route::has('profile.edit'))
|
||||
<a href="{{ route('profile.edit') }}">Profile</a>
|
||||
@endif
|
||||
<form method="POST" action="{{ route('logout') }}">
|
||||
@csrf
|
||||
<button type="submit">Log out</button>
|
||||
</form>
|
||||
@else
|
||||
@if (Route::has('login'))<a href="{{ route('login') }}">Log in</a>@endif
|
||||
@if (Route::has('register'))<a class="mobile-primary" href="{{ route('register') }}">Get started</a>@endif
|
||||
@endauth
|
||||
@if (filter_var($headerContent['show_mobile_menu'] ?? true, FILTER_VALIDATE_BOOL))
|
||||
<div id="{{ $mobileMenuId }}" class="mobile-nav" data-saasland-mobile-nav hidden>
|
||||
@foreach($navigationLinks as $link)
|
||||
<a href="{{ $link['url'] }}" @if($link['target']) target="{{ $link['target'] }}" rel="noopener" @endif>{{ $link['label'] }}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user