From b38dea33d1e17caebf5cdd5beff4e1a9f7512ae0 Mon Sep 17 00:00:00 2001 From: isaacclad Date: Mon, 8 Jun 2026 20:12:52 +0000 Subject: [PATCH] Add app-specific mail branding and sidebar Support links. Co-authored-by: Cursor --- config/mail_brands.php | 123 ++++++ .../images/logo/ladillevents-logo-email.png | Bin 0 -> 4326 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/ladillevents-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/ladillevents-logo-email.png b/public/images/logo/ladillevents-logo-email.png new file mode 100644 index 0000000000000000000000000000000000000000..18cba91846f7acd254f3e6b657ea8a4e8cf42958 GIT binary patch literal 4326 zcmV1d@56#(VA}cL*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4(bZzsv7 z%ym}^XJo&@!7#u>DMN}vyob2pzd`9V6DDQLZmLuxktnOUg2!sqUeA4Ga=$f1sU2R3 z!t;m~2AS!etKW2@f?Tih6_^N!v_c8I< z-ylk@flfRVKiUTxCX63}OXxAt7Ql3D3_=Hw)Jg)k6huHJ{s0 z4NiTj>SgowrW<3UGE;kGeycDj4@=l3qS_K0Rdunu(C^3_tgj@;L*KqPMIvNogUN#M&E0<{qo?CknX4Rii z=%k%qtITsG`JBryfN4D(ub$x)%S{p`__TV z&hI)lK0=qC`g-1=ewlk}qjrlW4oA^_KYX?|CqK)3t#pO7`JOAw`z}0udzm#I2fS`x zlZ>yLtZi9-Wk^coAaZz)>RulKGT4)n@17{Gk;+V~XwWc)>A;;POJ~#bl#% zZm;c}EXs1W8%vJd9e(!*g)F=}h7L(aHi{7C$~K~+@l;iFsB6!ADz^=@GRXvp!s_7J8sjPf(*!bxD*D}zy#{D|7Y9^c}Si>Q(Ba`miK$n zSf_qI*T~2|)K0|OXKTCCvXLGr8&UxOh?ZoI7s!=DG*Q4u?dMb>H=V-!Fy#`Q~Zf*TWD3(^7K9R!(XmB$A>H z7JM#bCuMRUK)CZwAxL3e2!A`xq&#rWpr|^HvQY1`C1Z_aOMck10UArV=_z^>_o(00000ym+kawe~$rm@)wWf_MM`002Hb)_lH|)&TZ(4b%v= zgaH5m0B^*~#~P^a}MzU0002I5^GMbR4`h6m3~Tl z)He~t0{{R3u*JaU '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 d8f49f7..1854a71 100644 --- a/resources/views/partials/sidebar.blade.php +++ b/resources/views/partials/sidebar.blade.php @@ -45,6 +45,7 @@
+ @include('partials.sidebar-support')