]> _ Git - pmi.git/commitdiff
wip #6033 @1:00 modifications du template mail (traductions, css, ...)
authorsoufiane <soufiane@cubedesigners.com>
Thu, 15 Jun 2023 14:03:46 +0000 (16:03 +0200)
committersoufiane <soufiane@cubedesigners.com>
Thu, 15 Jun 2023 14:03:46 +0000 (16:03 +0200)
27 files changed:
public/images/pmi_logo.png [new file with mode: 0644]
resources/fr.json [deleted file]
resources/lang/en/mail.php
resources/lang/fr/mail.php [new file with mode: 0644]
resources/lang/vendor/backpack/fr/base.php
resources/views/vendor/mail/html/button.blade.php [new file with mode: 0644]
resources/views/vendor/mail/html/footer.blade.php [new file with mode: 0644]
resources/views/vendor/mail/html/header.blade.php [new file with mode: 0644]
resources/views/vendor/mail/html/layout.blade.php [new file with mode: 0644]
resources/views/vendor/mail/html/message.blade.php [new file with mode: 0644]
resources/views/vendor/mail/html/panel.blade.php [new file with mode: 0644]
resources/views/vendor/mail/html/promotion.blade.php [new file with mode: 0644]
resources/views/vendor/mail/html/promotion/button.blade.php [new file with mode: 0644]
resources/views/vendor/mail/html/subcopy.blade.php [new file with mode: 0644]
resources/views/vendor/mail/html/table.blade.php [new file with mode: 0644]
resources/views/vendor/mail/html/themes/default.css [new file with mode: 0644]
resources/views/vendor/mail/text/button.blade.php [new file with mode: 0644]
resources/views/vendor/mail/text/footer.blade.php [new file with mode: 0644]
resources/views/vendor/mail/text/header.blade.php [new file with mode: 0644]
resources/views/vendor/mail/text/layout.blade.php [new file with mode: 0644]
resources/views/vendor/mail/text/message.blade.php [new file with mode: 0644]
resources/views/vendor/mail/text/panel.blade.php [new file with mode: 0644]
resources/views/vendor/mail/text/promotion.blade.php [new file with mode: 0644]
resources/views/vendor/mail/text/promotion/button.blade.php [new file with mode: 0644]
resources/views/vendor/mail/text/subcopy.blade.php [new file with mode: 0644]
resources/views/vendor/mail/text/table.blade.php [new file with mode: 0644]
resources/views/vendor/notifications/email.blade.php [new file with mode: 0644]

diff --git a/public/images/pmi_logo.png b/public/images/pmi_logo.png
new file mode 100644 (file)
index 0000000..bca79f6
Binary files /dev/null and b/public/images/pmi_logo.png differ
diff --git a/resources/fr.json b/resources/fr.json
deleted file mode 100644 (file)
index 979adea..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-    "name": "John Doe"
-}
index a4e8d4d22521fbf7650b46ab2a5cfcf50132a593..680076edc383965714e14757a0675e1eca59917a 100644 (file)
@@ -4,5 +4,5 @@ return [
     'regards' => 'Regards',
     'footer_part1' => 'If you’re having trouble clicking the',
     'footer_part2' => 'button, copy and paste the URL below',
-    'footer_part3' => ' into your web browser:<br>',
+    'footer_part3' => ' into your web browser:<br class="util">',
 ];
diff --git a/resources/lang/fr/mail.php b/resources/lang/fr/mail.php
new file mode 100644 (file)
index 0000000..d4a4a6a
--- /dev/null
@@ -0,0 +1,8 @@
+<?php
+
+return [
+    'regards' => 'Salutations',
+    'footer_part1' => 'Si vous ne parvenez pas à cliquer sur le bouton',
+    'footer_part2' => "copiez et collez l'URL ci-dessous",
+    'footer_part3' => 'dans votre navigateur Web:<br class="util">',
+];
index c10ecbcde9a0e771e4eeb836c0ce2cb3705e6cc6..87416fa16954cdddff239362ca10a2b03b42a009 100644 (file)
@@ -56,7 +56,7 @@ return [
         'subject' => 'Notification de réinitialisation de votre mot de passe',
         'line_1' => 'Vous recevez cet e-mail car nous avons reçu une demande de réinitialisation de mot de passe pour votre compte.',
         'line_2' => 'Cliquez sur le bouton ci-dessous pour poursuivre:',
-        'button' => 'Réininitialiser mon mot de passe',
+        'button' => 'Réinitialiser mon mot de passe',
         'notice' => 'Si cet demande de vient pas de vous, vous pouvez simplement ignorer cet e-mail',
     ],
 ];
diff --git a/resources/views/vendor/mail/html/button.blade.php b/resources/views/vendor/mail/html/button.blade.php
new file mode 100644 (file)
index 0000000..512c1d8
--- /dev/null
@@ -0,0 +1,19 @@
+<table class="action" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
+    <tr>
+        <td align="center">
+            <table width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation">
+                <tr>
+                    <td align="center">
+                        <table border="0" cellpadding="0" cellspacing="0" role="presentation">
+                            <tr>
+                                <td>
+                                    <a href="{{ $url }}" class="button button-{{ $color ?? 'primary' }}" target="_blank">{{ $slot }}</a>
+                                </td>
+                            </tr>
+                        </table>
+                    </td>
+                </tr>
+            </table>
+        </td>
+    </tr>
+</table>
diff --git a/resources/views/vendor/mail/html/footer.blade.php b/resources/views/vendor/mail/html/footer.blade.php
new file mode 100644 (file)
index 0000000..33f7dad
--- /dev/null
@@ -0,0 +1,11 @@
+<tr>
+    <td>
+        <table class="footer" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
+            <tr>
+                <td class="content-cell" align="center">
+                    {{ Illuminate\Mail\Markdown::parse($slot) }}
+                </td>
+            </tr>
+        </table>
+    </td>
+</tr>
diff --git a/resources/views/vendor/mail/html/header.blade.php b/resources/views/vendor/mail/html/header.blade.php
new file mode 100644 (file)
index 0000000..eefabab
--- /dev/null
@@ -0,0 +1,7 @@
+<tr>
+    <td class="header">
+        <a href="{{ $url }}">
+            {{ $slot }}
+        </a>
+    </td>
+</tr>
diff --git a/resources/views/vendor/mail/html/layout.blade.php b/resources/views/vendor/mail/html/layout.blade.php
new file mode 100644 (file)
index 0000000..8f8473a
--- /dev/null
@@ -0,0 +1,61 @@
+<!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>
+    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+</head>
+<body>
+    <style>
+        @media only screen and (max-width: 600px) {
+            .inner-body {
+                width: 100% !important;
+            }
+
+            .footer {
+                width: 100% !important;
+            }
+        }
+
+        @media only screen and (max-width: 500px) {
+            .button {
+                width: 100% !important;
+            }
+        }
+    </style>
+
+    <table class="wrapper" width="100%" cellpadding="0" cellspacing="0" role="presentation">
+        <tr>
+            <td align="center">
+                <table class="content" width="100%" cellpadding="0" cellspacing="0" role="presentation">
+                    {{ $header ?? '' }}
+
+                    <!-- Email Body -->
+                    <tr>
+                        <td class="body" width="100%" cellpadding="0" cellspacing="0">
+                            <table class="inner-body" align="center" width="570" cellpadding="0" cellspacing="0" role="presentation">
+                                <!-- Body content -->
+                                <tr>
+                                    <td class="content-cell">
+                                        {{ Illuminate\Mail\Markdown::parse($slot) }}
+
+                                        {{ $subcopy ?? '' }}
+                                    </td>
+                                </tr>
+                            </table>
+                        </td>
+                    </tr>
+                </table>
+            </td>
+        </tr>
+    </table>
+    <table class="wrapper no-bg" width="100%" cellpadding="0" cellspacing="0" role="presentation">
+        <tr>
+            <td align="center">
+                <table class="content" width="100%" cellpadding="0" cellspacing="0" role="presentation">
+                    {{ $footer ?? '' }}
+                </table>
+            </td>
+        </tr>
+    </table>
+</body>
+</html>
diff --git a/resources/views/vendor/mail/html/message.blade.php b/resources/views/vendor/mail/html/message.blade.php
new file mode 100644 (file)
index 0000000..2546f5a
--- /dev/null
@@ -0,0 +1,27 @@
+@component('mail::layout')
+    {{-- Header --}}
+    @slot('header')
+        @component('mail::header', ['url' => config('app.url')])
+            <img src="{{asset('images/pmi_logo.png')}}" style="width: 144px; margin: 0 auto" alt="{{config('app.name')}}" />
+        @endcomponent
+    @endslot
+
+    {{-- Body --}}
+    {{ $slot }}
+
+    {{-- Subcopy --}}
+    @isset($subcopy)
+        @slot('subcopy')
+            @component('mail::subcopy')
+                {{ $subcopy }}
+            @endcomponent
+        @endslot
+    @endisset
+
+    {{-- Footer --}}
+    @slot('footer')
+        @component('mail::footer')
+            © {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
+        @endcomponent
+    @endslot
+@endcomponent
diff --git a/resources/views/vendor/mail/html/panel.blade.php b/resources/views/vendor/mail/html/panel.blade.php
new file mode 100644 (file)
index 0000000..783af16
--- /dev/null
@@ -0,0 +1,13 @@
+<table class="panel" width="100%" cellpadding="0" cellspacing="0" role="presentation">
+    <tr>
+        <td class="panel-content">
+            <table width="100%" cellpadding="0" cellspacing="0" role="presentation">
+                <tr>
+                    <td class="panel-item">
+                        {{ Illuminate\Mail\Markdown::parse($slot) }}
+                    </td>
+                </tr>
+            </table>
+        </td>
+    </tr>
+</table>
diff --git a/resources/views/vendor/mail/html/promotion.blade.php b/resources/views/vendor/mail/html/promotion.blade.php
new file mode 100644 (file)
index 0000000..f78b358
--- /dev/null
@@ -0,0 +1,7 @@
+<table class="promotion" align="center" width="100%" cellpadding="0" cellspacing="0" role="presentation">
+    <tr>
+        <td align="center">
+            {{ Illuminate\Mail\Markdown::parse($slot) }}
+        </td>
+    </tr>
+</table>
diff --git a/resources/views/vendor/mail/html/promotion/button.blade.php b/resources/views/vendor/mail/html/promotion/button.blade.php
new file mode 100644 (file)
index 0000000..1dcb2ee
--- /dev/null
@@ -0,0 +1,13 @@
+<table width="100%" border="0" cellpadding="0" cellspacing="0" role="presentation">
+    <tr>
+        <td align="center">
+            <table border="0" cellpadding="0" cellspacing="0" role="presentation">
+                <tr>
+                    <td>
+                        <a href="{{ $url }}" class="button button-green" target="_blank">{{ $slot }}</a>
+                    </td>
+                </tr>
+            </table>
+        </td>
+    </tr>
+</table>
diff --git a/resources/views/vendor/mail/html/subcopy.blade.php b/resources/views/vendor/mail/html/subcopy.blade.php
new file mode 100644 (file)
index 0000000..f559e8f
--- /dev/null
@@ -0,0 +1,7 @@
+<table class="subcopy" width="100%" cellpadding="0" cellspacing="0" role="presentation">
+    <tr>
+        <td>
+            {{ Illuminate\Mail\Markdown::parse($slot) }}
+        </td>
+    </tr>
+</table>
diff --git a/resources/views/vendor/mail/html/table.blade.php b/resources/views/vendor/mail/html/table.blade.php
new file mode 100644 (file)
index 0000000..a5f3348
--- /dev/null
@@ -0,0 +1,3 @@
+<div class="table">
+{{ Illuminate\Mail\Markdown::parse($slot) }}
+</div>
diff --git a/resources/views/vendor/mail/html/themes/default.css b/resources/views/vendor/mail/html/themes/default.css
new file mode 100644 (file)
index 0000000..8ca4d98
--- /dev/null
@@ -0,0 +1,300 @@
+/* Base */
+
+body,
+body *:not(html):not(style):not(br):not(tr):not(code) {
+    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif,
+        'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
+    box-sizing: border-box;
+}
+
+body {
+    background-color: #f8fafc;
+    color: #74787e;
+    height: 100%;
+    hyphens: auto;
+    line-height: 1.4;
+    margin: 0;
+    -moz-hyphens: auto;
+    -ms-word-break: break-all;
+    width: 100% !important;
+    -webkit-hyphens: auto;
+    -webkit-text-size-adjust: none;
+    word-break: break-all;
+    word-break: break-word;
+}
+
+p,
+ul,
+ol,
+blockquote {
+    line-height: 1.4;
+    text-align: left;
+}
+
+a {
+    color: #3869d4;
+}
+
+a img {
+    border: none;
+}
+
+/* Typography */
+
+h1 {
+    color: #3d4852;
+    font-size: 19px;
+    font-weight: bold;
+    margin-top: 0;
+    text-align: left;
+}
+
+h2 {
+    color: #3d4852;
+    font-size: 16px;
+    font-weight: bold;
+    margin-top: 0;
+    text-align: left;
+}
+
+h3 {
+    color: #3d4852;
+    font-size: 14px;
+    font-weight: bold;
+    margin-top: 0;
+    text-align: left;
+}
+
+p {
+    color: #3d4852;
+    font-size: 16px;
+    line-height: 1.5em;
+    margin-top: 0;
+    text-align: left;
+}
+
+p.sub {
+    font-size: 12px;
+}
+
+img {
+    max-width: 100%;
+}
+
+br {
+    display: none !important;
+}
+
+/* Layout */
+
+.wrapper {
+    background-color: #152F4E;
+    margin: 0;
+    padding: 0;
+    width: 100%;
+    -premailer-cellpadding: 0;
+    -premailer-cellspacing: 0;
+    -premailer-width: 100%;
+}
+
+.wrapper.no-bg {
+    background-color: transparent;
+}
+
+.content {
+    margin: 0;
+    padding: 0;
+    width: 100%;
+    -premailer-cellpadding: 0;
+    -premailer-cellspacing: 0;
+    -premailer-width: 100%;
+}
+
+/* Header */
+
+.header {
+    padding: 25px 0;
+    text-align: center;
+}
+
+.header a {
+    color: #bbbfc3;
+    font-size: 19px;
+    font-weight: bold;
+    text-decoration: none;
+    text-shadow: 0 1px 0 white;
+}
+
+/* Body */
+
+.body {
+    background-color: #ffffff;
+    border-bottom: 1px solid #edeff2;
+    border-top: 1px solid #edeff2;
+    margin: 0;
+    padding: 0;
+    width: 100%;
+    -premailer-cellpadding: 0;
+    -premailer-cellspacing: 0;
+    -premailer-width: 100%;
+}
+
+.inner-body {
+    background-color: #ffffff;
+    margin: 0 auto;
+    padding: 0;
+    width: 570px;
+    -premailer-cellpadding: 0;
+    -premailer-cellspacing: 0;
+    -premailer-width: 570px;
+}
+
+/* Subcopy */
+
+.subcopy {
+    border-top: 1px solid #edeff2;
+    margin-top: 25px;
+    padding-top: 25px;
+}
+
+.subcopy p {
+    font-size: 12px;
+}
+
+/* Footer */
+
+.footer {
+    margin: 0 auto;
+    padding: 0;
+    text-align: center;
+    width: 570px;
+    -premailer-cellpadding: 0;
+    -premailer-cellspacing: 0;
+    -premailer-width: 570px;
+}
+
+.footer p {
+    color: #aeaeae;
+    font-size: 12px;
+    text-align: center;
+}
+
+/* Tables */
+
+.table table {
+    margin: 30px auto;
+    width: 100%;
+    -premailer-cellpadding: 0;
+    -premailer-cellspacing: 0;
+    -premailer-width: 100%;
+}
+
+.table th {
+    border-bottom: 1px solid #edeff2;
+    padding-bottom: 8px;
+    margin: 0;
+}
+
+.table td {
+    color: #74787e;
+    font-size: 15px;
+    line-height: 18px;
+    padding: 10px 0;
+    margin: 0;
+}
+
+.content-cell {
+    padding: 35px;
+}
+
+/* Buttons */
+
+.action {
+    margin: 30px auto;
+    padding: 0;
+    text-align: center;
+    width: 100%;
+    -premailer-cellpadding: 0;
+    -premailer-cellspacing: 0;
+    -premailer-width: 100%;
+}
+
+.button {
+    border-radius: 0;
+    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.16);
+    color: #fff;
+    display: inline-block;
+    text-decoration: none;
+    -webkit-text-size-adjust: none;
+}
+
+.button-blue,
+.button-primary {
+    background-color: #0EAADA;
+    border-top: 10px solid #0EAADA;
+    border-right: 18px solid #0EAADA;
+    border-bottom: 10px solid #0EAADA;
+    border-left: 18px solid #0EAADA;
+}
+
+.button-green,
+.button-success {
+    background-color: #38c172;
+    border-top: 10px solid #38c172;
+    border-right: 18px solid #38c172;
+    border-bottom: 10px solid #38c172;
+    border-left: 18px solid #38c172;
+}
+
+.button-red,
+.button-error {
+    background-color: #e3342f;
+    border-top: 10px solid #e3342f;
+    border-right: 18px solid #e3342f;
+    border-bottom: 10px solid #e3342f;
+    border-left: 18px solid #e3342f;
+}
+
+/* Panels */
+
+.panel {
+    margin: 0 0 21px;
+}
+
+.panel-content {
+    background-color: #f1f5f8;
+    padding: 16px;
+}
+
+.panel-item {
+    padding: 0;
+}
+
+.panel-item p:last-of-type {
+    margin-bottom: 0;
+    padding-bottom: 0;
+}
+
+/* Promotions */
+
+.promotion {
+    background-color: #ffffff;
+    border: 2px dashed #9ba2ab;
+    margin: 0;
+    margin-bottom: 25px;
+    margin-top: 25px;
+    padding: 24px;
+    width: 100%;
+    -premailer-cellpadding: 0;
+    -premailer-cellspacing: 0;
+    -premailer-width: 100%;
+}
+
+.promotion h1 {
+    text-align: center;
+}
+
+.promotion p {
+    font-size: 15px;
+    text-align: center;
+}
diff --git a/resources/views/vendor/mail/text/button.blade.php b/resources/views/vendor/mail/text/button.blade.php
new file mode 100644 (file)
index 0000000..97444eb
--- /dev/null
@@ -0,0 +1 @@
+{{ $slot }}: {{ $url }}
diff --git a/resources/views/vendor/mail/text/footer.blade.php b/resources/views/vendor/mail/text/footer.blade.php
new file mode 100644 (file)
index 0000000..3338f62
--- /dev/null
@@ -0,0 +1 @@
+{{ $slot }}
diff --git a/resources/views/vendor/mail/text/header.blade.php b/resources/views/vendor/mail/text/header.blade.php
new file mode 100644 (file)
index 0000000..aaa3e57
--- /dev/null
@@ -0,0 +1 @@
+[{{ $slot }}]({{ $url }})
diff --git a/resources/views/vendor/mail/text/layout.blade.php b/resources/views/vendor/mail/text/layout.blade.php
new file mode 100644 (file)
index 0000000..9378baa
--- /dev/null
@@ -0,0 +1,9 @@
+{!! strip_tags($header) !!}
+
+{!! strip_tags($slot) !!}
+@isset($subcopy)
+
+{!! strip_tags($subcopy) !!}
+@endisset
+
+{!! strip_tags($footer) !!}
diff --git a/resources/views/vendor/mail/text/message.blade.php b/resources/views/vendor/mail/text/message.blade.php
new file mode 100644 (file)
index 0000000..1ae9ed8
--- /dev/null
@@ -0,0 +1,27 @@
+@component('mail::layout')
+    {{-- Header --}}
+    @slot('header')
+        @component('mail::header', ['url' => config('app.url')])
+            {{ config('app.name') }}
+        @endcomponent
+    @endslot
+
+    {{-- Body --}}
+    {{ $slot }}
+
+    {{-- Subcopy --}}
+    @isset($subcopy)
+        @slot('subcopy')
+            @component('mail::subcopy')
+                {{ $subcopy }}
+            @endcomponent
+        @endslot
+    @endisset
+
+    {{-- Footer --}}
+    @slot('footer')
+        @component('mail::footer')
+            © {{ date('Y') }} {{ config('app.name') }}. @lang('All rights reserved.')
+        @endcomponent
+    @endslot
+@endcomponent
diff --git a/resources/views/vendor/mail/text/panel.blade.php b/resources/views/vendor/mail/text/panel.blade.php
new file mode 100644 (file)
index 0000000..3338f62
--- /dev/null
@@ -0,0 +1 @@
+{{ $slot }}
diff --git a/resources/views/vendor/mail/text/promotion.blade.php b/resources/views/vendor/mail/text/promotion.blade.php
new file mode 100644 (file)
index 0000000..3338f62
--- /dev/null
@@ -0,0 +1 @@
+{{ $slot }}
diff --git a/resources/views/vendor/mail/text/promotion/button.blade.php b/resources/views/vendor/mail/text/promotion/button.blade.php
new file mode 100644 (file)
index 0000000..aaa3e57
--- /dev/null
@@ -0,0 +1 @@
+[{{ $slot }}]({{ $url }})
diff --git a/resources/views/vendor/mail/text/subcopy.blade.php b/resources/views/vendor/mail/text/subcopy.blade.php
new file mode 100644 (file)
index 0000000..3338f62
--- /dev/null
@@ -0,0 +1 @@
+{{ $slot }}
diff --git a/resources/views/vendor/mail/text/table.blade.php b/resources/views/vendor/mail/text/table.blade.php
new file mode 100644 (file)
index 0000000..3338f62
--- /dev/null
@@ -0,0 +1 @@
+{{ $slot }}
diff --git a/resources/views/vendor/notifications/email.blade.php b/resources/views/vendor/notifications/email.blade.php
new file mode 100644 (file)
index 0000000..05be6cd
--- /dev/null
@@ -0,0 +1,68 @@
+@component('mail::message')
+{{-- Greeting --}}
+@if (! empty($greeting))
+# {{ $greeting }}
+@else
+@if ($level === 'error')
+# @lang('Whoops!')
+@else
+# @lang('Hello!')
+@endif
+@endif
+
+
+{{-- Intro Lines --}}
+@foreach ($introLines as $line)
+{{ $line }}
+
+@endforeach
+
+{{-- Action Button --}}
+@isset($actionText)
+<?php
+    switch ($level) {
+        case 'success':
+        case 'error':
+            $color = $level;
+            break;
+        default:
+            $color = 'primary';
+    }
+?>
+@component('mail::button', ['url' => $actionUrl, 'color' => $color])
+{{ $actionText }}
+@endcomponent
+@endisset
+
+{{-- Outro Lines --}}
+@foreach ($outroLines as $line)
+{{ $line }}
+
+@endforeach
+
+{{-- Salutation --}}
+@if (! empty($salutation))
+{{ $salutation }}
+@else
+@lang(':regards', ['regards' => trans('mail.regards')]),<br>
+{{ config('app.name') }}
+@endif
+
+{{-- Subcopy --}}
+@isset($actionText)
+@slot('subcopy')
+
+@lang(
+    ":text1 \":actionText\" :text2".
+    ':text3 [:actionURL](:actionURL)',
+    [
+        'text1' => trans('mail.footer_part1'),
+        'text2' => trans('mail.footer_part2'),
+        'text3' => trans('mail.footer_part3'),
+        'actionText' => $actionText,
+        'actionURL' => $actionUrl,
+    ]
+)
+@endslot
+@endisset
+@endcomponent