You've already forked lubo_comment_query
121 lines
9.0 KiB
PHP
121 lines
9.0 KiB
PHP
<html lang="zh">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<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="flex flex-col md:flex-row md:items-center md:justify-between mb-8 space-y-4 md:space-y-0">
|
|
<h1 class="text-2xl font-bold text-gray-900 dark:text-white">节目建设</h1>
|
|
<div class="flex space-x-4">
|
|
<a class="inline-flex items-center px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
|
|
href="{{ route("program.construct.add") }}">
|
|
<svg class="h-4 w-4 mr-1.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path></svg>
|
|
添加节目
|
|
</a>
|
|
<a class="inline-flex items-center px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-md shadow-sm text-sm font-medium text-gray-700 dark:text-gray-200 bg-white dark:bg-gray-800 hover:bg-gray-50 dark:hover:bg-gray-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"
|
|
href="{{ route("program.construct.batch_add") }}">
|
|
<svg class="h-4 w-4 mr-1.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"></path></svg>
|
|
导入节目单
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<form class="bg-white dark:bg-gray-800 p-6 rounded-xl shadow-sm mb-8 transition-colors duration-200" action="">
|
|
<label for="keyword" class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2">查找节目关键词</label>
|
|
<div class="relative flex items-center">
|
|
<input type="text" name="keyword" id="keyword" value="{{$keyword}}"
|
|
class="block flex-1 w-full rounded-l-lg border-gray-300 dark:border-gray-600 dark:bg-gray-700 dark:text-white shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm py-3"
|
|
placeholder="输入关键词,空格隔开...">
|
|
<button type="submit" class="inline-flex flex-shrink-0 whitespace-nowrap items-center px-6 py-3 border border-transparent text-base font-medium rounded-r-lg 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 transition-colors duration-200">
|
|
搜索
|
|
</button>
|
|
</div>
|
|
</form>
|
|
|
|
<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>
|
|
<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($programs as $program)
|
|
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
|
|
<td class="px-6 py-4 align-top">
|
|
<div class="flex items-start">
|
|
<a href="{{route("program.construct.edit", ["program"=>$program->id])}}" class="mr-3 text-indigo-600 hover:text-indigo-900 dark:hover:text-indigo-400">
|
|
<svg class="h-5 w-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path></svg>
|
|
</a>
|
|
<div>
|
|
<div class="text-sm font-medium text-gray-900 dark:text-white">{{$program->name}}</div>
|
|
@if($program->difficulty)
|
|
<div class="text-xs text-gray-500 mt-1">难度: {{$program->difficulty}}</div>
|
|
@endif
|
|
@if($program->desc)
|
|
<div class="text-xs text-gray-500 mt-1">{{$program->desc}}</div>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</td>
|
|
<td class="px-6 py-4 align-top text-sm text-gray-500 dark:text-gray-400">
|
|
@foreach($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">
|
|
@foreach($program->video_pivots as $video_pivot)
|
|
<div class="mb-4">
|
|
<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="Start">
|
|
@else
|
|
<span class="text-xs text-gray-400">无预览</span>
|
|
@endif
|
|
</x-links.video_link>
|
|
</div>
|
|
@endforeach
|
|
</td>
|
|
<td class="px-6 py-4 align-top text-sm">
|
|
@foreach($program->video_pivots as $video_pivot)
|
|
<div class="mb-4">
|
|
<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="End">
|
|
@else
|
|
<span class="text-xs text-gray-400">无预览</span>
|
|
@endif
|
|
</x-links.video_link>
|
|
</div>
|
|
@endforeach
|
|
</td>
|
|
</tr>
|
|
@endforeach
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="mt-8">
|
|
{{$programs->onEachSide(1)->links()}}
|
|
</div>
|
|
</div>
|
|
</main>
|
|
@include("common.footer")
|
|
</body>
|
|
</html> |