From 90c1ed019dbd4fcaa47e9b431983b715b9566fb5 Mon Sep 17 00:00:00 2001 From: Betsy Castro <5490820+betsyecastro@users.noreply.github.com> Date: Mon, 14 Apr 2025 14:33:56 -0500 Subject: [PATCH 1/7] Updates bg colors and styles footer --- .../views/emails/reviewstudents.blade.php | 2 +- resources/views/emails/template.blade.php | 20 +++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/resources/views/emails/reviewstudents.blade.php b/resources/views/emails/reviewstudents.blade.php index e3b7042b..725c15da 100644 --- a/resources/views/emails/reviewstudents.blade.php +++ b/resources/views/emails/reviewstudents.blade.php @@ -1,7 +1,7 @@ @extends('emails.template') @php - $primary_color = $settings['primary_color'] ?? '#008542'; + $primary_color = $settings['primary_color'] ?? '#154734'; @endphp @section('message') diff --git a/resources/views/emails/template.blade.php b/resources/views/emails/template.blade.php index 61e03a44..f683a9a8 100644 --- a/resources/views/emails/template.blade.php +++ b/resources/views/emails/template.blade.php @@ -2,9 +2,9 @@ @php - $bg_primary = $settings['primary_color'] ?? '#008542'; - $bg_secondary = $settings['secondary_color'] ?? '#008542'; - $bg_tertiary = $settings['tertiary_color'] ?? '#69BE28'; + $bg_primary = $settings['primary_color'] ?? '#154734'; + $bg_secondary = $settings['secondary_color'] ?? '#C95100'; + $bg_tertiary = $settings['tertiary_color'] ?? '#34827A'; @endphp
@@ -60,7 +60,7 @@Test
', - | - | Will be cleaned to: 'Test' - | - | http://htmlpurifier.org/live/configdoc/plain.html#HTML.ForbiddenElements - | - */ + 'configs' => [ + + 'default' => [ + 'Core.Encoding' => 'utf-8', + 'HTML.Doctype' => 'HTML 4.01 Transitional', + 'Cache.SerializerPermissions' => env('PURIFY_CACHE_PERMISSIONS', null), + 'HTML.Allowed' => 'h1,h2,h3,h4,h5,h6,b,strong,i,em,a[href|title],ul,ol,li,p[style],br,span,sup,sub,img[width|height|alt|src]', + 'HTML.ForbiddenElements' => '', + 'CSS.AllowedProperties' => 'font,font-size,font-weight,font-style,font-family,text-decoration,padding-left,color,background-color,text-align', + 'AutoFormat.AutoParagraph' => false, + 'AutoFormat.RemoveEmpty' => false, + ], + + 'trix_email' => [ + 'HTML.Doctype' => 'HTML 4.01 Transitional', + 'HTML.AllowedElements' => 'a,span', + 'HTML.AllowedAttributes' => 'a.href,a.style,span.style', + 'AutoFormat.RemoveEmpty' => true, + 'AutoFormat.RemoveEmpty.RemoveNbsp' => true, + 'CSS.AllowedProperties' => 'color,text-decoration', + 'Output.TidyFormat' => true, + 'HTML.Nofollow' => false, + 'Core.NormalizeNewlines' => true, + 'AutoFormat.AutoParagraph' => false, + 'AutoFormat.RemoveSpansWithoutAttributes' => true, + ], - 'HTML.ForbiddenElements' => '', - - /* - |-------------------------------------------------------------------------- - | CSS.AllowedProperties - |-------------------------------------------------------------------------- - | - | The Allowed CSS properties. - | - | http://htmlpurifier.org/live/configdoc/plain.html#CSS.AllowedProperties - | - */ - - 'CSS.AllowedProperties' => 'font,font-size,font-weight,font-style,font-family,text-decoration,padding-left,color,background-color,text-align', - - /* - |-------------------------------------------------------------------------- - | AutoFormat.AutoParagraph - |-------------------------------------------------------------------------- - | - | The Allowed CSS properties. - | - | This directive turns on auto-paragraphing, where double - | newlines are converted in to paragraphs whenever possible. - | - | http://htmlpurifier.org/live/configdoc/plain.html#AutoFormat.AutoParagraph - | - */ + ], - 'AutoFormat.AutoParagraph' => false, + /* + |-------------------------------------------------------------------------- + | HTMLPurifier definitions + |-------------------------------------------------------------------------- + | + | Here you may specify a class that augments the HTML definitions used by + | HTMLPurifier. Additional HTML5 definitions are provided out of the box. + | When specifying a custom class, make sure it implements the interface: + | + | \Stevebauman\Purify\Definitions\Definition + | + | Note that these definitions are applied to every Purifier instance. + | + | Documentation: http://htmlpurifier.org/docs/enduser-customize.html + | + */ - /* - |-------------------------------------------------------------------------- - | AutoFormat.RemoveEmpty - |-------------------------------------------------------------------------- - | - | When enabled, HTML Purifier will attempt to remove empty - | elements that contribute no semantic information to the document. - | - | http://htmlpurifier.org/live/configdoc/plain.html#AutoFormat.RemoveEmpty - | - */ + 'definitions' => Html5Definition::class, - 'AutoFormat.RemoveEmpty' => false, + /* + |-------------------------------------------------------------------------- + | Serializer location + |-------------------------------------------------------------------------- + | + | The location where HTMLPurifier can store its temporary serializer files. + | The filepath should be accessible and writable by the web server. + | A good place for this is in the framework's own storage path. + | + */ - ], + 'serializer' => storage_path('app/purify'), ]; diff --git a/resources/views/emails/template.blade.php b/resources/views/emails/template.blade.php index f683a9a8..835409e0 100644 --- a/resources/views/emails/template.blade.php +++ b/resources/views/emails/template.blade.php @@ -2,6 +2,8 @@ @php + use Stevebauman\Purify\Facades\Purify; + $bg_primary = $settings['primary_color'] ?? '#154734'; $bg_secondary = $settings['secondary_color'] ?? '#C95100'; $bg_tertiary = $settings['tertiary_color'] ?? '#34827A'; @@ -18,71 +20,64 @@ a[href], a[href]:visited { color: {{ $bg_primary }}; } .footer a[href], .footer a[href]:visited { color: #fff; } + td.footer-cell a[href] { color: #fff !important; font-size: 16px; text-decoration: underline; } -|
-
- @if(isset($settings['logo']))
- |
- ||||||||||||||||
|
-
-
-
- @yield('message')
-
- - - This is an automated message from the {{ $settings['site_title'] ?? 'Profiles' }} website. - - |
- ||||||||||||||||
| - | -||||||||||||||||
| - @if(isset($settings['footer'])) - {!! $settings['footer'] !!} - @else - Questions? Check our FAQ or contact us. - @endif - | -||||||||||||||||
+
|
+ ||||||||||||||||