split out email files

This commit is contained in:
Nabeel Shahzad 2018-05-21 11:25:51 -05:00
parent 9173558a0b
commit 072a7ffe12
8 changed files with 161 additions and 153 deletions

View File

@ -46,4 +46,8 @@ return [
'submit' => 'Submit', 'submit' => 'Submit',
'edit' => 'Edit', 'edit' => 'Edit',
'close' => 'Close', 'close' => 'Close',
'whoops' => 'Whoops',
'hello' => 'Hello',
'regards' => 'Regards',
'rightsreserved' => 'All Rights Reserved',
]; ];

View File

@ -0,0 +1,10 @@
<?php
/**
*
*/
return [
'buttontroubles' =>
'If youre having trouble clicking the ":actiontext" button, ' .
'copy and paste the URL below into your web browser:',
];

View File

@ -6,14 +6,4 @@ return [
'nodownloads' => 'There are no downloads!', 'nodownloads' => 'There are no downloads!',
], ],
'emails' => [
'whoops' => 'Whoops',
'hello' => 'Hello',
'regards' => 'Regards',
'buttontroubles' => [
'If youre having trouble clicking the ":actiontext" button,',
'copy and paste the URL below into your web browser:',
],
'allrightsreserved' => 'All Rights Reserved',
],
]; ];

View File

@ -47,4 +47,8 @@ return [
'submit' => 'Invia', 'submit' => 'Invia',
'edit' => 'Modifica', 'edit' => 'Modifica',
'close' => 'Chiudi', 'close' => 'Chiudi',
'whoops' => 'Ops',
'hello' => 'Ciao',
'regards' => 'Saluti',
'rightsreserved' => 'Tutti i Diritti Riservati',
]; ];

View File

@ -0,0 +1,10 @@
<?php
/**
*
*/
return [
'buttontroubles' =>
'Se hai problemi a cliccare il bottone ":actiontext", ' .
'copia e incolla l\'URL qui sotto nel tuo browser:',
];

View File

@ -1,21 +1,7 @@
<?php <?php
return [ return [
'emails' => [
'whoops' => 'Ops',
'hello' => 'Ciao',
'regards' => 'Saluti',
'buttontroubles' => [
'Se hai problemi a cliccare il bottone ":actiontext",',
'copia e incolla l\'URL qui sotto nel tuo browser:',
],
'allrightsreserved' => 'Tutti i Diritti Riservati',
],
'downloads' => [ 'downloads' => [
'nodownloads' => 'Non ci sono downloads!', 'nodownloads' => 'Non ci sono downloads!',
], ],
]; ];

View File

@ -3,7 +3,7 @@
if (! empty($greeting)) { if (! empty($greeting)) {
echo $greeting, "\n\n"; echo $greeting, "\n\n";
} else { } else {
echo $level == 'error' ? trans('frontend.emails.whoops').'!' : trans('frontend.emails.hello').',', "\n\n"; echo $level == 'error' ? __('common.whoops').'!' : __('common.hello').',', "\n\n";
} }
if (! empty($introLines)) { if (! empty($introLines)) {
@ -18,5 +18,5 @@ if (! empty($outroLines)) {
echo implode("\n", $outroLines), "\n\n"; echo implode("\n", $outroLines), "\n\n";
} }
echo trans('frontend.emails.regards).',', "\n"; echo __('common.regards).',', "\n";
echo config('app.name'), "\n"; echo config('app.name'), "\n";

View File

@ -2,8 +2,8 @@
<html> <html>
<head> <head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<style type="text/css" rel="stylesheet" media="all"> <style type="text/css" rel="stylesheet" media="all">
/* Media Queries */ /* Media Queries */
@ -63,14 +63,15 @@ $style = [
<?php $fontFamily = 'font-family: Arial, \'Helvetica Neue\', Helvetica, sans-serif;'; ?> <?php $fontFamily = 'font-family: Arial, \'Helvetica Neue\', Helvetica, sans-serif;'; ?>
<body style="{{ $style['body'] }}"> <body style="{{ $style['body'] }}">
<table width="100%" cellpadding="0" cellspacing="0"> <table width="100%" cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="{{ $style['email-wrapper'] }}" align="center"> <td style="{{ $style['email-wrapper'] }}" align="center">
<table width="100%" cellpadding="0" cellspacing="0"> <table width="100%" cellpadding="0" cellspacing="0">
<!-- Logo --> <!-- Logo -->
<tr> <tr>
<td style="{{ $style['email-masthead'] }}"> <td style="{{ $style['email-masthead'] }}">
<a style="{{ $fontFamily }} {{ $style['email-masthead_name'] }}" href="{{ url('/') }}" target="_blank"> <a style="{{ $fontFamily }} {{ $style['email-masthead_name'] }}"
href="{{ url('/') }}" target="_blank">
{{ config('app.name') }} {{ config('app.name') }}
</a> </a>
</td> </td>
@ -79,15 +80,16 @@ $style = [
<!-- Email Body --> <!-- Email Body -->
<tr> <tr>
<td style="{{ $style['email-body'] }}" width="100%"> <td style="{{ $style['email-body'] }}" width="100%">
<table style="{{ $style['email-body_inner'] }}" align="center" width="570" cellpadding="0" cellspacing="0"> <table style="{{ $style['email-body_inner'] }}" align="center" width="570"
cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="{{ $fontFamily }} {{ $style['email-body_cell'] }}"> <td style="{{ $fontFamily }} {{ $style['email-body_cell'] }}">
<!-- Greeting --> <!-- Greeting -->
<h1 style="{{ $style['header-1'] }}"> <h1 style="{{ $style['header-1'] }}">
@if ($level == 'error') @if ($level === 'error')
@lang('frontend.emails.whoops')! @lang('common.whoops')!
@else @else
@lang('frontend.emails.hello'), @lang('common.hello'),
@endif @endif
</h1> </h1>
@ -100,7 +102,8 @@ $style = [
<!-- Action Button --> <!-- Action Button -->
@if (isset($actionText)) @if (isset($actionText))
<table style="{{ $style['body_action'] }}" align="center" width="100%" cellpadding="0" cellspacing="0"> <table style="{{ $style['body_action'] }}" align="center"
width="100%" cellpadding="0" cellspacing="0">
<tr> <tr>
<td align="center"> <td align="center">
<?php <?php
@ -136,7 +139,8 @@ $style = [
<!-- Salutation --> <!-- Salutation -->
<p style="{{ $style['paragraph'] }}"> <p style="{{ $style['paragraph'] }}">
@lang('frontend.emails.regards'),<br>{{ config('app.name') }} @lang('common.regards')
,<br>{{ config('app.name') }}
</p> </p>
<!-- Sub Copy --> <!-- Sub Copy -->
@ -145,13 +149,11 @@ $style = [
<tr> <tr>
<td style="{{ $fontFamily }}"> <td style="{{ $fontFamily }}">
<p style="{{ $style['paragraph-sub'] }}"> <p style="{{ $style['paragraph-sub'] }}">
@foreach(trans('frontend.emails.buttontroubles' as $line) @lang('email.buttontroubles')
{{ str_replace(':actiontext', $actionText, $line) }}
@endforeach
</p> </p>
<p style="{{ $style['paragraph-sub'] }}"> <p style="{{ $style['paragraph-sub'] }}">
<a style="{{ $style['anchor'] }}" href="{{ $actionUrl }}" target="_blank"> <a style="{{ $style['anchor'] }}"
href="{{ $actionUrl }}" target="_blank">
{{ $actionUrl }} {{ $actionUrl }}
</a> </a>
</p> </p>
@ -168,13 +170,15 @@ $style = [
<!-- Footer --> <!-- Footer -->
<tr> <tr>
<td> <td>
<table style="{{ $style['email-footer'] }}" align="center" width="570" cellpadding="0" cellspacing="0"> <table style="{{ $style['email-footer'] }}" align="center" width="570"
cellpadding="0" cellspacing="0">
<tr> <tr>
<td style="{{ $fontFamily }} {{ $style['email-footer_cell'] }}"> <td style="{{ $fontFamily }} {{ $style['email-footer_cell'] }}">
<p style="{{ $style['paragraph-sub'] }}"> <p style="{{ $style['paragraph-sub'] }}">
&copy; {{ date('Y') }} &copy; {{ date('Y') }}
<a style="{{ $style['anchor'] }}" href="{{ url('/') }}" target="_blank">{{ config('app.name') }}</a>. <a style="{{ $style['anchor'] }}" href="{{ url('/') }}"
@lang(frontend.emails.allrightsreserved') target="_blank">{{ config('app.name') }}</a>.
@lang('common.rightsreserved')
</p> </p>
</td> </td>
</tr> </tr>
@ -184,6 +188,6 @@ $style = [
</table> </table>
</td> </td>
</tr> </tr>
</table> </table>
</body> </body>
</html> </html>