From: soufiane Date: Thu, 8 May 2025 20:58:15 +0000 (+0200) Subject: Dev X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=ab0634fc1815415de0dc08fd94c32cdc26a3fab6;p=psq.git Dev --- diff --git a/app/Http/Controllers/AdvertisersController.php b/app/Http/Controllers/AdvertisersController.php new file mode 100644 index 0000000..f624c46 --- /dev/null +++ b/app/Http/Controllers/AdvertisersController.php @@ -0,0 +1,11 @@ + 'layouts.app', 'component' => 'file-instant-search', - 'class' => 'psq-archives' + 'class' => 'psq-archives', + 'title' => 'Nos archives' ]); } diff --git a/app/View/Components/Cover.php b/app/View/Components/Cover.php index 58e1401..92df0f3 100644 --- a/app/View/Components/Cover.php +++ b/app/View/Components/Cover.php @@ -13,6 +13,7 @@ class Cover extends Component public string $file; public string $link; public string $target; + public string $key; /** * Create a new component instance. @@ -22,7 +23,7 @@ class Cover extends Component * @param string $linkTo edition or read * @param string $target */ - public function __construct($pdf, $type, $linkTo = 'edition', $target = '_self') + public function __construct($pdf, $type, $linkTo = 'edition', $target = '_self', $key = 0) { $this->pdf = $pdf; $this->type = $type; @@ -32,8 +33,7 @@ class Cover extends Component action('FileController@show', ['file' => $pdf]) : $this->pdf->getUrl(); $this->target = $target; - - + $this->key = $key; } /** diff --git a/public/img/carousel/next.svg b/public/img/carousel/next.svg new file mode 100644 index 0000000..e09d19c --- /dev/null +++ b/public/img/carousel/next.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/img/carousel/prev.svg b/public/img/carousel/prev.svg new file mode 100644 index 0000000..62d05f0 --- /dev/null +++ b/public/img/carousel/prev.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/public/img/fb_impression_x10.png b/public/img/fb_impression_x10.png new file mode 100644 index 0000000..7c852f7 Binary files /dev/null and b/public/img/fb_impression_x10.png differ diff --git a/public/img/fb_impression_x4.png b/public/img/fb_impression_x4.png new file mode 100644 index 0000000..d031ef5 Binary files /dev/null and b/public/img/fb_impression_x4.png differ diff --git a/public/img/offre_abonnement.png b/public/img/offre_abonnement.png new file mode 100644 index 0000000..6af1fe4 Binary files /dev/null and b/public/img/offre_abonnement.png differ diff --git a/public/img/ombre-magazine.png b/public/img/ombre-magazine.png new file mode 100644 index 0000000..9546419 Binary files /dev/null and b/public/img/ombre-magazine.png differ diff --git a/public/img/pastille.png b/public/img/pastille.png new file mode 100644 index 0000000..3142bbe Binary files /dev/null and b/public/img/pastille.png differ diff --git a/resources/js/app.js b/resources/js/app.js index 04a0f9e..1a131ff 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -5,6 +5,7 @@ */ require('./bootstrap'); +const Swal = require('sweetalert2') window.Vue = require('vue'); /** @todo fix vue material design issue */ @@ -18,6 +19,8 @@ import InstantSearch from "vue-instantsearch"; import 'instantsearch.css/themes/reset-min.css'; import { MdProgress } from 'vue-material/dist/components' import Toasted from 'vue-toasted'; +import EmblaCarousel from 'embla-carousel'; + window.Vue.use( CKEditor ); window.Vue.use(InstantSearch); window.Vue.use(MdProgress); @@ -67,4 +70,67 @@ document.addEventListener("DOMContentLoaded", () => { document.querySelector("nav").classList.toggle("open"); el.classList.toggle("open"); }); + + const notConnectedLink = document.querySelector('.notConnected'); + const notAuthorized = document.querySelector('body').getAttribute("data-not-authorized"); + + if(notAuthorized) { + const $title = 'Votre abonnement actuel ne vous permet pas de consulter les archives.'; + const $text = "Pour toute demande, veuillez nous envoyer un message." + popup($title,$text) + } + + document.querySelectorAll('.notConnected').forEach(link => { + link.addEventListener('click', function (e) { + e.preventDefault(); + const $title = 'Accès réservé aux abonnés'; + const $text = `

Veuillez vous connecter ou + découvrez nos offres d'abonnement +

`; + popup($title,$text) + }) + }) + + const emblaNode = document.querySelector('.embla') + const options = { + loop: false, + container: '.embla__container', + slides: '.embla__slide', + watchDrag: false, + watchResize: true, + } + const embla = EmblaCarousel(emblaNode, options) + + const rootNode = document.querySelector('.embla') + + // Grab button nodes + const prevButtonNode = rootNode.querySelector('.embla__prev') + const nextButtonNode = rootNode.querySelector('.embla__next') + + // Add click listeners + prevButtonNode.addEventListener('click', embla.scrollPrev, false) + nextButtonNode.addEventListener('click', embla.scrollNext, false) + + window.addEventListener("resize",embla.reInit()) }) + +function popup($title, $text) { + Swal.fire({ + title: $title, + html: $text, + showCloseButton: true, + showConfirmButton: false, + closeButtonHtml: `
+ + + + + + + + + + +
` + }) +} diff --git a/resources/js/components/Contact/ContactForm.vue b/resources/js/components/Contact/ContactForm.vue index db97d22..60e7cae 100644 --- a/resources/js/components/Contact/ContactForm.vue +++ b/resources/js/components/Contact/ContactForm.vue @@ -1,9 +1,9 @@