From 06107cb8fc129c076ce97fcf181b98c0e78eedef Mon Sep 17 00:00:00 2001 From: Ludovic CANDELLIER Date: Tue, 14 Feb 2023 00:20:00 +0100 Subject: [PATCH] Add overlay on css, adapt shelves, fix bienvenue mail on laravel 9 methods --- .../Controllers/Shop/CategoryController.php | 2 +- app/Mail/Bienvenue.php | 16 ++--- build/css/site.css | 71 +++++++++++++++++++ build/css/txt.css | 1 + .../Shop/Articles/partials/article.blade.php | 11 ++- resources/views/Shop/layout/layout.blade.php | 2 +- 6 files changed, 92 insertions(+), 11 deletions(-) create mode 100644 build/css/txt.css diff --git a/app/Http/Controllers/Shop/CategoryController.php b/app/Http/Controllers/Shop/CategoryController.php index 6c8c9cf9..5ae19c3b 100644 --- a/app/Http/Controllers/Shop/CategoryController.php +++ b/app/Http/Controllers/Shop/CategoryController.php @@ -64,7 +64,7 @@ class CategoryController extends Controller ]), 'tags' => TagGroups::getWithTagsAndCountOffers($category_id), ]; - // dump($data); + dump($data); return view('Shop.Shelves.shelve', $data); } diff --git a/app/Mail/Bienvenue.php b/app/Mail/Bienvenue.php index 79a83eeb..3e6630a6 100644 --- a/app/Mail/Bienvenue.php +++ b/app/Mail/Bienvenue.php @@ -4,10 +4,12 @@ namespace App\Mail; use App\Models\Core\Mail\MailTemplate; use App\Repositories\Core\DateTime; +use App\Repositories\Shop\Customers; use Illuminate\Bus\Queueable; +use Illuminate\Mail\Mailables\Address; +use Illuminate\Mail\Mailables\Envelope; use Illuminate\Queue\SerializesModels; use Spatie\MailTemplates\TemplateMailable; -use App\Repositories\Shop\Customers; class Bienvenue extends TemplateMailable @@ -29,8 +31,6 @@ class Bienvenue extends TemplateMailable $this->user = $user; $this->male = $user->gender == 1; $this->subject = $subject; - $this->from[] = ['address' => 'boutique@jardinenvie.com','name' => 'Boutique JardinEnVie']; - $this->reply_to = ['address' => 'boutique@jardinenvie.com','name' => 'Boutique JardinEnVie']; } public static function getDataByUser($user_id) @@ -48,11 +48,11 @@ class Bienvenue extends TemplateMailable return Customers::get($id); } - public function build() + public function envelope() { - $data = ['user' => $this->user]; - $template = $this->getTemplate(); - return $this->view($template, $data); + return new Envelope( + from: new Address('boutique@jardinenvie.com', 'Jardin\'en\'Vie'), + subject: $this->subject, + ); } - } diff --git a/build/css/site.css b/build/css/site.css index b435b173..11a780d9 100644 --- a/build/css/site.css +++ b/build/css/site.css @@ -235,6 +235,77 @@ a.nav-link { width: 192px; } + +.content { + position: relative; + width: 100%; + max-width: 400px; + margin: auto; + overflow: hidden +} + +.content .content-overlay { + background: rgba(0, 0, 0, 0.7); + position: absolute; + height: 99%; + width: 100%; + left: 0; + top: 0; + bottom: 0; + right: 0; + opacity: 0; + -webkit-transition: all 0.4s ease-in-out 0s; + -moz-transition: all 0.4s ease-in-out 0s; + transition: all 0.4s ease-in-out 0s +} + +.content:hover .content-overlay { + opacity: 1 +} + +.content-image { + width: 100% +} + +.content-details { + position: absolute; + text-align: center; + padding-left: 1em; + padding-right: 1em; + width: 100%; + top: 50%; + left: 50%; + opacity: 0; + -webkit-transform: translate(-50%, -50%); + -moz-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); + -webkit-transition: all 0.3s ease-in-out 0s; + -moz-transition: all 0.3s ease-in-out 0s; + transition: all 0.3s ease-in-out 0s; + -ms-transform: translate(-50%, -50%); + -o-transform: translate(-50%, -50%); +} + +.content:hover .content-details { + top: 50%; + left: 50%; + opacity: 1 +} + +.content-details h3 { + color: #fff; + font-weight: 500; + letter-spacing: 0.15em; + margin-bottom: 0.5em; + text-transform: uppercase +} + +.content-details p { + color: #fff; + font-size: 0.8em +} + + @font-face { font-family: 'noto_sanscondensed'; src: url('/fonts/notosans-condensed/notosans-condensed-webfont.eot'); diff --git a/build/css/txt.css b/build/css/txt.css new file mode 100644 index 00000000..0e8725ca --- /dev/null +++ b/build/css/txt.css @@ -0,0 +1 @@ +@import url(https://fonts.googleapis.com/css?family=Raleway);body{background: #f9f9f9;font-size: 16px;font-family: 'Raleway', sans-serif}.container{margin-top: 200px}.title{color: #1a1a1a;text-align: center;margin-bottom: 10px}.content{position: relative;width: 90%;max-width: 400px;margin: auto;overflow: hidden}.content .content-overlay{background: rgba(0,0,0,0.7);position: absolute;height: 99%;width: 100%;left: 0;top: 0;bottom: 0;right: 0;opacity: 0;-webkit-transition: all 0.4s ease-in-out 0s;-moz-transition: all 0.4s ease-in-out 0s;transition: all 0.4s ease-in-out 0s}.content:hover .content-overlay{opacity: 1}.content-image{width: 100%}img{box-shadow: 1px 1px 5px 1px rgba(0, 0, 0, 0.1);border-radius: 5px}.content-details{position: absolute;text-align: center;padding-left: 1em;padding-right: 1em;width: 100%;top: 50%;left: 50%;opacity: 0;-webkit-transform: translate(-50%, -50%);-moz-transform: translate(-50%, -50%);transform: translate(-50%, -50%);-webkit-transition: all 0.3s ease-in-out 0s;-moz-transition: all 0.3s ease-in-out 0s;transition: all 0.3s ease-in-out 0s}.content:hover .content-details{top: 50%;left: 50%;opacity: 1}.content-details h3{color: #fff;font-weight: 500;letter-spacing: 0.15em;margin-bottom: 0.5em;text-transform: uppercase}.content-details p{color: #fff;font-size: 0.8em}.fadeIn-bottom{top: 80%} \ No newline at end of file diff --git a/resources/views/Shop/Articles/partials/article.blade.php b/resources/views/Shop/Articles/partials/article.blade.php index cd890741..9ab22f3f 100644 --- a/resources/views/Shop/Articles/partials/article.blade.php +++ b/resources/views/Shop/Articles/partials/article.blade.php @@ -1,6 +1,15 @@
- {{ $product_name }} +
diff --git a/resources/views/Shop/layout/layout.blade.php b/resources/views/Shop/layout/layout.blade.php index 114b263a..0da17cff 100644 --- a/resources/views/Shop/layout/layout.blade.php +++ b/resources/views/Shop/layout/layout.blade.php @@ -27,7 +27,7 @@
@include("Shop.layout.partials.header")
-
+
@yield('content')