Update mail views

This commit is contained in:
philipp lang 2024-04-19 16:51:17 +02:00
parent 1f4173caf8
commit fde1a9d169
7 changed files with 48 additions and 38 deletions

2
.gitignore vendored
View File

@ -8,7 +8,7 @@ yarn-error.log
/public/build
/public/vendor
storage/*.key
vendor/
/vendor/
Homestead.yaml
Homestead.json
.vagrant/

View File

@ -1,13 +1,18 @@
<table class="action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
@props([
'url',
'color' => 'primary',
'align' => 'center',
])
<table class="action" align="{{ $align }}" width="100%" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td align="center">
<td align="{{ $align }}">
<table width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td align="center">
<td align="{{ $align }}">
<table border="0" cellpadding="0" cellspacing="0" role="presentation">
<tr>
<td>
<a href="{{ $url }}" class="button button-{{ $color ?? 'primary' }}" target="_blank" rel="noopener">{{ $slot }}</a>
<a href="{{ $url }}" class="button button-{{ $color }}" target="_blank" rel="noopener">{{ $slot }}</a>
</td>
</tr>
</table>

View File

@ -1,7 +1,12 @@
@props(['url'])
<tr>
<td class="header">
<a href="{{ $url }}" style="display: inline-block;">
<img src="{{ url('/img/logo.png') }}" class="logo" alt="Stamm Silva Logo">
@if (trim($slot) === 'Laravel')
<img src="https://laravel.com/img/notification-logo.png" class="logo" alt="Laravel Logo">
@else
{{ $slot }}
@endif
</a>
</td>
</tr>

View File

@ -1,6 +1,7 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{{ config('app.name') }}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="color-scheme" content="light">
@ -33,7 +34,7 @@ width: 100% !important;
<!-- Email Body -->
<tr>
<td class="body" width="100%" cellpadding="0" cellspacing="0">
<td class="body" width="100%" cellpadding="0" cellspacing="0" style="border: hidden !important;">
<table class="inner-body" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
<!-- Body content -->
<tr>

View File

@ -1,27 +1,27 @@
@component('mail::layout')
<x-mail::layout>
{{-- Header --}}
@slot('header')
@component('mail::header', ['url' => 'https://stamm-silva.de'])
<x-slot:header>
<x-mail::header :url="config('app.url')">
{{ config('app.name') }}
@endcomponent
@endslot
</x-mail::header>
</x-slot:header>
{{-- Body --}}
{{ $slot }}
{{-- Subcopy --}}
@isset($subcopy)
@slot('subcopy')
@component('mail::subcopy')
<x-slot:subcopy>
<x-mail::subcopy>
{{ $subcopy }}
@endcomponent
@endslot
</x-mail::subcopy>
</x-slot:subcopy>
@endisset
{{-- Footer --}}
@slot('footer')
@component('mail::footer')
© {{ date('Y') }} Stamm Silva.
@endcomponent
@endslot
@endcomponent
<x-slot:footer>
<x-mail::footer>
© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
</x-mail::footer>
</x-slot:footer>
</x-mail::layout>

View File

@ -3,8 +3,7 @@
body,
body *:not(html):not(style):not(br):not(tr):not(code) {
box-sizing: border-box;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
position: relative;
}

View File

@ -1,27 +1,27 @@
@component('mail::layout')
<x-mail::layout>
{{-- Header --}}
@slot('header')
@component('mail::header', ['url' => config('app.url')])
<x-slot:header>
<x-mail::header :url="config('app.url')">
{{ config('app.name') }}
@endcomponent
@endslot
</x-mail::header>
</x-slot:header>
{{-- Body --}}
{{ $slot }}
{{-- Subcopy --}}
@isset($subcopy)
@slot('subcopy')
@component('mail::subcopy')
<x-slot:subcopy>
<x-mail::subcopy>
{{ $subcopy }}
@endcomponent
@endslot
</x-mail::subcopy>
</x-slot:subcopy>
@endisset
{{-- Footer --}}
@slot('footer')
@component('mail::footer')
<x-slot:footer>
<x-mail::footer>
© {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
@endcomponent
@endslot
@endcomponent
</x-mail::footer>
</x-slot:footer>
</x-mail::layout>