upadte
parent
2a006b57b2
commit
9baa7e29ab
|
@ -7,7 +7,8 @@ use App\Models\Konten\Kegiatan;
|
|||
class FrontController extends Controller
|
||||
{
|
||||
function index() {
|
||||
$data['kegiatan'] = Kegiatan::orderBy('KegiatanId','DESC')->limit(5)->get();
|
||||
$data['side_kegiatan'] = Kegiatan::orderBy('KegiatanId','DESC')->limit(5)->get();
|
||||
$data['kegiatan'] = Kegiatan::orderBy('KegiatanId','DESC')->limit(8)->get();
|
||||
return view('index',$data);
|
||||
}
|
||||
function sekolah() {
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
<?php
|
||||
$images = json_decode($dataKeg->image);
|
||||
?>
|
||||
<div class="relative group w-full overflow-hidden rounded-lg shadow-[10px_10px_10px_0px_rgba(0,0,0,0.25)]">
|
||||
<div class="relative group w-full h-50 overflow-hidden rounded-lg shadow-[10px_10px_10px_0px_rgba(0,0,0,0.25)]">
|
||||
<img src="{{ asset($images[0]) }}" class="w-full h-full object-cover" alt="Galeri">
|
||||
<div class="absolute inset-0 bg-success bg-opacity-50 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex flex-col justify-center p-4 gap-3">
|
||||
<h4 class="mb-5 font-bold text-white w-50">{{ $dataKeg->judul }}</h4>
|
||||
<h4 class="mb-5 font-bold text-white w-50">{{ substr($dataKeg->judul,0,35) }}...</h4>
|
||||
{{-- <p class="text-white text-sm font-normal">1 Agustus 2025</p> --}}
|
||||
{{-- <button class="rounded-md bg-gray-950/5 px-2.5 py-1.5 text-sm font-semibold text-gray-900 hover:bg-gray-950/10">Open dialog</button> --}}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@
|
|||
</div>
|
||||
<div class="hidden lg:block w-1/3">
|
||||
<div class="flex flex-col gap-3">
|
||||
@foreach($kegiatan as $dataKeg)
|
||||
@foreach($side_kegiatan as $dataKeg)
|
||||
<?php
|
||||
$images = json_decode($dataKeg->image);
|
||||
?>
|
||||
|
@ -140,10 +140,10 @@
|
|||
<?php
|
||||
$images = json_decode($dataKeg->image);
|
||||
?>
|
||||
<div class="relative group w-full overflow-hidden rounded-lg shadow-[10px_10px_10px_0px_rgba(0,0,0,0.25)]">
|
||||
<div class="relative group w-full h-50 overflow-hidden rounded-lg shadow-[10px_10px_10px_0px_rgba(0,0,0,0.25)]">
|
||||
<img src="{{ asset(@$images[0]) }}" class="w-full h-full object-cover" alt="Galeri">
|
||||
<div class="absolute inset-0 bg-success bg-opacity-50 opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex flex-col justify-center p-4 gap-3">
|
||||
<h4 class="mb-5 font-bold text-white w-50">{{ $dataKeg->judul }}</h4>
|
||||
<h4 class="mb-5 font-bold text-white w-50">{{ substr($dataKeg->judul,0,35) }}...</h4>
|
||||
{{-- <p class="text-white text-sm font-normal">1 Agustus 2025</p> --}}
|
||||
<a href="#" data-url="{{$dataKeg->image}}" data-judul="{{$dataKeg->judul}}" class="btnmodal p-2 text-black text-sm bg-white opacity-50 rounded-[10px] mx-auto md:mx-0 text-center flex flex-row justify-between gap-3 w-40 ">
|
||||
<span>Lihat Detail</span> <x-lucide-arrow-right width="20" class="text-black text-right"/>
|
||||
|
@ -155,7 +155,7 @@
|
|||
</div>
|
||||
</section>
|
||||
|
||||
<div id="myModal" class="fixed inset-0 z-50 hidden bg-black/50 flex items-center justify-center">
|
||||
<div id="myModal" class="fixed inset-0 z-50 hidden bg-black/50 flex items-center justify-center overflow-y-scroll">
|
||||
<div class="bg-white rounded-lg shadow-lg w-1/2 p-6 relative">
|
||||
<div id="carousel" class="relative w-full flex transition-transform duration-500">
|
||||
<img id="image" src="" alt="" class="w-full rounded">
|
||||
|
|
Loading…
Reference in New Issue