使用Mix,Tailwind,更改对应样式

This commit is contained in:
2022-07-14 13:07:10 +08:00
parent 23dfef114e
commit eab7f1f3aa
20 changed files with 5483 additions and 145 deletions

View File

@ -19,7 +19,7 @@ class CommentQueryController extends BaseController
}
}
}
$comments = $query->limit(20)->get();
$comments = $query->paginate(10);
return view("index", [
"keyword" => $keyword,
"comments" => $comments,

View File

@ -11,7 +11,7 @@ class DanmakuQueryController extends BaseController
{
public function index()
{
$video_list = Videos::query()->withCount("danmakus")->orderByDesc("created_at")->limit(20)->get();
$video_list = Videos::query()->withCount("danmakus")->orderByDesc("created_at")->paginate(10);
return view("danmaku.index", [
"video_list" => $video_list,
]);
@ -21,8 +21,8 @@ class DanmakuQueryController extends BaseController
{
$video = Videos::query()->withCount("danmakus")->where("bvid", "=", $bvid)->firstOrFail();
$keyword = $request->get("keyword", "");
$query = VideoDanmakus::query()->where("video_bvid", "=", $bvid);
if ($keyword) {
$query = VideoDanmakus::query()->where("video_bvid", "=", $bvid);
$keyword_split = explode(" ", $keyword);
foreach ($keyword_split as $_keyword) {
if (mb_strlen(trim($_keyword)) > 0) {
@ -31,10 +31,8 @@ class DanmakuQueryController extends BaseController
});
}
}
$danmakus = $query->orderBy("created_at", "asc")->get();
} else {
$danmakus = [];
}
$danmakus = $query->orderBy("created_at", "asc")->paginate(20);
return view("danmaku.search_index", [
"keyword" => $keyword,
"video" => $video,