You've already forked lubo_comment_query
样式
This commit is contained in:
@@ -5,41 +5,73 @@
|
||||
<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")
|
||||
<form class="max-w xl:max-w-5xl lg:max-w-2xl md:max-w-lg mx-2 md:mx-auto form py-2" action="">
|
||||
<label for="keyword">查找节目单关键词,空格隔开查找多个关键词</label>
|
||||
<input class="border border-black" type="text" name="keyword" id="keyword" value="{{$keyword}}">
|
||||
<input class="border border-black" type="submit">
|
||||
</form>
|
||||
@foreach($comments as $comment)
|
||||
<div class="max-w xl:max-w-5xl lg:max-w-2xl md:max-w-lg mx-2 md:mx-auto px-2 md:px-4 py-4 bg-white border border-gray-200 rounded-lg shadow-md my-4 dark:bg-gray-800">
|
||||
<div>
|
||||
<a href="/video/{{$comment->video->id}}" class="text-2xl font-bold text-gray-700 dark:text-white hover:text-gray-600 dark:hover:text-gray-200 hover:underline" tabindex="0" role="link">{{$comment->video->title}}</a>
|
||||
<div class="px-2 md:px-4 lg:px-8 mt-2 flex items-center justify-between">
|
||||
<span class="text-sm font-light text-gray-600 dark:text-gray-400 hidden md:block">稿件时间:{{$comment->video->created_at}}</span>
|
||||
<span class="text-sm font-light text-gray-600 dark:text-gray-400">评论时间:{{$comment->created_at}}</span>
|
||||
|
||||
<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 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>
|
||||
<p class="px-2 md:px-4 lg:px-8 mt-2 text-gray-600 dark:text-gray-300 whitespace-pre-wrap">{{$comment->content}}</p>
|
||||
<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="flex items-center justify-between mt-4">
|
||||
<a href="https://www.bilibili.com/video/{{$comment->video->bvid}}" target="_blank" class="inline-flex text-blue-600 dark:text-blue-400 hover:underline" tabindex="0" role="link">
|
||||
去B站浏览
|
||||
<svg class="w-5 h-5 ml-2" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M11 3a1 1 0 100 2h2.586l-6.293 6.293a1 1 0 101.414 1.414L15 6.414V9a1 1 0 102 0V4a1 1 0 00-1-1h-5z"></path><path d="M5 5a2 2 0 00-2 2v8a2 2 0 002 2h8a2 2 0 002-2v-3a1 1 0 10-2 0v3H5V7h3a1 1 0 000-2H5z"></path></svg>
|
||||
</a>
|
||||
|
||||
<div class="flex items-center">
|
||||
<span class="text-gray-500">课代表:</span>
|
||||
<a href="https://space.bilibili.com/{{$comment->mid}}" target="_blank" class="font-bold text-gray-700 cursor-pointer dark:text-gray-200 hover:underline" tabindex="0" role="link">{{$comment->uname}}</a>
|
||||
</div>
|
||||
<div class="mt-8">
|
||||
{{$comments->onEachSide(1)->links()}}
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
<div class="max-w xl:max-w-5xl lg:max-w-2xl md:max-w-lg mx-2 md:mx-auto sticky bottom-0">
|
||||
{{$comments->links()}}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
@include("common.footer")
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
Reference in New Issue
Block a user