ldc-groupe/resources/views/front/pages/search.blade.php

38 lines
No EOL
2.2 KiB
PHP

@extends('front.layouts.layout')
@section('title', trans('front.search.seo_title', ['terms' => $searchTerm]))
@section('description', trans('front.search.seo_description'))
@section('content')
<div class="search-page fw">
@include('front.breadcrumbs.breadcrumb-body')
<div class="search-page__wrapper wrapper">
<h1 id="search-global-count" class="search-results-count subtitle">
{{ trans('front.search.results_total', [
'nbr' => 0,
'terms' => $searchTerm,
]) }}
</h1>
<form class="form search-form" id="searchform" method="get" action="{{ route('front.search') }}">
<div class="search-form__wrapper">
<div class="search-form__field">
<input class="search-form__input form__input" type="text" name="{{ trans('front.search.query') }}"
placeholder="{{ trans('front.search.placeholder')}}" value="{{ $searchTerm }}">
</div>
<button class="search-form__btn" type="submit">
<img class="search-form__btn-icon" src="/assets/img/search-icon_white.png" alt="{{ trans('front.search.trans')}}">
</button>
</div>
@error(trans('front.search.query'))
<div class="form__error">{{ $message }}</div>
@enderror
</form>
<h3 class="subtitle">{{ str(trans_choice('models.classes.news', \INF))->ucFirst() }}</h3>
<x-front.search.content :class="\App\Models\News::class" :searchTerm="$searchTerm" wrapperId="news" />
<h3 class="subtitle">{{ str(trans_choice('models.classes.dynamic-page', \INF))->ucFirst() }}</h3>
<x-front.search.content :class="\App\Models\DynamicPage::class" :searchTerm="$searchTerm" wrapperId="dynamicpages" />
<h3 class="subtitle">{{ str(trans_choice('models.classes.document', \INF))->ucFirst() }}</h3>
<x-front.search.content :class="\App\Models\Document::class" :searchTerm="$searchTerm" wrapperId="documents" />
</div>
</div>
@endsection