Compare commits
1
Commits
main
...
product-landing
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c4aecfaee |
@@ -0,0 +1,31 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use Illuminate\Http\RedirectResponse;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\View\View;
|
||||||
|
|
||||||
|
class ProductLandingController extends Controller
|
||||||
|
{
|
||||||
|
public function show(Request $request): View|RedirectResponse
|
||||||
|
{
|
||||||
|
$landing = config('product_landing', []);
|
||||||
|
$variant = (string) ($landing['landing_variant'] ?? 'default');
|
||||||
|
$dashboardRoute = (string) ($landing['dashboard_route'] ?? 'login');
|
||||||
|
|
||||||
|
if ($variant === 'webmail') {
|
||||||
|
if ($request->session()->has('mb.email')) {
|
||||||
|
return redirect()->route($dashboardRoute);
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('product.landing');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (auth()->check()) {
|
||||||
|
return redirect()->route($dashboardRoute);
|
||||||
|
}
|
||||||
|
|
||||||
|
return view('product.landing');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
'slug' => 'events',
|
||||||
|
'name' => 'Events',
|
||||||
|
'logo' => 'images/logo/ladillevents-logo.svg',
|
||||||
|
'icon' => 'events.svg',
|
||||||
|
'tagline' => 'Tickets and event registration',
|
||||||
|
'headline' => 'Sell tickets and manage check-in',
|
||||||
|
'accent' => 'registration, ticketing, and attendance',
|
||||||
|
'description' => 'Events handles ticket sales, RSVPs, and check-in for conferences, concerts, church programs, and community gatherings.',
|
||||||
|
'benefits' =>
|
||||||
|
[
|
||||||
|
0 =>
|
||||||
|
[
|
||||||
|
'title' => 'Paid or free events',
|
||||||
|
'text' => 'Sell tickets with mobile money and cards, or run RSVP-only events.',
|
||||||
|
,]
|
||||||
|
1 =>
|
||||||
|
[
|
||||||
|
'title' => 'Check-in tools',
|
||||||
|
'text' => 'Scan attendees at the door with QR codes.',
|
||||||
|
,]
|
||||||
|
2 =>
|
||||||
|
[
|
||||||
|
'title' => 'Attendee management',
|
||||||
|
'text' => 'Export guest lists and track attendance in real time.',
|
||||||
|
,]
|
||||||
|
,]
|
||||||
|
'use_cases' =>
|
||||||
|
[
|
||||||
|
0 => 'Conferences',
|
||||||
|
1 => 'Church programs',
|
||||||
|
2 => 'Concerts & meetups',
|
||||||
|
,]
|
||||||
|
'gradient_from' => '#7c3aed',
|
||||||
|
'gradient_to' => '#1c75bc',
|
||||||
|
'dashboard_route' => 'events.dashboard',
|
||||||
|
'platform_url' => 'https://localhost',
|
||||||
|
'marketing_url' => 'https://localhost/products/events',
|
||||||
|
'register_url' => 'https://auth.localhost/register',
|
||||||
|
'landing_variant' => 'default',
|
||||||
|
];
|
||||||
@@ -0,0 +1,101 @@
|
|||||||
|
@php
|
||||||
|
$landing = (array) config('product_landing');
|
||||||
|
$logo = (string) ($landing['logo'] ?? '');
|
||||||
|
$logoPath = $logo !== '' ? public_path($logo) : null;
|
||||||
|
$platformUrl = (string) ($landing['platform_url'] ?? 'https://ladill.com');
|
||||||
|
$marketingUrl = (string) ($landing['marketing_url'] ?? $platformUrl);
|
||||||
|
$signInUrl = route('sso.connect', [
|
||||||
|
'redirect' => route($landing['dashboard_route'] ?? 'login'),
|
||||||
|
'interactive' => 1,
|
||||||
|
]);
|
||||||
|
$variant = (string) ($landing['landing_variant'] ?? 'default');
|
||||||
|
@endphp
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en" class="h-full">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover">
|
||||||
|
<title>{{ $landing['name'] ?? config('app.name') }} — Ladill</title>
|
||||||
|
<meta name="description" content="{{ $landing['description'] ?? '' }}">
|
||||||
|
@include('partials.favicon')
|
||||||
|
<link rel="canonical" href="{{ $marketingUrl }}">
|
||||||
|
<link rel="preconnect" href="https://fonts.bunny.net">
|
||||||
|
<link href="https://fonts.bunny.net/css?family=figtree:400,500,600,700&display=swap" rel="stylesheet" />
|
||||||
|
@vite(['resources/css/app.css'])
|
||||||
|
</head>
|
||||||
|
<body class="min-h-screen bg-slate-950 font-sans text-white antialiased">
|
||||||
|
<div class="pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_top_left,rgba(28,117,188,.35),transparent_50%),radial-gradient(circle_at_bottom_right,rgba(217,236,103,.12),transparent_45%)]"></div>
|
||||||
|
|
||||||
|
<header class="relative z-10 border-b border-white/10">
|
||||||
|
<div class="mx-auto flex max-w-6xl items-center justify-between gap-4 px-4 py-4 sm:px-6">
|
||||||
|
@if ($logo !== '')
|
||||||
|
<img src="{{ asset($logo) }}?v={{ $logoPath && is_file($logoPath) ? filemtime($logoPath) : '1' }}"
|
||||||
|
alt="{{ $landing['name'] ?? config('app.name') }}"
|
||||||
|
class="h-7 w-auto">
|
||||||
|
@else
|
||||||
|
<span class="text-sm font-semibold">{{ $landing['name'] ?? config('app.name') }}</span>
|
||||||
|
@endif
|
||||||
|
<div class="flex items-center gap-2">
|
||||||
|
<a href="{{ $platformUrl }}" class="hidden rounded-lg px-3 py-2 text-sm font-medium text-slate-300 transition hover:text-white sm:inline-flex">ladill.com</a>
|
||||||
|
<a href="{{ $signInUrl }}" class="rounded-lg border border-white/20 px-4 py-2 text-sm font-semibold text-white transition hover:bg-white/10">Sign in</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<main class="relative z-10 mx-auto max-w-6xl px-4 py-12 sm:px-6 sm:py-16">
|
||||||
|
<div class="grid items-center gap-12 lg:grid-cols-2">
|
||||||
|
<div>
|
||||||
|
<p class="text-sm font-semibold uppercase tracking-wider text-[#d9ec67]">{{ $landing['tagline'] ?? '' }}</p>
|
||||||
|
<h1 class="mt-4 text-4xl font-bold tracking-tight sm:text-5xl">{{ $landing['headline'] ?? ($landing['name'] ?? '') }}</h1>
|
||||||
|
<p class="mt-5 text-base leading-relaxed text-slate-300 sm:text-lg">{{ $landing['description'] ?? '' }}</p>
|
||||||
|
|
||||||
|
<div class="mt-8 flex flex-wrap gap-3">
|
||||||
|
<a href="{{ $signInUrl }}" class="inline-flex items-center justify-center rounded-xl bg-[#d9ec67] px-6 py-3.5 text-sm font-bold text-slate-950 transition hover:bg-[#e5f278]">
|
||||||
|
{{ $variant === 'webmail' ? 'Sign in to webmail' : 'Get started' }}
|
||||||
|
</a>
|
||||||
|
@if ($variant === 'webmail')
|
||||||
|
<a href="{{ route('webmail.login.manual') }}" class="inline-flex items-center justify-center rounded-xl border border-white/20 px-6 py-3.5 text-sm font-semibold text-white transition hover:bg-white/10">
|
||||||
|
Manual login
|
||||||
|
</a>
|
||||||
|
@else
|
||||||
|
<a href="{{ $landing['register_url'] ?? $platformUrl.'/register' }}" class="inline-flex items-center justify-center rounded-xl border border-white/20 px-6 py-3.5 text-sm font-semibold text-white transition hover:bg-white/10">
|
||||||
|
Create account
|
||||||
|
</a>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="mt-5 text-sm text-slate-400">
|
||||||
|
<a href="{{ $marketingUrl }}" class="font-medium text-slate-200 underline decoration-white/20 underline-offset-2 hover:text-white">Learn more on ladill.com</a>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="rounded-3xl border border-white/10 bg-white/5 p-6 backdrop-blur sm:p-8">
|
||||||
|
<p class="text-xs font-semibold uppercase tracking-wider text-slate-400">Why {{ $landing['name'] ?? 'Ladill' }}</p>
|
||||||
|
<div class="mt-5 space-y-4">
|
||||||
|
@foreach (($landing['benefits'] ?? []) as $benefit)
|
||||||
|
<div class="rounded-2xl border border-white/10 bg-slate-950/40 p-4">
|
||||||
|
<h2 class="text-sm font-semibold text-white">{{ $benefit['title'] }}</h2>
|
||||||
|
<p class="mt-1.5 text-sm leading-relaxed text-slate-400">{{ $benefit['text'] }}</p>
|
||||||
|
</div>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@if (! empty($landing['use_cases']))
|
||||||
|
<div class="mt-6 border-t border-white/10 pt-6">
|
||||||
|
<p class="text-xs font-semibold uppercase tracking-wider text-slate-400">Ideal for</p>
|
||||||
|
<div class="mt-3 flex flex-wrap gap-2">
|
||||||
|
@foreach ($landing['use_cases'] as $useCase)
|
||||||
|
<span class="rounded-full border border-white/10 bg-white/5 px-3 py-1 text-xs font-medium text-slate-200">{{ $useCase }}</span>
|
||||||
|
@endforeach
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
@endif
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="relative z-10 border-t border-white/10 py-6 text-center text-xs text-slate-500">
|
||||||
|
Part of the <a href="{{ $platformUrl }}" class="font-medium text-slate-300 hover:text-white">Ladill</a> platform — one account for every app.
|
||||||
|
</footer>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
+2
-3
@@ -1,5 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use App\Http\Controllers\ProductLandingController;
|
||||||
use App\Http\Controllers\Auth\SsoLoginController;
|
use App\Http\Controllers\Auth\SsoLoginController;
|
||||||
use App\Http\Controllers\Events\AttendeeController;
|
use App\Http\Controllers\Events\AttendeeController;
|
||||||
use App\Http\Controllers\Events\OverviewController;
|
use App\Http\Controllers\Events\OverviewController;
|
||||||
@@ -16,9 +17,7 @@ use App\Http\Controllers\Qr\TeamController;
|
|||||||
use App\Http\Controllers\SearchController;
|
use App\Http\Controllers\SearchController;
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
|
|
||||||
Route::get('/', fn () => auth()->check()
|
Route::get('/', [ProductLandingController::class, 'show'])->name('events.landing');
|
||||||
? redirect()->route('events.dashboard')
|
|
||||||
: redirect()->route('sso.connect'))->name('events.root');
|
|
||||||
|
|
||||||
Route::get('/login', [SsoLoginController::class, 'connect'])->name('login');
|
Route::get('/login', [SsoLoginController::class, 'connect'])->name('login');
|
||||||
Route::get('/sso/connect', [SsoLoginController::class, 'connect'])->name('sso.connect');
|
Route::get('/sso/connect', [SsoLoginController::class, 'connect'])->name('sso.connect');
|
||||||
|
|||||||
Reference in New Issue
Block a user