LOG_CHANNEL=stack
DB_CONNECTION=mysql
-DB_HOST=pmi-dev-mariadb
+DB_HOST=pmi-mariadb
DB_PORT=3306
-DB_DATABASE=pmi-dev
+DB_DATABASE=pmi
DB_USERNAME=root
-DB_PASSWORD=PFBq8Exwz7ys5CzR
+DB_PASSWORD=uOvpiRwybTsT1Gyc
BROADCAST_DRIVER=log
CACHE_DRIVER=redis
--- /dev/null
+<?php
+
+namespace App\SubForms;
+
+use Cubist\Backpack\app\Magic\SubForm;
+
+class Faq extends SubForm
+{
+
+
+ public function init()
+ {
+ parent::init();
+
+ $this->addField(['name' => 'question',
+ 'label' => 'Question',
+ 'type' => 'Textarea',
+ 'attributes' => [
+ 'rows' => 3,
+ ],
+ ]);
+
+ $this->addField(['name' => 'response',
+ 'label' => 'Réponse',
+ 'type' => 'Textarea',
+ 'attributes' => [
+ 'rows' => 3,
+ ],
+ ]);
+ }
+}
--- /dev/null
+<?php
+
+namespace App\SubForms;
+
+
+use Cubist\Backpack\app\Magic\SubForm;
+
+class OurSolutionsUSP extends SubForm
+{
+ public function init()
+ {
+ parent::init();
+
+ $this->addField(['name' => 'title',
+ 'label' => 'Titre',
+ 'type' => 'Text']);
+
+ $this->addField(['name' => 'text',
+ 'label' => 'Texte',
+ 'type' => 'Textarea',
+ 'attributes' => [
+ 'rows' => 10,
+ ]]);
+
+ $this->addField(['name' => 'image',
+ 'label' => 'Image',
+ 'type' => 'Images']);
+
+ $this->addField(['name' => 'page',
+ 'label' => 'Lien vers',
+ 'type' => 'PageInternal']);
+ }
+}
--- /dev/null
+<?php
+
+namespace App\SubForms;
+
+
+use Cubist\Backpack\app\Magic\SubForm;
+
+class TitleTextImage extends SubForm
+{
+ public function init()
+ {
+ parent::init();
+
+ $this->addField(['name' => 'title',
+ 'label' => 'Titre',
+ 'type' => 'Text']);
+
+ $this->addField(['name' => 'text',
+ 'label' => 'Texte',
+ 'type' => 'Textarea',
+ 'attributes' => [
+ 'rows' => 10,
+ ]]);
+
+ $this->addField(['name' => 'image',
+ 'label' => 'Image',
+ 'type' => 'Images']);
+ }
+}
'name' => 'form',
'type' => 'BunchOfFieldsMultiple',
'bunch' => 'App\SubForms\FormField',
+ 'edit_label'=>"%type",
'label' => 'Champs du formulaire',
'tab' => $tab,
]);
--- /dev/null
+<?php
+
+namespace App\Templates;
+
+use App\Models\Application;
+use App\Models\News;
+use Cubist\Backpack\app\Magic\PageData;
+
+class OurSolutions extends Base
+{
+
+ public function showInDropDown()
+ {
+ return true;
+ }
+
+ public function getName()
+ {
+ return 'Nos solutions';
+ }
+
+ public function init()
+ {
+ $this->addField(['name' => 'hero',
+ 'label' => 'Hero',
+ 'type' => 'BunchOfFields',
+ 'bunch' => 'App\SubForms\ImageBlock',
+ 'tab' => 'Hero bloc']);
+
+ parent::init();
+
+ $this->addField(['name' => 'intro',
+ 'label' => 'Introduction',
+ 'type' => 'BunchOfFields',
+ 'bunch' => 'App\SubForms\Intro',
+ 'tab' => 'Introduction']);
+
+ $this->addField(['name' => 'markets_title',
+ 'label' => 'Titre',
+ 'type' => 'BunchOfFields',
+ 'bunch' => 'App\SubForms\Intro',
+ 'tab' => 'Marchés cibles']);
+
+ $this->addField(['name' => 'markets',
+ 'label' => 'Marchés cibles',
+ 'type' => 'BunchOfFieldsMultiple',
+ 'bunch' => 'App\SubForms\ImageBlock',
+ 'edit_label'=>"%title",
+ 'tab' => 'Marchés cibles']);
+
+ $this->addField(['name' => 'usp_title',
+ 'label' => 'Titre',
+ 'type' => 'BunchOfFields',
+ 'bunch' => 'App\SubForms\Intro',
+ 'tab' => 'USP']);
+
+ $this->addField(['name' => 'usp_items',
+ 'label' => 'USP',
+ 'type' => 'BunchOfFieldsMultiple',
+ 'bunch' => 'App\SubForms\TitleTextImage',
+ 'edit_label'=>"%title",
+ 'tab' => 'USP']);
+
+ $this->addField(['name' => 'our_solutions_title',
+ 'label' => 'Titre',
+ 'type' => 'text',
+ 'tab' => 'Nos solutions']);
+
+ $this->addField(['name' => 'our_solutions_items',
+ 'label' => 'Marchés cibles',
+ 'type' => 'BunchOfFieldsMultiple',
+ 'bunch' => 'App\SubForms\OurSolutionsUSP',
+ 'edit_label'=>"%title",
+ 'tab' => 'Nos solutions']);
+
+ $this->addField(['name' => 'faqs',
+ 'label' => 'FAQs',
+ 'type' => 'BunchOfFieldsMultiple',
+ 'edit_label'=>"%question",
+ 'bunch' => 'App\SubForms\Faq',
+ 'tab' => 'FAQs']);
+
+ $this->addForm();
+ }
+
+ // Set extra data for Home blade view
+ public function setData(&$data)
+ {
+ // Latest News posts
+ $data['news'] = News::getPosts(4);
+ }
+
+}
$("#product-price-container, #features-quotes").removeClass("hidden")
})
+$(document).on("click", ".faq-container-item .faq-item", function() {
+ $(this).toggleClass("active")
+})
--- /dev/null
+.faq
+ &-container-item
+ +below(768px)
+ padding: 0 !important
+
+ &-item
+ border-bottom: 1px solid #BEC5D0
+ cursor: pointer
+ transition: all .3s
+
+ &.active
+ @apply pl-6
+ background-color: #fff
+
+ svg
+ transform: rotate(180deg)
+
+ svg
+ transition: transform .3s
+
+ .question
+ line-height: normal
+ +below(768px)
+ font-size: 17px
+
+ path
+ stroke: theme('colors.navy')
+
+ &-response
+ color: #6B7287
+ display: none
+ visibility: none
+ opacity: 0
+ transition: opacity .3s
+
+ .active &
+ display: block
+ visibility: visible
+ opacity: 1
--- /dev/null
+.hero
+
+ &-bg
+ position: absolute
+ width: 100%
+ height: 100%
+ left: 0
+ top: 0
+ background-repeat: no-repeat
+ background-size: cover
+ background-position: center
+ &:before
+ content: ""
+ background: linear-gradient(to right, theme('colors.navy'), transparent)
+ width: 100%
+ height: 100%
+ position: absolute
+
+ .text-block
+ position: relative
{{ $preTitle ?? '' }}
@isset($title)
- <{{ $titleTag }} class="{{ $titleClass }}">{{ $title }}</{{ $titleTag }}>
+ <{{ $titleTag }} class="{{ $titleClass }}">{!! nl2br($title) !!}</{{ $titleTag }}>
@endisset
<div class="text-block-body">
--- /dev/null
+@section('breadcrumbs')
+ {{-- Breadcrumbs disabled on home... --}}
+@endsection
+
+@extends('layouts/app')
+
+@section('content')
+
+ @php
+ $hero = $page->get('hero');
+ $image = $page->getImageURLByCollection($hero['image']);
+ $title = $hero['title'];
+ $text = $hero['text'];
+ @endphp
+
+ {{-- Hero Section --}}
+ <full-width padding="pt-2v pb-4v" class="bg-grey-100 text-white antialiased relative hero">
+ <content>
+ <div class="hero-bg" style="background-image: url({{$image}})"></div>
+ <text-block :title="$title" title-tag="h1" title-class="h1 text-inherit mb-0.75v">
+ <h2 class="text-3xl md:text-2xl font-semibold text-white">
+ {!! nl2br($text) !!}
+ </h2>
+ </text-block>
+ </content>
+ </full-width>
+
+ {{-- Intro block --}}
+ @php
+ $intro = $page->get('intro');
+ $title = $intro['title'];
+ $text = $intro['text'];
+ @endphp
+ <full-width class="">
+ <content>
+ <grid cols="2" class="md:grid-cols-1">
+ <div>
+ <div class="">
+ <img src="{{ $page->getImageURLByCollection($intro['image']) }}" />
+ </div>
+ </div>
+ <text-block class="p-0" title-class="h2 text-block-body" :title="$title" title-tag="h2">
+ <p>{!! $text !!}</p>
+ </text-block>
+ </grid>
+ </content>
+ </full-width>
+
+ {{-- Markets block --}}
+ @php
+ $markets = $page->get('markets_title');
+ $title = $markets['title'];
+ $text = $markets['text'];
+ @endphp
+ <full-width padding="py-3v" class="bg-grey-100 antialiased">
+ <content>
+ <text-block class="pb-16" title-class="h2" :title="$title">
+ <p class="text-block-body">{!! $text !!}</p>
+ </text-block>
+ <grid cols="4" class="sm:grid-cols-2 xs:grid-cols-1">
+ @foreach ($page->get('markets', []) as $market)
+ <div class="">
+ <div class="bg-cover mb-8" style="padding-bottom: 75.25%; background-image: url({{$page->getImageURLbyCollection($market['image'])}}) "></div>
+
+ <div class="">
+ <h4 class="text-2xl sm:text-xl">
+ {{ $market['title'] }}
+ </h4>
+ </div>
+ </div>
+ @endforeach
+ </grid>
+ </content>
+ </full-width>
+
+ {{-- --}}
+ @php
+ $usp = $page->get('usp_title');
+ $title = $usp['title'];
+ $text = $usp['text'];
+ @endphp
+ <full-width padding="py-3v" class="antialiased">
+ <content>
+ <text-block class="pb-16" title-class="h2" :title="$title">
+ <p class="text-block-body">{!! $text !!}</p>
+ </text-block>
+ <grid cols="3" class="sm:grid-cols-2 xs:grid-cols-1">
+ @foreach ($page->get('usp_items', []) as $item)
+ <div class="">
+ <div class="bg-cover mb-8" style="padding-bottom: 56.25%; background-image: url({{ $page->getImageURLbyCollection($item['image']) }})">
+ </div>
+
+ <div class="">
+ <h3 class="text-2xl sm:text-xl mb-4">
+ {{ $item['title'] }}
+ </h3>
+ <p>{{ $item['text'] }}</p>
+ </div>
+ </div>
+ @endforeach
+ </grid>
+ </content>
+ </full-width>
+
+ {{-- --}}
+ @php
+ $our_solutions_items = $page->get('our_solutions_items');
+ @endphp
+ <full-width padding="py-3v bg-navy text-white">
+ <content>
+ <text-block :title="__('Nos solutions')" title-class="h1 text-inherit" />
+ <grid cols="3" class="sm:grid-cols-2 xs:grid-cols-1">
+ @foreach ($our_solutions_items as $item)
+ <div class="">
+ <a href="{{ $nav->getHrefById($item['page']) }}">
+ <div class="bg-cover mb-8" style="padding-bottom: 56.25%; background-image: url({{ $page->getImageURLbyCollection($item['image']) }})">
+ </div>
+ </a>
+ <div class="">
+ <h3 class="text-2xl sm:text-xl text-white">
+ {{ $item['title'] }}
+ </h3>
+ <p>{{ $item['text'] }}</p>
+ <a href="{{ $nav->getHrefById($item['page']) }}">{{ __('Découvrir') }}</a>
+ </div>
+ </div>
+ @endforeach
+ </grid>
+ </content>
+ </full-width>
+
+ {{-- --}}
+ @if(count($news) > 0)
+ {{-- News --}}
+ <full-width>
+ <content>
+ <text-block :title="__('Actus Monitoring/IOT')"/>
+ <news-grid :items="$news" />
+ </content>
+ </full-width>
+ @endif
+
+ <full-width class="bg-grey-100 antialiased">
+ <content>
+ <text-block title="FAQs" />
+ @foreach($page->get('faqs') as $faq)
+ @if($faq['response'])
+ <div class="faq-container-item pl-2v">
+ <div class="faq-item py-8 pr-4">
+ <div class="question text-2xl text-navy font-semibold pb-2 flex justify-between align-center">
+ {{ $faq['question'] }}
+ @svg('arrow-down')
+ </div>
+ <span class="faq-response">{{ $faq['response'] }}</span>
+ </div>
+ </div>
+ @endif
+ @endforeach
+ </content>
+ </full-width>
+
+ {{-- --}}
+ <full-width padding="pt-2v pb-4v" class="antialiased">
+ <content>
+ <grid cols="auto" class="sm:grid-cols-1">
+
+ {{-- Nested divs to allow grey backgrounds of columns to match the height of their content instead of total height --}}
+ <div>
+ <text-block title="Besoin de surveiller votre infrastructure ? Contactez-nous" />
+ </div>
+
+ <div class="bg-grey-100 flex items-center justify-center">
+ <div class="bg-grey-100 p-1v">
+ @form
+ </div>
+ </div>
+
+ </grid>
+
+ </content>
+ </full-width>
+
+ {{-- --}}
+@endsection
</nav>
+ <pre style="display:none;">
+ @php( var_dump(CubistMenu::getNavigation()->getHrefByName('signin')) )
+ </pre>
+
<ul class="account-header relative">
<li class="{{ Route::currentRouteName() === "client" ? "active" : '' }}">
<a href="{{ Auth::guard('web-clients')->check() ? '#' : CubistMenu::getNavigation()->getHrefByName('signin') }}"
$title = \Illuminate\Support\Str::ucfirst($page->get("$name.title", $page->get("name")));
$title_tag = $title_tag ?? 'h1';
+ $title_class = isset($title_tag_class) ? $title_tag_class : 'h1';
$image = $page->getImageURL("$name.image",'',asset('storage/uploads/images/products-intro.jpg'));
$alt = $page->getImageAlt("$name.image",$title);
+ $title_class .= isset($overlap) ? " overlap-left" : "";
$class = $class ?? '';
$padding = $padding ?? null; // Pass null so it doesn't override default padding
$button = $page->get("$name.button");
</column>
<column>
- <text-block class="pt-2v" title-class="h1 overlap-left" :title="$title" :title-tag="$title_tag">
+ <text-block class="pt-2v" :title-class="$title_class" :title="$title" :title-tag="$title_tag">
<p>@markdown($page->get("$name.text"))</p>
@if ($button)