You've already forked lubo_comment_query
87 lines
5.0 KiB
PHP
87 lines
5.0 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">
|
|
<!-- Month Navigation -->
|
|
<div class="flex items-center justify-between mb-6">
|
|
@if($has_prev)
|
|
<a href="/calendar?month={{$prev_month->format("Y-m")}}" class="inline-flex items-center px-3 py-2 rounded-lg text-sm font-medium text-indigo-600 dark:text-indigo-400 hover:bg-indigo-50 dark:hover:bg-gray-800 transition-colors">
|
|
‹ {{$prev_month->format("Y年n月")}}
|
|
</a>
|
|
@else
|
|
<span class="inline-flex items-center px-3 py-2 text-sm font-medium text-gray-300 dark:text-gray-600 cursor-not-allowed">
|
|
‹ {{$prev_month->format("Y年n月")}}
|
|
</span>
|
|
@endif
|
|
<div class="text-center">
|
|
<h1 class="text-xl sm:text-2xl font-bold text-gray-900 dark:text-white">{{$month->format("Y年n月")}}</h1>
|
|
@if(!$is_current_month)
|
|
<a href="/calendar" class="text-xs text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-300">回到本月</a>
|
|
@endif
|
|
</div>
|
|
@if($has_next)
|
|
<a href="/calendar?month={{$next_month->format("Y-m")}}" class="inline-flex items-center px-3 py-2 rounded-lg text-sm font-medium text-indigo-600 dark:text-indigo-400 hover:bg-indigo-50 dark:hover:bg-gray-800 transition-colors">
|
|
{{$next_month->format("Y年n月")}} ›
|
|
</a>
|
|
@else
|
|
<span class="inline-flex items-center px-3 py-2 text-sm font-medium text-gray-300 dark:text-gray-600 cursor-not-allowed">
|
|
{{$next_month->format("Y年n月")}} ›
|
|
</span>
|
|
@endif
|
|
</div>
|
|
|
|
<!-- Calendar Grid -->
|
|
<div class="bg-white dark:bg-gray-800 shadow rounded-lg overflow-hidden">
|
|
<div class="grid grid-cols-7 gap-px bg-gray-200 dark:bg-gray-700 border-b border-gray-200 dark:border-gray-700">
|
|
@foreach(["一", "二", "三", "四", "五", "六", "日"] as $weekday)
|
|
<div class="bg-gray-50 dark:bg-gray-700 py-2 text-center text-xs sm:text-sm font-semibold text-gray-500 dark:text-gray-300">周{{$weekday}}</div>
|
|
@endforeach
|
|
</div>
|
|
<div class="grid grid-cols-7 gap-px bg-gray-200 dark:bg-gray-700">
|
|
@foreach($weeks as $week)
|
|
@foreach($week as $cell)
|
|
@if($cell === null)
|
|
<div class="bg-gray-50 dark:bg-gray-900 min-h-[3.5rem] sm:min-h-[5.5rem]"></div>
|
|
@else
|
|
<div class="bg-white dark:bg-gray-800 min-h-[3.5rem] sm:min-h-[5.5rem] p-1 sm:p-2">
|
|
<div class="mb-1">
|
|
@if($cell["is_today"])
|
|
<span class="inline-flex items-center justify-center w-5 h-5 sm:w-6 sm:h-6 rounded-full bg-indigo-600 text-white text-xs sm:text-sm font-bold">{{$cell["day"]}}</span>
|
|
@else
|
|
<span class="text-xs sm:text-sm {{sizeof($cell["videos"]) > 0 ? "font-bold text-gray-900 dark:text-white" : "text-gray-400 dark:text-gray-500"}}">{{$cell["day"]}}</span>
|
|
@endif
|
|
</div>
|
|
@foreach($cell["videos"] as $video)
|
|
<a href="/video/{{$video->id}}" title="{{$video->title}}" class="block mb-1 rounded bg-indigo-50 dark:bg-indigo-900/40 hover:bg-indigo-100 dark:hover:bg-indigo-900 px-1 py-0.5 text-center text-[10px] sm:text-xs text-indigo-700 dark:text-indigo-300 leading-tight transition-colors">
|
|
{{$video->total_duration ?? "录播"}}
|
|
</a>
|
|
@endforeach
|
|
</div>
|
|
@endif
|
|
@endforeach
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Stats -->
|
|
<div class="mt-4 text-sm text-gray-500 dark:text-gray-400 text-center">
|
|
<span>本月直播 {{$live_days}} 天</span>
|
|
@if($unparsed_count > 0)
|
|
<span class="mx-1">·</span>
|
|
<span>另有 {{$unparsed_count}} 条稿件标题未包含可解析日期(剪辑/合集等),未纳入日历</span>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</main>
|
|
@include("common.footer")
|
|
</body>
|
|
</html>
|