E-mail improvements:

- Removed injection of Tailwind CSS in the TemplateEngine.php
- Removed tailwindcss@1.4.6.css & tailwind-1.2.0.css
- Updated master template of e-mails for greeting, signature & footer sections
- Updated generic template for emails
- Updated footer (clean up)
- Fixed EntitySentObject.php class name
- Removed css-inliner.php config file
- Updated button component for e-mails
This commit is contained in:
Benjamin Beganović 2021-01-20 13:18:17 +01:00
parent ea20c55468
commit e5c7fc4416
9 changed files with 42 additions and 61 deletions

View File

@ -14,7 +14,7 @@ namespace App\Mail\Admin;
use App\Utils\Number;
use stdClass;
class EntityFailedSendObject
class EntitySentObject
{
public $invitation;

View File

@ -197,7 +197,7 @@ class TemplateEngine
}
} else {
$wrapper = view($this->getTemplatePath($email_style), $data)->render();
$injection = '<head><link rel="stylesheet" type="text/css" property="stylesheet" href="'.config('ninja.app_url').'/css/tailwind-1.2.0.css">';
$injection = '';
$wrapper = str_replace('<head>', $injection, $wrapper);
}

View File

@ -1,20 +0,0 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Css Files
|--------------------------------------------------------------------------
|
| Css file of your style for your emails
| The content of these files will be added directly into the inliner
| Use absolute paths, ie. public_path('css/main.css')
|
*/
'css-files' => [
public_path('css/app.css'),
],
];

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,10 +1,11 @@
@component('email.template.master', ['design' => 'light', 'settings' => $settings])
@slot('header')
@component('email.components.header', ['p' => $title, 'logo' => $logo])
@endcomponent
@include('email.components.header', ['logo' => $logo])
@endslot
<h1>{{ $title }}</h1>
@slot('greeting')
@lang($message)
@endslot
@ -22,5 +23,4 @@
For any info, please visit InvoiceNinja.
@endcomponent
@endslot
@endcomponent

View File

@ -1,3 +1,3 @@
<div class="px-10 py-6 flex flex-col items-center">
<a href="{{ $url }}" class="bg-green-500 px-4 py-3 text-white leading-tight hover:bg-green-600" style="color: white !important;">{{ $slot }}</a>
</div>
<a href="{{ $url }}" target="_blank" class="button">
{{ $slot }}
</a>

View File

@ -1,8 +1,7 @@
<div class="mt-8 text-center break-words">
<p class="block text-center text-sm break-words">{{ $slot }}</p>
<p>{{ $slot }}</p>
@isset($url)
<a href="{{ $url }}" class="text-blue-500 hover:text-blue-600 mt-4 text-sm break-words">
<a href="{{ $url }}" target="_blank">
@isset($url_text)
{!! $url_text !!}
@else
@ -10,4 +9,3 @@
@endisset
</a>
@endisset
</div>

View File

@ -64,7 +64,12 @@
<table cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;">
<tr>
<td align="center" id="email-content">
@yield('greeting')
{{ $slot }}
@yield('signature')
@yield('footer')
</td>
</tr>
</table>