add search page

This commit is contained in:
Constantin Plaiasu 2024-08-28 01:03:34 +03:00
parent dc30424db9
commit 4c2f96ea6b
26 changed files with 169 additions and 148 deletions

View file

@ -30,7 +30,7 @@ public function index(ApiClient $api, TmdbClient $tmdb)
$meta['description'] = Str::limit(config('site.home.description'), 150);
$meta['full_description'] = config('site.home.description');
$meta['keywords'] = config('site.home.keywords', false);
$meta['image'] = asset('images/custom-icon.png');
$meta['image'] = asset('images/cover.jpg');
$nowplaying = $this->formatTmdbResponse($tmdb->getNowPlayingMovies(1), false, [], 12)['data'];
$upcoming = $this->formatTmdbResponse($tmdb->getUpcomingMovies(1), false, [], 12)['data'];
@ -62,7 +62,7 @@ public function homesearch()
$meta['description'] = Str::limit(config('site.homesearch.description'), 150);
$meta['full_description'] = config('site.homesearch.description');
$meta['keywords'] = config('site.homesearch.keywords', false);
$meta['image'] = asset('images/custom-icon.png');
$meta['image'] = asset('images/cover.jpg');
$content = config('site.homesearch.content');
@ -89,7 +89,7 @@ public function search(SearchRequest $request, TmdbClient $tmdb)
$meta['title'] = str(config('site.search.title'))->replace(['{QUERY}'], $query)->replace(['{PAGE}'], $page_text)->apa();
$meta['description'] = str(config('site.search.description'))->replace(['{QUERY}'], $query)->replace(['{PAGE}'], $page_text);
$meta['keywords'] = config('site.search.keywords', false);
$meta['image'] = asset('images/custom-icon.png');
$meta['image'] = asset('images/cover.jpg');
$meta['page_title'] = 'Search Results for: '. $query;
$meta['route'] = Route::current();
// dd($meta['route']);

View file

@ -64,7 +64,7 @@ public function movies( ApiClient $api, TmdbClient $tmdb, ?int $page = 1,)
$meta['page_title'] = config('site.movies.list.title', 'Popular Movies');
$meta['description'] = config('site.movies.list.description', 'Popular Movies');
$meta['keywords'] = config('site.movies.list.keywords');
$meta['image'] = asset('images/custom-icon.png');
$meta['image'] = asset('images/cover.jpg');
$meta['route'] = Route::current();
$pagination = $results['pagination'];
// dd($pagination);
@ -108,7 +108,7 @@ public function genres( ApiClient $api, TmdbClient $tmdb, string $genre, ?int $p
$meta['page_title'] = sprintf(config('site.movies.genres.title', 'Genre Movies'), $genre->name);
$meta['description'] = sprintf(config('site.movies.genres.description', 'Genre Movies'), $genre->name);
$meta['keywords'] = config('site.movies.genres.keywords', null);
$meta['image'] = asset('images/custom-icon.png');
$meta['image'] = asset('images/cover.jpg');
$meta['route'] = Route::current();
$pagination = $results['pagination'];
// dd($pagination);

View file

@ -160,7 +160,7 @@ public function shows( ApiClient $api, TmdbClient $tmdb, ?int $page = 1,)
$meta['page_title'] = config('site.shows.list.title', 'Popular Shows');
$meta['description'] = config('site.shows.list.description', 'Popular Shows');
$meta['keywords'] = config('site.shows.list.keywords', false);
$meta['image'] = asset('images/custom-icon.png');
$meta['image'] = asset('images/cover.jpg');
$meta['type'] = 'TV Shows';
$meta['route'] = Route::current();
$pagination = $results['pagination'];
@ -195,7 +195,7 @@ public function genres( ApiClient $api, TmdbClient $tmdb, string $genre, ?int $p
$meta['page_title'] = sprintf(config('site.shows.genres.title', 'Genre Shows'), $genre->name);
$meta['description'] = sprintf(config('site.shows.genres.description', 'Genre Shows'), $genre->name);
$meta['keywords'] = config('site.shows.genres.keywords');
$meta['image'] = asset('images/custom-icon.png');
$meta['image'] = asset('images/cover.jpg');
$meta['route'] = Route::current();
$pagination = $results['pagination'];
// dd($pagination);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1 @@
.hero__slider .slick-list{position:relative;display:block;overflow:hidden;margin:0;padding:0}.hero__slider .movie-slide{padding-top:50px;padding-bottom:50px;position:relative;z-index:1;min-height:695px;display:flex!important;flex-wrap:wrap;align-items:center;height:695px}.hero__slider .movie-slide:before{height:695px}@media (max-width: 1199px){.hero__slider .movie-slide{height:600px}}@media (max-width: 991px){.hero__slider .movie-slide{height:450px}}@media (max-width: 767px){.hero__slider .movie-slide{height:400px}}@media (max-width: 575px){.hero__slider .movie-slide{height:290px}}@media (max-width: 400px){.hero__slider .movie-slide{height:195px}}

View file

@ -1 +0,0 @@

View file

@ -1,6 +1,6 @@
{
"resources/js/app.js": {
"file": "assets/app-BaOZ0czw.js",
"file": "assets/app-CHq8Ct2h.js",
"name": "app",
"src": "resources/js/app.js",
"isEntry": true
@ -36,7 +36,7 @@
"isEntry": true
},
"resources/scss/app.scss": {
"file": "assets/app-CT5t3asE.css",
"file": "assets/app-eEoWVkwA.css",
"src": "resources/scss/app.scss",
"isEntry": true
},
@ -51,8 +51,7 @@
"isEntry": true
},
"resources/scss/home.scss": {
"file": "assets/home-l0sNRNKZ.js",
"name": "home",
"file": "assets/home-DeVdxQxW.css",
"src": "resources/scss/home.scss",
"isEntry": true
},

BIN
public/images/cover.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

View file

@ -26,6 +26,7 @@ $('.navbar-toggler').on('click', function (){
});
$('.nav-right__search-btn').on('click', function(){
$('.header-search-area').addClass('active');
$("input:text:visible:first").trigger('focus');
});
//close when click off of container
$(document).on('click', function (e){
@ -33,6 +34,9 @@ $('.nav-right__search-btn').on('click', function(){
$('.header-search-area').removeClass('active');
}
});
$(".search-bar > a").on("click", function () {
$(".header-top-search-area").slideToggle();
});
// mobile menu js
$(".navbar-collapse>ul>li>a, .navbar-collapse ul.sub-menu>li>a").on("click", function() {
@ -106,9 +110,7 @@ lazyLoading(); */
// "user strict";
// Search options
$(".search-bar > a").on("click", function () {
$(".header-top-search-area").slideToggle();
});
// })($);

View file

@ -1,13 +1,14 @@
img {
&.loaded {
opacity: 1!important;
transition: 0.6s ease-out!important;
}
&.lazy {
opacity: 0.6;
transition: 0.6s ease-out;
}
&.loaded {
opacity: 1;
transition: 0.6s ease-out;
}
}

View file

@ -1647,49 +1647,49 @@ a:hover {
}
}
.movie-slide {
padding-top: 50px;
padding-bottom: 50px;
position: relative;
z-index: 1;
min-height: 695px;
display: flex !important;
flex-wrap: wrap;
align-items: center;
}
// .movie-slide {
// padding-top: 50px;
// padding-bottom: 50px;
// position: relative;
// z-index: 1;
// min-height: 695px;
// display: flex !important;
// flex-wrap: wrap;
// align-items: center;
// }
@media (max-width: 1199px) {
.movie-slide {
min-height: auto;
height: 600px;
padding-top: 50px;
padding-bottom: 50px;
}
}
// @media (max-width: 1199px) {
// .movie-slide {
// min-height: auto;
// height: 600px;
// padding-top: 50px;
// padding-bottom: 50px;
// }
// }
@media (max-width: 991px) {
.movie-slide {
height: 450px;
}
}
// @media (max-width: 991px) {
// .movie-slide {
// height: 450px;
// }
// }
@media (max-width: 767px) {
.movie-slide {
height: 400px;
}
}
// @media (max-width: 767px) {
// .movie-slide {
// height: 400px;
// }
// }
@media (max-width: 575px) {
.movie-slide {
height: 290px;
}
}
// @media (max-width: 575px) {
// .movie-slide {
// height: 290px;
// }
// }
@media (max-width: 400px) {
.movie-slide {
height: 195px;
}
}
// @media (max-width: 400px) {
// .movie-slide {
// height: 195px;
// }
// }
.movie-slide:before {
position: absolute;
@ -1855,53 +1855,48 @@ a:hover {
}
}
.hero__slider img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center;
}
// .hero__slider img {
// width: 100%;
// height: 100%;
// object-fit: cover;
// object-position: center;
// }
.hero__slider .single-slide,
.hero__slider .single-slide a {
display: block;
height: 695px;
}
// .hero__slider .movie-slide {
// display: block;
// height: 695px;
// }
@media (max-width: 1199px) {
.hero__slider .single-slide,
.hero__slider .single-slide a {
height: 600px;
}
}
// @media (max-width: 1199px) {
// .hero__slider .movie-slide {
// height: 600px;
// }
// }
@media (max-width: 991px) {
.hero__slider .single-slide,
.hero__slider .single-slide a {
height: 450px;
}
}
// @media (max-width: 991px) {
// .hero__slider .movie-slide {
// height: 450px;
// }
// }
@media (max-width: 767px) {
.hero__slider .single-slide,
.hero__slider .single-slide a {
height: 400px;
}
}
// @media (max-width: 767px) {
// .hero__slider .movie-slide {
// height: 400px;
// }
// }
@media (max-width: 575px) {
.hero__slider .single-slide,
.hero__slider .single-slide a {
height: 290px;
}
}
// @media (max-width: 575px) {
// .hero__slider .movie-slide {
// height: 290px;
// }
// }
@media (max-width: 400px) {
.hero__slider .single-slide,
.hero__slider .single-slide a {
height: 195px;
}
}
// @media (max-width: 400px) {
// .hero__slider .movie-slide
// {
// height: 195px;
// }
// }
/* hero-section end */
/* inner-hero section css start */

View file

@ -0,0 +1,60 @@
.hero__slider {
.slick-list {
position: relative;
display: block;
overflow: hidden;
margin: 0;
padding: 0;
}
.movie-slide {
padding-top: 50px;
padding-bottom: 50px;
position: relative;
z-index: 1;
min-height: 695px;
display: flex!important;
flex-wrap: wrap;
align-items: center;
// display: block;
height: 695px;
&::before {
// display: none;
height: 695px;
}
}
}
@media (max-width: 1199px) {
.hero__slider .movie-slide {
height: 600px;
}
}
@media (max-width: 991px) {
.hero__slider .movie-slide {
height: 450px;
}
}
@media (max-width: 767px) {
.hero__slider .movie-slide {
height: 400px;
}
}
@media (max-width: 575px) {
.hero__slider .movie-slide {
height: 290px;
}
}
@media (max-width: 400px) {
.hero__slider .movie-slide
{
height: 195px;
}
}

View file

@ -2,7 +2,7 @@
<div class="@if(isset($is_list) && $is_list)col-xxl-2 @else col-xxl-3 @endif col-md-3 col-4 col-xs-6 mb-30">
<div class="movie-card" @isset($data_text) data-text="{{ $data_text }}"@else data-text="{{ ucfirst($item['route'] ?? $item['type']) }}" @endisset>
<div class="movie-card__thumb thumb__2">
<img @if($item['image'])class="lazy"@endif width="300" height="450" src="data:image/svg+xml,%3Csvg width='300' height='450' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='300' height='450' x='0' y='0' fill='%231B1B3F' /%3E%3C/svg%3E"" @if($item['image']) data-src="{{$item['image'] }}" @endif alt="{{ str($item['title'])->apa() }}">
<img @if($item['image'])class="lazy"@endif width="300" height="450" src="data:image/svg+xml,%3Csvg width='300' height='450' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='300' height='450' x='0' y='0' fill='%231B1B3F' /%3E%3C/svg%3E" @if($item['image']) data-src="{{$item['image'] }}" @endif alt="{{ str($item['title'])->apa() }}">
<a href="{{ route($item['route'] ?? $item['type'], ['id' => $item['id'], 'slug' => $item['slug']]) }}" title="{{ str($item['title'])->apa() }}" class="icon"><i class="fas fa-play"></i></a>
</div>
</div>

View file

@ -1,6 +1,9 @@
@extends('layouts.layout')
@push('head')
<style>
{!! Vite::content('resources/scss/home.scss') !!}
</style>
<link href="{{ asset('css/vendor/animate.min.css') }}" rel="stylesheet">
{{-- <link href="{{ asset('css/vendor/nice-select.css') }}" rel="stylesheet"> --}}
<link href="{{ asset('css/vendor/slick.css') }}" rel="stylesheet">
@ -20,7 +23,7 @@
</a>
</div>
@else --}}
<div class="movie-slide lazy bg_img" data-bg="{{ $slider['backdrop'] }}">
<div class="movie-slide lazy bg_img" data-bg="{{ $slider['backdrop'] }}" >
<div class="movie-slide__content">
<h2 class="movie-name" data-animation="fadeInUp" data-delay=".2s">{{ __($slider['title']) }}</h2>
<ul class="movie-meta justify-content-lg-start justify-content-center" data-animation="fadeInUp" data-delay=".4s">

View file

@ -5,9 +5,7 @@
@endforeach
@endsection
@section('head')
{{-- <link rel="preload" as="image" href="{{img_url('w1280', $movie['backdrop_path'], true, 400, 225 )}}" type="image/webp" media="(max-width: 575px)"> --}}
{{-- <link rel="preload" as="image" href="{{img_url('w1280', $movie['backdrop_path'], true, 400, 225 )}}" type="image/webp" media="(max-width: 575px)"> --}}
{{-- <link rel="preload" as="image" href="{{img_url('w1280', $movie['backdrop_path'], true, 400, 225 )}}" type="image/webp" media="(max-width: 575px)"> --}}
<link rel="preload" as="image" type="image/webp" href="{{img_url('w1280', $movie['backdrop_path'], true, 360, 200 )}}" imagesrcset="{{img_url('w1280', $movie['backdrop_path'], true, 360, 200 )}} 360w, {{img_url('w1280', $movie['backdrop_path'], true, 1280, 720 )}} 1280w" imagesizes="70vw, 100vw" fetchpriority="high" />
<style>
{!! Vite::content('resources/scss/watch.scss') !!}

View file

@ -48,40 +48,3 @@
@endpush
{{-- <div class="card my-4 border-0 shadow">
<div class="card-header bg-primary d-flex justify-content-between">
<h1 class="fs-5 fw-bold text-white text-uppercase mb-0">{{ $meta['page_title'] ?? $meta['title']}}</h1>
</div>
<div class="card-body">
@if(isset($data['movie']) && !empty($data['movie']))
<div class="row">
<span class="text-lg text-white text-center bg-primary py-2 fs-5 fw-semibold rounded">Movies</span>
<div class="row row-cols-2 row-cols-sm-4 row-cols-lg-6 row-cols-xl-8 g-4">
@foreach ($data['movie'] as $item)
@include('components.title_card')
@endforeach
</div>
</div>
@endif
@if(isset($data['show']) && !empty($data['show']))
<div class="row">
<span class="text-lg text-white text-center bg-primary py-2 fs-5 fw-semibold rounded mt-5">TV Shows</span>
<div class="row row-cols-2 row-cols-sm-4 row-cols-lg-6 row-cols-xl-8 g-4">
@foreach ($data['show'] as $item)
@include('components.title_card')
@endforeach
</div>
</div>
@endif
@if( (!isset($data['show']) || empty($data['show'])) && (!isset($data['movie']) || empty($data['movie'])) )
<div class="row">
<span class="text-lg text-white text-center bg-primary py-2 fs-5 fw-bold rounded">No Results</span>
</div>
@endif
</div>
</div> --}}

View file

@ -13,7 +13,7 @@
<div class="movie-card" data-text="@lang('Free')">
<div class="movie-card__thumb">
<img class="lazy-loading-img" data-lazy="{{$featured['image']}}" src="{{ asset('images/lazy.png') }}" alt="@lang('image')">
<img class="lazy" data-lazy="{{$featured['image']}}" src="data:image/svg+xml,%3Csvg width='300' height='450' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='300' height='450' x='0' y='0' fill='%231B1B3F' /%3E%3C/svg%3E" alt="@lang('image')">
<a class="icon" href="{{ route($featured['route'], ['id' => $featured['id'], 'slug' => $featured['slug']]) }}"><i class="fas fa-play"></i></a>
</div>
<div class="movie-card__content">

View file

@ -3,7 +3,7 @@
<div class="row align-items-center">
<div class="col-xl-5 col-lg-6">
<div class="single-movie-thumb">
<img class="lazy-loading-img lazy" data-src="{{ $item['backdrop'] }}" src="{{ asset('images/lazy_one.png') }}" alt="image">
<img class="lazy w-100" data-src="{{ $item['backdrop'] }}" src="data:image/svg+xml,%3Csvg width='780' height='439' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='780' height='439' x='0' y='0' fill='%231B1B3F' /%3E%3C/svg%3E" alt="image">
<a class="video-btn" href="{{ route($item['route'], ['id' => $item['id'], 'slug' => $item['slug']]) }}">
<div class="icon">
<i class="fas fa-play"></i>

View file

@ -9,7 +9,7 @@
@foreach ($col1_items as $trending)
<li class="movie-small">
<div class="movie-small__thumb">
<img class="lazy-loading-img lazy" data-src="{{ $trending['image'] }}" src="{{ asset('images/lazy.png') }}" alt="{{$trending['title']}}">
<img class="lazy" data-src="{{ $trending['image'] }}" src="data:image/svg+xml,%3Csvg width='780' height='450' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='300' height='450' x='0' y='0' fill='%231B1B3F' /%3E%3C/svg%3E" alt="{{$trending['title']}}">
</div>
<div class="movie-small__content">
<h5>{{$trending['title'] }}</h5>
@ -35,7 +35,7 @@
@foreach ($col2_items as $trending)
<li class="movie-small">
<div class="movie-small__thumb">
<img class="lazy-loading-img lazy" data-src="{{ $trending['image'] }}" src="{{ asset('images/lazy.png') }}" alt="{{$trending['title']}}">
<img class="lazy" data-src="{{ $trending['image'] }}" src="data:image/svg+xml,%3Csvg width='300' height='450' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='300' height='450' x='0' y='0' fill='%231B1B3F' /%3E%3C/svg%3E" alt="{{$trending['title']}}">
</div>
<div class="movie-small__content">
<h5>{{$trending['title'] }}</h5>
@ -56,7 +56,7 @@
<div class="col-xxl-6 col-xl-4">
<div class="single-movie">
<div class="single-movie__thumb">
<img class="w-100 lazy-loading-img lazy" data-src="{{ $item['backdrop'] }}" alt="{{$item['title']}}" ssrc="{{ asset('images/lazy_one.png') }}" style="opacity:50% !important">
<img class="w-100 lazy opacity-50" data-src="{{ $item['backdrop'] }}" alt="{{$item['title']}}" src="data:image/svg+xml,%3Csvg width='780' height='439' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='780' height='439' x='0' y='0' fill='%231B1B3F' /%3E%3C/svg%3E">
</div>
@if (@$trending_movies)
<a class="video-btn" href="{{ route($item['route'], ['id' => $item['id'], 'slug' => $item['slug']]) }}">

View file

@ -47,7 +47,7 @@ export default defineConfig({
templates: ['blade'],
safelist: {
deep: [/dropdown-menu$/, /navbar$/],
greedy: [/la-(long|facebook|linkedin|twitter|pinterest|plus-circle)/, /fa-(search|play)/, /show$/, /collapsing$/, /aos/, /data/, /reveal/, /show-filters/, /modal/, /collapsed/, /expand/, /slideout/, /^navbar/, /collapse/, /slick/, /prev/, /next/]
greedy: [/loaded/, /la-(long|facebook|linkedin|twitter|pinterest|plus-circle)/, /fa-(search|play)/, /show$/, /collapsing$/, /aos/, /data/, /reveal/, /show-filters/, /modal/, /collapsed/, /expand/, /slideout/, /^navbar/, /collapse/, /slick/, /prev/, /next/, /animated/, /menu-fixed/, /fadeInDown/]
},
})
],