<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")
    <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 hidden lg:table-cell">操作</th>
        </tr>
        </thead>
        <tbody>
        @foreach($video_list as $video)
            <tr>
                <td class="border text-sm lg:text-current">
                    @if($video->danmakus_count > 0)
                        <a class="text-blue-600 lg:text-current underline lg:no-underline break-all" href="/danmakus/{{$video->bvid}}">{{$video->title}}</a>
                        @if($video->bilibili_danmakus_count > 0)
                            <img class="w-4 h-4 inline-block" src="https://cdn.jerryyan.net/luboimg/bilibili.ico" alt="B站">
                        @endif
                        @if($video->ixigua_danmakus_count > 0)
                            <img class="w-4 h-4 inline-block" src="https://cdn.jerryyan.net/luboimg/ixigua.ico" alt="西瓜视频">
                        @endif
                        @if($video->douyin_danmakus_count > 0)
                            <img class="w-4 h-4 inline-block" src="https://cdn.jerryyan.net/luboimg/douyin.ico" alt="抖音">
                        @endif
                    @else
                        {{$video->title}}
                    @endif
                </td>
                <td class="border">{{$video->danmakus_count}}</td>
                <td class="border hidden lg:table-cell">
                    @if($video->danmakus_count > 0)
                        <a class="text-blue-600 underline" href="/danmakus/{{$video->bvid}}">详情</a>
                    @else
                        无弹幕
                    @endif
                </td>
            </tr>
        @endforeach
        </tbody>
    </table>
    {{$video_list->links()}}
    @include("common.footer")
</body>
</html>