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

77 lines
5.6 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($comments as $comment)
<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/{{$comment->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">
{{$comment->video->title}}
</a>
</div>
<div class="bg-gray-50 dark:bg-gray-700/50 rounded-lg p-4 mb-4">
<p class="text-gray-700 dark:text-gray-300 text-base leading-relaxed whitespace-pre-wrap font-sans">{{$comment->content}}</p>
</div>
<div class="flex flex-wrap items-center justify-between text-sm text-gray-500 dark:text-gray-400 border-t dark:border-gray-700 pt-4 gap-4">
<div class="flex items-center space-x-6">
<span class="flex items-center" title="评论时间">
<svg class="w-4 h-4 mr-1.5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
{{$comment->created_at}}
</span>
<span class="hidden sm:flex items-center" title="稿件时间">
<svg class="w-4 h-4 mr-1.5 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 10l4.553-2.276A1 1 0 0121 8.618v6.764a1 1 0 01-1.447.894L15 14M5 18h8a2 2 0 002-2V8a2 2 0 00-2-2H5a2 2 0 00-2 2v8a2 2 0 002 2z"></path></svg>
投稿: {{$comment->video->created_at}}
</span>
</div>
<div class="flex items-center space-x-4">
<a href="https://space.bilibili.com/{{$comment->mid}}" target="_blank" class="flex items-center hover:text-indigo-600 dark:hover:text-indigo-400 transition-colors" title="课代表: {{$comment->uname}}">
<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="M16 7a4 4 0 11-8 0 4 4 0 018 0zM12 14a7 7 0 00-7 7h14a7 7 0 00-7-7z"></path></svg>
{{$comment->uname}}
</a>
<span class="text-gray-300 dark:text-gray-600">|</span>
<a href="https://www.bilibili.com/video/{{$comment->video->bvid}}" target="_blank" class="text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-300 flex items-center transition-colors font-medium">
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>
</div>
</div>
</div>
</div>
@endforeach
</div>
<div class="mt-8">
{{$comments->onEachSide(1)->links()}}
</div>
</div>
</main>
@include("common.footer")
</body>
</html>