$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();
--- /dev/null
+<?php
+
+namespace App\Http\Controllers;
+
+use Illuminate\Http\Request;
+
+class MagController extends Controller
+{
+ public function index()
+ {
+ return view('mag.index');
+ }
+}
_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: "" }
}),
: _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
])
])
}
-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
font-display: swap;
}
+.font-medium {
+ font-weight: 500;
+}
+
.blue {
color: #074e9c;
}
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;
div.pill-box {
position: relative;
- background-color: white;
}
div.pill-box img {
}
div.pill-box div {
+ background-color: initial !important;
border-radius: 5px;
padding: 0 5px 5px;
}
margin: auto;
}
-.mw-40 {
- max-width: 40%;
+.mh-campaign {
+ max-height: 120px;
}
_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: "" }
}),
: _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
])
])
}
-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
</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>
</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>
$psq_grey: #546983;
$psq_denim: #0c2c50;
$psq_green: #41BD53;
+$psq_mag_blue: #2a6ba3;
// BOOTSTRAP VARS
"orange" : $psq_orange,
"grey" : $psq_grey,
"denim" : $psq_denim,
- "green" : $psq_green
+ "green" : $psq_green,
+ "mag-blue" : $psq_mag_blue,
);
$psq_pages: (
font-display: swap;
}
+.font-medium {
+ font-weight: 500;
+}
div.pill-box {
position: relative;
- background-color: white;
+ //background-color: white;
img {
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;
margin: auto;
}
-.mw-40{
- max-width: 40%;
+.mh-campaign{
+ max-height: 120px;
}
@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">
<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>
</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>
--- /dev/null
+@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
<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>
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');