Files
lubo_comment_query/resources/views/danmaku/search_index.blade.php
2025-12-09 11:40:16 +08:00

87 lines
5.2 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>
<div class="flex items-center text-sm text-gray-500 dark:text-gray-400">
<span class="mr-4">弹幕总数:{{$video->danmakus_count}}</span>
<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-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="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>
</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 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 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>
<!-- Desktop Table -->
<div class="hidden md:block bg-white dark:bg-gray-800 shadow overflow-hidden rounded-lg">
<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/5">发送人</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-3/5">弹幕内容</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/5">发送时间</th>
</tr>
</thead>
<tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">
@foreach($danmakus as $danmaku)
<tr class="hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<x-links.user_link :name="$danmaku->from" :plt-id="$danmaku->platform_id" :mid="$danmaku->from_mid"></x-links.user_link>
</td>
<td class="px-6 py-4 text-sm text-gray-900 dark:text-gray-100">
{{$danmaku->content}}
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500 dark:text-gray-400">
{{$danmaku->created_at}}
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<!-- Mobile List -->
<div class="md:hidden space-y-4">
@foreach($danmakus as $danmaku)
<div class="bg-white dark:bg-gray-800 p-4 rounded-lg shadow-sm border border-gray-100 dark:border-gray-700">
<div class="flex justify-between items-start mb-2">
<div class="text-sm font-bold">
<x-links.user_link :name="$danmaku->from" :plt-id="$danmaku->platform_id" :mid="$danmaku->from_mid"></x-links.user_link>
</div>
<div class="text-xs text-gray-400">{{$danmaku->created_at}}</div>
</div>
<p class="text-gray-900 dark:text-gray-100 text-base">{{$danmaku->content}}</p>
</div>
@endforeach
</div>
<div class="mt-8">
{{$danmakus->onEachSide(1)->links()}}
</div>
</div>
</main>
@include("common.footer")
</body>
</html>