123 lines
5.9 KiB
PHP
123 lines
5.9 KiB
PHP
@extends('layouts.app', ['brParam' => $moment])
|
|
@section('title', $moment->title)
|
|
@section('description', $moment->description)
|
|
|
|
@section('breadcrumb', request()->route()->getName())
|
|
|
|
@section('sub_header')
|
|
<div class="sub_header sub_header_moment entete-white">
|
|
<div class="content">
|
|
<img src="{{ asset('assets/images/moments/logo-encemoment.png') }}" alt="{{ __('En ce moment') }} - Le Gaulois" class="img-moment-header">
|
|
<p class="title {{ $moment->color }}">{{ $moment->title }}</p>
|
|
<!-- TODO : GESTION IMG SI MOBILE -->
|
|
<img src="{{ asset($moment->picture_bg) }}" alt="{{ __('En ce moment') }} - Le Gaulois" class="img-cover">
|
|
</div>
|
|
</div>
|
|
@endsection
|
|
|
|
@section('content')
|
|
|
|
<div class="content moment">
|
|
<img src="{{ asset($moment->picture) }}" alt="{{ $moment->title }} - Le Gaulois" class="img-moment">
|
|
@if ($moment->strates()->count() > 0)
|
|
<section class="strates">
|
|
@foreach ($moment->strates as $strate)
|
|
<div class="strate-item">
|
|
{{-- TODO: Remove this inline js call --}}
|
|
<button class="scroll-button" onclick="__Gaul.scrollToContent('{{ 'strate-text-' . $loop->iteration }}', 70)"></button>
|
|
@if ($strate->picture)
|
|
<figure>
|
|
<span><img src="{{ asset($strate->picture) }}" alt="{{ $strate->title }} - Le Gaulois"></span>
|
|
<figcaption>{{ $strate->picture_label }}</figcaption>
|
|
</figure>
|
|
@endif
|
|
<div class="strate-text" id="strate-text-{{ $loop->iteration }}">
|
|
<h1>{{ $strate->title }}</h1>
|
|
{!! $strate->content !!}
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</section>
|
|
@endif
|
|
@if ($moment->featured_status === 1)
|
|
<section class="ascent">
|
|
<div class="ascent-content">
|
|
{{-- TODO: Remove this inline js call --}}
|
|
<button class="scroll-button" onclick="__Gaul.scrollToContent('title-ascent', 70)"></button>
|
|
<h1 id="title-ascent">{{ $moment->featured_title }}</h1>
|
|
{!! $moment->featured_text !!}
|
|
@if ($moment->featured_type === "produits")
|
|
<div class="ascent-products">
|
|
@else
|
|
<div class="ascent-objects">
|
|
@endif
|
|
@foreach ($featuredObjects as $object)
|
|
@if ($moment->featured_type === "recettes")
|
|
<a href="{{ route('recipe', $object->slug) }}">
|
|
@elseif ($moment->featured_type === "articles")
|
|
<a href="{{ route('club.infos.child', $object->slug) }}">
|
|
@elseif ($moment->featured_type === "produits")
|
|
<a href="{{ route('product.show', $object->slug) }}">
|
|
@endif
|
|
<figure>
|
|
<img src="{{ asset($object->picture) }}" alt="Le Gaulois">
|
|
<div class="hover-img">
|
|
@if ($moment->featured_type === "recettes")
|
|
{{__('Voir la\ recette !') }}
|
|
@elseif ($moment->featured_type === "articles")
|
|
{{__('Voir l\'article !') }}
|
|
@endif
|
|
</div>
|
|
</figure>
|
|
<p>{{ isset($object->title) ? $object->title : $object->name }}</p>
|
|
@if ($moment->featured_type === "produits")<span>{{ $object->description }}</span> @endif
|
|
</a>
|
|
@endforeach
|
|
</div>
|
|
<div class="ascent-btn">
|
|
@if ($moment->featured_type === "recettes")
|
|
<a href="{{ route('recipes.index') }}">{{ __('Toutes les recettes') }}</a>
|
|
@elseif ($moment->featured_type === "articles")
|
|
<a href="{{ route('club.index') }}">{{ __('Tous les articles') }}</a>
|
|
@elseif ($moment->featured_type === "produits")
|
|
<a href="{{ route('products.index') }}">{{ __('Tous les produits') }}</a>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</section>
|
|
@endif
|
|
@if ($moment->voucher_status === 1)
|
|
<section class="voucher">
|
|
{{-- TODO: Remove this inline js call --}}
|
|
<button class="scroll-button" onclick="__Gaul.scrollToContent('voucher-content', 70)"></button>
|
|
<div class="voucher-content">
|
|
<figure class="voucher-picture" id="voucher-content">
|
|
<img src="{{ asset('assets/images/moments/lebonplan-moment.png') }}" alt="{{ __('Bon plan') }} - Le Gaulois">
|
|
</figure>
|
|
<figure class="voucher-picture">
|
|
<a href="{{ auth('customer')->check() ? route('club.reductions') : route('form-connexion') }}" class="link-voucher">
|
|
<img src="{{ asset($moment->voucher_picture) }}" alt="{{ $moment->title }} - Le Gaulois" class="img-voucher">
|
|
</a>
|
|
</figure>
|
|
</div>
|
|
</section>
|
|
@endif
|
|
@if (count($otherMoments) > 0)
|
|
<section class="other-moments">
|
|
<h2>{{ __('Découvrez aussi') }}</h2>
|
|
<div>
|
|
@foreach ($otherMoments as $om)
|
|
<figure>
|
|
<a href="{{ route('moment', $om->slug) }}">
|
|
<img src="{{ asset($om->picture) }}" alt="{{ $om->title }} - Le Gaulois" class="img-item">
|
|
<p class="{{ $om->color }}">{{ $om->title }}</p>
|
|
<p>{{ Str::limit($om->description, 80) }}</p>
|
|
</a>
|
|
</figure>
|
|
@endforeach
|
|
</div>
|
|
</section>
|
|
@endif
|
|
</div>
|
|
|
|
@endsection
|