]> _ Git - psq.git/commitdiff
mag page + design and poll adjustments
authorLouis Jeckel <louis.jeckel@outlook.cm>
Sun, 16 Aug 2020 10:30:04 +0000 (12:30 +0200)
committerLouis Jeckel <louis.jeckel@outlook.cm>
Sun, 16 Aug 2020 10:30:04 +0000 (12:30 +0200)
18 files changed:
app/Http/Controllers/Admin/PollController.php
app/Http/Controllers/MagController.php [new file with mode: 0644]
public/admin/js/admin.js
public/css/app.css
public/img/le-mag/cover.jpg [new file with mode: 0644]
public/js/app.js
resources/js/components/AdCampaign/CampaignHit.vue
resources/js/components/PollAnswers/PollAnswers.vue
resources/sass/_colors.scss
resources/sass/_fonts.scss
resources/sass/_pill_boxes.scss
resources/sass/app.scss
resources/views/actu-labos/show.blade.php
resources/views/com-campaigns/index.blade.php
resources/views/components/nav.blade.php
resources/views/mag/index.blade.php [new file with mode: 0644]
resources/views/not-registered/index.blade.php
routes/web.php

index cf27b1ebbfd90f58466f914a3ec0a91f233e00ee..0d6370fce823e68877f11a67008c60819fb80b78 100644 (file)
@@ -35,7 +35,7 @@ class PollController extends ModuleController
 
 
             $ans = $answers->flatMap(function($ans) use($question){
-                    return Arr::wrap($ans->answers[$question['slug']]);
+                    return Arr::wrap($ans->answers[$question['slug']] ?? ['[no-answer]']);
             });
             $ansCountBy = $ans->countBy()->toArray();
 
diff --git a/app/Http/Controllers/MagController.php b/app/Http/Controllers/MagController.php
new file mode 100644 (file)
index 0000000..6169564
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+
+class MagController extends Controller
+{
+    public function index()
+    {
+        return view('mag.index');
+    }
+}
index 77bc4a7d4d5657013377cb4fd5872e5cc6304fd2..c1edde2c903cb57280fb82c00977c7c94742c6ec 100644 (file)
@@ -50090,9 +50090,9 @@ var render = function() {
         _c("div", [
           _c("img", {
             class: {
-              "mw-40 mx-1": true,
-              "float-left": !_vm.flip,
-              "float-right": _vm.flip
+              "mh-campaign": true,
+              "float-left mr-3": !_vm.flip,
+              "float-right ml-3": _vm.flip
             },
             attrs: { src: _vm.hit.image, alt: "" }
           }),
@@ -50698,33 +50698,64 @@ var render = function() {
                           : _c("div", [
                               _c(
                                 "table",
-                                {
-                                  staticClass:
-                                    "table table-bordered table-hover"
-                                },
+                                { staticClass: "table table-hover" },
                                 [
-                                  _vm._m(0),
+                                  _c("thead", { staticClass: "thead-light" }, [
+                                    _c("tr", [
+                                      _c("th", [_vm._v("Réponse")]),
+                                      _vm._v(" "),
+                                      _vm.selected_question.type !== "poll_text"
+                                        ? _c("th", [_vm._v("Occurences")])
+                                        : _vm._e(),
+                                      _vm._v(" "),
+                                      _vm.selected_question.type !== "poll_text"
+                                        ? _c("th", [_vm._v("Pourcentage")])
+                                        : _vm._e()
+                                    ])
+                                  ]),
                                   _vm._v(" "),
                                   _c(
                                     "tbody",
                                     _vm._l(
                                       _vm.selected_question.answers,
                                       function(answer) {
-                                        return _c("tr", [
-                                          _c("td", [
-                                            _vm._v(_vm._s(answer.value))
-                                          ]),
-                                          _vm._v(" "),
-                                          _c("td", [
-                                            _vm._v(_vm._s(answer.count))
-                                          ]),
-                                          _vm._v(" "),
-                                          _c("td", [
-                                            _vm._v(
-                                              _vm._s(answer.percentage) + "%"
-                                            )
-                                          ])
-                                        ])
+                                        return _c(
+                                          "tr",
+                                          {
+                                            class: {
+                                              "table-warning":
+                                                answer.value === "[no-answer]"
+                                            }
+                                          },
+                                          [
+                                            _c("td", {
+                                              domProps: {
+                                                textContent: _vm._s(
+                                                  answer.value === "[no-answer]"
+                                                    ? "[Aucune réponse]"
+                                                    : answer.value
+                                                )
+                                              }
+                                            }),
+                                            _vm._v(" "),
+                                            _vm.selected_question.type !==
+                                            "poll_text"
+                                              ? _c("td", [
+                                                  _vm._v(_vm._s(answer.count))
+                                                ])
+                                              : _vm._e(),
+                                            _vm._v(" "),
+                                            _vm.selected_question.type !==
+                                            "poll_text"
+                                              ? _c("td", [
+                                                  _vm._v(
+                                                    _vm._s(answer.percentage) +
+                                                      "%"
+                                                  )
+                                                ])
+                                              : _vm._e()
+                                          ]
+                                        )
                                       }
                                     ),
                                     0
@@ -50747,22 +50778,7 @@ var render = function() {
         ])
   ])
 }
-var staticRenderFns = [
-  function() {
-    var _vm = this
-    var _h = _vm.$createElement
-    var _c = _vm._self._c || _h
-    return _c("thead", [
-      _c("tr", [
-        _c("th", [_vm._v("Réponse")]),
-        _vm._v(" "),
-        _c("th", [_vm._v("Occurences")]),
-        _vm._v(" "),
-        _c("th", [_vm._v("Pourcentage")])
-      ])
-    ])
-  }
-]
+var staticRenderFns = []
 render._withStripped = true
 
 
index 771a7e0cdad90a5fa67f4b55b1ae98d84fb6f278..5ae132f594796475c35045104943d7316e4c223f 100644 (file)
@@ -11046,6 +11046,10 @@ mark.mark {
   font-display: swap;
 }
 
+.font-medium {
+  font-weight: 500;
+}
+
 .blue {
   color: #074e9c;
 }
@@ -11165,6 +11169,19 @@ h1 {
   border: 1px solid #41BD53;
 }
 
+.mag-blue {
+  color: #2a6ba3;
+}
+
+.highlight-mag-blue {
+  color: white;
+  background-color: #2a6ba3;
+}
+
+.border-mag-blue {
+  border: 1px solid #2a6ba3;
+}
+
 .psq-actu h1 {
   color: white;
   background-color: #d04d4a;
@@ -11415,7 +11432,6 @@ div.cover .cover-title p {
 
 div.pill-box {
   position: relative;
-  background-color: white;
 }
 
 div.pill-box img {
@@ -11427,6 +11443,7 @@ div.pill-box img {
 }
 
 div.pill-box div {
+  background-color: initial !important;
   border-radius: 5px;
   padding: 0 5px 5px;
 }
@@ -11611,7 +11628,7 @@ article img.top-img {
   margin: auto;
 }
 
-.mw-40 {
-  max-width: 40%;
+.mh-campaign {
+  max-height: 120px;
 }
 
diff --git a/public/img/le-mag/cover.jpg b/public/img/le-mag/cover.jpg
new file mode 100644 (file)
index 0000000..6cfd306
Binary files /dev/null and b/public/img/le-mag/cover.jpg differ
index 8c9f06b25e35f7f5db025f7210673a7efe3a41ab..755cba004693757234c6f71aaea1c61e24188e5f 100644 (file)
@@ -79570,9 +79570,9 @@ var render = function() {
         _c("div", [
           _c("img", {
             class: {
-              "mw-40 mx-1": true,
-              "float-left": !_vm.flip,
-              "float-right": _vm.flip
+              "mh-campaign": true,
+              "float-left mr-3": !_vm.flip,
+              "float-right ml-3": _vm.flip
             },
             attrs: { src: _vm.hit.image, alt: "" }
           }),
@@ -80178,33 +80178,64 @@ var render = function() {
                           : _c("div", [
                               _c(
                                 "table",
-                                {
-                                  staticClass:
-                                    "table table-bordered table-hover"
-                                },
+                                { staticClass: "table table-hover" },
                                 [
-                                  _vm._m(0),
+                                  _c("thead", { staticClass: "thead-light" }, [
+                                    _c("tr", [
+                                      _c("th", [_vm._v("Réponse")]),
+                                      _vm._v(" "),
+                                      _vm.selected_question.type !== "poll_text"
+                                        ? _c("th", [_vm._v("Occurences")])
+                                        : _vm._e(),
+                                      _vm._v(" "),
+                                      _vm.selected_question.type !== "poll_text"
+                                        ? _c("th", [_vm._v("Pourcentage")])
+                                        : _vm._e()
+                                    ])
+                                  ]),
                                   _vm._v(" "),
                                   _c(
                                     "tbody",
                                     _vm._l(
                                       _vm.selected_question.answers,
                                       function(answer) {
-                                        return _c("tr", [
-                                          _c("td", [
-                                            _vm._v(_vm._s(answer.value))
-                                          ]),
-                                          _vm._v(" "),
-                                          _c("td", [
-                                            _vm._v(_vm._s(answer.count))
-                                          ]),
-                                          _vm._v(" "),
-                                          _c("td", [
-                                            _vm._v(
-                                              _vm._s(answer.percentage) + "%"
-                                            )
-                                          ])
-                                        ])
+                                        return _c(
+                                          "tr",
+                                          {
+                                            class: {
+                                              "table-warning":
+                                                answer.value === "[no-answer]"
+                                            }
+                                          },
+                                          [
+                                            _c("td", {
+                                              domProps: {
+                                                textContent: _vm._s(
+                                                  answer.value === "[no-answer]"
+                                                    ? "[Aucune réponse]"
+                                                    : answer.value
+                                                )
+                                              }
+                                            }),
+                                            _vm._v(" "),
+                                            _vm.selected_question.type !==
+                                            "poll_text"
+                                              ? _c("td", [
+                                                  _vm._v(_vm._s(answer.count))
+                                                ])
+                                              : _vm._e(),
+                                            _vm._v(" "),
+                                            _vm.selected_question.type !==
+                                            "poll_text"
+                                              ? _c("td", [
+                                                  _vm._v(
+                                                    _vm._s(answer.percentage) +
+                                                      "%"
+                                                  )
+                                                ])
+                                              : _vm._e()
+                                          ]
+                                        )
                                       }
                                     ),
                                     0
@@ -80227,22 +80258,7 @@ var render = function() {
         ])
   ])
 }
-var staticRenderFns = [
-  function() {
-    var _vm = this
-    var _h = _vm.$createElement
-    var _c = _vm._self._c || _h
-    return _c("thead", [
-      _c("tr", [
-        _c("th", [_vm._v("Réponse")]),
-        _vm._v(" "),
-        _c("th", [_vm._v("Occurences")]),
-        _vm._v(" "),
-        _c("th", [_vm._v("Pourcentage")])
-      ])
-    ])
-  }
-]
+var staticRenderFns = []
 render._withStripped = true
 
 
index c0d3f49161921b01ff109d34e2d6fef1cf74faaf..c5d862255ac93ee944ba33d5d5f6f2b499b59c83 100644 (file)
@@ -12,7 +12,7 @@
         </div>
         <div>
 
-            <img :class="{'mw-40 mx-1': true, 'float-left': !flip, 'float-right': flip} " :src="hit.image" alt="">
+            <img :class="{'mh-campaign': true, 'float-left mr-3': !flip, 'float-right ml-3': flip} " :src="hit.image" alt="">
 
             <div v-html="hit.description" class="pb-2"></div>
             <a :href="hit.url" :class="{'click-here': true,  'bottom-right': !flip, 'bottom-left': flip}">Lire ici</a>
index 966de0040deb273e9f71527e82c56e558cc4e10b..7b0dd5d22bfad21eb9d92d4046f16272c06fcb73 100644 (file)
                     </div>
 
                     <div v-else>
-                        <table class="table table-bordered table-hover">
-                            <thead>
+                        <table class="table table-hover">
+                            <thead class="thead-light">
                                 <tr>
                                     <th>Réponse</th>
-                                    <th>Occurences</th>
-                                    <th>Pourcentage</th>
+                                    <th v-if="selected_question.type !== 'poll_text'">Occurences</th>
+                                    <th v-if="selected_question.type !== 'poll_text'">Pourcentage</th>
                                 </tr>
                             </thead>
                             <tbody>
-                                <tr v-for="answer in selected_question.answers">
-                                    <td>{{answer.value}}</td>
-                                    <td>{{answer.count}}</td>
-                                    <td>{{answer.percentage}}%</td>
+                                <tr v-for="answer in selected_question.answers" :class="{'table-warning' : (answer.value === '[no-answer]')}">
+                                    <td v-text="(answer.value === '[no-answer]') ? '[Aucune réponse]' : answer.value"></td>
+                                    <td v-if="selected_question.type !== 'poll_text'">{{answer.count}}</td>
+                                    <td v-if="selected_question.type !== 'poll_text'">{{answer.percentage}}%</td>
                                 </tr>
                             </tbody>
                         </table>
index 50fd2796670b3f50863922f22ca4752c43275338..bf50c20fa415a0fe526c4f21a00b77721594d7e9 100644 (file)
@@ -10,6 +10,7 @@ $psq_orange: #e79817;
 $psq_grey: #546983;
 $psq_denim: #0c2c50;
 $psq_green: #41BD53;
+$psq_mag_blue: #2a6ba3;
 
 
 // BOOTSTRAP VARS
@@ -30,7 +31,8 @@ $psq_colors: (
     "orange" : $psq_orange,
     "grey" : $psq_grey,
     "denim" : $psq_denim,
-    "green" : $psq_green
+    "green" : $psq_green,
+    "mag-blue" : $psq_mag_blue,
 );
 
 $psq_pages: (
index 09b231eb0fd0bd37367baa6c560eeb05c7dd01b9..f854203b09a2a831eae88c551d9e6cd7f9455320 100644 (file)
     font-display: swap;
 }
 
+.font-medium {
+    font-weight: 500;
+}
index 6c5f4b39edd3285f4c96d41a0d6010e7dc05e8bb..7130d3e07503adb122941df8bd7b648f15e738de 100644 (file)
@@ -1,7 +1,7 @@
 
 div.pill-box {
     position: relative;
-    background-color: white;
+    //background-color: white;
 
 
     img {
@@ -15,6 +15,7 @@ div.pill-box {
     div {
         //background-color: rgba(208, 77, 74, 0.2);
         @extend .box;
+        background-color: initial !important;
         border-radius: 5px;
         padding: 0 5px 5px;
         //border: 1px solid $psq_red;
index 1a68f3bd88fbf143e4837565655413e603c6c227..f99da3b09ba0eb1fe21c2d450b88b61dd3bbd3a1 100644 (file)
@@ -141,6 +141,6 @@ article {
     margin: auto;
 }
 
-.mw-40{
-    max-width: 40%;
+.mh-campaign{
+    max-height: 120px;
 }
index 12f4142e6e3ba3556734f3f2b71b7e4b6a68b707..2e6ba8b9a439cd840dbe952126863fdaaeaa966b 100644 (file)
@@ -3,7 +3,7 @@
 @section('content')
     <div class="container psq-labos">
         <x-back></x-back>
-        <h1>L'actu des labos</h1>
+{{--        <h1>L'actu des labos</h1>--}}
 
         <article class="row">
             <div class="col-sm-4">
index 5f9a484f691ee57b5dfab6338b3d3787ab46c747..ba8c7ed762b9eb0a446c1b7501d1ac7569db0441 100644 (file)
@@ -5,28 +5,26 @@
     <h1>marketing & com : les campagnes de la semaine</h1>
 
 
-    <div class="row">
+    <div class="row align-items-center">
         <div class="col-md-8 mb-4">
-            <campaign-hit :hit='@json($campaigns->shift())'></campaign-hit>
+            <campaign-hit :hit='@json($campaigns->pop())'></campaign-hit>
         </div>
         <div class="col-md-4 mb-4">
             <x-pill-box slug="campagnes-et-com-1">
             </x-pill-box>
 
         </div>
-    </div>
-    <div class="row">
+
         <div class="col-md-4 mb-4">
             <x-pill-box slug="campagnes-et-com-2">
             </x-pill-box>
         </div>
         <div class="col-md-8 mb-4">
-            <campaign-hit :hit='@json($campaigns->shift())' :flip="true"></campaign-hit>
+            <campaign-hit :hit='@json($campaigns->pop())' :flip="true"></campaign-hit>
         </div>
-    </div>
-    <div class="row">
+
         <div class="col-md-12">
-            <campaign-hit :hit='@json($campaigns->shift())'></campaign-hit>
+            <campaign-hit :hit='@json($campaigns->pop())'></campaign-hit>
         </div>
     </div>
 
index 122fa822f42ce9274ab59edabc4ca80d5095610a..6ed9e683fe264055e33032bc407688b6fbc8d0ca 100644 (file)
@@ -20,7 +20,7 @@
     </div>
 
     <div>
-        <a href="#">
+        <a href="{{route('mag.index')}}">
             <img src="{{asset('img/nav/4-lemag.svg')}}" alt="Pill Icon">
             <p>Le Magazine</p>
         </a>
diff --git a/resources/views/mag/index.blade.php b/resources/views/mag/index.blade.php
new file mode 100644 (file)
index 0000000..8124e85
--- /dev/null
@@ -0,0 +1,40 @@
+@extends('layouts.app')
+
+@section('content')
+
+    <div class="container psq-mag" style="max-width: 960px;">
+{{--        <h1 class="mb-5">Le magazine</h1>--}}
+        <div class="row align-items-center">
+            <div class="col-sm-6 mag-blue text-center font-medium" style="font-size: large">
+                <p class="font-weight-bold mb-0" style="font-size: larger">
+                    ACTEURS DE LA PHARMA :
+                </p>
+                <p style="font-size: xx-large;">
+                    Et si, enfin, on parlait de vous autrement ?
+                </p>
+                <p>
+                    Tous les trois mois, un véritable Magazine dédié au Médicament, son économie, ses acteurs, sa communication et son histoire
+                </p>
+                <p>
+                    Plus de 120 pages diffusées à 5000 décideurs, politiques, relais d’opinion et à ceux qui font le médicament au quotidien.
+                </p>
+                <p class="mb-0">
+                    LE 20 SEPTEMBRE PROCHAIN : MISE EN LIGNE DU SOMMAIRE COMPLET DE CE PREMIER NUMÉRO
+                </p>
+                <p style="font-size: larger;" class="font-weight-bold mb-0">
+                    N°1 : LE 25 OCTOBRE 2020
+                </p>
+                <p>
+                    <a href="mailto:publicite@prescription-quotidien.com">
+                        POUR ACCOMPAGNER PUBLICITAIREMENT CET ÉVÉNEMENT CLIQUEZ ICI
+                    </a>
+                </p>
+
+            </div>
+
+            <div class="col-sm-6">
+                <img src="{{asset('img/le-mag/cover.jpg')}}" alt="" class="w-100">
+            </div>
+        </div>
+    </div>
+@endsection
index 7eb7786e09051df3684ca9b6e07caf1169e62cd5..43e304502df5f5dc33ca736b4dd408777d03445a 100644 (file)
@@ -9,7 +9,7 @@
         <div class="col-sm-6">
             <img src="{{asset('img/not-registered.jpg')}}" alt="Image pas encore abonné" class="w-100">
         </div>
-        <div class="col-sm-6 pt-3 box">
+        <div class="col-sm-6 pt-3 text-center">
             {!! $settings->byKey('not_registered_text') !!}
         </div>
 
index 143f3f2e429f7d970f70bc31b9a4bc90a1843282..95282d7e22de492af74e1687a71161be4e0acf50 100644 (file)
@@ -74,6 +74,8 @@ Route::domain(env('CLIENT_DOMAIN_NAME'))->group(function() {
         Route::post('{slug}', 'PollController@submit')->name('poll.submit');
     });
 
+    Route::get('le-mag', 'MagController@index')->name('mag.index');
+
     /** Metadata */
     Route::prefix('/files/{file:slug}')->group(function () {
         Route::get('/cover', 'FileController@cover');