Skip to content

Commit

Permalink
move context conference to website
Browse files Browse the repository at this point in the history
  • Loading branch information
rahmanramsi committed Sep 26, 2023
1 parent 898c98a commit c949017
Show file tree
Hide file tree
Showing 37 changed files with 80 additions and 80 deletions.
4 changes: 2 additions & 2 deletions app/Http/Middleware/DefaultViewData.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ public function handle(Request $request, Closure $next): Response
View::share('currentConference', $currentConference);
View::share('headerLogo', $currentConference->getFirstMedia('logo')?->getAvailableUrl(['thumb','thumb-xl']));
View::share('headerLogoAltText', $currentConference->name);
View::share('logoText', $currentConference->name);
View::share('contextName', $currentConference->name);
View::share('footer', $currentConference->getMeta('footer'));
} else {
$site = app()->getSite();
View::share('headerLogo', $site->getFirstMedia('logo')?->getAvailableUrl(['thumb','thumb-xl']));
View::share('headerLogoAltText', $site->getMeta('name'));
View::share('logoText', $site->getMeta('name'));
View::share('contextName', $site->getMeta('name'));
View::share('footer', $site->getMeta('footer'));
}
View::share('homeUrl', match($currentConference?->status){
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/ConferenceServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected function currentConference(PageGroup $pageGroup): PageGroup
return $pageGroup
->id('current-conference')
->path('current')
->layout('conference.components.layouts.app')
->layout('website.components.layouts.app')
->homePage(Home::class)
->middleware([
'web',
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/WebsiteServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function pageGroup(PageGroup $pageGroup): PageGroup
return $pageGroup
->id('website')
->path('')
->layout('conference.components.layouts.app')
->layout('website.components.layouts.app')
->homePage(Home::class)
->bootUsing(function () {
app()->scopeCurrentConference();
Expand Down
20 changes: 10 additions & 10 deletions public/build/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@
"file": "assets/logo-913f6b43.png",
"src": "resources/assets/images/logo.png"
},
"resources/conference/css/conference.css": {
"file": "assets/conference-ddc9a1df.css",
"isEntry": true,
"src": "resources/conference/css/conference.css"
},
"resources/conference/js/conference.js": {
"file": "assets/conference-b4ec506a.js",
"isEntry": true,
"src": "resources/conference/js/conference.js"
},
"resources/panel/css/panel.css": {
"file": "assets/panel-b715b443.css",
"isEntry": true,
Expand All @@ -22,5 +12,15 @@
"file": "assets/panel-540e3665.js",
"isEntry": true,
"src": "resources/panel/js/panel.js"
},
"resources/website/css/website.css": {
"file": "assets/website-fbf287d6.css",
"isEntry": true,
"src": "resources/website/css/website.css"
},
"resources/website/js/website.js": {
"file": "assets/website-b4ec506a.js",
"isEntry": true,
"src": "resources/website/js/website.js"
}
}
20 changes: 0 additions & 20 deletions resources/views/conference/components/layouts/header.blade.php

This file was deleted.

4 changes: 2 additions & 2 deletions resources/views/conference/pages/about.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-conference::layouts.main>
<x-website::layouts.main>
<div class="card-body flex gap-3">
<x-conference::breadcrumbs :breadcrumbs="$this->getBreadcrumbs()" />
<x-website::breadcrumbs :breadcrumbs="$this->getBreadcrumbs()" />
<h2 class="card-title">{{ $this->getTitle() }} </h2>

<div class="user-content">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<x-conference::layouts.main>
<x-website::layouts.main>
<div class="card-body">
<h1 class="text-xl mb-2 ml-2 text-gray-900">{{ 'Announcements' }}</h1>
<div class="divide-y overflow-y-auto">
Expand Down
2 changes: 1 addition & 1 deletion resources/views/conference/pages/announcement.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<x-conference::layouts.main>
<x-website::layouts.main>
<div class="card-body text-gray-800">
<p class="text-xs text-gray-500 font-medium">{{ $this->announcement->created_at->format('l, j F Y') }}</p>
<h1 class="card-title">{{ $this->announcement->title }}</h1>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/conference/pages/home.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<x-conference::layouts.main>
<x-website::layouts.main>

<div class="card px-5 py-4">
<div class="card-body space-y-2 bg-gray-50 border">
Expand Down
4 changes: 2 additions & 2 deletions resources/views/conference/pages/privacy-statement.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-conference::layouts.main>
<x-website::layouts.main>
<div class="card-body space-y-2">
<x-conference::breadcrumbs :breadcrumbs="$this->getBreadcrumbs()" />
<x-website::breadcrumbs :breadcrumbs="$this->getBreadcrumbs()" />
<h2 class="card-title">{{ $this->getTitle() }}</h2>
<div class="user-content">
{{ new Illuminate\Support\HtmlString($currentConference->getMeta('privacy_statement')) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@foreach ($breadcrumbs as $url => $label)
<li>
@if(!is_int($url))
<x-conference::link
<x-website::link
:href="$url"
class="link link-hover link-primary"
{{-- wire:navigate --}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<x-conference::layouts.base :livewire="$livewire">
<x-website::layouts.base :livewire="$livewire">
<div class="flex flex-col h-full gap-3 min-h-screen">

{{-- Load Header Layout --}}
<x-conference::layouts.header />
<x-website::layouts.header />

{{-- Load Main Layout --}}
{{ $slot }}

{{-- Load Footer Layout --}}
<x-conference::layouts.footer />
<x-website::layouts.footer />
</div>
</x-conference::layouts.base>
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<title>
{{ filled($title = strip_tags($livewire->getTitle())) ? "{$title} - " : null }}
{{ isset($currentConference) ? $currentConference->name : config('app.name') }}
{{ $contextName ?? config('app.name') }}
</title>

<link rel="preconnect" href="https://fonts.googleapis.com">
Expand All @@ -23,7 +23,7 @@
display: none !important;
}
</style>
@vite(['resources/conference/css/conference.css', 'resources/conference/js/conference.js'])
@vite(['resources/website/css/website.css', 'resources/website/js/website.js'])
</head>

<body class="page page-{{ strtolower($livewire->getTitle()) }} antialiased" x-data>
Expand Down
20 changes: 20 additions & 0 deletions resources/views/website/components/layouts/header.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@php($primaryNavigationItems = app()->getNavigationItems('primary-navigation-menu'))


<div class="navbar-container sticky top-0 z-[60] bg-sky-400 text-white">
<div class="navbar mx-auto max-w-7xl">
<div class="navbar-start items-center w-auto sm:w-1/2 gap-2">
<x-website::navigation-mobile :items="$primaryNavigationItems"/>
<x-website::logo/>
</div>
<x-website::navigation :items="$primaryNavigationItems"/>
<div class="navbar-end gap-x-4 hidden lg:inline-flex">
@if (\Filament\Facades\Filament::getDefaultPanel()->auth()->user())
<x-website::link :href="route('filament.panel.tenant')" :spa="false" class="btn btn-sm btn-white rounded px-4 font-normal text-gray-900">Dashboard</x-conference::link>
@else
<x-website::link :href="route('livewirePageGroup.website.pages.register')" :spa="false" class="btn btn-sm btn-ghost rounded px-4 font-normal text-white">Register</x-conference::link>
<x-website::link :href="route('livewirePageGroup.website.pages.login')" :spa="false" class="btn btn-sm rounded px-4 font-normal text-gray-900">Login</x-conference::link>
@endif
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div class="page-main mx-auto max-w-7xl flex flex-col lg:grid grid-cols-12 gap-3 grow w-full">
<x-conference::layouts.leftbar />
<x-website::layouts.leftbar />
<div class="page-content col-span-12">
{{ $slot }}
</div>
<x-conference::layouts.rightbar />
<x-website::layouts.rightbar />
</div>

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
@if ($headerLogo)
<x-conference::link
<x-website::link
{{ $attributes }}
:href="$homeUrl"
>
<img src="{{ $headerLogo }}" alt="{{ $headerLogoAltText }}"
class="max-h-12 w-auto">
</x-conference::link>
@else
<x-conference::link
<x-website::link
:href="$homeUrl"
{{ $attributes->merge(['class' => 'text-lg sm:text-lg']) }}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ class="fixed inset-0 backdrop-blur-[2px]"></div>
class="w-screen max-w-xs">
<div
class="flex flex-col h-full pt-[5rem] pb-5 px-4 sm:px-6 overflow-y-scroll bg-white border-r shadow-lg border-neutral-100/70 justify-between">
<x-conference::navigation-mobile.items :items="$items" />
<x-website::navigation-mobile.items :items="$items" />
<div class="flex flex-col gap-2">
@if (\Filament\Facades\Filament::getDefaultPanel()->auth()->user())
<x-conference::link :href="route('filament.panel.tenant')" :spa="false"
class="btn btn-sm btn-primary rounded px-4 font-normal">Dashboard</x-conference::link>
<x-website::link :href="route('filament.panel.tenant')" :spa="false"
class="btn btn-sm btn-primary rounded px-4 font-normal">Dashboard</x-website::link>
@else
<x-conference::link :href="route('livewirePageGroup.website.pages.register')" :spa="false"
class="btn btn-sm btn-primary rounded px-4 font-normal">Register</x-conference::link>
<x-conference::link :href="route('livewirePageGroup.website.pages.login')" :spa="false"
class="btn btn-sm rounded px-4 font-normal text-gray-900">Login</x-conference::link>
<x-website::link :href="route('livewirePageGroup.website.pages.register')" :spa="false"
class="btn btn-sm btn-primary rounded px-4 font-normal">Register</x-website::link>
<x-website::link :href="route('livewirePageGroup.website.pages.login')" :spa="false"
class="btn btn-sm rounded px-4 font-normal text-gray-900">Login</x-website::link>
@endif
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
@php($item = new App\Classes\NavigationItem(...$item))
<li class="relative">
@if ($level >= 1)
<x-conference::link @class([
<x-website::link @class([
'block w-full pl-3.5 before:pointer-events-none before:absolute before:-left-1 before:top-1/2 before:h-1.5 before:w-1.5 before:-translate-y-1/2 before:rounded-full hover:before:block',
'font-semibold text-primary before:bg-primary' => request()->url() === $item->getUrl(),
'before:hidden before:bg-slate-300 text-slate-500 hover:text-slate-600' => request()->url() !== $item->getUrl(),
]) :href="$item->getUrl()">
{{ $item->getLabel() }}
</x-conference::link>
@else
<x-conference::link @class([
<x-website::link @class([
'text-primary font-semibold' => request()->url() === $item->getUrl(),
'text-slate-900 font-medium' => request()->url() !== $item->getUrl(),
]) :href="$item->getUrl()">
Expand All @@ -28,7 +28,7 @@
@endif
</li>
@if ($item->hasChildren())
<x-conference::navigation-mobile.items
<x-website::navigation-mobile.items
:items="$item->getChildren()"
:level="$level + 1"
@class([
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ class="w-4 h-4 ml-auto">
</div>
<div data-submenu
class="absolute top-0 right-0 invisible mr-1 duration-200 ease-out translate-x-full opacity-0 group-hover:mr-0 group-hover:visible group-hover:opacity-100">
<x-conference::navigation.dropdown.items :items="$item->getChildren()" :level="$level + 1"
<x-website::navigation.dropdown.items :items="$item->getChildren()" :level="$level + 1"
class="z-50 min-w-[8rem] overflow-hidden" />
</div>
</div>
@continue
@endif


<x-conference::link
<x-website::link
class="relative flex hover:bg-neutral-100 items-center py-1.5 px-4 pr-6 text-sm outline-none transition-colors gap-4 w-full"
:href="$item->getUrl()">
{{ $item->getLabel() }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@

@if (!$item->hasChildren())
<li>
<x-conference::link
<x-website::link
class="btn btn-ghost btn-sm rounded-full inline-flex items-center justify-center px-4 transition-colors hover:text-primary-content focus:outline-none disabled:opacity-50 disabled:pointer-events-none group w-max"
:href="$item->getUrl()">
{{ $item->getLabel() }}
</x-conference::link>
</li>
@else
<x-conference::navigation.dropdown.trigger :key="$key" :item="$item" />
<x-website::navigation.dropdown.trigger :key="$key" :item="$item" />
@endif
@endforeach
</ul>
Expand All @@ -33,7 +33,7 @@ class="navbar-dropdown absolute -top-2 duration-200 ease-out -translate-x-1/2 tr
@continue
@endif
<div class="navbar-dropdown-content" x-navigation:dropdown-content="{{ $key }}">
<x-conference::navigation.dropdown.items :items="$item->getChildren()" />
<x-website::navigation.dropdown.items :items="$item->getChildren()" />
</div>
@endforeach
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/views/website/pages/home.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<x-conference::layouts.main>
<x-website::layouts.main>
<div class="px-6 py-4">
<h1 class="card-title mt-4">Highlight Conference</h1>
<div class="h-1 w-20 rounded bg-primary"></div>
Expand Down Expand Up @@ -98,4 +98,4 @@ class="btn btn-primary btn-sm btn-outline rounded mt-3 font-normal">Enrol</butto
</div>
</div>
</x-conference::layouts.main>
</x-website::layouts.main>
6 changes: 3 additions & 3 deletions resources/views/website/pages/login.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-conference::layouts.main>
<x-website::layouts.main>
<div class="card-body space-y-2">
<x-conference::breadcrumbs :breadcrumbs="$this->getBreadcrumbs()" />
<x-website::breadcrumbs :breadcrumbs="$this->getBreadcrumbs()" />
<form wire:submit='login' class="space-y-4">
<div class="form-control sm:col-span-6 gap-2">
<label class="label-text">
Expand Down Expand Up @@ -35,7 +35,7 @@
<span class="loading loading-spinner loading-xs" wire:loading></span>
Login
</button>
<x-conference::link class="btn btn-outline btn-sm" :href="url('register')">
<x-website::link class="btn btn-outline btn-sm" :href="url('register')">
Register
</x-conference::link>
</div>
Expand Down
8 changes: 4 additions & 4 deletions resources/views/website/pages/register.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-conference::layouts.main>
<x-website::layouts.main>
<div class="card-body space-y-2">
<x-conference::breadcrumbs :breadcrumbs="$this->getBreadcrumbs()" />
<x-website::breadcrumbs :breadcrumbs="$this->getBreadcrumbs()" />
<h2 class="card-title">{{ $this->getTitle() }}</h2>

<form wire:submit='register' class="space-y-4">
Expand Down Expand Up @@ -92,7 +92,7 @@
<label class="label justify-normal gap-2">
<input type="checkbox" class="checkbox checkbox-primary checkbox-sm" wire:model="privacy_statement_agree" required/>
<p class="label-text">
I accept and approve according to <x-conference::link href="#" class="link link-primary link-hover">Privacy Statement.</x-conference::link>
I accept and approve according to <x-website::link href="#" class="link link-primary link-hover">Privacy Statement.</x-conference::link>
</p>
</label>
</div>
Expand All @@ -108,7 +108,7 @@
<span class="loading loading-spinner loading-xs" wire:loading></span>
Register
</button>
<x-conference::link class="btn btn-outline btn-sm" :href="url('login')">
<x-website::link class="btn btn-outline btn-sm" :href="url('login')">
Login
</x-conference::link>
</div>
Expand Down
2 changes: 1 addition & 1 deletion resources/views/website/pages/static-page.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<x-conference::layouts.main>
<x-website::layouts.main>
<div class="card-body text-gray-800">
<p class="text-xs text-gray-500 font-medium">{{ $this->staticPage->created_at->format('l, j F Y') }}</p>
<h1 class="card-title">{{ $this->staticPage->title }}</h1>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions stubs/livewire-page-group/PageView.stub
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<x-conference::layouts.main>
<x-website::layouts.main>
<div class="card-body space-y-2">
<x-conference::breadcrumbs :breadcrumbs="$this->getBreadcrumbs()" />
<x-website::breadcrumbs :breadcrumbs="$this->getBreadcrumbs()" />
<h2 class="card-title">{{$this->getTitle()}}</h2>
</div>
</x-conference::layouts.main>
4 changes: 2 additions & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ export default defineConfig({
input: [
"resources/panel/css/panel.css",
"resources/panel/js/panel.js",
"resources/conference/css/conference.css",
"resources/conference/js/conference.js",
"resources/website/css/website.css",
"resources/website/js/website.js",
],
refresh: true,
}),
Expand Down

0 comments on commit c949017

Please sign in to comment.