Compare commits

...
Sign in to create a new pull request.

4 commits

Author SHA1 Message Date
Noah Lancien
5352c36b89 Fixed lang selector : now responsive 2023-06-08 17:08:15 +02:00
Vincent BRIDIER
998f7e0a8a Merge branch 'fixes' into 'develop'
404 PAGE

See merge request ldc-web/projets/nature-and-respect!19
2023-06-05 09:00:45 +00:00
Jérémy Munsch
568ebb9f2d
404 PAGE
- Add second layout as minimal for front (we have 2 to maintain)
- set links as optional  (Do not throw 404 from layout)
- Keep 404 as standard as possible
2023-06-05 09:38:33 +02:00
Jérémy Munsch
0468e10854
refresh sitemap config set only published elements 2023-06-05 09:17:38 +02:00
6 changed files with 117 additions and 54 deletions

View file

@ -57,7 +57,9 @@ return [
* ]
*
*/
'queryConditions' => [],
'queryConditions' => [
'status' => true,
],
/**
* The default route frequency to use with sitemap generator

View file

@ -0,0 +1,37 @@
<!DOCTYPE html>
<html dir="ltr" lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
@include('fo.layouts.head')
<meta name="p:domain_verify" content="5f89c5d6c41555aa17ff8d26cc6661f2" />
</head>
<body class="relative w-full min-h-screen font-roboto bg-hellgrau text-p lg:text-p-lg mt-[87px] scroll-smooth">
<a name="top" id="top"></a>
@include('fo.layouts.header')
@yield('content')
@include('fo.layouts.footer')
@include('fo.layouts.navigation')
@include('fo.vendor.ldcweb-cookies')
@stack('scripts-constants')
@include('modules.script-constants')
@stack('scripts')
@vite(['resources/ts/fo.ts'])
<script nonce="{{ $nonce }}">
let mobileMenuOpen = false;
function toggleMobileMenuOpen() {
mobileMenuOpen = !mobileMenuOpen;
const navMenu = document.getElementById('navigationModule');
navMenu.classList.toggle('hidden');
navMenu.classList.toggle('flex');
}
</script>
</body>
</html>

View file

@ -27,8 +27,10 @@
</ul>
</li>
<li class="mr-6 mb-4 relative">
@php $firstConcept = \App\Models\Concept::query()->firstOrFail(); @endphp
@php $firstConcept = \App\Models\Concept::query()->first(); @endphp
@if($firstConcept)
<a href="{{ route('concept.show', ['concept' => $firstConcept]) }}">{{ __('Our concept') }}</a>
@endif
<ul class="xinvisible xgroup-hover:visible pl-8 lg:pl-0 lg:absolute lg:left-0 lg:right-auto w-max pt-2">
@foreach ($conceptListGlobal as $concept)
<li class="mt-2">

View file

@ -13,7 +13,7 @@
@endpush
<a href="https://www.instagram.com/nature_and_respect/" class="hidden sm:inline-block mr-2 ml-[36px]" target="_blank"><img src="{{ Vite::asset('resources/assets/images/Icons/instagram-icon.svg') }}" alt="Instagram" class="w-8"></a>
<a href="https://www.pinterest.de/natureandrespect" class="hidden sm:inline-block mr-0" target="_blank"><img src="{{ Vite::asset('resources/assets/images/Icons/pinterest-icon.svg') }}" alt="Pinterest" class="w-8"></a>
<div class="ml-4 font-hobo text-p-lg">
<div class="ml-4 font-hobo text-p-lg hidden lg:inline-block">
@foreach (config('app.locales') as $locale)
@if (!$loop->first)
|

View file

@ -2,53 +2,63 @@
<nav class="main fixed top-0 left-0 z-[150] flex-col w-full h-screen font-semibold text-center bg-weiss p-0 hidden" id="navigationModule">
<div class="relative w-full h-screen max-w-7xl mx-auto text-braun flex items-center">
<a id="menu-burger-link-close" class="absolute right-10 top-[16px] sm:right-[144px] sm:top-[34px] font-hobo text-p-lg cursor-pointer inline-flex items-center"><img class="w-4 mr-4" src="{{ Vite::asset('resources/assets/images/Icons/menu-close.svg') }}"> {{ __('Menu') }}</a>
@push('scripts')
<script nonce="{{ $nonce }}">
document.addEventListener('DOMContentLoaded', function () {
document.getElementById('menu-burger-link-close').addEventListener('click', () => toggleMobileMenuOpen());
});
</script>
@endpush
<a href="">
<img src="{{ Vite::asset('resources/assets/images/Icons/logo-nature-respect.svg') }}" alt="{{ __('Unternehmenslogo') }}" class="w-16 sm:w-[120px] absolute left-0 right-0 mx-auto top-2 sm:top-6">
</a>
<a id="menu-burger-link-close" class="absolute right-10 top-[16px] sm:right-[144px] sm:top-[34px] font-hobo text-p-lg cursor-pointer inline-flex items-center"><img class="w-4 mr-4" src="{{ Vite::asset('resources/assets/images/Icons/menu-close.svg') }}"> {{ __('Menu') }}</a>
@push('scripts')
<script nonce="{{ $nonce }}">
document.addEventListener('DOMContentLoaded', function () {
document.getElementById('menu-burger-link-close').addEventListener('click', () => toggleMobileMenuOpen());
});
</script>
@endpush
<a href="">
<img src="{{ Vite::asset('resources/assets/images/Icons/logo-nature-respect.svg') }}" alt="{{ __('Unternehmenslogo') }}" class="w-16 sm:w-[120px] absolute left-0 right-0 mx-auto top-2 sm:top-6">
</a>
<ul id="frontend_menu" class="font-hobo text-left md:text-h3-md lg:text-h3-lg xl:text-h3 ml-6 md:ml-12">
<li class="mb-2 block leading-[180%] relative">
<a href="">{{ __('Home') }}</a>
</li>
<li class="mb-2 block leading-[180%] relative">
@php $concept = \App\Models\Concept::query()->firstOrFail(); @endphp
<a href="{{ route('concept.show', ['concept' => $concept]) }}">{{ __('Our concept') }}</a>
<ul class="pl-8 sm:absolute sm:top-0 sm:left-full sm:pl-24 w-max">
@foreach ($conceptListGlobal as $concept)
<li class="mb-2 block leading-[180%]">
<a class="block" href="{{ route('concept.show', ['concept' => $concept]) }}">{{ $concept->name }}</a>
</li>
@endforeach
</ul>
</li>
<li class="mb-2 block leading-[180%] relative">
<a href="{{ route('products.index') }}">{{ __('Our products') }}</a>
</li>
<li class="mb-2 block leading-[180%] relative">
<a href="{{ route('recipes.index') }}">{{ __('Our recipes') }}</a>
</li>
<li class="mb-2 block leading-[180%] relative">
<a href="{{ route('storefinder.index') }}">{{ __('Store finder') }}</a>
</li>
<li class="mb-2 block leading-[180%] relative">
<a href="{{ route('contact-form') }}">{{ __('Contact Us') }}</a>
</li>
</ul>
<ul id="frontend_menu" class="font-hobo text-left md:text-h3-md lg:text-h3-lg xl:text-h3 ml-6 md:ml-12">
<li class="mb-2 block leading-[180%] relative">
<a href="">{{ __('Home') }}</a>
</li>
<li class="mb-2 block leading-[180%] relative">
@php $concept = \App\Models\Concept::query()->first(); @endphp
@if($concept)
<a href="{{ route('concept.show', ['concept' => $concept]) }}">{{ __('Our concept') }}</a>
@endif
<ul class="pl-8 sm:absolute sm:top-0 sm:left-full sm:pl-24 w-max">
@foreach ($conceptListGlobal as $concept)
<li class="mb-2 block leading-[180%]">
<a class="block" href="{{ route('concept.show', ['concept' => $concept]) }}">{{ $concept->name }}</a>
</li>
@endforeach
</ul>
</li>
<li class="mb-2 block leading-[180%] relative">
<a href="{{ route('products.index') }}">{{ __('Our products') }}</a>
</li>
<li class="mb-2 block leading-[180%] relative">
<a href="{{ route('recipes.index') }}">{{ __('Our recipes') }}</a>
</li>
<li class="mb-2 block leading-[180%] relative">
<a href="{{ route('storefinder.index') }}">{{ __('Store finder') }}</a>
</li>
<li class="mb-2 block leading-[180%] relative">
<a href="{{ route('contact-form') }}">{{ __('Contact Us') }}</a>
</li>
</ul>
<div class="absolute bottom-8 right-8 flex items-center font-hobo">
{{ __('Follow us') }}
<div class="absolute bottom-16 right-8 flex items-center font-hobo">
{{ __('Follow us') }}
<a href="https://www.instagram.com/nature_and_respect/" class="inline-block mr-2 ml-5" target="_blank"><img src="{{ Vite::asset('resources/assets/images/Icons/instagram-icon.svg') }}" alt="Instagram" class="w-6"></a>
<a href="https://www.pinterest.de/natureandrespect" class="inline-block mr-0" target="_blank"><img src="{{ Vite::asset('resources/assets/images/Icons/pinterest-icon.svg') }}" alt="Pinterest" class="w-6"></a>
</div>
<a href="https://www.instagram.com/nature_and_respect/" class="inline-block mr-2 ml-5" target="_blank"><img src="{{ Vite::asset('resources/assets/images/Icons/instagram-icon.svg') }}" alt="Instagram" class="w-6"></a>
<a href="https://www.pinterest.de/natureandrespect" class="inline-block mr-0" target="_blank"><img src="{{ Vite::asset('resources/assets/images/Icons/pinterest-icon.svg') }}" alt="Pinterest" class="w-6"></a>
</div>
<div class="absolute bottom-8 right-8 font-hobo text-p-lg">
@foreach (config('app.locales') as $locale)
@if (!$loop->first)
|
@endif
<a href="{{ route('home', [], true, $locale) }}" class="@if (app()->currentLocale() === $locale) text-hellgruen @endif">{{ Str::upper($locale) }}</a>
@endforeach
</div>
</div>
</nav>

View file

@ -1,14 +1,26 @@
@extends('fo.layout-frame')
@php $nonce = $nonce ?? uniqid(); @endphp
@extends('fo.layout-minimal')
@section('title', __('Not Found'))
@section('description', __('Not Found'))
@section('code', '404')
@section('message', __('Not Found'))
@section('submessage', __('We could not find the page'))
@section('image')
<img src="{{ Vite::asset('resources/assets/images/Icons/404-grafik.svg') }}" class="inline max-w-sm w-full px-4" alt="{{ config('app.name') }}">
@endsection
@section('content')
<div class="mx-auto max-w-7xl py-6 px-4 sm:px-8 mb-24 mt-32 text-center pt-16 pb-16">
<img class="inline max-w-sm w-full px-4" src="{{ Vite::asset('resources/assets/images/Icons/404-grafik.svg') }}">
<h1 class="font-scarletwood text-hellgruen text-[100px] leading-[100px] mt-8">404</h1>
<p class="font-scarletwood text-hellgruen">{{ __('We could not find the page') }}</p>
<a href="/" class="button brown inline-flex items-center px-4 my-2 mt-12 mr-6 text-sm text-white">
<span>{{ __('Back to home page') }}</span>
@yield('image')
<h1 class="font-scarletwood text-hellgruen text-[100px] leading-[100px] mt-8">@yield('code', __('Oh no'))</h1>
<p class="font-scarletwood text-hellgruen">@yield('message')</p>
<p class="font-scarletwood text-hellgruen">@yield('submessage')</p>
<a href="{{ app('router')->has('home') ? route('home') : url('/') }}" class="button brown inline-flex items-center px-4 my-2 mt-12 mr-6 text-sm text-white">
<span>{{ __('Go to page :page', [
'page' => __('home')
]) }}</span>
</a>
</div>
@endsection