Compare commits

...

7 Commits

Author SHA1 Message Date
Valentin Lab
7887e2d532 new: make all forms have a cancel/save button on the top also 2025-12-13 21:43:40 +01:00
Valentin Lab
f92e175731 fix: prevent error 500 upon displaying empty 'Rayons' 2025-12-13 21:43:40 +01:00
Valentin Lab
6bb910bb54 fix: make 'Rayons' title adaptable to screen width 2025-12-13 21:43:40 +01:00
Valentin Lab
1db3725fb2 new: make the menu visible on mobile 2025-12-13 21:43:40 +01:00
Valentin Lab
ebdf0c0d8e fix: repair tinymce implementation 2025-12-13 20:10:19 +01:00
Valentin Lab
22ebcb102f fix: prevent error message about missing css 2025-12-13 20:09:56 +01:00
Valentin Lab
cc3d4d3e32 chg: put article description after variety description on product public page 2025-12-13 18:21:37 +01:00
16 changed files with 197 additions and 56 deletions

View File

@@ -57,6 +57,7 @@ RUN chmod +x artisan
RUN ./artisan vendor:publish --tag=public --force ## creates public/vendor/jsvalidation
RUN ./artisan vendor:publish --tag=boilerplate-public --force --ansi ## creates public/vendor/boilerplate
RUN ./artisan vendor:publish --tag=datatables-buttons --force --ansi ## creates public/vendor/datatables/buttons
RUN ./artisan vendor:publish --tag=lfm_public --force --ansi
## XXXvlab: 2025-09-25 these migration files are breaking first
## install, but we had to resolve to not install from scratch and use

View File

@@ -178,10 +178,18 @@ class Articles
$articles = self::getArticlesWithOffers($options);
$searchOrder = $options['ids'] ?? false ? array_flip($options['ids']->toArray()) : false;
foreach ($articles as $article) {
// Skip articles without an offer/tariff/price list for the resolved sale channel
if (!isset($article->offers[0]) || ! $article->offers[0]->tariff) {
continue;
}
$price_lists = $article->offers[0]->tariff->price_lists->toArray();
if (! count($price_lists)) {
continue;
}
if (empty($price_lists[0]['price_list_values'][0] ?? null)) {
continue;
}
if (! is_array($data[$article->name] ?? false)) {
$data[$article->name] = self::getDataForSale($article);
if ($searchOrder) {

View File

@@ -112,3 +112,17 @@ body {
.bg-darker {
background-color: rgba(0,0,0,0.05)!important;
}
/* Header action buttons aligned with page title */
.content-header .form-buttons {
margin-left: 12px;
}
.content-header .form-buttons .btn {
height: 32px;
display: inline-flex;
align-items: center;
padding-top: 4px;
padding-bottom: 4px;
line-height: 1.1;
}

View File

@@ -311,6 +311,52 @@ div.megamenu ul.megamenu li.megamenu.level1
}
.category-title {
font-size: 2em;
}
.category-description {
font-size: 1.2em;
}
.breadcrumb-title {
font-size: 1.6em;
}
.breadcrumb-current {
font-size: 1em;
}
@media (max-width: 767.98px){
.category-title {
font-size: 1.5em;
}
.category-description {
font-size: 1.05em;
}
.breadcrumb-title {
font-size: 1.4em;
}
.breadcrumb-current {
font-size: 0.95em;
}
}
@media (max-width: 575.98px){
.category-title {
font-size: 1.35em;
}
.category-description {
font-size: 0.95em;
}
.breadcrumb-title {
font-size: 1.2em;
}
.breadcrumb-current {
font-size: 0.9em;
}
}
@font-face {
font-family: 'noto_sanscondensed';
src: url('/fonts/notosans-condensed/notosans-condensed-webfont.eot');
@@ -348,4 +394,40 @@ div.megamenu ul.megamenu li.megamenu.level1
.dropdown-menu > li:hover > .submenu{
display: block;
}
}
}
@media (max-width: 991.98px){
#navbarContentMobile .navbar-nav {
flex-direction: column;
}
#navbarContentMobile .navbar-nav .col {
flex: 0 0 100%;
max-width: 100%;
}
#navbarContentMobile .dropdown-menu {
display: block;
position: static;
float: none;
box-shadow: none;
background: transparent;
}
#navbarContentMobile .dropdown-toggle::after {
display: none;
}
#navbarContentMobile .dropdown-menu .container,
#navbarContentMobile .dropdown-menu .row {
margin: 0;
}
#navbarContentMobile .dropdown-menu .shadow {
box-shadow: none !important;
}
.category-card .card-body {
font-size: 0.75rem;
}
/* Supprimer les grandes marges du container en affichage mobile/tablette */
.container {
max-width: 100%;
}
}

View File

@@ -32,12 +32,14 @@ $(document).on('click', '.dropdown-menu', function (e) {
// make it as accordion for smaller screens
if ($(window).width() < 992) {
$('.dropdown-menu a').click(function(e) {
e.preventDefault();
if ($(this).next('.submenu').length) {
$(this).next('.submenu').toggle();
var $submenu = $(this).next('.submenu');
if ($submenu.length) {
e.preventDefault();
$submenu.toggle();
}
$('.dropdown').on('hide.bs.dropdown', function () {
$(this).find('.submenu').hide();
});
});
$('.dropdown').on('hide.bs.dropdown', function () {
$(this).find('.submenu').hide();
});
}

View File

@@ -18,9 +18,9 @@
</div>
</div>
<div class="col-lg-5 col-xs-12 text-justify">
{!! $article['description']['variety'] ?? null !!}
{!! $article['description']['semences'] ?? null !!}
{!! $article['description']['plants'] ?? null !!}
{!! $article['description']['variety'] ?? null !!}
{!! $article['description']['merchandise'] ?? null !!}
@if ($article['description']['plus'] ?? false)

View File

@@ -1,8 +1,6 @@
<h1 style="font-size: 1.5em;">
<h1 class="breadcrumb-title">
@foreach($breadcrumb ?? [] as $parent)
<a href="{{ route('Shop.Categories.show', ['id' => $parent['id']]) }}" style="text-decoration: none; color: inherit;">{{ $parent['name'] }}</a> /
<a href="{{ route('Shop.Categories.show', ['id' => $parent['id']]) }}" class="breadcrumb-link">{{ $parent['name'] }}</a> /
@endforeach
<span style="font-size: 1.4em;">
{{ $category['name'] }}
</span>
<span class="breadcrumb-current">{{ $category['name'] }}</span>
</h1>

View File

@@ -1,7 +1,7 @@
<div class="row">
<div class="col-8">
<h1 style="font-size: 2em;">{{ $category['name'] }}</h1>
<h3 style="font-size: 1.2em;">{!! $category['description'] !!}</h3>
<h1 class="category-title">{{ $category['name'] }}</h1>
<h3 class="category-description">{!! $category['description'] !!}</h3>
</div>
<div class="col-4">
@include('Shop.layout.partials.category_add')
@@ -12,4 +12,4 @@
<div class="col-12">
@include('Shop.layout.partials.category_articles')
</div>
</div>
</div>

View File

@@ -1,7 +1,7 @@
<div class="row">
<div class="row mx-n1">
@if ($articles ?? false)
@foreach ($articles as $product_name => $article)
<div class="col-lg-3 col-xs-12 mb-3">
<div class="category-card col-6 col-md-4 col-lg-3 mb-2 px-1">
@include('Shop.Articles.partials.article')
</div>
@endforeach
@@ -46,4 +46,3 @@
});
</script>
@endpush

View File

@@ -1,18 +1,28 @@
<div class="row bg-light">
<div class="row bg-light align-items-center">
<div class="col-sm-12 col-lg-5">
<div class="col-6 col-lg-5 d-flex align-items-center">
<a href="/"><img src="/img/logo.png" height="52" alt="Jardin'Envie"></a>
<span class="green ml-3">Variétés Paysannes de la Semence à l'Assiette</span>
<span class="green ml-3 d-none d-md-inline">Variétés Paysannes de la Semence à l'Assiette</span>
</div>
<div class="col-sm-12 col-lg-4 pt-2">
<div class="col-12 col-lg-4 pt-2 order-3 order-lg-2">
@include('Shop.layout.partials.search')
</div>
<div class="col-sm-12 col-lg-3 pt-2 text-right">
<div class="col-6 col-lg-3 pt-2 text-right order-2 order-lg-3 d-flex justify-content-end align-items-center">
@include('Shop.layout.partials.header-catalog')
@include('Shop.layout.partials.header-profile')
@include('Shop.layout.partials.header-basket')
</div>
</div>
<div class="row d-lg-none bg-green-dark">
<div class="col-12 p-0">
<div class="collapse" id="navbarContentMobile">
<nav class="navbar navbar-dark p-0">
@include('Shop.layout.partials.sections-menu-list')
</nav>
</div>
</div>
</div>

View File

@@ -10,6 +10,13 @@
<div class="input-group-append">
<span class="input-group-text"><i class="btn btn-sm fa fa-search"></i></span>
</div>
<div class="input-group-append d-lg-none">
<button class="navbar-toggler navbar-light" type="button" data-toggle="collapse"
data-target="#navbarContentMobile" aria-controls="navbarContentMobile" aria-expanded="false"
aria-label="Menu catégories">
<span class="navbar-toggler-icon"></span>
</button>
</div>
</div>
</form>

View File

@@ -0,0 +1,19 @@
<ul class="navbar-nav w-100">
@foreach ($categories as $menu)
<li class="nav-item dropdown megamenu p-2 col
@if (in_array($menu['id'], [$category['id'] ?? false, $category['parent_id'] ?? false, $category['parent']['parent_id'] ?? false])) active @endif">
@if ($menu['children'] ?? false)
<a id="megamenu_{{ $menu['id'] }}" href="{{ route('Shop.Categories.show', ['id' => $menu['id']]) }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link dropdown-toggle text-uppercase">
{{ $menu['name'] }}
</a>
<div aria-labelledby="megamenu_{{ $menu['id'] }}" class="dropdown-menu border-0 p-0 m-0">
@include('Shop.layout.partials.megamenu')
</div>
@else
<a href="{{ route('Shop.Categories.show', ['id' => $menu['id']]) }}" class="nav-link text-uppercase text-white">
{{ $menu['name'] }}
</a>
@endif
</li>
@endforeach
</ul>

View File

@@ -1,27 +1,9 @@
<div class="row mb-3 bg-green-dark">
<div class="row mb-3 bg-green-dark d-none d-lg-block">
<div class="col-12 pl-0 pr-0">
<nav class="navbar navbar-expand-lg p-0">
<div class="collapse navbar-collapse" id="navbarContent">
<ul class="navbar-nav w-100">
@foreach ($categories as $menu)
<li class="nav-item dropdown megamenu p-2 col
@if (in_array($menu['id'], [$category['id'] ?? false, $category['parent_id'] ?? false, $category['parent']['parent_id'] ?? false])) active @endif">
@if ($menu['children'] ?? false)
<a id="megamenu_{{ $menu['id'] }}" href="{{ route('Shop.Categories.show', ['id' => $menu['id']]) }}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="nav-link dropdown-toggle text-uppercase">
{{ $menu['name'] }}
</a>
<div aria-labelledby="megamenu_{{ $menu['id'] }}" class="dropdown-menu border-0 p-0 m-0">
@include('Shop.layout.partials.megamenu')
</div>
@else
<a href="{{ route('Shop.Categories.show', ['id' => $menu['id']]) }}" class="nav-link text-uppercase text-white">
{{ $menu['name'] }}
</a>
@endif
</li>
@endforeach
</ul>
<nav class="navbar navbar-expand-lg navbar-dark p-0">
<div class="navbar-collapse show" id="navbarContent">
@include('Shop.layout.partials.sections-menu-list')
</div>
</nav>
</div>
</div>
</div>

View File

@@ -1,7 +1,23 @@
@php
$cancelUrl = $cancel_url ?? $cancelUrl ?? null;
@endphp
@push('header-actions')
<div class="form-buttons d-flex align-items-center ml-3">
@include('components.form.buttons.button-cancel', [
'class' => 'btn-sm mr-2',
'url' => $cancelUrl,
])
@include('components.form.buttons.button-save', [
'class' => 'btn-sm',
])
</div>
@endpush
<div class="row pt-0 pb-3">
<div class="col-12">
<div class="text-right form-buttons">
@include('components.form.buttons.button-cancel')
@include('components.form.buttons.button-cancel', ['url' => $cancelUrl])
@include('components.form.buttons.button-save')
</div>
</div>

View File

@@ -1,13 +1,16 @@
<div class="content-header pt-2 pb-1">
<div class="container-fluid">
<div class="row mb-2 align-items-end">
<div class="row mb-2 align-items-center">
<div class="col-sm-6">
<h1 class="m-0 text-dark">
{{ $title ?? null}}
@isset($subtitle)
<small class="font-weight-light ml-1 text-md">{{ $subtitle }}</small>
@endisset
</h1>
<div class="d-flex align-items-center flex-wrap">
<h1 class="m-0 text-dark d-flex align-items-center">
{{ $title ?? null}}
@isset($subtitle)
<small class="font-weight-light ml-1 text-md">{{ $subtitle }}</small>
@endisset
</h1>
@stack('header-actions')
</div>
</div>
<div class="col-sm-6">
<ol class="breadcrumb float-sm-right text-sm">

View File

@@ -39,7 +39,7 @@
''); // Empty tags
},
skin: "oxide",
content_css: 'oxide',
content_css: 'default',
language: '{{ App::getLocale() }}',
file_picker_callback: function(callback, value, meta) {
var x = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName(