Compare commits
1
Commits
main
...
product-landing
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a754e8068b |
@@ -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' => 'hosting',
|
||||
'name' => 'Hosting',
|
||||
'logo' => 'images/logo/ladillhosting-logo.svg',
|
||||
'icon' => 'hosting.svg',
|
||||
'tagline' => 'Fast, managed web hosting',
|
||||
'headline' => 'Reliable hosting for your websites',
|
||||
'accent' => 'shared, WordPress, and cloud plans',
|
||||
'description' => 'Hosting provides managed web hosting for business sites, WordPress, and multi-domain setups — with SSL, backups, and one-click tools.',
|
||||
'benefits' =>
|
||||
[
|
||||
0 =>
|
||||
[
|
||||
'title' => 'Plans for every stage',
|
||||
'text' => 'Single-domain, multi-domain, WordPress, and reseller options.',
|
||||
,]
|
||||
1 =>
|
||||
[
|
||||
'title' => 'Free SSL included',
|
||||
'text' => 'Secure every site with automatic HTTPS.',
|
||||
,]
|
||||
2 =>
|
||||
[
|
||||
'title' => 'Managed & monitored',
|
||||
'text' => '99.9% uptime with 24/7 platform support.',
|
||||
,]
|
||||
,]
|
||||
'use_cases' =>
|
||||
[
|
||||
0 => 'Business websites',
|
||||
1 => 'WordPress blogs',
|
||||
2 => 'Agency client hosting',
|
||||
,]
|
||||
'gradient_from' => '#1c75bc',
|
||||
'gradient_to' => '#010c1f',
|
||||
'dashboard_route' => 'hosting.dashboard',
|
||||
'platform_url' => 'https://localhost',
|
||||
'marketing_url' => 'https://localhost/products/hosting',
|
||||
'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
|
||||
|
||||
use App\Http\Controllers\ProductLandingController;
|
||||
use App\Http\Controllers\Auth\SsoLoginController;
|
||||
use App\Http\Controllers\Hosting\AccountController;
|
||||
use App\Http\Controllers\Hosting\AfiaController;
|
||||
@@ -18,9 +19,7 @@ $serversApp = fn (string $path = ''): string => 'https://'.config('app.servers_d
|
||||
|
||||
// Ladill Hosting — authenticated app for buying + managing hosting (hosting.ladill.com).
|
||||
|
||||
Route::get('/', fn () => auth()->check()
|
||||
? redirect()->route('hosting.dashboard')
|
||||
: redirect()->route('sso.connect'))->name('hosting.root');
|
||||
Route::get('/', [ProductLandingController::class, 'show'])->name('hosting.landing');
|
||||
|
||||
Route::get('/login', [SsoLoginController::class, 'connect'])->name('login');
|
||||
Route::get('/sso/connect', [SsoLoginController::class, 'connect'])->name('sso.connect');
|
||||
|
||||
Reference in New Issue
Block a user