*/
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');
}
--- /dev/null
+<?php
+
+namespace App\View\Components;
+
+use App\PdfFile;
+use Illuminate\View\Component;
+
+class Cover extends Component
+{
+ public PdfFile $pdf;
+ public string $type;
+ public string $class;
+ public string $file;
+
+ /**
+ * Create a new component instance.
+ *
+ * @param $pdf
+ * @param $type
+ */
+ public function __construct($pdf, $type)
+ {
+ //
+ $this->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');
+ }
+}
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 {
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 {
div.pill-box div h2 {
padding: 0 30px;
- font-weight: bold;
- font-size: large;
color: #d04d4a;
text-align: center;
}
display: block;
}
+.spotlight-news {
+ background-color: rgba(7, 78, 156, 0.25);
+ padding: 0.5rem;
+ margin-bottom: 1rem;
+}
+
+.spotlight-news > div {
+ font-size: small;
+}
+
}
+//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
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 {
h2 {
padding: 0 30px;
- font-weight: bold;
- font-size: large;
color: $psq_red;
text-align: center;
}
}
}
+
+
+//Spotlight news
+
+.spotlight-news {
+
+ background-color: rgba($psq_blue, 0.25);
+ padding: 0.5rem;
+ margin-bottom: 1rem;
+
+
+ > div {
+ font-size: small;
+ }
+}
@section('content')
<div class="container">
+ <h1 class="highlight-purple">CAMPAGNES & COMMUNICATION DES ACTEURS DE LA SANTÉ</h1>
+
+ <ul class="leaders">
+ <li><span>MARKETING & COM : LES CAMPAGNES DE LA SEMAINE</span></li>
+ </ul>
+
<campaign-instant-search></campaign-instant-search>
</div>
@endsection
-<div class="cover">
- <img class="cover-bg" src="{{asset('img/cover-bg-center.png')}}" alt="">
+<div class="cover {{$class}}">
+ <img class="cover-bg" src="{{$file}}" alt="">
<img class="cover-over" src="{{$pdf->coverUrl}}" alt="">
<p>{{$pdf->title}} - {{$pdf->created_at->format('d/m/Y')}}</p>
</div>
<div class="pill-box">
<img src="{{asset('img/pill-icon.svg')}}" alt="Pill Icon" class="pill-icon">
<div>
- <h2>{{$title}}</h2>
+ <h2 class="bold">{{$title}}</h2>
<p>{{$slot}}</p>
<a href="{{$link}}">Cliquez-ici</a>
</div>
--- /dev/null
+<div class="spotlight-news">
+ <h2>{{$title}}</h2>
+ <div>
+ {{$slot}}
+ </div>
+</div>
<div class="container">
<h1>L'actualité à la une de notre quotidien</h1>
- <div class="row justify-content-center pt-5">
+ <div class="row justify-content-center pt-3">
<div class="col-sm-4">
<ul class="leaders">
<li><span>à la une aujourd'hui</span></li>
</ul>
- <x-cover :pdf="$last_pdf->first()">
+ <x-cover :pdf="$last_pdf->first()" type="3">
</x-cover>
</div>
<div class="row">
@foreach($last_pdf->slice(1, 3) as $pdf)
<div class="col-sm-4">
- <x-cover :pdf="$pdf">
+ <x-cover :pdf="$pdf" type="2">
</x-cover>
</div>
</div>
<div class="row justify-content-center pt-5">
<div class="col-sm-4">
+ <x-spotlight-news title="À SEULEMENT J+1 DAVID LOEW NOUVEAU">
+ <ul>
+ <li>Nouveau Boss d’IPSEN face à la presse</li>
+ <li>Lorem ipsum dolor sit amet, consectetuer adipiscing elit</li>
+ </ul>
+ </x-spotlight-news>
</div>
<div class="col-sm-8">
et du médicament
</x-pill-box>
+
+ <div class="row mt-3">
+ @foreach($last_pdf->slice(4, 3) as $pdf)
+ <div class="col-sm-4">
+ <x-cover :pdf="$pdf" type="2">
+ </x-cover>
+
+ </div>
+ @endforeach
+ </div>
</div>
</div>