From aef6135e306537f45cd2dd645e9cffaed92d3ea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Wed, 26 Feb 2020 21:55:23 +0100 Subject: [PATCH] New email design (#3386) --- resources/lang/en/texts.php | 9 +- .../views/email/components/button.blade.php | 15 +- .../views/email/components/header.blade.php | 24 +- .../email/components/layout-dark.blade.php | 498 ------------------ .../views/email/components/layout.blade.php | 498 ------------------ resources/views/email/example.blade.php | 11 +- .../views/email/template/master.blade.php | 384 ++------------ 7 files changed, 76 insertions(+), 1363 deletions(-) delete mode 100644 resources/views/email/components/layout-dark.blade.php delete mode 100644 resources/views/email/components/layout.blade.php diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index cd3b53d03dbf..22f2f6f1d2e8 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -3114,18 +3114,13 @@ $LANG = array( 'cycles_remaining' => 'Cycles remaining', 'i_understand_delete' => 'I understand, delete', - - 'download_files' => 'Download Files', 'download_timeframe' => 'Use this link to download your files, the link will expire in 1 hour.', 'new_signup' => 'New Signup', - 'new_signup_text' => 'A new account has been created by :user - :email - from IP address: :ip' - - - - + 'new_signup_text' => 'A new account has been created by :user - :email - from IP address: :ip', + 'email_link_not_working' => 'If button above isn\'t working for you, please click on the link', ); return $LANG; diff --git a/resources/views/email/components/button.blade.php b/resources/views/email/components/button.blade.php index 95a82e4dbd27..2a836e71c0f5 100644 --- a/resources/views/email/components/button.blade.php +++ b/resources/views/email/components/button.blade.php @@ -1,5 +1,10 @@ - - - \ No newline at end of file +
+ {{ $slot }} +
+ +@isset($show_link) +
+

{{ ctrans('texts.email_link_not_working') }}:

+ {{ $url }} +
+@endisset \ No newline at end of file diff --git a/resources/views/email/components/header.blade.php b/resources/views/email/components/header.blade.php index ff5a6c4568d7..fbbf61602c2a 100644 --- a/resources/views/email/components/header.blade.php +++ b/resources/views/email/components/header.blade.php @@ -1,11 +1,15 @@ -
- @isset($image) - @isset($image_alt) {{ $image_alt }} @endisset - @endisset -

{{ $slot }}

-

- @isset($p) - {{ $p }} - @endisset -

+ + +
+ opened +

+ {{ $slot }} +

+ @isset($p) +

{{ $p }}

+ @endisset
\ No newline at end of file diff --git a/resources/views/email/components/layout-dark.blade.php b/resources/views/email/components/layout-dark.blade.php deleted file mode 100644 index a8d2a7f4535f..000000000000 --- a/resources/views/email/components/layout-dark.blade.php +++ /dev/null @@ -1,498 +0,0 @@ - - - - - - - - - - - - -
- -
- -
- - {{ $header }} - -
- - @isset($greeting) - {{ $greeting }} - @endisset - -
- {{ $slot }} -
- - @isset($signature) -

Sincerely,

-

{{ $signature }}

- @endisset - -
- - @isset($footer) - {{ $footer }} - @endisset - -
- -
- -
- @isset($below_card) - {!! $below_card !!} - @endisset -
- -
- - -
- -
- - - \ No newline at end of file diff --git a/resources/views/email/components/layout.blade.php b/resources/views/email/components/layout.blade.php deleted file mode 100644 index c66252eb9a0e..000000000000 --- a/resources/views/email/components/layout.blade.php +++ /dev/null @@ -1,498 +0,0 @@ - - - - - - - - - - - - -
- -
- -
- - {{ $header }} - -
- - @isset($greeting) - {{ $greeting }} - @endisset - -
- {{ $slot }} -
- - @isset($signature) -

Sincerely,

-

{{ $signature }}

- @endisset - -
- - @isset($footer) - {{ $footer }} - @endisset - -
- -
- -
- @isset($below_card) - {!! $below_card !!} - @endisset -
- -
- - -
- -
- - - \ No newline at end of file diff --git a/resources/views/email/example.blade.php b/resources/views/email/example.blade.php index b8c8e88ec08d..c584fd312f11 100644 --- a/resources/views/email/example.blade.php +++ b/resources/views/email/example.blade.php @@ -1,12 +1,7 @@ -{{-- @if() - @component('email.components.layout-dark') - @endif ---}} - -@component('email.components.layout') +@component('email.template.master', ['design' => 'light']) @slot('header') - @component('email.components.header', ['p' => 'Your upgrade has completed!', 'image' => 'https://www.invoiceninja.com/wp-content/uploads/2019/01/InvoiceNinja-Logo-Round-300x300.png']) + @component('email.components.header', ['p' => 'Your upgrade has completed!', 'logo' => 'https://www.invoiceninja.com/wp-content/uploads/2019/01/InvoiceNinja-Logo-Round-300x300.png']) Upgrade! @endcomponent @@ -18,7 +13,7 @@ Hello, this is really tiny template. We just want to inform you that upgrade has been completed. -@component('email.components.button', ['url' => 'https://invoiceninja.com']) +@component('email.components.button', ['url' => 'https://invoiceninja.com', 'show_link' => true]) Visit InvoiceNinja @endcomponent diff --git a/resources/views/email/template/master.blade.php b/resources/views/email/template/master.blade.php index 78ca09f2e27b..132ee44692f5 100644 --- a/resources/views/email/template/master.blade.php +++ b/resources/views/email/template/master.blade.php @@ -1,342 +1,52 @@ - - - - - - @yield('title') - - - - This is preheader text. Some clients will show this text as a preview. - - - - - - - - - - - + @isset($below_card) +
+ {{ $below_card }} +
+ @endisset + +
+ + \ No newline at end of file