Skip to content
This repository was archived by the owner on Apr 4, 2026. It is now read-only.

Commit bc18ba2

Browse files
authored
Merge pull request #34 from techdiary-dev/rayhan-dev
Customise mail theme
2 parents 3184ef9 + c323416 commit bc18ba2

17 files changed

Lines changed: 505 additions & 0 deletions
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
@props([
2+
'url',
3+
'color' => 'primary',
4+
'align' => 'center',
5+
])
6+
<table class="action" align="{{ $align }}" width="100%" cellpadding="0" cellspacing="0" role="presentation">
7+
<tr>
8+
<td align="{{ $align }}">
9+
<table width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation">
10+
<tr>
11+
<td align="{{ $align }}">
12+
<table border="0" cellpadding="0" cellspacing="0" role="presentation">
13+
<tr>
14+
<td>
15+
<a href="{{ $url }}" class="button button-{{ $color }}" target="_blank" rel="noopener">{{ $slot }}</a>
16+
</td>
17+
</tr>
18+
</table>
19+
</td>
20+
</tr>
21+
</table>
22+
</td>
23+
</tr>
24+
</table>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<tr>
2+
<td>
3+
<table class="footer" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
4+
<tr>
5+
<td class="content-cell" align="center">
6+
{{ Illuminate\Mail\Markdown::parse($slot) }}
7+
</td>
8+
</tr>
9+
</table>
10+
</td>
11+
</tr>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@props(['url'])
2+
3+
4+
<tr>
5+
<td class="header">
6+
{{--<a href="{{ $url }}" style="display: inline-block;">--}}
7+
<a href="{{config(('app.client_url'))}}" style="display: inline-block;">
8+
@if (trim($slot) === 'Laravel')
9+
<img src="https://laravel.com/img/notification-logo.png" class="logo" alt="Laravel Logo">
10+
@else
11+
{{ $slot }}
12+
@endif
13+
</a>
14+
</td>
15+
</tr>
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2+
<html xmlns="http://www.w3.org/1999/xhtml">
3+
<head>
4+
<title>{{ config('app.name') }}</title>
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
6+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
7+
<meta name="color-scheme" content="light">
8+
<meta name="supported-color-schemes" content="light">
9+
<style>
10+
@media only screen and (max-width: 600px) {
11+
.inner-body {
12+
width: 100% !important;
13+
}
14+
15+
.footer {
16+
width: 100% !important;
17+
}
18+
}
19+
20+
@media only screen and (max-width: 500px) {
21+
.button {
22+
width: 100% !important;
23+
}
24+
}
25+
</style>
26+
</head>
27+
<body>
28+
29+
<table class="wrapper" width="100%" cellpadding="0" cellspacing="0" role="presentation">
30+
<tr>
31+
<td align="center">
32+
<table class="content" width="100%" cellpadding="0" cellspacing="0" role="presentation">
33+
{{ $header ?? '' }}
34+
35+
<!-- Email Body -->
36+
<tr>
37+
<td class="body" width="100%" cellpadding="0" cellspacing="0" style="border: hidden !important;">
38+
<table class="inner-body" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
39+
<!-- Body content -->
40+
<tr>
41+
<td class="content-cell">
42+
{{ Illuminate\Mail\Markdown::parse($slot) }}
43+
44+
{{ $subcopy ?? '' }}
45+
</td>
46+
</tr>
47+
</table>
48+
</td>
49+
</tr>
50+
51+
{{ $footer ?? '' }}
52+
</table>
53+
</td>
54+
</tr>
55+
</table>
56+
</body>
57+
</html>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<x-mail::layout>
2+
{{-- Header --}}
3+
<x-slot:header>
4+
<x-mail::header :url="config('app.url')">
5+
{{ config('app.name') }}
6+
</x-mail::header>
7+
</x-slot:header>
8+
9+
{{-- Body --}}
10+
{{ $slot }}
11+
12+
{{-- Subcopy --}}
13+
@isset($subcopy)
14+
<x-slot:subcopy>
15+
<x-mail::subcopy>
16+
{{ $subcopy }}
17+
</x-mail::subcopy>
18+
</x-slot:subcopy>
19+
@endisset
20+
21+
{{-- Footer --}}
22+
<x-slot:footer>
23+
<x-mail::footer>
24+
© {{ date('Y') }} {{ config('app.name') }}. {{ __('All rights reserved.') }}
25+
</x-mail::footer>
26+
</x-slot:footer>
27+
</x-mail::layout>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<table class="panel" width="100%" cellpadding="0" cellspacing="0" role="presentation">
2+
<tr>
3+
<td class="panel-content">
4+
<table width="100%" cellpadding="0" cellspacing="0" role="presentation">
5+
<tr>
6+
<td class="panel-item">
7+
{{ Illuminate\Mail\Markdown::parse($slot) }}
8+
</td>
9+
</tr>
10+
</table>
11+
</td>
12+
</tr>
13+
</table>
14+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<table class="subcopy" width="100%" cellpadding="0" cellspacing="0" role="presentation">
2+
<tr>
3+
<td>
4+
{{ Illuminate\Mail\Markdown::parse($slot) }}
5+
</td>
6+
</tr>
7+
</table>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div class="table">
2+
{{ Illuminate\Mail\Markdown::parse($slot) }}
3+
</div>

0 commit comments

Comments
 (0)