Files
newznab-tmux/resources/views/movies/trending.blade.php
T
2026-03-06 15:41:54 +01:00

167 lines
10 KiB
PHP

@extends('layouts.main')
@section('content')
<div class="surface-panel rounded-xl shadow-sm">
<x-breadcrumb :items="[
['label' => 'Home', 'url' => url($site['home_link'] ?? '/'), 'icon' => 'fas fa-home'],
['label' => 'Movies', 'url' => route('Movies')],
['label' => 'Trending'],
]" />
<!-- Header -->
<div class="px-6 py-6 bg-primary-600 text-white">
<div class="flex items-center justify-between">
<div>
<h1 class="text-3xl font-bold mb-2">
<i class="fas fa-fire mr-2"></i>Trending Movies
</h1>
<p class="text-primary-100">Most downloaded movies in the last 48 hours - Updated every hour</p>
</div>
<div class="text-right flex gap-2">
@if(auth()->check())
<a href="{{ url('/rss/trending-movies?dl=1&api_token=' . auth()->user()->api_token) }}" class="inline-flex items-center px-4 py-2 bg-primary-700 hover:bg-primary-800 text-white rounded-lg transition shadow-md" title="RSS Feed">
<i class="fas fa-rss mr-2"></i> RSS Feed
</a>
@endif
<a href="{{ route('Movies') }}" class="inline-flex items-center px-4 py-2 bg-white/20 hover:bg-white/30 text-white rounded-lg transition">
<i class="fas fa-film mr-2"></i> Browse All Movies
</a>
</div>
</div>
</div>
<!-- Trending Movies List -->
@if(isset($trendingMovies) && $trendingMovies->count() > 0)
<div class="px-6 py-6">
<div class="grid grid-cols-1 gap-6">
@foreach($trendingMovies as $index => $movie)
<div class="surface-panel relative border rounded-lg shadow-md overflow-hidden hover:shadow-xl transition-shadow duration-300">
<div class="flex flex-col md:flex-row">
<!-- Rank Badge -->
<div class="absolute top-4 left-4 z-10">
<div class="w-12 h-12 rounded-full flex items-center justify-center text-white font-bold text-lg shadow-lg
{{ $index < 3 ? 'bg-linear-to-br from-yellow-400 to-yellow-600' : 'bg-linear-to-br from-gray-400 to-gray-600' }}">
#{{ $index + 1 }}
</div>
</div>
<!-- Movie Poster -->
<div class="shrink-0 relative p-4">
<a href="{{ route('movie.view', ['imdbid' => $movie->imdbid]) }}" class="block">
@if($movie->cover)
<img src="{{ $movie->cover }}" alt="{{ $movie->title }}" class="w-full md:w-64 h-96 object-cover rounded-xl shadow-xl">
@else
<div class="w-full md:w-64 h-96 bg-gray-200 dark:bg-gray-700 flex items-center justify-center rounded-xl shadow-xl">
<i class="fas fa-film text-gray-400 text-5xl"></i>
</div>
@endif
</a>
<!-- Download Badge -->
<div class="absolute bottom-4 right-4 bg-primary-500 text-white px-3 py-1 rounded-full text-sm font-semibold shadow-lg">
<i class="fas fa-download mr-1"></i>{{ number_format($movie->total_downloads) }}
</div>
</div>
<!-- Movie Details -->
<div class="flex-1 py-6 pr-6 min-w-0">
<div class="flex flex-col h-full">
<!-- Title and Info -->
<div class="flex-1">
<a href="{{ route('movie.view', ['imdbid' => $movie->imdbid]) }}" class="hover:text-primary-600 dark:hover:text-primary-400">
<h2 class="text-2xl font-bold text-gray-900 dark:text-gray-100 mb-2">
{{ $movie->title }}
</h2>
</a>
<div class="flex flex-wrap items-center gap-4 mb-4 text-sm text-gray-600 dark:text-gray-400">
@if($movie->year)
<span class="inline-flex items-center">
<i class="fas fa-calendar mr-1"></i> {{ $movie->year }}
</span>
@endif
@if($movie->rating)
<span class="inline-flex items-center text-yellow-600">
<i class="fas fa-star mr-1"></i> {{ $movie->rating }}/10
</span>
@endif
<span class="inline-flex items-center text-primary-600 dark:text-primary-400">
<i class="fas fa-film mr-1"></i> {{ $movie->release_count }} Release{{ $movie->release_count > 1 ? 's' : '' }}
</span>
</div>
<!-- External Links -->
<div class="flex items-center gap-2 mb-4 text-xs flex-wrap">
@if($movie->imdbid)
<a href="{{ $site['dereferrer_link'] }}https://www.imdb.com/title/tt{{ $movie->imdbid }}" target="_blank" class="inline-flex items-center px-3 py-1.5 bg-yellow-100 text-yellow-800 rounded-lg hover:bg-yellow-200 transition">
<i class="fab fa-imdb mr-1"></i> IMDb
</a>
@endif
@if($movie->tmdbid)
<a href="{{ $site['dereferrer_link'] }}https://www.themoviedb.org/movie/{{ $movie->tmdbid }}" target="_blank" class="inline-flex items-center px-3 py-1.5 bg-primary-100 text-primary-800 rounded-lg hover:bg-primary-200 transition dark:bg-primary-900/30 dark:text-primary-200 dark:hover:bg-primary-800/30">
<i class="fas fa-film mr-1"></i> TMDb
</a>
@endif
@if($movie->traktid)
<a href="{{ $site['dereferrer_link'] }}https://trakt.tv/movies/{{ $movie->traktid }}" target="_blank" class="inline-flex items-center px-3 py-1.5 bg-red-100 text-red-800 rounded-lg hover:bg-red-200 transition">
<i class="fas fa-heart mr-1"></i> Trakt
</a>
@endif
</div>
<!-- Plot/Description -->
@if($movie->plot)
<p class="text-gray-700 dark:text-gray-300 text-sm leading-relaxed line-clamp-4 mb-4">
{{ $movie->plot }}
</p>
@endif
<!-- Genre -->
@if($movie->genre)
<div class="text-xs text-gray-600 dark:text-gray-400 mb-4">
<strong class="text-gray-700 dark:text-gray-300">Genre:</strong> {{ $movie->genre }}
</div>
@endif
</div>
<!-- Action Buttons -->
<div class="flex gap-3 mt-4 pt-4 border-t border-gray-200 dark:border-gray-700">
<a href="{{ route('movie.view', ['imdbid' => $movie->imdbid]) }}" class="inline-flex items-center px-6 py-2.5 bg-primary-600 dark:bg-primary-700 text-white font-medium rounded-lg hover:bg-primary-700 dark:hover:bg-primary-800 transition shadow-md">
<i class="fas fa-eye mr-2"></i> View All Releases
</a>
<a href="{{ route('Movies') }}?title={{ urlencode($movie->title) }}" class="inline-flex items-center px-6 py-2.5 bg-gray-600 text-white font-medium rounded-lg hover:bg-gray-700 transition shadow-md">
<i class="fas fa-search mr-2"></i> Search Similar
</a>
</div>
</div>
</div>
</div>
</div>
@endforeach
</div>
</div>
@else
<x-empty-state
icon="fas fa-chart-line"
title="No trending movies found"
message="Check back soon for the most popular downloads!"
action-url="{{ route('Movies') }}"
action-label="Browse All Movies"
action-icon="fas fa-film"
/>
@endif
<!-- Info Box -->
<div class="px-6 py-4 surface-panel-alt border-t">
<div class="flex items-start gap-3">
<i class="fas fa-info-circle text-primary-500 mt-1"></i>
<div class="text-sm text-gray-700 dark:text-gray-300">
<strong>About Trending Movies:</strong> This list shows the top 15 most downloaded movies on our platform <strong>in the last 48 hours</strong>.
The rankings are updated automatically every hour based on recent download activity.
Click on any movie to see all available releases and detailed information.
</div>
</div>
</div>
</div>
@endsection