mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
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:
parent
ea20c55468
commit
e5c7fc4416
@ -14,7 +14,7 @@ namespace App\Mail\Admin;
|
||||
use App\Utils\Number;
|
||||
use stdClass;
|
||||
|
||||
class EntityFailedSendObject
|
||||
class EntitySentObject
|
||||
{
|
||||
public $invitation;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
@ -208,7 +208,7 @@ class TemplateEngine
|
||||
'raw_body' => $this->raw_body,
|
||||
'raw_subject' => $this->raw_subject
|
||||
];
|
||||
|
||||
|
||||
$this->tearDown();
|
||||
|
||||
return $data;
|
||||
|
@ -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'),
|
||||
],
|
||||
|
||||
];
|
1
public/css/tailwind-1.2.0.css
vendored
1
public/css/tailwind-1.2.0.css
vendored
File diff suppressed because one or more lines are too long
1
public/css/tailwindcss@1.4.6.css
vendored
1
public/css/tailwindcss@1.4.6.css
vendored
File diff suppressed because one or more lines are too long
@ -1,26 +1,26 @@
|
||||
@component('email.template.master', ['design' => 'light', 'settings' =>$settings])
|
||||
@component('email.template.master', ['design' => 'light', 'settings' => $settings])
|
||||
|
||||
@slot('header')
|
||||
@component('email.components.header', ['p' => $title, 'logo' => $logo])
|
||||
@slot('header')
|
||||
@include('email.components.header', ['logo' => $logo])
|
||||
@endslot
|
||||
|
||||
<h1>{{ $title }}</h1>
|
||||
|
||||
@slot('greeting')
|
||||
@lang($message)
|
||||
@endslot
|
||||
|
||||
@component('email.components.button', ['url' => $url])
|
||||
@lang($button)
|
||||
@endcomponent
|
||||
@endslot
|
||||
|
||||
@slot('greeting')
|
||||
@lang($message)
|
||||
@endslot
|
||||
@slot('signature')
|
||||
{{ $signature }}
|
||||
@endslot
|
||||
|
||||
@component('email.components.button', ['url' => $url])
|
||||
@lang($button)
|
||||
@slot('footer')
|
||||
@component('email.components.footer', ['url' => 'https://invoiceninja.com', 'url_text' => '© InvoiceNinja'])
|
||||
For any info, please visit InvoiceNinja.
|
||||
@endcomponent
|
||||
@endslot
|
||||
@endcomponent
|
||||
|
||||
@slot('signature')
|
||||
{{ $signature }}
|
||||
@endslot
|
||||
|
||||
@slot('footer')
|
||||
@component('email.components.footer', ['url' => 'https://invoiceninja.com', 'url_text' => '© InvoiceNinja'])
|
||||
For any info, please visit InvoiceNinja.
|
||||
@endcomponent
|
||||
@endslot
|
||||
|
||||
@endcomponent
|
@ -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>
|
||||
|
@ -1,13 +1,11 @@
|
||||
<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">
|
||||
@isset($url_text)
|
||||
{!! $url_text !!}
|
||||
@else
|
||||
{{ $url }}
|
||||
@endisset
|
||||
</a>
|
||||
@endisset
|
||||
</div>
|
||||
@isset($url)
|
||||
<a href="{{ $url }}" target="_blank">
|
||||
@isset($url_text)
|
||||
{!! $url_text !!}
|
||||
@else
|
||||
{{ $url }}
|
||||
@endisset
|
||||
</a>
|
||||
@endisset
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user