From 8c37afc3ecb89ccf7bdd673928f46e5a12fe0447 Mon Sep 17 00:00:00 2001 From: isaacclad Date: Mon, 8 Jun 2026 20:12:28 +0000 Subject: [PATCH] Add app-specific mail branding and sidebar Support links. Co-authored-by: Cursor --- config/mail_brands.php | 123 ++++++ public/images/logo/ladillmini-logo-email.png | Bin 0 -> 3302 bytes .../notifications/domain-verified.blade.php | 90 ++++ .../notifications/event-programme.blade.php | 8 + .../notifications/hosting-activated.blade.php | 64 +++ .../hosting-developer-added.blade.php | 47 ++ .../notifications/hosting-expiring.blade.php | 56 +++ .../notifications/hosting-suspended.blade.php | 59 +++ .../views/mail/notifications/layout.blade.php | 404 ++++++++++++++++++ .../mail/notifications/ssl-expiring.blade.php | 64 +++ .../notifications/ssl-provisioned.blade.php | 64 +++ .../mail/partials/brand-footer.blade.php | 20 + .../mail/partials/brand-header.blade.php | 7 + .../views/partials/sidebar-support.blade.php | 23 + resources/views/partials/sidebar.blade.php | 1 + 15 files changed, 1030 insertions(+) create mode 100644 config/mail_brands.php create mode 100644 public/images/logo/ladillmini-logo-email.png create mode 100644 resources/views/mail/notifications/domain-verified.blade.php create mode 100644 resources/views/mail/notifications/hosting-activated.blade.php create mode 100644 resources/views/mail/notifications/hosting-developer-added.blade.php create mode 100644 resources/views/mail/notifications/hosting-expiring.blade.php create mode 100644 resources/views/mail/notifications/hosting-suspended.blade.php create mode 100644 resources/views/mail/notifications/layout.blade.php create mode 100644 resources/views/mail/notifications/ssl-expiring.blade.php create mode 100644 resources/views/mail/notifications/ssl-provisioned.blade.php create mode 100644 resources/views/mail/partials/brand-footer.blade.php create mode 100644 resources/views/mail/partials/brand-header.blade.php create mode 100644 resources/views/partials/sidebar-support.blade.php diff --git a/config/mail_brands.php b/config/mail_brands.php new file mode 100644 index 0000000..c0fa4a7 --- /dev/null +++ b/config/mail_brands.php @@ -0,0 +1,123 @@ + env( + 'LADILL_ACCOUNT_URL', + 'https://'.env('ACCOUNT_DOMAIN', 'account.'.$platformHost) + ), + + 'brands' => [ + 'ladill' => [ + 'name' => 'Ladill', + 'logo' => 'ladill-logo-white.png', + 'logo_class' => 'email-logo', + 'app_url' => env('APP_URL', 'https://ladill.com'), + 'footer_account' => 'an account with Ladill', + 'dashboard_path' => '/dashboard', + 'support_path' => '/support', + 'home_label' => 'ladill.com', + ], + 'hosting' => [ + 'name' => 'Ladill Hosting', + 'logo' => 'ladillhosting-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_HOSTING_APP_URL', 'https://hosting.ladill.com'), + 'footer_account' => 'a Ladill Hosting account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'hosting.ladill.com', + ], + 'domains' => [ + 'name' => 'Ladill Domains', + 'logo' => 'ladilldomains-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_DOMAINS_APP_URL', 'https://domains.ladill.com'), + 'footer_account' => 'a Ladill Domains account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'domains.ladill.com', + ], + 'bird' => [ + 'name' => 'Ladill Bird', + 'logo' => 'ladillbird-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_BIRD_APP_URL', 'https://bird.ladill.com'), + 'footer_account' => 'a Ladill Bird account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'bird.ladill.com', + ], + 'mail' => [ + 'name' => 'Ladill Mail', + 'logo' => 'ladillmail-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_WEBMAIL_URL', 'https://mail.ladill.com'), + 'footer_account' => 'a Ladill Mail account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'mail.ladill.com', + ], + 'email' => [ + 'name' => 'Ladill Email', + 'logo' => 'ladillemail-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_EMAIL_APP_URL', 'https://email.ladill.com'), + 'footer_account' => 'a Ladill Email account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'email.ladill.com', + ], + 'qrplus' => [ + 'name' => 'Ladill QR Plus', + 'logo' => 'ladillqrplus-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_QR_APP_URL', 'https://qrplus.ladill.com'), + 'footer_account' => 'a Ladill QR Plus account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'qrplus.ladill.com', + ], + 'events' => [ + 'name' => 'Ladill Events', + 'logo' => 'ladillevents-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_EVENTS_APP_URL', 'https://events.ladill.com'), + 'footer_account' => 'a Ladill Events account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'events.ladill.com', + ], + 'transfer' => [ + 'name' => 'Ladill Transfer', + 'logo' => 'ladilltransfer-logo-email.png', + 'logo_class' => 'email-logo email-logo-transfer', + 'app_url' => env('LADILL_TRANSFER_APP_URL', 'https://transfer.ladill.com'), + 'footer_account' => 'a Ladill Transfer account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'transfer.ladill.com', + ], + 'mini' => [ + 'name' => 'Ladill Mini', + 'logo' => 'ladillmini-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_MINI_APP_URL', 'https://mini.ladill.com'), + 'footer_account' => 'a Ladill Mini account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'mini.ladill.com', + ], + 'servers' => [ + 'name' => 'Ladill Servers', + 'logo' => 'ladillservers-logo-email.png', + 'logo_class' => 'email-logo', + 'app_url' => env('LADILL_SERVERS_APP_URL', 'https://servers.ladill.com'), + 'footer_account' => 'a Ladill Servers account', + 'dashboard_path' => '/', + 'support_path' => '/support', + 'home_label' => 'servers.ladill.com', + ], + ], +]; diff --git a/public/images/logo/ladillmini-logo-email.png b/public/images/logo/ladillmini-logo-email.png new file mode 100644 index 0000000000000000000000000000000000000000..c22d791eb39c354ccdf920ad021f2b341bcf5b72 GIT binary patch literal 3302 zcmVou@P)_Z1)Eers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j*?Y-x1+otEImyCZNpYT^; z_|WDVSJi{0%jd}NeJbfN6wjm1NmTY^t31N0q=~-jwj@F0u{@V6Ez`*lvB3?zd-(lz zQFJ_9{~66005CLs%pp7)s^4wTp4rE$5mX%j00f~Pa!rhal-R}UQz$9 zQXnAh0001jpur{w>Uo5M(D ky4IXS)&T%uwEQo?0Gr(_e5Em=M*si-07*qoM6N<$g38eo9smFU literal 0 HcmV?d00001 diff --git a/resources/views/mail/notifications/domain-verified.blade.php b/resources/views/mail/notifications/domain-verified.blade.php new file mode 100644 index 0000000..1db6f71 --- /dev/null +++ b/resources/views/mail/notifications/domain-verified.blade.php @@ -0,0 +1,90 @@ +@extends('mail.notifications.layout') + +@section('email-header') + @include('mail.partials.brand-header', ['brand' => 'domains']) +@endsection + +@section('email-footer') + @include('mail.partials.brand-footer', ['brand' => 'domains']) +@endsection + +@section('content') +
+

Domain Verified!

+

{{ $domain->host }} is now active

+
+ +

Your Domain is Ready

+ + + + + + + +
    +
  • Create email addresses like hello@{{ $domain->host }}
  • +
  • Connect this domain to your website
  • +
  • Manage DNS records from your dashboard
  • +
+ +

+ +
+ +

+@endsection diff --git a/resources/views/mail/notifications/event-programme.blade.php b/resources/views/mail/notifications/event-programme.blade.php index e98b883..ba5db16 100644 --- a/resources/views/mail/notifications/event-programme.blade.php +++ b/resources/views/mail/notifications/event-programme.blade.php @@ -1,5 +1,13 @@ @extends('mail.notifications.layout') +@section('email-header') + @include('mail.partials.brand-header', ['brand' => 'events']) +@endsection + +@section('email-footer') + @include('mail.partials.brand-footer', ['brand' => 'events']) +@endsection + @section('content')

📋 Programme Outline

diff --git a/resources/views/mail/notifications/hosting-activated.blade.php b/resources/views/mail/notifications/hosting-activated.blade.php new file mode 100644 index 0000000..4e38851 --- /dev/null +++ b/resources/views/mail/notifications/hosting-activated.blade.php @@ -0,0 +1,64 @@ +@extends('mail.notifications.layout') + +@section('email-header') + @include('mail.partials.brand-header', ['brand' => 'hosting']) +@endsection + +@section('email-footer') + @include('mail.partials.brand-footer', ['brand' => 'hosting']) +@endsection + +@section('content') +

Your hosting is now active! 🖥️

+ + + +
+

{{ $planName }}

+

Your hosting is live and ready

+
+ + + +

+ +

+ + + + +@endsection diff --git a/resources/views/mail/notifications/hosting-developer-added.blade.php b/resources/views/mail/notifications/hosting-developer-added.blade.php new file mode 100644 index 0000000..5a0048e --- /dev/null +++ b/resources/views/mail/notifications/hosting-developer-added.blade.php @@ -0,0 +1,47 @@ +@extends('mail.notifications.layout') + +@section('email-header') + @include('mail.partials.brand-header', ['brand' => 'hosting']) +@endsection + +@section('email-footer') + @include('mail.partials.brand-footer', ['brand' => 'hosting']) +@endsection + +@section('content') +

You were added to a hosting team

+

+ {{ $ownerName }} granted you developer access to the following Ladill hosting environment{{ count($accountLabels) === 1 ? '' : 's' }}: +

+ +
    + @foreach ($accountLabels as $label) +
  • {{ $label }}
  • + @endforeach +
+ +

+ You now have full access to the hosting panel for {{ count($accountLabels) === 1 ? 'this account' : 'these accounts' }} — manage files, domains, databases, SSL, cron jobs, and more. +

+ +

+ To connect via SSH or SFTP, add your public key from the hosting panel Settings page after signing in. +

+ + @if ($setupUrl) + +

+ Use the button above to activate your account before signing in. +

+ @else + + @endif + +

+ After signing in, open your dashboard here: {{ $dashboardUrl }} +

+@endsection diff --git a/resources/views/mail/notifications/hosting-expiring.blade.php b/resources/views/mail/notifications/hosting-expiring.blade.php new file mode 100644 index 0000000..dce0a10 --- /dev/null +++ b/resources/views/mail/notifications/hosting-expiring.blade.php @@ -0,0 +1,56 @@ +@extends('mail.notifications.layout') + +@section('email-header') + @include('mail.partials.brand-header', ['brand' => 'hosting']) +@endsection + +@section('email-footer') + @include('mail.partials.brand-footer', ['brand' => 'hosting']) +@endsection + +@section('content') +
+

Hosting Expiring Soon

+

{{ $account->primary_domain ?: $account->username }}

+
+ +

Your Hosting Plan is Expiring Soon

+ + + + + + + +

+ +

+ + + + +@endsection diff --git a/resources/views/mail/notifications/hosting-suspended.blade.php b/resources/views/mail/notifications/hosting-suspended.blade.php new file mode 100644 index 0000000..f63ca41 --- /dev/null +++ b/resources/views/mail/notifications/hosting-suspended.blade.php @@ -0,0 +1,59 @@ +@extends('mail.notifications.layout') + +@section('email-header') + @include('mail.partials.brand-header', ['brand' => 'hosting']) +@endsection + +@section('email-footer') + @include('mail.partials.brand-footer', ['brand' => 'hosting']) +@endsection + +@section('content') +
+

Account Suspended

+

Action Required

+
+ +

Your Hosting Account Has Been Suspended

+ + + + + + + +

+ +

+ + + + +@endsection diff --git a/resources/views/mail/notifications/layout.blade.php b/resources/views/mail/notifications/layout.blade.php new file mode 100644 index 0000000..3662c00 --- /dev/null +++ b/resources/views/mail/notifications/layout.blade.php @@ -0,0 +1,404 @@ + + + + + + + {{ $subject ?? 'Ladill Notification' }} + + + + + + + diff --git a/resources/views/mail/notifications/ssl-expiring.blade.php b/resources/views/mail/notifications/ssl-expiring.blade.php new file mode 100644 index 0000000..99547a8 --- /dev/null +++ b/resources/views/mail/notifications/ssl-expiring.blade.php @@ -0,0 +1,64 @@ +@extends('mail.notifications.layout') + +@section('email-header') + @include('mail.partials.brand-header', ['brand' => 'hosting']) +@endsection + +@section('email-footer') + @include('mail.partials.brand-footer', ['brand' => 'hosting']) +@endsection + +@section('content') +
+

⚠️ SSL Certificate Expiring

+

{{ $daysUntilExpiry }} days remaining

+
+ +

Action May Be Required

+ + + + + + + +
    +
  • Ensure your domain's nameservers still point to Ladill
  • +
  • Verify your domain hasn't expired at your registrar
  • +
  • Check that your website is accessible
  • +
+ +

+ +

+ + + + +@endsection diff --git a/resources/views/mail/notifications/ssl-provisioned.blade.php b/resources/views/mail/notifications/ssl-provisioned.blade.php new file mode 100644 index 0000000..8a3fa31 --- /dev/null +++ b/resources/views/mail/notifications/ssl-provisioned.blade.php @@ -0,0 +1,64 @@ +@extends('mail.notifications.layout') + +@section('email-header') + @include('mail.partials.brand-header', ['brand' => 'hosting']) +@endsection + +@section('email-footer') + @include('mail.partials.brand-footer', ['brand' => 'hosting']) +@endsection + +@section('content') +
+

🔒 SSL Certificate Active

+

{{ $domain->host }} is now secure

+
+ +

Your Site is Secure

+ + + + + + + +
    +
  • All traffic to your site is encrypted
  • +
  • Visitors see a secure padlock in their browser
  • +
  • Better search engine rankings (Google prefers HTTPS)
  • +
  • Certificate auto-renews before expiry
  • +
+ +

+ +

+ + + + +@endsection diff --git a/resources/views/mail/partials/brand-footer.blade.php b/resources/views/mail/partials/brand-footer.blade.php new file mode 100644 index 0000000..6f6b66a --- /dev/null +++ b/resources/views/mail/partials/brand-footer.blade.php @@ -0,0 +1,20 @@ +@php + $brandKey = $brand ?? 'ladill'; + $brandConfig = config("mail_brands.brands.{$brandKey}", config('mail_brands.brands.ladill')); + $appBase = rtrim((string) ($brandConfig['app_url'] ?? config('app.url')), '/'); + $dashboardPath = $brandConfig['dashboard_path'] ?? '/'; + $accountBase = rtrim((string) ($brandConfig['account_url'] ?? config('mail_brands.account_url', 'https://account.ladill.com')), '/'); + $supportUrl = $brandConfig['support_url'] ?? $accountBase.'/support-tickets'; + $homeLabel = $brandConfig['home_label'] ?? parse_url($appBase, PHP_URL_HOST) ?: 'ladill.com'; +@endphp + + + diff --git a/resources/views/mail/partials/brand-header.blade.php b/resources/views/mail/partials/brand-header.blade.php new file mode 100644 index 0000000..f6bce5a --- /dev/null +++ b/resources/views/mail/partials/brand-header.blade.php @@ -0,0 +1,7 @@ +@php + $brandKey = $brand ?? 'ladill'; + $brandConfig = config("mail_brands.brands.{$brandKey}", config('mail_brands.brands.ladill')); + $assetBase = rtrim((string) ($brandConfig['asset_url'] ?? config('app.url')), '/'); + $logoClass = trim((string) ($brandConfig['logo_class'] ?? 'email-logo')); +@endphp +{{ $brandConfig['name'] }} diff --git a/resources/views/partials/sidebar-support.blade.php b/resources/views/partials/sidebar-support.blade.php new file mode 100644 index 0000000..817932f --- /dev/null +++ b/resources/views/partials/sidebar-support.blade.php @@ -0,0 +1,23 @@ +@php + $useInternal = $internal ?? false; + if ($useInternal) { + $supportUrl = route('user.support-tickets.index'); + $openExternal = false; + } else { + $supportUrl = function_exists('ladill_account_url') + ? ladill_account_url('/support-tickets') + : 'https://'.config('app.account_domain', 'account.ladill.com').'/support-tickets'; + $openExternal = true; + } +@endphp + + + Support + @if($openExternal) + + @endif + diff --git a/resources/views/partials/sidebar.blade.php b/resources/views/partials/sidebar.blade.php index fff622c..17e6986 100644 --- a/resources/views/partials/sidebar.blade.php +++ b/resources/views/partials/sidebar.blade.php @@ -26,6 +26,7 @@
+ @include('partials.sidebar-support')