<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>
@include("common.header")
<div>
    <h3 class="text-2xl font-bold">{{$video->title}}</h3>
    <h4 class="text-lg">弹幕数:{{$video->danmakus_count}}</h4>
</div>
<form 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>
<table class="table-auto border-collapse w-full lg:border lg:border-black">
    <thead>
    <tr class="border border-black sticky bg-white lg:static top-0 left-0 right-0">
        <th class="border border-black">发送人</th>
        <th class="border border-black">弹幕内容</th>
        <th class="border border-black">发送时间</th>
    </tr>
    </thead>
    <tbody>
    @foreach($danmakus as $danmaku)
        <tr>
            <td class="border">
                <x-links.user_link :name="$danmaku->from" :plt-id="$danmaku->platform_id" :mid="$danmaku->from_mid"></x-links.user_link>
            </td>
            <td class="border">{{$danmaku->content}}</td>
            <td class="border text-sm">{{$danmaku->created_at}}</td>
        </tr>
    @endforeach
    </tbody>
</table>
{{$danmakus->links()}}
@include("common.footer")
</body>
</html>