Add account company logo for customer event emails.
Deploy Ladill Events / deploy (push) Successful in 1m39s

Upload logo in account settings and prefer it over Ladill product marks in event notification headers.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-07-12 20:07:55 +00:00
co-authored by Cursor
parent 407f1364fb
commit b5debd79c4
15 changed files with 377 additions and 36 deletions
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body style="margin:0;background:#f8fafc;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Helvetica,Arial,sans-serif;color:#0f172a;">
<div style="max-width:600px;margin:0 auto;padding:48px 16px;">
<div style="text-align:center;padding:0 0 24px;">
@if (! empty($logoUrl))
<img src="{{ $logoUrl }}" alt="{{ $companyName }}" style="height:42px;max-height:42px;width:auto;">
@else
<div style="font-size:22px;font-weight:700;letter-spacing:-0.02em;color:#0f172a;">{{ $companyName }}</div>
@endif
</div>
<div style="background:#ffffff;border-radius:16px;padding:40px;border:1px solid #e2e8f0;box-shadow:0 4px 6px -1px rgba(0,0,0,0.1);">
{!! $bodyHtml !!}
</div>
<p style="margin-top:20px;text-align:center;font-size:13px;color:#94a3b8;">{{ $companyName }}</p>
</div>
</body>
</html>
@@ -1,11 +1,11 @@
@extends('mail.notifications.layout')
@section('email-header')
@include('mail.partials.brand-header', ['brand' => 'events'])
@include('mail.partials.brand-header', ['brand' => 'events', 'logoUrl' => $logoUrl ?? null, 'companyName' => $companyName ?? null])
@endsection
@section('email-footer')
@include('mail.partials.brand-footer', ['brand' => 'events'])
@include('mail.partials.brand-footer', ['brand' => 'events', 'companyName' => $companyName ?? null])
@endsection
@section('content')
@@ -1,11 +1,11 @@
@extends('mail.notifications.layout')
@section('email-header')
@include('mail.partials.brand-header', ['brand' => 'events'])
@include('mail.partials.brand-header', ['brand' => 'events', 'logoUrl' => $logoUrl ?? null, 'companyName' => $companyName ?? null])
@endsection
@section('email-footer')
@include('mail.partials.brand-footer', ['brand' => 'events'])
@include('mail.partials.brand-footer', ['brand' => 'events', 'companyName' => $companyName ?? null])
@endsection
@section('content')
@@ -1,11 +1,11 @@
@extends('mail.notifications.layout')
@section('email-header')
@include('mail.partials.brand-header', ['brand' => 'events'])
@include('mail.partials.brand-header', ['brand' => 'events', 'logoUrl' => $logoUrl ?? null, 'companyName' => $companyName ?? null])
@endsection
@section('email-footer')
@include('mail.partials.brand-footer', ['brand' => 'events'])
@include('mail.partials.brand-footer', ['brand' => 'events', 'companyName' => $companyName ?? null])
@endsection
@section('content')
@@ -1,11 +1,11 @@
@extends('mail.notifications.layout')
@section('email-header')
@include('mail.partials.brand-header', ['brand' => 'events'])
@include('mail.partials.brand-header', ['brand' => 'events', 'logoUrl' => $logoUrl ?? null, 'companyName' => $companyName ?? null])
@endsection
@section('email-footer')
@include('mail.partials.brand-footer', ['brand' => 'events'])
@include('mail.partials.brand-footer', ['brand' => 'events', 'companyName' => $companyName ?? null])
@endsection
@section('content')
@@ -1,11 +1,11 @@
@extends('mail.notifications.layout')
@section('email-header')
@include('mail.partials.brand-header', ['brand' => 'events'])
@include('mail.partials.brand-header', ['brand' => 'events', 'logoUrl' => $logoUrl ?? null, 'companyName' => $companyName ?? null])
@endsection
@section('email-footer')
@include('mail.partials.brand-footer', ['brand' => 'events'])
@include('mail.partials.brand-footer', ['brand' => 'events', 'companyName' => $companyName ?? null])
@endsection
@section('content')
@@ -1,20 +1,24 @@
@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
<p class="email-footer-text">
You're receiving this email because you have {{ $brandConfig['footer_account'] ?? 'an account with Ladill' }}.
</p>
<div class="email-footer-links">
<a href="{{ $appBase }}{{ $dashboardPath }}">Dashboard</a>
<a href="{{ $supportUrl }}">Support</a>
<a href="{{ $appBase }}">{{ $homeLabel }}</a>
</div>
<p class="email-footer-text" style="margin-top: 20px; color: #64748b;">
&copy; {{ date('Y') }} Ladill Technologies. All rights reserved.
</p>
@if (! empty($companyName))
<p class="email-footer-text" style="margin-top: 20px; color: #64748b;">{{ $companyName }}</p>
@else
@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
<p class="email-footer-text">
You're receiving this email because you have {{ $brandConfig['footer_account'] ?? 'an account with Ladill' }}.
</p>
<div class="email-footer-links">
<a href="{{ $appBase }}{{ $dashboardPath }}">Dashboard</a>
<a href="{{ $supportUrl }}">Support</a>
<a href="{{ $appBase }}">{{ $homeLabel }}</a>
</div>
<p class="email-footer-text" style="margin-top: 20px; color: #64748b;">
&copy; {{ date('Y') }} Ladill Technologies. All rights reserved.
</p>
@endif
@@ -1,5 +1,11 @@
@php
$brandKey = $brand ?? 'ladill';
$brandConfig = config("mail_brands.brands.{$brandKey}", config('mail_brands.brands.ladill'));
@endphp
<img src="{{ asset('images/logo/'.$brandConfig['logo']) }}" alt="{{ $brandConfig['name'] }}" style="height: 38px; max-height: 38px; width: auto;">
@if (! empty($logoUrl))
<img src="{{ $logoUrl }}" alt="{{ $companyName ?? '' }}" style="height: 40px; max-height: 42px; width: auto;">
@elseif (! empty($companyName))
<div style="font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: #0f172a;">{{ $companyName }}</div>
@else
@php
$brandKey = $brand ?? 'ladill';
$brandConfig = config("mail_brands.brands.{$brandKey}", config('mail_brands.brands.ladill'));
@endphp
<img src="{{ asset('images/logo/'.$brandConfig['logo']) }}" alt="{{ $brandConfig['name'] }}" style="height: 38px; max-height: 38px; width: auto;">
@endif
+23 -1
View File
@@ -14,7 +14,7 @@
<div class="mt-4 rounded-xl border border-emerald-200 bg-emerald-50 px-4 py-3 text-sm text-emerald-800">{{ session('success') }}</div>
@endif
<form method="POST" action="{{ route('account.settings.update') }}" class="mt-6 space-y-4">
<form method="POST" action="{{ route('account.settings.update') }}" enctype="multipart/form-data" class="mt-6 space-y-4">
@csrf
@method('PUT')
@@ -71,6 +71,28 @@
</label>
</div>
<div class="rounded-2xl border border-slate-200 bg-white p-5">
<h2 class="text-sm font-semibold text-slate-900">Company branding</h2>
<p class="mt-1 text-xs text-slate-500">Your logo appears in customer emails (registration confirmations, join links, and programme shares).</p>
@if (\App\Support\AccountBranding::hasCustomLogo($settings))
<div class="mt-4">
<img src="{{ \App\Support\AccountBranding::logoUrl($settings) }}" alt="Company logo" class="h-12 w-auto max-w-[200px] rounded-lg border border-slate-100 bg-slate-50 object-contain p-2">
</div>
<label class="mt-3 flex items-center gap-2 text-sm text-slate-600">
<input type="checkbox" name="remove_logo" value="1" class="rounded border-slate-300 text-rose-600 focus:ring-rose-500">
Remove current logo
</label>
@endif
<div class="mt-4">
<label for="logo" class="block text-[11px] font-medium text-slate-500">{{ \App\Support\AccountBranding::hasCustomLogo($settings) ? 'Replace logo' : 'Upload logo' }}</label>
<input type="file" id="logo" name="logo" accept="image/png,image/jpeg,image/webp,image/svg+xml"
class="mt-1 block w-full text-sm text-slate-600 file:mr-3 file:rounded-lg file:border-0 file:bg-indigo-50 file:px-3 file:py-2 file:text-sm file:font-semibold file:text-indigo-700 hover:file:bg-indigo-100">
@error('logo') <p class="mt-1 text-xs text-rose-600">{{ $message }}</p> @enderror
</div>
</div>
<div class="rounded-2xl border border-slate-200 bg-white p-5">
<h2 class="text-sm font-semibold text-slate-900">New event defaults</h2>
<p class="mt-1 text-xs text-slate-500">Pre-fill the create flow so every new event starts with your usual setup.</p>