Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
atomjoy authored Jul 2, 2023
1 parent 3d409d2 commit a68a195
Show file tree
Hide file tree
Showing 6 changed files with 158 additions and 194 deletions.
11 changes: 5 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,19 @@ use Proton\Mail\RegisterMail;
use Proton\Mail\PasswordMail;

Route::get('/proton', function () {
// Set locale
// app()->setLocale('pl');

// User (required columns: id, name, code)
// $user = User::first();
$user = User::first();

// Send email sample
Mail::to('[email protected]')->send(new DefaultMail());

// User reset password, use null for example
Mail::to('[email protected]')->send(new PasswordMail(null, 'XXX-123'));
Mail::to('[email protected]')->send(new PasswordMail($user, '321-XXX-123'));
Mail::to('[email protected]')->locale('pl')->send(new PasswordMail($user, '321-XXX-123'));

// User activation link (User model required columns: id, name, code), use null for example
Mail::to('[email protected]')->send(new RegisterMail(null));
Mail::to('[email protected]')->send(new RegisterMail($user));
Mail::to('[email protected]')->locale('pl')->send(new RegisterMail($user));

// Show example email view
return view('proton::email.default');
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/row.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</x-proton.row>
--}}
<x-proton::tr>
<x-proton::td colspan="100">
<x-proton::td class="{{ $class ?? '' }}" colspan="{{ $colspan ?? 10 }}" style="{{ $style ?? '' }}">
{{ $slot }}
</x-proton::td>
</x-proton::tr>
2 changes: 1 addition & 1 deletion resources/views/components/td.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
</x-proton.td>
</x-proton.tr>
--}}
<td class="proton-td {{ $class ?? '' }}" colspan="{{ $colspan ?? 10}}" style="{{ $style ?? '' }}">
<td class="proton-td {{ $class ?? '' }}" colspan="{{ $colspan ?? 10 }}" style="{{ $style ?? '' }}">
{{ $slot }}
</td>
157 changes: 69 additions & 88 deletions resources/views/email/default.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,69 +7,56 @@
</style>
</x-slot:style>

<x-proton::tr>
<x-proton::td>
<x-proton::margin />
<x-proton::row>
<x-proton::margin />

<center>
<img src="https://raw.githubusercontent.com/atomjoy/proton/main/public/proton-default.png" alt="Image">
</center>

<h2> Welcome {{ auth()->user()?->name ?? 'Alex' }}! </h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae, architecto minus <a href="">go to site</a> . Placeat sapiente perspiciatis illum corporis earum obcaecati illo mollitia inventore voluptatibus, ipsa, quasi quaerat dolorem commodi labore accusantium
repudiandae!</p>
</x-proton::td>
</x-proton::tr>

<x-proton::tr>
<x-proton::td>
<x-proton::button url="http://localhost">
Confirm Email
</x-proton::button>
</x-proton::td>
</x-proton::tr>

<x-proton::tr>
<x-proton::td>
<h2> Secret code </h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae, architecto minus accusantium repudiandae!</p>

<x-proton::code>
KLE-6677-HJS-7866
</x-proton::code>
</x-proton::td>
</x-proton::tr>

<x-proton::tr>
<x-proton::td>
<h2> About company </h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae, architecto minus. Placeat sapiente perspiciatis illum corporis earum obcaecati illo mollitia inventore voluptatibus, ipsa, quasi quaerat dolorem commodi labore accusantium repudiandae!</p>
</x-proton::td>
</x-proton::tr>
<center>
<img src="https://raw.githubusercontent.com/atomjoy/proton/main/public/proton-default.png" alt="Image">
</center>

<h2> Welcome {{ auth()->user()?->name ?? 'Alex' }}! </h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae, architecto minus <a href="">go to site</a> . Placeat sapiente perspiciatis illum corporis earum obcaecati illo mollitia inventore voluptatibus, ipsa, quasi quaerat dolorem commodi labore accusantium
repudiandae!</p>
</x-proton::row>

<x-proton::row>
<x-proton::button url="http://localhost">
Confirm Email
</x-proton::button>
</x-proton::row>

<x-proton::tr>
<x-proton::td>
<h2> Current promotions </h2>
</x-proton::td>
</x-proton::tr>
<x-proton::row>
<h2> Secret code </h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae, architecto minus accusantium repudiandae!</p>

<x-proton::tr>
<x-proton::td colspan="3" style="padding-right: 10px;">
<x-proton::code>
KLE-6677-HJS-7866
</x-proton::code>
</x-proton::row>

<x-proton::row>
<h2> About company </h2>
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae, architecto minus. Placeat sapiente perspiciatis illum corporis earum obcaecati illo mollitia inventore voluptatibus, ipsa, quasi quaerat dolorem commodi labore accusantium repudiandae!</p>
</x-proton::row>

<x-proton::row>
<h2> Current promotions </h2>
</x-proton::row>

<x-proton::row2>
<x-slot:slot1>
<img src="https://raw.githubusercontent.com/atomjoy/proton/main/public/proton-default.png" alt="Image">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae, architecto minus. Placeat sapiente perspiciatis illum corporis earum obcaecati illo mollitia inventore voluptatibus, ipsa, quasi quaerat dolorem commodi labore accusantium repudiandae!</p>
</x-proton::td>

<x-proton::td colspan="3" style="padding-left: 10px;">
</x-slot:slot1>
<x-slot:slot2>
<img src="https://raw.githubusercontent.com/atomjoy/proton/main/public/proton-default.png" alt="Image">
<p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Vitae, architecto minus. Placeat sapiente perspiciatis illum corporis earum obcaecati illo mollitia inventore voluptatibus, ipsa, quasi quaerat dolorem commodi labore accusantium repudiandae!</p>
</x-proton::td>
</x-proton::tr>
</x-slot:slot2>
</x-proton::row2>

<x-proton::tr>
<x-proton::td>
<h2> Gallery </h2>
</x-proton::td>
</x-proton::tr>
<x-proton::row>
<h2> Gallery </h2>
</x-proton::row>

<x-proton::row2>
<x-slot:slot1>
Expand Down Expand Up @@ -97,11 +84,9 @@
</x-slot:slot2>
</x-proton::row2>

<x-proton::tr>
<x-proton::td>
<h2> Links </h2>
</x-proton::td>
</x-proton::tr>
<x-proton::row>
<h2> Links </h2>
</x-proton::row>

<x-proton::row3>
<x-slot:slot1>
Expand All @@ -121,32 +106,28 @@
</x-slot:slot3>
</x-proton::row3>

<x-proton::tr>
<x-proton::td>
<br />
<h3> Regards </h3>
<p>Alex, <br /> Have a nice day!</p>
</x-proton::td>
</x-proton::tr>

<x-proton::tr>
<x-proton::td>
<x-proton::divider />

<center>
<span class="proton-rights"> © @lang('proton.rights') </span>
</center>

<br />

<x-proton::flex>
<x-proton::social name="twitter" />
<x-proton::social name="tiktok" />
<x-proton::social name="facebook" />
<x-proton::social name="instagram" />
</x-proton::flex>

<x-proton::margin />
</x-proton::td>
</x-proton::tr>
<x-proton::row>
<br />
<h3> Regards </h3>
<p>Alex, <br /> Have a nice day!</p>
</x-proton::row>

<x-proton::row>
<x-proton::divider />

<center>
<span class="proton-rights"> © @lang('proton.rights') </span>
</center>

<br />

<x-proton::flex>
<x-proton::social name="twitter" />
<x-proton::social name="tiktok" />
<x-proton::social name="facebook" />
<x-proton::social name="instagram" />
</x-proton::flex>

<x-proton::margin />
</x-proton::row>
</x-proton::email>
90 changes: 41 additions & 49 deletions resources/views/email/password.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,53 +7,45 @@
</style>
</x-slot:style>

<x-proton::tr>
<x-proton::td>
<x-proton::margin />

<center>
<img src="{{ config('proton.password_image_url', 'https://raw.githubusercontent.com/atomjoy/proton/main/public/proton-default.png') }}" alt="Image">
</center>

<h2>@lang('proton.password.welcome') {{ $user?->name ?? 'User' }}!</h2>
<p>@lang('proton.password.message')</p>
</x-proton::td>
</x-proton::tr>

<x-proton::tr>
<x-proton::td>
<x-proton::code>
{{ $password ?? 'INVALIDPASS'}}
</x-proton::code>
</x-proton::td>
</x-proton::tr>

<x-proton::tr>
<x-proton::td>
<h3>@lang('proton.password.regards_title')</h3>
<strong>{{ $user?->name ?? '' }}</strong>
<p>@lang('proton.password.regards_text')</p>
</x-proton::td>
</x-proton::tr>

<x-proton::tr>
<x-proton::td>
<x-proton::divider />

<center>
<span class="proton-rights"> © @lang('proton.rights') </span>
</center>

<br />

<x-proton::flex>
<x-proton::social name="twitter" />
<x-proton::social name="tiktok" />
<x-proton::social name="facebook" />
<x-proton::social name="instagram" />
</x-proton::flex>

<x-proton::margin />
</x-proton::td>
</x-proton::tr>
<x-proton::row>
<x-proton::margin />

<center>
<img src="{{ config('proton.password_image_url', 'https://raw.githubusercontent.com/atomjoy/proton/main/public/proton-default.png') }}" alt="Image">
</center>

<h2>@lang('proton.password.welcome') {{ $user?->name ?? 'User' }}!</h2>
<p>@lang('proton.password.message')</p>
</x-proton::row>

<x-proton::row>
<x-proton::code>
{{ $password ?? 'INVALIDPASS'}}
</x-proton::code>
</x-proton::row>

<x-proton::row>
<h3>@lang('proton.password.regards_title')</h3>
<strong>{{ $user?->name ?? '' }}</strong>
<p>@lang('proton.password.regards_text')</p>
</x-proton::row>

<x-proton::row>
<x-proton::divider />

<center>
<span class="proton-rights"> © @lang('proton.rights') </span>
</center>

<br />

<x-proton::flex>
<x-proton::social name="twitter" />
<x-proton::social name="tiktok" />
<x-proton::social name="facebook" />
<x-proton::social name="instagram" />
</x-proton::flex>

<x-proton::margin />
</x-proton::row>
</x-proton::email>
Loading

0 comments on commit a68a195

Please sign in to comment.