You've already forked lubo_comment_query
90 lines
6.0 KiB
PHP
90 lines
6.0 KiB
PHP
<html lang="zh">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>{{$program->name}} - 录播节目查询</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-5xl mx-auto">
|
|
<div class="bg-white dark:bg-gray-800 rounded-xl shadow-sm border border-gray-100 dark:border-gray-700 p-6 mb-8">
|
|
<h1 class="text-xl font-bold text-gray-900 dark:text-white" title="节目">{{$program->name}}</h1>
|
|
<div class="mt-2 flex flex-wrap gap-x-6 gap-y-1 text-sm text-gray-500 dark:text-gray-400">
|
|
<span title="难度">难度:{{$program->difficulty}}</span>
|
|
<span title="要求">要求:{{$program->desc}}</span>
|
|
</div>
|
|
<div class="mt-4 space-y-1">
|
|
@foreach($program->appends as $append)
|
|
<x-append :append="$append"></x-append>
|
|
@endforeach
|
|
</div>
|
|
<div class="mt-4 border-t border-gray-100 dark:border-gray-700 pt-4 space-y-2">
|
|
@foreach($videos as $video_pivot)
|
|
@if($video_pivot->video)
|
|
<a class="block text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-300 transition-colors" href="{{url("/video/".$video_pivot->video->id)}}">查看《{{$video_pivot->video->title}}》下所有的节目</a>
|
|
@else
|
|
<a class="block text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-300 transition-colors" href="https://www.bilibili.com/video/{{$video_pivot->video_bvid}}">查看录播</a>
|
|
@endif
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
|
|
<div class="bg-white dark:bg-gray-800 shadow overflow-hidden rounded-lg">
|
|
<div class="overflow-x-auto">
|
|
<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">节目开始时的画面</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">节目结束时的画面</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">
|
|
@foreach($videos as $video_pivot)
|
|
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
|
|
<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 dark:text-gray-400 mb-1">{{$video_pivot->created_at}} P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}</div>
|
|
@if($video_pivot->start_image)
|
|
<img loading="lazy" width="300" class="rounded border border-gray-200 dark:border-gray-600" src="{{$video_pivot->start_image}}" alt="开始时的画面">
|
|
@else
|
|
<span class="text-xs text-gray-400 italic">节目开始位置</span>
|
|
@endif
|
|
</x-links.video_link>
|
|
@if($video_pivot->start_ocr)
|
|
<canvas class="mt-1 w-full max-w-[180px] bg-black rounded" data-ocr-frame="{{ json_encode($video_pivot->start_ocr, JSON_UNESCAPED_UNICODE) }}"></canvas>
|
|
<div class="text-xs text-gray-500 dark:text-gray-400">OCR @ {{ gmdate("H:i:s", (int)$video_pivot->start_ocr["ts"]) }}</div>
|
|
@endif
|
|
</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-xs text-gray-500 dark:text-gray-400 mb-1">P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}</div>
|
|
@if($video_pivot->start_image)
|
|
<img loading="lazy" width="300" class="rounded border border-gray-200 dark:border-gray-600" src="{{$video_pivot->stop_image}}" alt="结束时的画面">
|
|
@else
|
|
<span class="text-xs text-gray-400 italic">节目结束位置</span>
|
|
@endif
|
|
</x-links.video_link>
|
|
@if($video_pivot->stop_ocr)
|
|
<canvas class="mt-1 w-full max-w-[180px] bg-black rounded" data-ocr-frame="{{ json_encode($video_pivot->stop_ocr, JSON_UNESCAPED_UNICODE) }}"></canvas>
|
|
<div class="text-xs text-gray-500 dark:text-gray-400">OCR @ {{ gmdate("H:i:s", (int)$video_pivot->stop_ocr["ts"]) }}</div>
|
|
@endif
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
<script src="{{ mix('/js/manifest.js') }}"></script>
|
|
<script src="{{ mix('/js/component/ocr_canvas.js') }}"></script>
|
|
<script>document.addEventListener("DOMContentLoaded", function () { OcrCanvas.initSnapshots(); });</script>
|
|
@include("common.footer")
|
|
</body>
|
|
</html>
|