Files
lubo_comment_query/resources/views/danmaku/index.blade.php
2025-12-09 11:57:49 +08:00

100 lines
7.2 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-5xl mx-auto">
<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>
<p class="mt-2 text-xs text-gray-500 dark:text-gray-400">支持多个关键词组合搜索</p>
</form>
<div class="space-y-6">
@foreach($video_list as $video)
<div class="bg-white dark:bg-gray-800 rounded-xl shadow-sm border border-gray-100 dark:border-gray-700 hover:shadow-md transition-shadow duration-200 overflow-hidden">
<div class="p-6">
<div class="flex justify-between items-start mb-3">
<a href="/video/{{$video->id}}" class="text-xl font-bold text-gray-900 dark:text-white hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors line-clamp-1">
{{$video->title}}
</a>
</div>
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 text-sm text-gray-600 dark:text-gray-400 mb-4 bg-gray-50 dark:bg-gray-700/30 p-4 rounded-lg">
<div class="flex items-center">
<span class="font-medium mr-2">投稿时间:</span>
{{$video->created_at}}
</div>
<div class="flex items-center">
<span class="font-medium mr-2">视频时长:</span>
{{$video->total_duration}}
</div>
@if($video->danmakus_count > 0)
<div class="flex items-center">
<span class="font-medium mr-2">弹幕数量:</span>
{{$video->danmakus_count}}
<div class="flex space-x-2 ml-2">
@if($video->bilibili_danmakus_count > 0)
<img class="w-4 h-4" src="https://cdn.jerryyan.net/luboimg/bilibili.ico" alt="B站" title="包含B站直播弹幕">
@endif
@if($video->ixigua_danmakus_count > 0)
<img class="w-4 h-4" src="https://cdn.jerryyan.net/luboimg/ixigua.ico" alt="西瓜视频" title="包含西瓜视频直播弹幕">
@endif
@if($video->douyin_danmakus_count > 0)
<img class="w-4 h-4" src="https://cdn.jerryyan.net/luboimg/douyin.ico" alt="抖音" title="包含抖音直播弹幕">
@endif
</div>
</div>
@endif
@if($video->programs_count > 0)
<div class="flex items-center">
<span class="font-medium mr-2">节目数量:</span>
{{$video->programs_count}}
</div>
@endif
</div>
<div class="flex flex-wrap items-center gap-4 text-sm border-t dark:border-gray-700 pt-4">
<a href="https://www.bilibili.com/video/{{$video->bvid}}" target="_blank" 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">
去B站浏览
<svg class="w-4 h-4 ml-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>
</a>
@if($video->danmakus_count > 0)
<a href="/danmakus/{{$video->bvid}}" class="inline-flex items-center text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors">
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"></path></svg>
直播弹幕明细
</a>
@endif
@if($video->programs_count > 0)
<a href="/video/{{$video->id}}" class="inline-flex items-center text-gray-700 dark:text-gray-300 hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors">
<svg class="w-4 h-4 mr-1" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 6h16M4 10h16M4 14h16M4 18h16"></path></svg>
节目列表
</a>
@endif
</div>
</div>
</div>
@endforeach
</div>
<div class="mt-8">
{{$video_list->onEachSide(1)->links()}}
</div>
</div>
</main>
@include("common.footer")
</body>
</html>