Compare commits

...

2 Commits

Author SHA1 Message Date
c034c94db5 Add padding to comments on home page 2025-10-09 12:38:54 +02:00
ca52584da9 Cache random hentai row for 5 minutes 2025-10-09 12:38:17 +02:00
2 changed files with 7 additions and 3 deletions

View File

@@ -26,7 +26,7 @@
<!-- Comments -->
<div class="mx-auto pt-6 sm:px-6 lg:px-8 space-y-6 max-w-[100%] xl:max-w-[95%] 2xl:max-w-[85%]">
<div class="mx-auto pt-6 sm:px-6 lg:px-8 space-y-6 max-w-[100%] xl:max-w-[95%] 2xl:max-w-[85%] pb-2">
@include('home.partials.comments')
</div>
</x-app-layout>

View File

@@ -1,8 +1,12 @@
<p class="leading-normal font-bold text-lg text-neutral-800 dark:text-white">
Random
Random <span class="font-light text-xs text-neutral-800/60 dark:text-white/40">(Cached for 5 minutes)</span>
</p>
@php $random = \App\Models\Episode::inRandomOrder()->limit(8)->get(); @endphp
@php
$random = \cache()->remember('random_home', 300, function () {
return \App\Models\Episode::inRandomOrder()->limit(8)->get(); ;
});
@endphp
<div class="mb-6">
@include('home.partials.tab.template', ['episodes' => $random, 'showThumbnails' => false])