mirror of
https://github.com/openclassify/openclassify.git
synced 2026-04-14 11:12:09 -05:00
Refactor Blade headers sitewide
This commit is contained in:
parent
33570c18d3
commit
08aad25594
@ -10,7 +10,6 @@ class DemoContentSeeder extends Seeder
|
|||||||
{
|
{
|
||||||
$this->call([
|
$this->call([
|
||||||
\Modules\User\Database\Seeders\AuthUserSeeder::class,
|
\Modules\User\Database\Seeders\AuthUserSeeder::class,
|
||||||
\Modules\Listing\Database\Seeders\ListingSeeder::class,
|
|
||||||
\Modules\Listing\Database\Seeders\ListingPanelDemoSeeder::class,
|
\Modules\Listing\Database\Seeders\ListingPanelDemoSeeder::class,
|
||||||
\Modules\Favorite\Database\Seeders\FavoriteDemoSeeder::class,
|
\Modules\Favorite\Database\Seeders\FavoriteDemoSeeder::class,
|
||||||
\Modules\Conversation\Database\Seeders\ConversationDemoSeeder::class,
|
\Modules\Conversation\Database\Seeders\ConversationDemoSeeder::class,
|
||||||
|
|||||||
@ -7,13 +7,12 @@ use Illuminate\Http\RedirectResponse;
|
|||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
use Illuminate\Support\Facades\Auth;
|
use Illuminate\Support\Facades\Auth;
|
||||||
use Illuminate\Validation\Rule;
|
use Illuminate\Validation\Rule;
|
||||||
use Illuminate\View\View;
|
|
||||||
|
|
||||||
class ProfileController extends Controller
|
class ProfileController extends Controller
|
||||||
{
|
{
|
||||||
public function edit(Request $request): View
|
public function edit(): RedirectResponse
|
||||||
{
|
{
|
||||||
return view('user::profile.edit', ['user' => $request->user()]);
|
return redirect()->route('panel.profile.edit');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function update(Request $request): RedirectResponse
|
public function update(Request $request): RedirectResponse
|
||||||
|
|||||||
@ -1,29 +0,0 @@
|
|||||||
<x-app-layout>
|
|
||||||
<x-slot name="header">
|
|
||||||
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
|
|
||||||
{{ __('Profile') }}
|
|
||||||
</h2>
|
|
||||||
</x-slot>
|
|
||||||
|
|
||||||
<div class="py-12">
|
|
||||||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8 space-y-6">
|
|
||||||
<div class="p-4 sm:p-8 bg-white shadow sm:rounded-lg">
|
|
||||||
<div class="max-w-xl">
|
|
||||||
@include('user::profile.partials.update-profile-information-form')
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-4 sm:p-8 bg-white shadow sm:rounded-lg">
|
|
||||||
<div class="max-w-xl">
|
|
||||||
@include('user::profile.partials.update-password-form')
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="p-4 sm:p-8 bg-white shadow sm:rounded-lg">
|
|
||||||
<div class="max-w-xl">
|
|
||||||
@include('user::profile.partials.delete-user-form')
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</x-app-layout>
|
|
||||||
@ -14,6 +14,7 @@ class DatabaseSeeder extends Seeder
|
|||||||
\Modules\Location\Database\Seeders\LocationSeeder::class,
|
\Modules\Location\Database\Seeders\LocationSeeder::class,
|
||||||
\Modules\Category\Database\Seeders\CategorySeeder::class,
|
\Modules\Category\Database\Seeders\CategorySeeder::class,
|
||||||
\Modules\Listing\Database\Seeders\ListingCustomFieldSeeder::class,
|
\Modules\Listing\Database\Seeders\ListingCustomFieldSeeder::class,
|
||||||
|
\Modules\Listing\Database\Seeders\ListingSeeder::class,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ((bool) config('demo.enabled') || (bool) config('demo.provisioning')) {
|
if ((bool) config('demo.enabled') || (bool) config('demo.provisioning')) {
|
||||||
|
|||||||
@ -1,17 +0,0 @@
|
|||||||
<x-app-layout>
|
|
||||||
<x-slot name="header">
|
|
||||||
<h2 class="font-semibold text-xl text-gray-800 leading-tight">
|
|
||||||
{{ __('Dashboard') }}
|
|
||||||
</h2>
|
|
||||||
</x-slot>
|
|
||||||
|
|
||||||
<div class="py-12">
|
|
||||||
<div class="max-w-7xl mx-auto sm:px-6 lg:px-8">
|
|
||||||
<div class="bg-white overflow-hidden shadow-sm sm:rounded-lg">
|
|
||||||
<div class="p-6 text-gray-900">
|
|
||||||
{{ __("You're logged in!") }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</x-app-layout>
|
|
||||||
@ -78,7 +78,7 @@
|
|||||||
'bg-slate-50' => $demoLandingMode,
|
'bg-slate-50' => $demoLandingMode,
|
||||||
'bg-[#f5f5f7]' => $simplePage && ! $demoLandingMode,
|
'bg-[#f5f5f7]' => $simplePage && ! $demoLandingMode,
|
||||||
])>
|
])>
|
||||||
@if(!$demoLandingMode && $simplePage)
|
@if($simplePage)
|
||||||
<nav class="sticky top-0 z-50 border-b border-black/5 bg-white/80 backdrop-blur-2xl">
|
<nav class="sticky top-0 z-50 border-b border-black/5 bg-white/80 backdrop-blur-2xl">
|
||||||
<div class="mx-auto flex min-h-[76px] max-w-[1120px] items-center justify-between gap-4 px-4">
|
<div class="mx-auto flex min-h-[76px] max-w-[1120px] items-center justify-between gap-4 px-4">
|
||||||
<a href="{{ route('home') }}" class="oc-brand">
|
<a href="{{ route('home') }}" class="oc-brand">
|
||||||
@ -102,7 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
@elseif(!$demoLandingMode)
|
@else
|
||||||
<nav class="market-nav-surface sticky top-0 z-50">
|
<nav class="market-nav-surface sticky top-0 z-50">
|
||||||
<div class="oc-nav-wrap">
|
<div class="oc-nav-wrap">
|
||||||
<div class="oc-nav-main">
|
<div class="oc-nav-main">
|
||||||
@ -215,14 +215,12 @@
|
|||||||
<button type="submit" class="oc-text-link">{{ __('messages.logout') }}</button>
|
<button type="submit" class="oc-text-link">{{ __('messages.logout') }}</button>
|
||||||
</form>
|
</form>
|
||||||
@else
|
@else
|
||||||
@if(!$demoLandingMode)
|
|
||||||
<a href="{{ $loginRoute }}" class="oc-text-link oc-auth-link">
|
<a href="{{ $loginRoute }}" class="oc-text-link oc-auth-link">
|
||||||
{{ __('messages.login') }}
|
{{ __('messages.login') }}
|
||||||
</a>
|
</a>
|
||||||
<a href="{{ $panelCreateRoute }}" class="btn-primary oc-cta">
|
<a href="{{ $panelCreateRoute }}" class="btn-primary oc-cta">
|
||||||
Sell
|
Sell
|
||||||
</a>
|
</a>
|
||||||
@endif
|
|
||||||
@endauth
|
@endauth
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -282,7 +280,6 @@
|
|||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
@else
|
@else
|
||||||
@if(!$demoLandingMode)
|
|
||||||
<a href="{{ $loginRoute }}" class="oc-mobile-menu-link">
|
<a href="{{ $loginRoute }}" class="oc-mobile-menu-link">
|
||||||
<span>Login</span>
|
<span>Login</span>
|
||||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||||
@ -295,7 +292,6 @@
|
|||||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M9 6l6 6-6 6"/>
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.8" d="M9 6l6 6-6 6"/>
|
||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
@endif
|
|
||||||
@endauth
|
@endauth
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -341,14 +337,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
@endif
|
@endif
|
||||||
@if(!$demoLandingMode && $demoRemainingLabel)
|
@if($demoRemainingLabel)
|
||||||
<div class="sticky top-0 z-40 border-b border-amber-200 bg-amber-50/95 backdrop-blur-md">
|
<div class="sticky top-0 z-40 border-b border-amber-200 bg-amber-50/95 backdrop-blur-md">
|
||||||
<div class="mx-auto flex min-h-12 max-w-[1320px] items-center justify-center px-4 py-2 text-center text-sm font-semibold text-amber-900">
|
<div class="mx-auto flex min-h-12 max-w-[1320px] items-center justify-center px-4 py-2 text-center text-sm font-semibold text-amber-900">
|
||||||
Demo auto deletes in {{ $demoRemainingLabel }}
|
Demo auto deletes in {{ $demoRemainingLabel }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@unless($demoLandingMode)
|
|
||||||
@if(session('success'))
|
@if(session('success'))
|
||||||
<div class="max-w-[1320px] mx-auto px-4 pt-3">
|
<div class="max-w-[1320px] mx-auto px-4 pt-3">
|
||||||
<div class="bg-emerald-100 border border-emerald-300 text-emerald-800 px-4 py-3 rounded-xl text-sm">{{ session('success') }}</div>
|
<div class="bg-emerald-100 border border-emerald-300 text-emerald-800 px-4 py-3 rounded-xl text-sm">{{ session('success') }}</div>
|
||||||
@ -359,12 +354,11 @@
|
|||||||
<div class="bg-rose-100 border border-rose-300 text-rose-700 px-4 py-3 rounded-xl text-sm">{{ session('error') }}</div>
|
<div class="bg-rose-100 border border-rose-300 text-rose-700 px-4 py-3 rounded-xl text-sm">{{ session('error') }}</div>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
@endunless
|
|
||||||
<main @class([
|
<main @class([
|
||||||
'site-main',
|
'site-main',
|
||||||
'min-h-screen' => $demoLandingMode,
|
'min-h-screen' => $demoLandingMode,
|
||||||
])>@yield('content')</main>
|
])>@yield('content')</main>
|
||||||
@if(!$demoLandingMode && !$simplePage)
|
@if(!$simplePage)
|
||||||
<footer class="mt-14 bg-slate-100 text-slate-600 border-t border-slate-200">
|
<footer class="mt-14 bg-slate-100 text-slate-600 border-t border-slate-200">
|
||||||
<div class="max-w-[1320px] mx-auto px-4 py-12">
|
<div class="max-w-[1320px] mx-auto px-4 py-12">
|
||||||
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
|
||||||
|
|||||||
@ -1,100 +0,0 @@
|
|||||||
<nav x-data="{ open: false }" class="bg-white border-b border-gray-100">
|
|
||||||
<!-- Primary Navigation Menu -->
|
|
||||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
|
||||||
<div class="flex justify-between h-16">
|
|
||||||
<div class="flex">
|
|
||||||
<!-- Logo -->
|
|
||||||
<div class="shrink-0 flex items-center">
|
|
||||||
<a href="{{ route('dashboard') }}">
|
|
||||||
<x-application-logo class="block h-9 w-auto fill-current text-gray-800" />
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Navigation Links -->
|
|
||||||
<div class="hidden space-x-8 sm:-my-px sm:ms-10 sm:flex">
|
|
||||||
<x-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')">
|
|
||||||
{{ __('Dashboard') }}
|
|
||||||
</x-nav-link>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Settings Dropdown -->
|
|
||||||
<div class="hidden sm:flex sm:items-center sm:ms-6">
|
|
||||||
<x-dropdown align="right" width="48">
|
|
||||||
<x-slot name="trigger">
|
|
||||||
<button class="inline-flex items-center px-3 py-2 border border-transparent text-sm leading-4 font-medium rounded-md text-gray-500 bg-white hover:text-gray-700 focus:outline-none transition ease-in-out duration-150">
|
|
||||||
<div>{{ Auth::user()->name }}</div>
|
|
||||||
|
|
||||||
<div class="ms-1">
|
|
||||||
<svg class="fill-current h-4 w-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
|
||||||
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
|
|
||||||
</svg>
|
|
||||||
</div>
|
|
||||||
</button>
|
|
||||||
</x-slot>
|
|
||||||
|
|
||||||
<x-slot name="content">
|
|
||||||
<x-dropdown-link :href="route('panel.profile.edit')">
|
|
||||||
{{ __('Profile') }}
|
|
||||||
</x-dropdown-link>
|
|
||||||
|
|
||||||
<!-- Authentication -->
|
|
||||||
<form method="POST" action="{{ route('logout') }}">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<x-dropdown-link :href="route('logout')"
|
|
||||||
onclick="event.preventDefault();
|
|
||||||
this.closest('form').submit();">
|
|
||||||
{{ __('Log Out') }}
|
|
||||||
</x-dropdown-link>
|
|
||||||
</form>
|
|
||||||
</x-slot>
|
|
||||||
</x-dropdown>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Hamburger -->
|
|
||||||
<div class="-me-2 flex items-center sm:hidden">
|
|
||||||
<button @click="open = ! open" class="inline-flex items-center justify-center p-2 rounded-md text-gray-400 hover:text-gray-500 hover:bg-gray-100 focus:outline-none focus:bg-gray-100 focus:text-gray-500 transition duration-150 ease-in-out">
|
|
||||||
<svg class="h-6 w-6" stroke="currentColor" fill="none" viewBox="0 0 24 24">
|
|
||||||
<path :class="{'hidden': open, 'inline-flex': ! open }" class="inline-flex" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 12h16M4 18h16" />
|
|
||||||
<path :class="{'hidden': ! open, 'inline-flex': open }" class="hidden" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12" />
|
|
||||||
</svg>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Responsive Navigation Menu -->
|
|
||||||
<div :class="{'block': open, 'hidden': ! open}" class="hidden sm:hidden">
|
|
||||||
<div class="pt-2 pb-3 space-y-1">
|
|
||||||
<x-responsive-nav-link :href="route('dashboard')" :active="request()->routeIs('dashboard')">
|
|
||||||
{{ __('Dashboard') }}
|
|
||||||
</x-responsive-nav-link>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Responsive Settings Options -->
|
|
||||||
<div class="pt-4 pb-1 border-t border-gray-200">
|
|
||||||
<div class="px-4">
|
|
||||||
<div class="font-medium text-base text-gray-800">{{ Auth::user()->name }}</div>
|
|
||||||
<div class="font-medium text-sm text-gray-500">{{ Auth::user()->email }}</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="mt-3 space-y-1">
|
|
||||||
<x-responsive-nav-link :href="route('panel.profile.edit')">
|
|
||||||
{{ __('Profile') }}
|
|
||||||
</x-responsive-nav-link>
|
|
||||||
|
|
||||||
<!-- Authentication -->
|
|
||||||
<form method="POST" action="{{ route('logout') }}">
|
|
||||||
@csrf
|
|
||||||
|
|
||||||
<x-responsive-nav-link :href="route('logout')"
|
|
||||||
onclick="event.preventDefault();
|
|
||||||
this.closest('form').submit();">
|
|
||||||
{{ __('Log Out') }}
|
|
||||||
</x-responsive-nav-link>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
Loading…
Reference in New Issue
Block a user