You've already forked lubo_comment_query
样式
This commit is contained in:
@@ -1,77 +1,164 @@
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>录播节目查询</title>
|
||||
<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>
|
||||
<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")
|
||||
<div>
|
||||
<h3 class="text-2xl font-bold">
|
||||
<a class="text-blue-600" href="https://www.bilibili.com/video/{{$video->bvid}}">{{$video->title}}</a>
|
||||
</h3>
|
||||
</div>
|
||||
<table class="table-auto border-collapse w-full lg:border lg:border-black">
|
||||
<thead>
|
||||
<tr class="border border-black sticky bg-white lg:static top-0 left-0 right-0">
|
||||
<th class="border border-black">节目名称</th>
|
||||
<th class="border border-black">点播及追加</th>
|
||||
<th class="border border-black hidden lg:table-cell">节目开始</th>
|
||||
<th class="border border-black hidden lg:table-cell">节目结束</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($video_pivots as $video_pivot)
|
||||
<tr>
|
||||
<td class="border align-top w-1/2 lg:w-1/4">
|
||||
@auth("web")
|
||||
<a href="{{route("program.construct.edit", ["program"=>$video_pivot->program->id])}}">编辑</a>
|
||||
@endauth
|
||||
<div class="block lg:hidden">{{$video_pivot->created_at}}</div>
|
||||
<a class="text-blue-600 lg:text-current underline lg:no-underline" href="/programs/{{ $video_pivot->program->id }}/video">
|
||||
<span title="节目">{{$video_pivot->program->name}}</span>
|
||||
<span title="难度">{{$video_pivot->program->difficulty}}</span>
|
||||
<span title="要求">{{$video_pivot->program->desc}}</span>
|
||||
</a>
|
||||
</td>
|
||||
<td class="border align-top w-1/2 lg:w-1/4">
|
||||
@foreach($video_pivot->program->appends as $append)
|
||||
<x-append :append="$append"></x-append>
|
||||
@endforeach
|
||||
</td>
|
||||
<td class="border align-top hidden lg:table-cell lg:w-1/4">
|
||||
<x-links.video_link :bvid="$video_pivot->video_bvid" :part="$video_pivot->start_part" :time="$video_pivot->start_time">
|
||||
<div>{{$video_pivot->created_at}} P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}</div>
|
||||
@if($video_pivot->start_image)
|
||||
<img loading="lazy" width="300" src="{{$video_pivot->start_image}}" alt="开始时的画面">
|
||||
@else
|
||||
节目开始位置
|
||||
|
||||
<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
|
||||
</x-links.video_link>
|
||||
</td>
|
||||
<td class="border align-top hidden lg:table-cell lg:w-1/4">
|
||||
<x-links.video_link :bvid="$video_pivot->video_bvid" :part="$video_pivot->stop_part" :time="$video_pivot->stop_time">
|
||||
<div>P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}</div>
|
||||
@if($video_pivot->start_image)
|
||||
<img loading="lazy" width="300" src="{{$video_pivot->stop_image}}" alt="结束时的画面">
|
||||
@else
|
||||
节目结束位置
|
||||
@endif
|
||||
</x-links.video_link>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
@auth("web")
|
||||
@if(sizeof($video_pivots) === 0 && $comment)
|
||||
<a href="{{ url(route("program.construct.from_comment", ["comment"=>$comment->id])) }}" class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white">一键导入评论中的节目单</a>
|
||||
@endif
|
||||
@if($video->danmakus->count() === 0)
|
||||
<a href="{{ url(route("danmaku.construct.batch_import", ["video_bvid"=>$video->bvid])) }}" class="px-6 py-2 inline-block rounded-full bg-cyan-600 text-white">导入直播弹幕</a>
|
||||
@endif
|
||||
@endauth
|
||||
|
||||
<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>
|
||||
</html>
|
||||
Reference in New Issue
Block a user