统一页面样式:节目画面页布局与 dark 模式、表单错误提示条

This commit is contained in:
2026-07-30 07:58:33 +08:00
parent 8914a2a609
commit 811d6d4dfd
5 changed files with 103 additions and 74 deletions
+10 -1
View File
@@ -1,5 +1,14 @@
@if($errors->any()) @if($errors->any())
<div class="rounded-lg bg-red-50 dark:bg-red-900/30 border border-red-200 dark:border-red-900/50 p-4 space-y-2">
@foreach ($errors->all() as $error) @foreach ($errors->all() as $error)
<div class="bg-red-600 text-white">错误:{{ $error }}</div> <div class="flex">
<div class="flex-shrink-0">
<svg class="h-5 w-5 text-red-400" viewBox="0 0 20 20" fill="currentColor">
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd" />
</svg>
</div>
<p class="ml-3 text-sm text-red-700 dark:text-red-300">错误:{{ $error }}</p>
</div>
@endforeach @endforeach
</div>
@endif @endif
@@ -2,10 +2,22 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>正在建设中</title> <title>正在建设中</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="{{ mix('/css/app.css') }}" rel="stylesheet"/>
</head> </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") @include("common.header")
<h1>正在建设中</h1>
<main class="flex-grow container mx-auto px-4 sm:px-6 lg:px-8 py-8 flex items-center justify-center">
<div class="text-center">
<svg class="mx-auto h-16 w-16 text-gray-400 dark:text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19.428 15.428a2 2 0 00-1.022-.547l-2.387-.477a6 6 0 00-3.86.517l-.318.158a6 6 0 01-3.86.517L6.05 15.21a2 2 0 00-1.806.547M8 4h8l-1 1v5.172a2 2 0 00.586 1.414l5 5c1.26 1.26.367 3.414-1.415 3.414H4.828c-1.782 0-2.674-2.154-1.414-3.414l5-5A2 2 0 009 10.172V5L8 4z"></path>
</svg>
<h1 class="mt-4 text-2xl font-bold text-gray-900 dark:text-white">正在建设中</h1>
<p class="mt-2 text-sm text-gray-500 dark:text-gray-400">该功能尚未开放,敬请期待。</p>
</div>
</main>
@include("common.footer") @include("common.footer")
</body> </body>
</html> </html>
+3 -4
View File
@@ -1,7 +1,6 @@
<html lang="zh"> <html lang="zh">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>文件上传 - 录播查询</title> <title>文件上传 - 录播查询</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="{{ mix('/css/app.css') }}" rel="stylesheet"/> <link href="{{ mix('/css/app.css') }}" rel="stylesheet"/>
@@ -9,10 +8,10 @@
<body class="bg-gray-50 dark:bg-gray-900 min-h-screen flex flex-col text-gray-900 dark:text-gray-100"> <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") @include("common.header")
<main class="flex-grow container mx-auto px-4 sm:px-6 lg:px-8 py-16"> <main class="flex-grow container mx-auto px-4 sm:px-6 lg:px-8 py-8">
<div class="max-w-md mx-auto bg-white dark:bg-gray-800 rounded-xl shadow-md overflow-hidden md:max-w-lg"> <div class="max-w-md mx-auto bg-white dark:bg-gray-800 rounded-xl shadow-sm overflow-hidden md:max-w-lg">
<div class="p-8"> <div class="p-8">
<h2 class="text-2xl font-bold mb-6 text-center">文件上传</h2> <h2 class="text-2xl font-bold mb-6 text-center text-gray-900 dark:text-white">文件上传</h2>
<form action="" enctype="multipart/form-data" method="post" class="space-y-6"> <form action="" enctype="multipart/form-data" method="post" class="space-y-6">
@csrf @csrf
<div> <div>
@@ -4,8 +4,6 @@
<title>复制常驻留言 - 录播查询</title> <title>复制常驻留言 - 录播查询</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="{{ mix('/css/app.css') }}" rel="stylesheet"/> <link href="{{ mix('/css/app.css') }}" rel="stylesheet"/>
<script src="{{ mix('/js/manifest.js') }}" rel="script"></script>
<link href="{{ asset('/css/vendor/picomplete/picomplete.css') }}" rel="stylesheet"/>
</head> </head>
<body class="bg-gray-50 dark:bg-gray-900 min-h-screen flex flex-col text-gray-900 dark:text-gray-100"> <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") @include("common.header")
+41 -30
View File
@@ -1,75 +1,86 @@
<html lang="zh"> <html lang="zh">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>录播节目查询</title> <title>{{$program->name}} - 录播节目查询</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="{{ mix('/css/app.css') }}" rel="stylesheet"/> <link href="{{ mix('/css/app.css') }}" rel="stylesheet"/>
</head> </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") @include("common.header")
<div class="border-2 lg:w-1/2 w-full">
<div class="text-lg font-bold"> <main class="flex-grow container mx-auto px-4 sm:px-6 lg:px-8 py-8">
<span title="节目">{{$program->name}}</span> <div class="max-w-5xl mx-auto">
<span title="难度">{{$program->difficulty}}</span> <div class="bg-white dark:bg-gray-800 rounded-xl shadow-sm border border-gray-100 dark:border-gray-700 p-6 mb-8">
<span title="要求">{{$program->desc}}</span> <h1 class="text-xl font-bold text-gray-900 dark:text-white" title="节目">{{$program->name}}</h1>
<div class="mt-2 flex flex-wrap gap-x-6 gap-y-1 text-sm text-gray-500 dark:text-gray-400">
<span title="难度">难度:{{$program->difficulty}}</span>
<span title="要求">要求:{{$program->desc}}</span>
</div> </div>
<div class="ml-2"> <div class="mt-4 space-y-1">
@foreach($program->appends as $append) @foreach($program->appends as $append)
<x-append :append="$append"></x-append> <x-append :append="$append"></x-append>
@endforeach @endforeach
</div> </div>
<div> <div class="mt-4 border-t border-gray-100 dark:border-gray-700 pt-4 space-y-2">
@foreach($videos as $video_pivot) @foreach($videos as $video_pivot)
@if($video_pivot->video) @if($video_pivot->video)
<a class="block text-blue-600" href="{{url("/video/".$video_pivot->video->id)}}">查看《{{$video_pivot->video->title}}》下所有的节目</a> <a class="block text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-300 transition-colors" href="{{url("/video/".$video_pivot->video->id)}}">查看《{{$video_pivot->video->title}}》下所有的节目</a>
@else @else
<a class="block text-blue-600" href="https://www.bilibili.com/video/{{$video_pivot->video_bvid}}">查看录播</a> <a class="block text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-300 transition-colors" href="https://www.bilibili.com/video/{{$video_pivot->video_bvid}}">查看录播</a>
@endif @endif
@endforeach @endforeach
</div> </div>
</div> </div>
<table class="table-auto border-collapse w-full lg:border lg:border-black">
<thead> <div class="bg-white dark:bg-gray-800 shadow overflow-hidden rounded-lg">
<tr class="border border-black sticky bg-white lg:static top-0 left-0 right-0"> <div class="overflow-x-auto">
<td class="border">节目开始时的画面</td> <table class="min-w-full divide-y divide-gray-200 dark:divide-gray-700">
<td class="border">节目结束时的画面</td> <thead class="bg-gray-50 dark:bg-gray-700">
<tr>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">节目开始时的画面</th>
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 dark:text-gray-300 uppercase tracking-wider">节目结束时的画面</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody class="bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700">
@foreach($videos as $video_pivot) @foreach($videos as $video_pivot)
<tr class="border"> <tr class="hover:bg-gray-50 dark:hover:bg-gray-700 transition-colors">
<td class="border align-bottom"> <td class="px-6 py-4 align-top text-sm">
<x-links.video_link :bvid="$video_pivot->video_bvid" :part="$video_pivot->start_part" :time="$video_pivot->start_time"> <x-links.video_link :bvid="$video_pivot->video_bvid" :part="$video_pivot->start_part" :time="$video_pivot->start_time">
<div>{{$video_pivot->created_at}} P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}</div> <div class="text-xs text-gray-500 dark:text-gray-400 mb-1">{{$video_pivot->created_at}} P{{$video_pivot->start_part}}#{{$video_pivot->start_time}}</div>
@if($video_pivot->start_image) @if($video_pivot->start_image)
<img loading="lazy" width="300" src="{{$video_pivot->start_image}}" alt="开始时的画面"> <img loading="lazy" width="300" class="rounded border border-gray-200 dark:border-gray-600" src="{{$video_pivot->start_image}}" alt="开始时的画面">
@else @else
节目开始位置 <span class="text-xs text-gray-400 italic">节目开始位置</span>
@endif @endif
</x-links.video_link> </x-links.video_link>
@if($video_pivot->start_ocr) @if($video_pivot->start_ocr)
<canvas class="mt-1 w-full max-w-[180px] bg-black rounded" data-ocr-frame="{{ json_encode($video_pivot->start_ocr, JSON_UNESCAPED_UNICODE) }}"></canvas> <canvas class="mt-1 w-full max-w-[180px] bg-black rounded" data-ocr-frame="{{ json_encode($video_pivot->start_ocr, JSON_UNESCAPED_UNICODE) }}"></canvas>
<div class="text-xs text-gray-500">OCR @ {{ gmdate("H:i:s", (int)$video_pivot->start_ocr["ts"]) }}</div> <div class="text-xs text-gray-500 dark:text-gray-400">OCR @ {{ gmdate("H:i:s", (int)$video_pivot->start_ocr["ts"]) }}</div>
@endif @endif
</td> </td>
<td class="border align-bottom"> <td class="px-6 py-4 align-top text-sm">
<x-links.video_link :bvid="$video_pivot->video_bvid" :part="$video_pivot->stop_part" :time="$video_pivot->stop_time"> <x-links.video_link :bvid="$video_pivot->video_bvid" :part="$video_pivot->stop_part" :time="$video_pivot->stop_time">
<div>P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}</div> <div class="text-xs text-gray-500 dark:text-gray-400 mb-1">P{{$video_pivot->stop_part}}#{{$video_pivot->stop_time}}</div>
@if($video_pivot->start_image) @if($video_pivot->start_image)
<img loading="lazy" width="300" src="{{$video_pivot->stop_image}}" alt="结束时的画面"> <img loading="lazy" width="300" class="rounded border border-gray-200 dark:border-gray-600" src="{{$video_pivot->stop_image}}" alt="结束时的画面">
@else @else
节目结束位置 <span class="text-xs text-gray-400 italic">节目结束位置</span>
@endif @endif
</x-links.video_link> </x-links.video_link>
@if($video_pivot->stop_ocr) @if($video_pivot->stop_ocr)
<canvas class="mt-1 w-full max-w-[180px] bg-black rounded" data-ocr-frame="{{ json_encode($video_pivot->stop_ocr, JSON_UNESCAPED_UNICODE) }}"></canvas> <canvas class="mt-1 w-full max-w-[180px] bg-black rounded" data-ocr-frame="{{ json_encode($video_pivot->stop_ocr, JSON_UNESCAPED_UNICODE) }}"></canvas>
<div class="text-xs text-gray-500">OCR @ {{ gmdate("H:i:s", (int)$video_pivot->stop_ocr["ts"]) }}</div> <div class="text-xs text-gray-500 dark:text-gray-400">OCR @ {{ gmdate("H:i:s", (int)$video_pivot->stop_ocr["ts"]) }}</div>
@endif @endif
</td> </td>
</tr> </tr>
@endforeach @endforeach
</tbody> </tbody>
</table> </table>
</div>
</div>
</div>
</main>
<script src="{{ mix('/js/manifest.js') }}"></script> <script src="{{ mix('/js/manifest.js') }}"></script>
<script src="{{ mix('/js/component/ocr_canvas.js') }}"></script> <script src="{{ mix('/js/component/ocr_canvas.js') }}"></script>
<script>document.addEventListener("DOMContentLoaded", function () { OcrCanvas.initSnapshots(); });</script> <script>document.addEventListener("DOMContentLoaded", function () { OcrCanvas.initSnapshots(); });</script>