diff --git a/app/Mail/ExampleMail.php b/app/Mail/ExampleMail.php new file mode 100644 index 000000000000..5a3db457a44f --- /dev/null +++ b/app/Mail/ExampleMail.php @@ -0,0 +1,33 @@ +markdown('email.example'); + } +} diff --git a/resources/views/email/components/button.blade.php b/resources/views/email/components/button.blade.php new file mode 100644 index 000000000000..95a82e4dbd27 --- /dev/null +++ b/resources/views/email/components/button.blade.php @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/resources/views/email/components/footer.blade.php b/resources/views/email/components/footer.blade.php new file mode 100644 index 000000000000..55c822b3426c --- /dev/null +++ b/resources/views/email/components/footer.blade.php @@ -0,0 +1,13 @@ +
+

{{ $slot }}

+ + @isset($url) + + @isset($url_text) + {!! $url_text !!} + @else + {{ $url }} + @endisset + + @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 new file mode 100644 index 000000000000..ca34e5239213 --- /dev/null +++ b/resources/views/email/components/header.blade.php @@ -0,0 +1,8 @@ +
+

{{ $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 new file mode 100644 index 000000000000..a8d2a7f4535f --- /dev/null +++ b/resources/views/email/components/layout-dark.blade.php @@ -0,0 +1,498 @@ + + + + + + + + + + + + +
+ +
+ +
+ + {{ $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 new file mode 100644 index 000000000000..c66252eb9a0e --- /dev/null +++ b/resources/views/email/components/layout.blade.php @@ -0,0 +1,498 @@ + + + + + + + + + + + + +
+ +
+ +
+ + {{ $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/table.blade.php b/resources/views/email/components/table.blade.php new file mode 100644 index 000000000000..5a2674df552e --- /dev/null +++ b/resources/views/email/components/table.blade.php @@ -0,0 +1,3 @@ +
+ {{ Illuminate\Mail\Markdown::parse($slot) }} +
\ No newline at end of file diff --git a/resources/views/email/example.blade.php b/resources/views/email/example.blade.php new file mode 100644 index 000000000000..18e776bb9a9e --- /dev/null +++ b/resources/views/email/example.blade.php @@ -0,0 +1,40 @@ +@component('email.components.layout') + +@slot('header') + @component('email.components.header', ['p' => 'Your upgrade has completed!']) + Upgrade! + @endcomponent +@endslot + +@slot('greeting') + Hello, David +@endslot + +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']) + Visit InvoiceNinja +@endcomponent + +@component('email.components.table') +| Laravel | Table | Example | +| ------------- |:-------------:| --------:| +| Col 2 is | Centered | $10 | +| Col 3 is | Right-Aligned | $20 | +@endcomponent + +@slot('signature') + Benjamin, InvoiceNinja (ben@invoiceninja.com) +@endslot + +@slot('footer') + @component('email.components.footer', ['url' => 'https://invoiceninja.com', 'url_text' => '© InvoiceNinja']) + For any info, please visit InvoiceNinja. + @endcomponent +@endslot + +@slot('below_card') + Lorem ipsum dolor sit amet. I love InvoiceNinja. +@endslot + +@endcomponent \ No newline at end of file