From: Louis Jeckel Date: Wed, 29 Jul 2020 23:46:53 +0000 (+0200) Subject: spotlight news + add news cover bg images X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ee5d6365cd183ce59aa2dfc7dc488a48922fc480;p=psq.git spotlight news + add news cover bg images --- diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index 00c1726..fee95d8 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -15,7 +15,7 @@ class HomeController extends Controller */ public function index() { - \View::share('last_pdf', PdfFile::query()->orderByDesc('id')->take(4)->get()); + \View::share('last_pdf', PdfFile::query()->orderByDesc('id')->take(7)->get()); return view('home.index'); } diff --git a/app/View/Components/Cover.php b/app/View/Components/Cover.php new file mode 100644 index 0000000..8970795 --- /dev/null +++ b/app/View/Components/Cover.php @@ -0,0 +1,40 @@ +pdf = $pdf; + $this->type = $type; + $this->class = "cover-pile-$type"; + $this->file = asset("img/cover-bg/pile-mag-$type.png"); + + } + + /** + * Get the view / contents that represent the component. + * + * @return \Illuminate\View\View|string + */ + public function render() + { + return view('components.cover'); + } +} diff --git a/public/css/app.css b/public/css/app.css index d9690be..3d2479a 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -11109,15 +11109,44 @@ mark.mark { margin: 1em auto; } +.highlight-purple { + color: white; + background-color: #AD5ED3; +} + +.purple { + color: #AD5ED3; +} + +.highlight-red, +h1 { + color: white; + background-color: #d04d4a; +} + +.red { + color: #d04d4a; +} + h1 { text-transform: uppercase; - margin: auto; + margin: auto auto 2rem; text-align: center; display: table; font-size: x-large; - padding: 2px 4px; - color: white; - background-color: #d04d4a; + padding: 6px 8px 4px; +} + +h2 { + font-weight: 500; + font-size: medium; + text-transform: uppercase; + color: #074e9c; +} + +h2.bold { + font-weight: bold; + font-size: large; } ul.leaders { @@ -11155,11 +11184,20 @@ div.cover img.cover-bg { width: 100%; } +div.cover.cover-pile-2 img.cover-over { + width: 71%; + left: 15%; + top: 3%; +} + +div.cover.cover-pile-3 img.cover-over { + width: 60%; + left: 20%; + top: 5%; +} + div.cover img.cover-over { position: absolute; - width: 56%; - left: 22%; - top: 3%; } div.cover p { @@ -11196,8 +11234,6 @@ div.pill-box div { div.pill-box div h2 { padding: 0 30px; - font-weight: bold; - font-size: large; color: #d04d4a; text-align: center; } @@ -11217,3 +11253,13 @@ div.pill-box div > a { display: block; } +.spotlight-news { + background-color: rgba(7, 78, 156, 0.25); + padding: 0.5rem; + margin-bottom: 1rem; +} + +.spotlight-news > div { + font-size: small; +} + diff --git a/public/img/cover-bg/pile-mag-2.png b/public/img/cover-bg/pile-mag-2.png new file mode 100644 index 0000000..2cfa6a2 Binary files /dev/null and b/public/img/cover-bg/pile-mag-2.png differ diff --git a/public/img/cover-bg/pile-mag-3.png b/public/img/cover-bg/pile-mag-3.png new file mode 100644 index 0000000..c76f59c Binary files /dev/null and b/public/img/cover-bg/pile-mag-3.png differ diff --git a/resources/sass/app.scss b/resources/sass/app.scss index c6ee5db..c3c708b 100644 --- a/resources/sass/app.scss +++ b/resources/sass/app.scss @@ -21,22 +21,53 @@ } +//COLORS +.highlight-purple { + color: white; + background-color: $psq_purple; +} + +.purple { + color: $psq_purple; +} + +.highlight-red { + color: white; + background-color: $psq_red; +} + +.red { + color: $psq_red; +} //HEADERS h1 { + @extend .highlight-red; text-transform: uppercase; - margin: auto; + margin: auto auto 2rem; text-align: center; display: table; font-size: x-large; - padding: 2px 4px; + padding: 6px 8px 4px; - color: white; - background-color: $psq_red; } +h2 { + font-weight: 500; + font-size: medium; + text-transform: uppercase; + color: $psq_blue; +} +h2.bold { + font-weight: bold; + font-size: large; +} + +h3 { + +} //TITLE DOTS @@ -90,11 +121,26 @@ div.cover { width: 100%; } + + + &.cover-pile-2 { + img.cover-over { + width: 71%; + left: 15%; + top: 3%; + } + } + + &.cover-pile-3 { + img.cover-over { + width: 60%; + left: 20%; + top: 5%; + } + } + img.cover-over { position: absolute; - width: 56%; - left: 22%; - top: 3%; } p { @@ -134,8 +180,6 @@ div.pill-box { h2 { padding: 0 30px; - font-weight: bold; - font-size: large; color: $psq_red; text-align: center; } @@ -159,3 +203,18 @@ div.pill-box { } } + + +//Spotlight news + +.spotlight-news { + + background-color: rgba($psq_blue, 0.25); + padding: 0.5rem; + margin-bottom: 1rem; + + + > div { + font-size: small; + } +} diff --git a/resources/views/ad_campaigns.blade.php b/resources/views/ad_campaigns.blade.php index e0862b1..8a5806a 100644 --- a/resources/views/ad_campaigns.blade.php +++ b/resources/views/ad_campaigns.blade.php @@ -2,6 +2,12 @@ @section('content')
+

CAMPAGNES & COMMUNICATION DES ACTEURS DE LA SANTÉ

+ + +
@endsection diff --git a/resources/views/components/cover.blade.php b/resources/views/components/cover.blade.php index c854276..adacbed 100644 --- a/resources/views/components/cover.blade.php +++ b/resources/views/components/cover.blade.php @@ -1,5 +1,5 @@ -
- +
+

{{$pdf->title}} - {{$pdf->created_at->format('d/m/Y')}}

diff --git a/resources/views/components/pill-box.blade.php b/resources/views/components/pill-box.blade.php index d5493d9..46cb6e0 100644 --- a/resources/views/components/pill-box.blade.php +++ b/resources/views/components/pill-box.blade.php @@ -1,7 +1,7 @@
Pill Icon
-

{{$title}}

+

{{$title}}

{{$slot}}

Cliquez-ici
diff --git a/resources/views/components/spotlight-news.blade.php b/resources/views/components/spotlight-news.blade.php new file mode 100644 index 0000000..b469070 --- /dev/null +++ b/resources/views/components/spotlight-news.blade.php @@ -0,0 +1,6 @@ +
+

{{$title}}

+
+ {{$slot}} +
+
diff --git a/resources/views/home/index.blade.php b/resources/views/home/index.blade.php index 4765dda..af058c6 100644 --- a/resources/views/home/index.blade.php +++ b/resources/views/home/index.blade.php @@ -4,13 +4,13 @@

L'actualité à la une de notre quotidien

-
+
  • à la une aujourd'hui
- +
@@ -23,7 +23,7 @@
@foreach($last_pdf->slice(1, 3) as $pdf)
- +
@@ -35,6 +35,12 @@
+ +
    +
  • Nouveau Boss d’IPSEN face à la presse
  • +
  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit
  • +
+
@@ -43,6 +49,16 @@ et du médicament + +
+ @foreach($last_pdf->slice(4, 3) as $pdf) +
+ + + +
+ @endforeach +