Update cover pages

This commit is contained in:
DariusIII
2025-10-04 11:39:05 +02:00
parent a80c4f26b9
commit e0124ed0f7
8 changed files with 760 additions and 110 deletions
+26 -33
View File
@@ -12,7 +12,7 @@ class AdultController extends BasePageController
/**
* @throws \Exception
*/
public function show(Request $request, string $id = ''): void
public function show(Request $request, string $id = '')
{
$this->setPreferences();
$adult = new XXX;
@@ -37,10 +37,6 @@ class AdultController extends BasePageController
$catarray = [];
$catarray[] = $category;
$this->smarty->assign('catlist', $mtmp);
$this->smarty->assign('category', $category);
$this->smarty->assign('categorytitle', $id);
$ordering = $adult->getXXXOrdering();
$orderby = $request->has('ob') && \in_array($request->input('ob'), $ordering, false) ? $request->input('ob') : '';
@@ -58,54 +54,51 @@ class AdultController extends BasePageController
}
$title = ($request->has('title') && ! empty($request->input('title'))) ? stripslashes($request->input('title')) : '';
$this->smarty->assign('title', stripslashes($title));
$actors = ($request->has('actors') && ! empty($request->input('actors'))) ? stripslashes($request->input('actors')) : '';
$this->smarty->assign('actors', $actors);
$director = ($request->has('director') && ! empty($request->input('director'))) ? stripslashes($request->input('director')) : '';
$this->smarty->assign('director', $director);
$genres = $adult->getAllGenres(true);
$genre = ($request->has('genre') && \in_array($request->input('genre'), $genres, false)) ? $request->input('genre') : '';
$this->smarty->assign('genres', $genres);
$this->smarty->assign('genre', $genre);
$browseby_link = '&title='.$title.'&actors='.$actors.'&director='.$director.'&genre='.$genre;
$browseby_link = '&title='.$title.'&actors='.$actors.'&director='.$director.'&genre='.$genre;
if ((int) $category === -1) {
$this->smarty->assign('catname', 'All');
$catname = 'All';
} else {
$cdata = Category::find($category);
if ($cdata !== null) {
$this->smarty->assign('catname', $cdata);
$catname = $cdata->title;
} else {
$this->smarty->assign('catname', 'All');
$catname = 'All';
}
}
// Build order by URLs
$orderByUrls = [];
foreach ($ordering as $ordertype) {
$this->smarty->assign('orderby'.$ordertype, url('/xxx?t='.$category.$browseby_link.'&ob='.$ordertype.'&offset=0'));
$orderByUrls['orderby'.$ordertype] = url('/XXX/' . ($id ?: 'All') . '?t='.$category.$browseby_link.'&ob='.$ordertype.'&offset=0');
}
$this->smarty->assign(
[
'resultsadd' => $movies,
'results' => $results,
'covgroup' => 'xxx',
]
);
$this->viewData = array_merge($this->viewData, [
'catlist' => $mtmp,
'category' => $category,
'categorytitle' => $id,
'catname' => $catname,
'title' => stripslashes($title),
'actors' => $actors,
'director' => $director,
'genres' => $genres,
'genre' => $genre,
'resultsadd' => $movies,
'results' => $results,
'covgroup' => 'xxx',
'meta_title' => 'Browse XXX',
'meta_keywords' => 'browse,xxx,nzb,description,details',
'meta_description' => 'Browse for XXX Movies',
], $orderByUrls);
$meta_title = 'Browse XXX';
$meta_keywords = 'browse,xxx,nzb,description,details';
$meta_description = 'Browse for XXX Movies';
if ($request->has('id')) {
$content = $this->smarty->fetch('viewxxxfull.tpl');
} else {
$content = $this->smarty->fetch('xxx.tpl');
}
$this->smarty->assign(compact('content', 'meta_title', 'meta_keywords', 'meta_description'));
$this->pagerender();
return view('xxx.index', $this->viewData);
}
}
+23 -26
View File
@@ -12,7 +12,7 @@ class BooksController extends BasePageController
/**
* @throws \Exception
*/
public function index(Request $request, string $id = ''): void
public function index(Request $request, string $id = '')
{
$this->setPreferences();
$book = new Books(['Settings' => $this->settings]);
@@ -39,10 +39,6 @@ class BooksController extends BasePageController
$catarray = [];
$catarray[] = $category;
$this->smarty->assign('catlist', $btmp);
$this->smarty->assign('category', $category);
$this->smarty->assign('categorytitle', $id);
$ordering = $book->getBookOrdering();
$orderby = $request->has('ob') && \in_array($request->input('ob'), $ordering, false) ? $request->input('ob') : '';
@@ -64,42 +60,43 @@ class BooksController extends BasePageController
}
$author = ($request->has('author') && ! empty($request->input('author'))) ? stripslashes($request->input('author')) : '';
$this->smarty->assign('author', $author);
$title = ($request->has('title') && ! empty($request->input('title'))) ? stripslashes($request->input('title')) : '';
$this->smarty->assign('title', $title);
$browseby_link = '&title='.$title.'&author='.$author;
$browseby_link = '&title='.$title.'&author='.$author;
if ((int) $category === -1) {
$this->smarty->assign('catname', 'All');
$catname = 'All';
} else {
$cdata = Category::find($category);
if ($cdata !== null) {
$this->smarty->assign('catname', $cdata);
$catname = $cdata->title;
} else {
$this->smarty->assign('catname', 'All');
$catname = 'All';
}
}
// Build order by URLs
$orderByUrls = [];
foreach ($ordering as $ordertype) {
$this->smarty->assign('orderby'.$ordertype, url('/books?t='.$category.$browseby_link.'&ob='.$ordertype.'&offset=0'));
$orderByUrls['orderby'.$ordertype] = url('/Books/' . ($id ?: 'All') . '?t='.$category.$browseby_link.'&ob='.$ordertype.'&offset=0');
}
$this->smarty->assign(
[
'resultsadd' => $books,
'results' => $results,
'covgroup' => 'books',
]
);
$this->viewData = array_merge($this->viewData, [
'catlist' => $btmp,
'category' => $category,
'categorytitle' => $id,
'catname' => $catname,
'author' => $author,
'title' => $title,
'resultsadd' => $books,
'results' => $results,
'covgroup' => 'books',
'meta_title' => 'Browse Books',
'meta_keywords' => 'browse,nzb,books,description,details',
'meta_description' => 'Browse for Books',
], $orderByUrls);
$meta_title = 'Browse Books';
$meta_keywords = 'browse,nzb,books,description,details';
$meta_description = 'Browse for Books';
$content = $this->smarty->fetch('books.tpl');
$this->smarty->assign(compact('content', 'meta_title', 'meta_keywords', 'meta_description'));
$this->pagerender();
return view('books.index', $this->viewData);
}
}
+25 -22
View File
@@ -12,7 +12,7 @@ class GamesController extends BasePageController
/**
* @throws \Exception
*/
public function show(Request $request): void
public function show(Request $request)
{
$this->setPreferences();
$games = new Games(['Settings' => $this->settings]);
@@ -31,9 +31,6 @@ class GamesController extends BasePageController
$catarray = [];
$catarray[] = $category;
$this->smarty->assign('catlist', $ctmp);
$this->smarty->assign('category', $category);
$page = $request->has('page') && is_numeric($request->input('page')) ? $request->input('page') : 1;
$ordering = $games->getGamesOrdering();
$orderby = $request->has('ob') && \in_array($request->input('ob'), $ordering, false) ? $request->input('ob') : '';
@@ -42,7 +39,6 @@ class GamesController extends BasePageController
$results = $this->paginate($rslt ?? [], $rslt[0]->_totalcount ?? 0, config('nntmux.items_per_cover_page'), $page, $request->url(), $request->query());
$title = ($request->has('title') && ! empty($request->input('title'))) ? stripslashes($request->input('title')) : '';
$this->smarty->assign('title', $title);
$genres = $gen->getGenres(Genres::GAME_TYPE, true);
$tmpgnr = [];
@@ -53,35 +49,42 @@ class GamesController extends BasePageController
$years = range(1903, date('Y') + 1);
rsort($years);
$year = ($request->has('year') && \in_array($request->input('year'), $years, false)) ? $request->input('year') : '';
$this->smarty->assign('years', $years);
$this->smarty->assign('year', $year);
$genre = ($request->has('genre') && array_key_exists($request->input('genre'), $tmpgnr)) ? $request->input('genre') : '';
$this->smarty->assign('genres', $genres);
$this->smarty->assign('genre', $genre);
if ((int) $category === -1) {
$this->smarty->assign('catname', 'All');
$catname = 'All';
} else {
$cdata = Category::find($category);
if ($cdata !== null) {
$this->smarty->assign('catname', $cdata);
$catname = $cdata->title;
} else {
$this->smarty->assign('catname', 'All');
$catname = 'All';
}
}
$this->smarty->assign('results', $results);
$this->smarty->assign('covgroup', 'games');
// Build order by URLs
$orderByUrls = [];
foreach ($ordering as $orderType) {
$orderByUrls['orderby'.$orderType] = url('Games?ob='.$orderType);
}
$meta_title = 'Browse Games';
$meta_keywords = 'browse,nzb,games,description,details';
$meta_description = 'Browse for Games';
$this->viewData = array_merge($this->viewData, [
'catlist' => $ctmp,
'category' => $category,
'catname' => $catname,
'title' => $title,
'genres' => $genres,
'genre' => $genre,
'years' => $years,
'year' => $year,
'results' => $results,
'covgroup' => 'games',
'meta_title' => 'Browse Games',
'meta_keywords' => 'browse,nzb,games,description,details',
'meta_description' => 'Browse for Games',
], $orderByUrls);
$content = $this->smarty->fetch('games.tpl');
$this->smarty->assign(
compact('content', 'meta_title', 'meta_keywords', 'meta_description')
);
$this->pagerender();
return view('games.index', $this->viewData);
}
}
+28 -29
View File
@@ -13,7 +13,7 @@ class MusicController extends BasePageController
/**
* @throws \Exception
*/
public function show(Request $request, string $id = ''): void
public function show(Request $request, string $id = '')
{
$this->setPreferences();
$music = new Music(['Settings' => $this->settings]);
@@ -41,10 +41,6 @@ class MusicController extends BasePageController
$catarray = [];
$catarray[] = $category;
$this->smarty->assign('catlist', $mtmp);
$this->smarty->assign('category', $category);
$this->smarty->assign('categorytitle', $id);
$page = $request->has('page') && is_numeric($request->input('page')) ? $request->input('page') : 1;
$offset = ($page - 1) * config('nntmux.items_per_cover_page');
$ordering = $music->getMusicOrdering();
@@ -55,10 +51,8 @@ class MusicController extends BasePageController
$results = $this->paginate($rslt ?? [], $rslt[0]->_totalcount ?? 0, config('nntmux.items_per_cover_page'), $page, $request->url(), $request->query());
$artist = ($request->has('artist') && ! empty($request->input('artist'))) ? stripslashes($request->input('artist')) : '';
$this->smarty->assign('artist', $artist);
$title = ($request->has('title') && ! empty($request->input('title'))) ? stripslashes($request->input('title')) : '';
$this->smarty->assign('title', $title);
$genres = $gen->getGenres(Genres::MUSIC_TYPE, true);
$tmpgnr = [];
@@ -73,42 +67,47 @@ class MusicController extends BasePageController
}
$genre = ($request->has('genre') && array_key_exists($request->input('genre'), $tmpgnr)) ? $request->input('genre') : '';
$this->smarty->assign('genres', $genres);
$this->smarty->assign('genre', $genre);
$years = range(1950, date('Y') + 1);
rsort($years);
$year = ($request->has('year') && \in_array($request->input('year'), $years, false)) ? $request->input('year') : '';
$this->smarty->assign('years', $years);
$this->smarty->assign('year', $year);
if ((int) $category === -1) {
$this->smarty->assign('catname', 'All');
$catname = 'All';
} else {
$cdata = Category::find($category);
if ($cdata !== null) {
$this->smarty->assign('catname', $cdata);
$catname = $cdata->title;
} else {
$this->smarty->assign('catname', 'All');
$catname = 'All';
}
}
$this->smarty->assign(
[
'resultsadd' => $musics,
'results' => $results,
'covgroup' => 'music',
]
);
// Build order by URLs
$orderByUrls = [];
foreach ($ordering as $orderType) {
$orderByUrls['orderby'.$orderType] = url('music/' . ($id ?: 'All') . '?ob='.$orderType);
}
$meta_title = 'Browse Albums';
$meta_keywords = 'browse,nzb,albums,description,details';
$meta_description = 'Browse for Albums';
$this->viewData = array_merge($this->viewData, [
'catlist' => $mtmp,
'category' => $category,
'categorytitle' => $id,
'catname' => $catname,
'artist' => $artist,
'title' => $title,
'genres' => $genres,
'genre' => $genre,
'years' => $years,
'year' => $year,
'resultsadd' => $musics,
'results' => $results,
'covgroup' => 'music',
'meta_title' => 'Browse Albums',
'meta_keywords' => 'browse,nzb,albums,description,details',
'meta_description' => 'Browse for Albums',
], $orderByUrls);
$content = $this->smarty->fetch('music.tpl');
$this->smarty->assign(compact('content', 'meta_title', 'meta_keywords', 'meta_description'));
$this->pagerender();
return view('music.index', $this->viewData);
}
}
+152
View File
@@ -0,0 +1,152 @@
@extends('layouts.main')
@section('content')
<div class="bg-white rounded-lg shadow-sm">
<!-- Breadcrumb -->
<div class="px-6 py-4 border-b border-gray-200">
<nav aria-label="breadcrumb">
<ol class="flex items-center space-x-2 text-sm text-gray-600">
<li><a href="{{ url($site->home_link ?? '/') }}" class="hover:text-blue-600">Home</a></li>
<li><i class="fas fa-chevron-right text-xs mx-2"></i></li>
<li><a href="{{ url('/browse/Books') }}" class="hover:text-blue-600">Books</a></li>
@if(!empty($categorytitle) && $categorytitle !== 'All')
<li><i class="fas fa-chevron-right text-xs mx-2"></i></li>
<li class="text-gray-500">{{ $categorytitle }}</li>
@endif
</ol>
</nav>
</div>
<div class="px-6 py-4">
<!-- Search Filters -->
<div class="bg-gray-50 rounded-lg p-4 mb-6">
<form method="get" action="{{ url('/Books/' . ($categorytitle ?: 'All')) }}">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
<!-- Author Filter -->
<div>
<label for="author" class="block text-sm font-medium text-gray-700 mb-1">Author</label>
<input type="text"
id="author"
name="author"
value="{{ $author ?? '' }}"
placeholder="Search by author"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
</div>
<!-- Title Filter -->
<div>
<label for="title" class="block text-sm font-medium text-gray-700 mb-1">Title</label>
<input type="text"
id="title"
name="title"
value="{{ $title ?? '' }}"
placeholder="Search by title"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
</div>
<!-- Category Filter -->
<div>
<label for="category" class="block text-sm font-medium text-gray-700 mb-1">Category</label>
<select id="category"
name="t"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
<option value="">All Categories</option>
@foreach($catlist ?? [] as $cat)
<option value="{{ $cat['id'] }}" {{ ($category ?? '') == $cat['id'] ? 'selected' : '' }}>
{{ $cat['title'] }}
</option>
@endforeach
</select>
</div>
</div>
<div class="mt-4 flex gap-2">
<button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700">
<i class="fa fa-search mr-2"></i>Search
</button>
<a href="{{ url('/Books/' . ($categorytitle ?: 'All')) }}" class="px-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300">
<i class="fa fa-times mr-2"></i>Clear
</a>
</div>
</form>
</div>
<!-- Results -->
@if(count($results) > 0)
<div class="mb-4 flex justify-between items-center">
<h2 class="text-xl font-semibold text-gray-800">
<i class="fa fa-book mr-2 text-blue-600"></i>
{{ $catname ?? 'All' }} Books
</h2>
<span class="text-sm text-gray-600">
{{ $results->total() }} results found
</span>
</div>
<!-- Books Grid -->
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-4 mb-6">
@foreach($resultsadd as $result)
<div class="bg-white border border-gray-200 rounded-lg overflow-hidden hover:shadow-lg transition-shadow duration-200">
<a href="{{ url('/details/' . $result->guid) }}" class="block">
@if(!empty($result->cover))
<img src="{{ url('/covers/book/' . $result->cover) }}"
alt="{{ $result->title ?? $result->searchname }}"
class="w-full h-64 object-cover"
onerror="this.src='{{ url('/images/no-cover.png') }}'">
@else
<div class="w-full h-64 bg-gray-200 flex items-center justify-center">
<i class="fa fa-book text-4xl text-gray-400"></i>
</div>
@endif
<div class="p-3">
<h3 class="font-semibold text-sm text-gray-800 line-clamp-2 mb-1" title="{{ $result->title ?? $result->searchname }}">
{{ $result->title ?? $result->searchname }}
</h3>
@if(!empty($result->author))
<p class="text-xs text-gray-600 truncate mb-1" title="{{ $result->author }}">
{{ $result->author }}
</p>
@endif
@if(!empty($result->publishdate))
<p class="text-xs text-gray-500">{{ date('Y', strtotime($result->publishdate)) }}</p>
@endif
@if(!empty($result->overview))
<p class="text-xs text-gray-500 mt-2 line-clamp-3">{{ $result->overview }}</p>
@endif
</div>
</a>
<div class="px-3 pb-3 flex gap-1">
<a href="{{ url('/getnzb?id=' . $result->guid) }}"
class="flex-1 px-2 py-1 bg-green-600 text-white text-xs rounded hover:bg-green-700 text-center"
title="Download NZB">
<i class="fa fa-download"></i>
</a>
<a href="{{ url('/details/' . $result->guid) }}"
class="flex-1 px-2 py-1 bg-blue-600 text-white text-xs rounded hover:bg-blue-700 text-center"
title="View Details">
<i class="fa fa-info-circle"></i>
</a>
</div>
</div>
@endforeach
</div>
<!-- Pagination -->
<div class="flex justify-center">
{{ $results->links() }}
</div>
@else
<!-- No Results -->
<div class="bg-yellow-50 border border-yellow-200 rounded-lg p-8 text-center">
<i class="fa fa-book text-yellow-600 text-5xl mb-4"></i>
<h3 class="text-xl font-semibold text-gray-800 mb-2">No books found</h3>
<p class="text-gray-600 mb-4">Try adjusting your search filters or browse all books.</p>
<a href="{{ url('/Books/All') }}" class="inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">
<i class="fa fa-book mr-2"></i> Browse All Books
</a>
</div>
@endif
</div>
</div>
@endsection
+173
View File
@@ -0,0 +1,173 @@
@extends('layouts.main')
@section('content')
<div class="bg-white rounded-lg shadow-sm">
<!-- Breadcrumb -->
<div class="px-6 py-4 border-b border-gray-200">
<nav aria-label="breadcrumb">
<ol class="flex items-center space-x-2 text-sm text-gray-600">
<li><a href="{{ url($site->home_link ?? '/') }}" class="hover:text-blue-600">Home</a></li>
<li><i class="fas fa-chevron-right text-xs mx-2"></i></li>
<li><a href="{{ url('/browse/PC') }}" class="hover:text-blue-600">PC</a></li>
@if(!empty($catname) && $catname !== 'All')
<li><i class="fas fa-chevron-right text-xs mx-2"></i></li>
<li class="text-gray-500">{{ $catname }}</li>
@endif
</ol>
</nav>
</div>
<div class="px-6 py-4">
<!-- Search Filters -->
<div class="bg-gray-50 rounded-lg p-4 mb-6">
<form method="get" action="{{ url('/Games') }}">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
<!-- Category Filter -->
<div>
<label for="category" class="block text-sm font-medium text-gray-700 mb-1">Category</label>
<select id="category"
name="t"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
<option value="">All Categories</option>
@foreach($catlist ?? [] as $cat)
<option value="{{ $cat['id'] }}" {{ ($category ?? '') == $cat['id'] ? 'selected' : '' }}>
{{ $cat['title'] }}
</option>
@endforeach
</select>
</div>
<!-- Title Filter -->
<div>
<label for="title" class="block text-sm font-medium text-gray-700 mb-1">Title</label>
<input type="text"
id="title"
name="title"
value="{{ $title ?? '' }}"
placeholder="Search by title"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
</div>
<!-- Genre Filter -->
<div>
<label for="genre" class="block text-sm font-medium text-gray-700 mb-1">Genre</label>
<select id="genre"
name="genre"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
<option value="">All Genres</option>
@foreach($genres ?? [] as $g)
<option value="{{ $g->id }}" {{ ($genre ?? '') == $g->id ? 'selected' : '' }}>
{{ $g->title }}
</option>
@endforeach
</select>
</div>
<!-- Year Filter -->
<div>
<label for="year" class="block text-sm font-medium text-gray-700 mb-1">Year</label>
<select id="year"
name="year"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
<option value="">All Years</option>
@foreach($years ?? [] as $y)
<option value="{{ $y }}" {{ ($year ?? '') == $y ? 'selected' : '' }}>
{{ $y }}
</option>
@endforeach
</select>
</div>
</div>
<div class="mt-4 flex gap-2">
<button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700">
<i class="fa fa-search mr-2"></i>Search
</button>
<a href="{{ url('/Games') }}" class="px-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300">
<i class="fa fa-times mr-2"></i>Clear
</a>
</div>
</form>
</div>
<!-- Results -->
@if(count($results) > 0)
<div class="mb-4 flex justify-between items-center">
<h2 class="text-xl font-semibold text-gray-800">
<i class="fa fa-gamepad mr-2 text-blue-600"></i>
{{ $catname ?? 'All' }} Games
</h2>
<span class="text-sm text-gray-600">
{{ $results->total() }} results found
</span>
</div>
<!-- Games Grid -->
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-4 mb-6">
@foreach($results as $result)
<div class="bg-white border border-gray-200 rounded-lg overflow-hidden hover:shadow-lg transition-shadow duration-200">
<a href="{{ url('/details/' . $result->guid) }}" class="block">
@if(!empty($result->cover))
<img src="{{ url('/covers/games/' . $result->cover) }}"
alt="{{ $result->title ?? $result->searchname }}"
class="w-full h-48 object-cover"
onerror="this.src='{{ url('/images/no-cover.png') }}'">
@else
<div class="w-full h-48 bg-gray-200 flex items-center justify-center">
<i class="fa fa-gamepad text-4xl text-gray-400"></i>
</div>
@endif
<div class="p-3">
<h3 class="font-semibold text-sm text-gray-800 truncate" title="{{ $result->title ?? $result->searchname }}">
{{ $result->title ?? $result->searchname }}
</h3>
@if(!empty($result->publisher))
<p class="text-xs text-gray-600 truncate" title="{{ $result->publisher }}">
{{ $result->publisher }}
</p>
@endif
@if(!empty($result->releasedate))
<p class="text-xs text-gray-500 mt-1">{{ date('Y', strtotime($result->releasedate)) }}</p>
@elseif(!empty($result->year))
<p class="text-xs text-gray-500 mt-1">{{ $result->year }}</p>
@endif
@if(!empty($result->platform))
<p class="text-xs text-blue-600 mt-1 truncate">{{ $result->platform }}</p>
@endif
</div>
</a>
<div class="px-3 pb-3 flex gap-1">
<a href="{{ url('/getnzb?id=' . $result->guid) }}"
class="flex-1 px-2 py-1 bg-green-600 text-white text-xs rounded hover:bg-green-700 text-center"
title="Download NZB">
<i class="fa fa-download"></i>
</a>
<a href="{{ url('/details/' . $result->guid) }}"
class="flex-1 px-2 py-1 bg-blue-600 text-white text-xs rounded hover:bg-blue-700 text-center"
title="View Details">
<i class="fa fa-info-circle"></i>
</a>
</div>
</div>
@endforeach
</div>
<!-- Pagination -->
<div class="flex justify-center">
{{ $results->links() }}
</div>
@else
<!-- No Results -->
<div class="bg-yellow-50 border border-yellow-200 rounded-lg p-8 text-center">
<i class="fa fa-gamepad text-yellow-600 text-5xl mb-4"></i>
<h3 class="text-xl font-semibold text-gray-800 mb-2">No games found</h3>
<p class="text-gray-600 mb-4">Try adjusting your search filters or browse all games.</p>
<a href="{{ url('/Games') }}" class="inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">
<i class="fa fa-gamepad mr-2"></i> Browse All Games
</a>
</div>
@endif
</div>
</div>
@endsection
+166
View File
@@ -0,0 +1,166 @@
@extends('layouts.main')
@section('content')
<div class="bg-white rounded-lg shadow-sm">
<!-- Breadcrumb -->
<div class="px-6 py-4 border-b border-gray-200">
<nav aria-label="breadcrumb">
<ol class="flex items-center space-x-2 text-sm text-gray-600">
<li><a href="{{ url($site->home_link ?? '/') }}" class="hover:text-blue-600">Home</a></li>
<li><i class="fas fa-chevron-right text-xs mx-2"></i></li>
<li><a href="{{ url('/browse/Audio') }}" class="hover:text-blue-600">Audio</a></li>
@if(!empty($categorytitle) && $categorytitle !== 'All')
<li><i class="fas fa-chevron-right text-xs mx-2"></i></li>
<li class="text-gray-500">{{ $categorytitle }}</li>
@endif
</ol>
</nav>
</div>
<div class="px-6 py-4">
<!-- Search Filters -->
<div class="bg-gray-50 rounded-lg p-4 mb-6">
<form method="get" action="{{ url('/browse/Audio/' . ($categorytitle ?: 'All')) }}">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
<!-- Artist Filter -->
<div>
<label for="artist" class="block text-sm font-medium text-gray-700 mb-1">Artist</label>
<input type="text"
id="artist"
name="artist"
value="{{ $artist ?? '' }}"
placeholder="Search by artist"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
</div>
<!-- Title Filter -->
<div>
<label for="title" class="block text-sm font-medium text-gray-700 mb-1">Title</label>
<input type="text"
id="title"
name="title"
value="{{ $title ?? '' }}"
placeholder="Search by title"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
</div>
<!-- Genre Filter -->
<div>
<label for="genre" class="block text-sm font-medium text-gray-700 mb-1">Genre</label>
<select id="genre"
name="genre"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
<option value="">All Genres</option>
@foreach($genres ?? [] as $g)
<option value="{{ $g->id }}" {{ ($genre ?? '') == $g->id ? 'selected' : '' }}>
{{ $g->title }}
</option>
@endforeach
</select>
</div>
<!-- Year Filter -->
<div>
<label for="year" class="block text-sm font-medium text-gray-700 mb-1">Year</label>
<select id="year"
name="year"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
<option value="">All Years</option>
@foreach($years ?? [] as $y)
<option value="{{ $y }}" {{ ($year ?? '') == $y ? 'selected' : '' }}>
{{ $y }}
</option>
@endforeach
</select>
</div>
</div>
<div class="mt-4 flex gap-2">
<button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700">
<i class="fa fa-search mr-2"></i>Search
</button>
<a href="{{ url('/browse/Audio/' . ($categorytitle ?: 'All')) }}" class="px-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300">
<i class="fa fa-times mr-2"></i>Clear
</a>
</div>
</form>
</div>
<!-- Results -->
@if(count($results) > 0)
<div class="mb-4 flex justify-between items-center">
<h2 class="text-xl font-semibold text-gray-800">
<i class="fa fa-music mr-2 text-blue-600"></i>
{{ $catname ?? 'All' }} Albums
</h2>
<span class="text-sm text-gray-600">
{{ $results->total() }} results found
</span>
</div>
<!-- Album Grid -->
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-4 mb-6">
@foreach($resultsadd as $result)
<div class="bg-white border border-gray-200 rounded-lg overflow-hidden hover:shadow-lg transition-shadow duration-200">
<a href="{{ url('/details/' . $result->guid) }}" class="block">
@if(!empty($result->cover))
<img src="{{ url('/covers/music/' . $result->cover) }}"
alt="{{ $result->artist ?? '' }} - {{ $result->title ?? '' }}"
class="w-full h-48 object-cover"
onerror="this.src='{{ url('/images/no-cover.png') }}'">
@else
<div class="w-full h-48 bg-gray-200 flex items-center justify-center">
<i class="fa fa-music text-4xl text-gray-400"></i>
</div>
@endif
<div class="p-3">
<h3 class="font-semibold text-sm text-gray-800 truncate" title="{{ $result->title ?? $result->searchname }}">
{{ $result->title ?? $result->searchname }}
</h3>
<p class="text-xs text-gray-600 truncate" title="{{ $result->artist ?? '' }}">
{{ $result->artist ?? 'Unknown Artist' }}
</p>
@if(!empty($result->year))
<p class="text-xs text-gray-500 mt-1">{{ $result->year }}</p>
@endif
@if(!empty($result->genre))
<p class="text-xs text-blue-600 mt-1 truncate">{{ $result->genre }}</p>
@endif
</div>
</a>
<div class="px-3 pb-3 flex gap-1">
<a href="{{ url('/getnzb?id=' . $result->guid) }}"
class="flex-1 px-2 py-1 bg-green-600 text-white text-xs rounded hover:bg-green-700 text-center"
title="Download NZB">
<i class="fa fa-download"></i>
</a>
<a href="{{ url('/details/' . $result->guid) }}"
class="flex-1 px-2 py-1 bg-blue-600 text-white text-xs rounded hover:bg-blue-700 text-center"
title="View Details">
<i class="fa fa-info-circle"></i>
</a>
</div>
</div>
@endforeach
</div>
<!-- Pagination -->
<div class="flex justify-center">
{{ $results->links() }}
</div>
@else
<!-- No Results -->
<div class="bg-yellow-50 border border-yellow-200 rounded-lg p-8 text-center">
<i class="fa fa-music text-yellow-600 text-5xl mb-4"></i>
<h3 class="text-xl font-semibold text-gray-800 mb-2">No albums found</h3>
<p class="text-gray-600 mb-4">Try adjusting your search filters or browse all music.</p>
<a href="{{ url('/browse/Audio/All') }}" class="inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">
<i class="fa fa-music mr-2"></i> Browse All Audio
</a>
</div>
@endif
</div>
</div>
@endsection
+167
View File
@@ -0,0 +1,167 @@
@extends('layouts.main')
@section('content')
<div class="bg-white rounded-lg shadow-sm">
<!-- Breadcrumb -->
<div class="px-6 py-4 border-b border-gray-200">
<nav aria-label="breadcrumb">
<ol class="flex items-center space-x-2 text-sm text-gray-600">
<li><a href="{{ url($site->home_link ?? '/') }}" class="hover:text-blue-600">Home</a></li>
<li><i class="fas fa-chevron-right text-xs mx-2"></i></li>
<li><a href="{{ url('/browse/XXX') }}" class="hover:text-blue-600">XXX</a></li>
@if(!empty($categorytitle) && $categorytitle !== 'All')
<li><i class="fas fa-chevron-right text-xs mx-2"></i></li>
<li class="text-gray-500">{{ $categorytitle }}</li>
@endif
</ol>
</nav>
</div>
<div class="px-6 py-4">
<!-- Search Filters -->
<div class="bg-gray-50 rounded-lg p-4 mb-6">
<form method="get" action="{{ url('/XXX/' . ($categorytitle ?: 'All')) }}">
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
<!-- Title Filter -->
<div>
<label for="title" class="block text-sm font-medium text-gray-700 mb-1">Title</label>
<input type="text"
id="title"
name="title"
value="{{ $title ?? '' }}"
placeholder="Search by title"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
</div>
<!-- Actors Filter -->
<div>
<label for="actors" class="block text-sm font-medium text-gray-700 mb-1">Actors</label>
<input type="text"
id="actors"
name="actors"
value="{{ $actors ?? '' }}"
placeholder="Search by actors"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
</div>
<!-- Director Filter -->
<div>
<label for="director" class="block text-sm font-medium text-gray-700 mb-1">Director</label>
<input type="text"
id="director"
name="director"
value="{{ $director ?? '' }}"
placeholder="Search by director"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
</div>
<!-- Genre Filter -->
<div>
<label for="genre" class="block text-sm font-medium text-gray-700 mb-1">Genre</label>
<select id="genre"
name="genre"
class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-blue-500 focus:border-blue-500">
<option value="">All Genres</option>
@foreach($genres ?? [] as $g)
<option value="{{ $g }}" {{ ($genre ?? '') == $g ? 'selected' : '' }}>
{{ $g }}
</option>
@endforeach
</select>
</div>
</div>
<div class="mt-4 flex gap-2">
<button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded-md hover:bg-blue-700">
<i class="fa fa-search mr-2"></i>Search
</button>
<a href="{{ url('/XXX/' . ($categorytitle ?: 'All')) }}" class="px-4 py-2 bg-gray-200 text-gray-700 rounded-md hover:bg-gray-300">
<i class="fa fa-times mr-2"></i>Clear
</a>
</div>
</form>
</div>
<!-- Results -->
@if(count($results) > 0)
<div class="mb-4 flex justify-between items-center">
<h2 class="text-xl font-semibold text-gray-800">
<i class="fa fa-film mr-2 text-blue-600"></i>
{{ $catname ?? 'All' }} XXX
</h2>
<span class="text-sm text-gray-600">
{{ $results->total() }} results found
</span>
</div>
<!-- XXX Grid -->
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6 gap-4 mb-6">
@foreach($resultsadd as $result)
<div class="bg-white border border-gray-200 rounded-lg overflow-hidden hover:shadow-lg transition-shadow duration-200">
<a href="{{ url('/details/' . $result->guid) }}" class="block">
@if(!empty($result->cover))
<img src="{{ url('/covers/xxx/' . $result->cover) }}"
alt="{{ $result->title ?? $result->searchname }}"
class="w-full h-48 object-cover"
onerror="this.src='{{ url('/images/no-cover.png') }}'">
@else
<div class="w-full h-48 bg-gray-200 flex items-center justify-center">
<i class="fa fa-film text-4xl text-gray-400"></i>
</div>
@endif
<div class="p-3">
<h3 class="font-semibold text-sm text-gray-800 line-clamp-2 mb-1" title="{{ $result->title ?? $result->searchname }}">
{{ $result->title ?? $result->searchname }}
</h3>
@if(!empty($result->releasedate))
<p class="text-xs text-gray-500">{{ date('Y', strtotime($result->releasedate)) }}</p>
@elseif(!empty($result->year))
<p class="text-xs text-gray-500">{{ $result->year }}</p>
@endif
@if(!empty($result->genre))
<div class="text-xs text-blue-600 mt-1 line-clamp-1">
{!! $result->genre !!}
</div>
@endif
@if(!empty($result->director))
<div class="text-xs text-gray-600 mt-1 line-clamp-1" title="Director">
<i class="fa fa-user-circle mr-1"></i>{!! $result->director !!}
</div>
@endif
</div>
</a>
<div class="px-3 pb-3 flex gap-1">
<a href="{{ url('/getnzb?id=' . $result->guid) }}"
class="flex-1 px-2 py-1 bg-green-600 text-white text-xs rounded hover:bg-green-700 text-center"
title="Download NZB">
<i class="fa fa-download"></i>
</a>
<a href="{{ url('/details/' . $result->guid) }}"
class="flex-1 px-2 py-1 bg-blue-600 text-white text-xs rounded hover:bg-blue-700 text-center"
title="View Details">
<i class="fa fa-info-circle"></i>
</a>
</div>
</div>
@endforeach
</div>
<!-- Pagination -->
<div class="flex justify-center">
{{ $results->links() }}
</div>
@else
<!-- No Results -->
<div class="bg-yellow-50 border border-yellow-200 rounded-lg p-8 text-center">
<i class="fa fa-film text-yellow-600 text-5xl mb-4"></i>
<h3 class="text-xl font-semibold text-gray-800 mb-2">No content found</h3>
<p class="text-gray-600 mb-4">Try adjusting your search filters or browse all content.</p>
<a href="{{ url('/XXX/All') }}" class="inline-flex items-center px-4 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700">
<i class="fa fa-film mr-2"></i> Browse All XXX
</a>
</div>
@endif
</div>
</div>
@endsection