You've already forked lubo_comment_query
164 lines
11 KiB
PHP
164 lines
11 KiB
PHP
<html lang="zh">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>{{$video->title}} - 录播节目查询</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<link href="{{ mix('/css/app.css') }}" rel="stylesheet"/>
|
|
</head>
|
|
<body class="bg-gray-50 dark:bg-gray-900 min-h-screen flex flex-col text-gray-900 dark:text-gray-100">
|
|
@include("common.header")
|
|
|
|
<main class="flex-grow container mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
|
<div class="max-w-7xl mx-auto">
|
|
|
|
<div class="mb-8">
|
|
<h1 class="text-2xl font-bold text-gray-900 dark:text-white mb-2">{{$video->title}}</h1>
|
|
<a class="inline-flex items-center text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-300 font-medium transition-colors" href="https://www.bilibili.com/video/{{$video->bvid}}" target="_blank">
|
|
<svg class="w-5 h-5 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"></path></svg>
|
|
前往 B站 观看
|
|
</a>
|
|
</div>
|
|
|
|
<!-- Desktop Table -->
|
|
<div class="hidden lg:block bg-white dark:bg-gray-800 shadow overflow-hidden rounded-lg mb-8">
|
|
<table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
|
|
<thead class="bg-gray-50 dark:bg-gray-700">
|
|
<tr>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider w-1/4">节目名称</th>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider w-1/4">点播及追加</th>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider w-1/4">节目开始</th>
|
|
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider w-1/4">节目结束</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">
|
|
@foreach($video_pivots as $video_pivot)
|
|
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
|
|
<td class="px-6 py-4 align-top">
|
|
@auth("web")
|
|
<a href="{{route("program.construct.edit", ["program"=>$video_pivot->program->id])}}" class="text-indigo-600 hover:text-indigo-900 text-xs mb-1 block">编辑</a>
|
|
@endauth
|
|
<a href="/programs/{{ $video_pivot->program->id }}/video" class="block group">
|
|
<div class="text-sm font-medium text-gray-900 dark:text-white group-hover:text-indigo-600 transition-colors">{{$video_pivot->program->name}}</div>
|
|
@if($video_pivot->program->difficulty)
|
|
<div class="text-xs text-gray-500 mt-1">难度: {{$video_pivot->program->difficulty}}</div>
|
|
@endif
|
|
@if($video_pivot->program->desc)
|
|
<div class="text-xs text-gray-500 mt-1">{{$video_pivot->program->desc}}</div>
|
|
@endif
|
|
</a>
|
|
</td>
|
|
<td class="px-6 py-4 align-top text-sm text-gray-500 dark:text-gray-400">
|
|
@foreach($video_pivot->program->appends as $append)
|
|
<div class="mb-2">
|
|
<x-append :append="$append"></x-append>
|
|
</div>
|
|
@endforeach
|
|
</td>
|
|
<td class="px-6 py-4 align-top text-sm">
|
|
<x-links.video_link :bvid="$video_pivot->video_bvid" :part="$video_pivot->start_part" :time="$video_pivot->start_time">
|
|
<div class="text-xs text-gray-500 mb-1">{{$video_pivot->created_at}}</div>
|
|
<div class="text-indigo-600 hover:text-indigo-800">P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}</div>
|
|
@if($video_pivot->start_image)
|
|
<img loading="lazy" class="mt-1 rounded border border-gray-200 w-32" src="{{$video_pivot->start_image}}" alt="开始画面">
|
|
@else
|
|
<span class="text-xs text-gray-400">无预览</span>
|
|
@endif
|
|
</x-links.video_link>
|
|
</td>
|
|
<td class="px-6 py-4 align-top text-sm">
|
|
<x-links.video_link :bvid="$video_pivot->video_bvid" :part="$video_pivot->stop_part" :time="$video_pivot->stop_time">
|
|
<div class="text-indigo-600 hover:text-indigo-800">P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}</div>
|
|
@if($video_pivot->start_image)
|
|
<img loading="lazy" class="mt-1 rounded border border-gray-200 w-32" src="{{$video_pivot->stop_image}}" alt="结束画面">
|
|
@else
|
|
<span class="text-xs text-gray-400">无预览</span>
|
|
@endif
|
|
</x-links.video_link>
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<!-- Mobile Cards -->
|
|
<div class="space-y-6 lg:hidden mb-8">
|
|
@foreach($video_pivots as $video_pivot)
|
|
<div class="bg-white dark:bg-gray-800 rounded-xl shadow-sm border border-gray-100 dark:border-gray-700 overflow-hidden">
|
|
<div class="p-4 border-b dark:border-gray-700 bg-gray-50 dark:bg-gray-700/50">
|
|
<div class="flex justify-between items-start">
|
|
<div>
|
|
@auth("web")
|
|
<a href="{{route("program.construct.edit", ["program"=>$video_pivot->program->id])}}" class="text-xs text-indigo-600 mb-1 inline-block">编辑</a>
|
|
@endauth
|
|
<h3 class="text-lg font-bold text-gray-900 dark:text-white">{{$video_pivot->program->name}}</h3>
|
|
<div class="text-sm text-gray-500 mt-1">
|
|
<span class="mr-2">{{$video_pivot->program->difficulty}}</span>
|
|
<span>{{$video_pivot->program->desc}}</span>
|
|
</div>
|
|
</div>
|
|
<span class="text-xs text-gray-400">{{$video_pivot->created_at}}</span>
|
|
</div>
|
|
</div>
|
|
|
|
@if(count($video_pivot->program->appends) > 0)
|
|
<div class="p-4 border-b dark:border-gray-700">
|
|
<h4 class="text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2">点播及追加</h4>
|
|
<div class="space-y-2">
|
|
@foreach($video_pivot->program->appends as $append)
|
|
<x-append :append="$append"></x-append>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
@endif
|
|
|
|
<div class="p-4 grid grid-cols-2 gap-4">
|
|
<div>
|
|
<h4 class="text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2">开始</h4>
|
|
<x-links.video_link :bvid="$video_pivot->video_bvid" :part="$video_pivot->start_part" :time="$video_pivot->start_time">
|
|
<div class="text-sm text-indigo-600">P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}</div>
|
|
@if($video_pivot->start_image)
|
|
<img loading="lazy" class="mt-1 rounded w-full" src="{{$video_pivot->start_image}}" alt="Start">
|
|
@endif
|
|
</x-links.video_link>
|
|
</div>
|
|
<div>
|
|
<h4 class="text-xs font-semibold text-gray-500 uppercase tracking-wider mb-2">结束</h4>
|
|
<x-links.video_link :bvid="$video_pivot->video_bvid" :part="$video_pivot->stop_part" :time="$video_pivot->stop_time">
|
|
<div class="text-sm text-indigo-600">P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}</div>
|
|
@if($video_pivot->start_image)
|
|
<img loading="lazy" class="mt-1 rounded w-full" src="{{$video_pivot->stop_image}}" alt="End">
|
|
@endif
|
|
</x-links.video_link>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="px-4 py-3 bg-gray-50 dark:bg-gray-700/30 border-t dark:border-gray-700 text-center">
|
|
<a href="/programs/{{ $video_pivot->program->id }}/video" class="text-sm text-indigo-600 font-medium hover:text-indigo-800">
|
|
查看详情 →
|
|
</a>
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
|
|
@auth("web")
|
|
<div class="flex flex-wrap gap-4 mt-8">
|
|
@if(sizeof($video_pivots) === 0 && $comment)
|
|
<a href="{{ url(route("program.construct.from_comment", ["comment"=>$comment->id])) }}" class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-cyan-600 hover:bg-cyan-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-cyan-500">
|
|
一键导入评论中的节目单
|
|
</a>
|
|
@endif
|
|
@if($video->danmakus->count() === 0)
|
|
<a href="{{ url(route("danmaku.construct.batch_import", ["video_bvid"=>$video->bvid])) }}" class="inline-flex items-center px-4 py-2 border border-transparent text-sm font-medium rounded-md shadow-sm text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
|
|
导入直播弹幕
|
|
</a>
|
|
@endif
|
|
</div>
|
|
@endauth
|
|
|
|
</div>
|
|
</main>
|
|
@include("common.footer")
|
|
</body>
|
|
</html> |