sekolah_adiwiyata/resources/views/kegiatan.blade.php

36 lines
1.6 KiB
PHP

@extends('layouts.app')
@section('content')
<section id="section3" class="container mx-auto p-12 md:py-12">
<div class="flex justify-between mb-15">
<h4 class="text-lg md:text-2xl font-extrabold text-black">Kegiatan Adiwiyata</h4>
</div>
<div class="flex flex-row">
<div class="grid grid-rows-1 md:grid-cols-3 lg:grid-cols-4 gap-5">
@foreach($kegiatan as $dataKeg)
<?php
$image = json_decode($dataKeg->image);
?>
<div class="p-3 border border-[#eaeaea] rounded-[10px] shadow-[2px_1px_5px_0px_rgba(0,0,0,0.10)]">
<div class="flex flex-col gap-3">
<img src="{{ asset($image[0]) }}" alt="" class="w-full object-cover rounded-sm h-40 lg:w-[100%]">
<div class="flex flex-row gap-3 items-center">
<span class="p-2 bg-warning text-xs rounded-[10px] text-white">Kegiatan {{ $dataKeg->kategori }}</span>
<span class="text-xs opacity-[50%]">{{ date('D',strtotime($dataKeg->created_at)) }}, {{ date('d M Y',strtotime($dataKeg->created_at)) }}</span>
</div>
<h4 class="text-md text-black font-bold mt-2">{{ $dataKeg->judul }}</h4>
<div class="text-xs opacity-[50%]">
{!! substr(strip_tags($dataKeg->body),0,200) !!}
</div>
<a href="{{ url('kegiatan/'.$dataKeg->slug) }}" class="text-sm text-warning rounded-[10px] mx-auto md:mx-0 flex flex-row gap-3 ">
<span>Baca Selengkapnya</span> <x-lucide-arrow-right width="20" class="text-warning"/>
</a>
</div>
</div>
@endforeach
</div>
</div>
<div class="mt-10">
{!! $kegiatan->links() !!}
</div>
</section>
@endsection