main
Ilham Wara Nugroho 2026-02-02 11:31:02 +07:00
parent a0fef38211
commit b7b900f122
7 changed files with 296 additions and 100 deletions

View File

@ -145,6 +145,7 @@
<div class="h-1.5 w-full bg-slate-100 rounded-full mt-3 overflow-hidden">
<div id="strength-bar" class="h-full bg-slate-300 w-0 transition-all duration-300"></div>
</div>
<small class="text-red-500 mb-2"><i>Kata Sandi harus mengandung Minimal 8 karakter, maksimal 15 karakter, setidaknya 1 huruf kecil dan huruf besar, angka dan simbol </i></small>
<p id="strength-text" class="text-xs font-bold text-slate-400 mt-1 uppercase tracking-tighter">Sandi Sangat Lemah</p>
</div>
<div class="flex items-start gap-3 p-4 bg-slate-50 rounded-2xl">
@ -187,7 +188,7 @@
<span class="material-symbols-outlined text-5xl">task_alt</span>
</div>
<h3 class="text-3xl font-extrabold text-slate-900 mb-4">Registrasi Berhasil!</h3>
<p class="text-slate-600 mb-8">Data pendaftaran sekolah Anda telah diterima. Silakan cek email Anda untuk instruksi verifikasi dan login.</p>
<p class="text-slate-600 mb-8">Data pendaftaran sekolah Anda telah diterima.</p>
<button onclick="window.location.reload()" class="w-full py-4 bg-emerald-600 text-white rounded-2xl font-bold hover:bg-emerald-700 transition-all">Selesai</button>
</div>
</div>

View File

@ -1,33 +1,46 @@
@extends('layouts.app')
@extends('layouts.appNew')
@section('title',@$title)
@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 Sekolah Adiwiyata</h4>
<section id="kegiatan" class="py-24 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex flex-col md:flex-row md:items-end justify-between mb-12 gap-6">
<div class="max-w-xl">
<h2 class="text-4xl font-extrabold text-slate-900 mb-4 tracking-tight">Kegiatan Sekolah Adiwiyata</h2>
<p class="text-slate-500">Kumpulan laporan aktivitas harian dari sekolah-sekolah Adiwiyata Jakarta dalam upaya pelestarian lingkungan.</p>
</div>
<div class="flex flex-row">
<div class="grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-5">
</div>
<!-- Activity Grid -->
<div id="activity-grid" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-3 gap-8">
@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 class="activity-card group bg-white rounded-3xl shadow-sm border border-slate-100 overflow-hidden flex flex-col h-full fade-in">
<div class="relative h-48 overflow-hidden">
<img src="{{ asset($image[0]) }}" class="w-full h-full object-cover group-hover:scale-105 transition duration-500" alt="SMAN 42: Peduli Bumi &amp; Lingkungan">
<div class="absolute top-4 left-4">
<span class="px-3 py-1 rounded-full text-[10px] font-bold uppercase tracking-wider bg-green-600 text-white">
{{ $dataKeg->kategori }}
</span>
</div>
<h4 class="text-[15px] text-black font-reguler mt-2">
<a href="{{ url('kegiatan/'.$dataKeg->slug) }}">{{ $dataKeg->judul }}</a>
</h4>
</div>
<div class="p-6 flex flex-col flex-grow">
<div class="flex items-center text-slate-400 text-xs font-semibold mb-3">
<span class="material-symbols-outlined text-sm mr-1">calendar_today</span> {{ date('D',strtotime($dataKeg->created_at)) }}, {{ date('d M Y',strtotime($dataKeg->created_at)) }}
</div>
<h3 class="text-lg font-bold text-slate-900 mb-2 leading-tight group-hover:text-green-600 transition">{{ $dataKeg->judul }}</h3>
<a href="{{ url('kegiatan/'.$dataKeg->slug) }}" class="flex items-center justify-between group/btn py-2 text-green-600 font-bold text-sm">
<span>Lihat Selengkapnya</span>
<span class="material-symbols-outlined group-hover/btn:translate-x-1 transition">arrow_forward</span>
</a>
</div>
</div>
@endforeach
</div>
</div>
<div class="mt-10">
{!! $kegiatan->links() !!}
<div class="mt-16 text-center">
<button class="bg-white border-2 border-slate-200 text-slate-700 font-bold px-10 py-4 rounded-2xl hover:bg-slate-50 transition">Muat Lebih Banyak Kegiatan</button>
</div>
</section>
@endsection

View File

@ -1,12 +1,12 @@
@extends('layouts.app')
@extends('layouts.appNew')
@section('title',@$title)
@section('content')
<section id="section3" class="container mx-auto p-12 md:py-12">
<div class="flex flex-row gap-10">
<div class="w-full lg:w-2/3">
<div class="p-3 shadow-[1px_1px_5px_0px_rgba(0,0,0,0.25)] rounded-[10px]">
<div class="flex flex-col gap-3">
<section id="kegiatan" class="py-24 max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<!-- Activity Grid -->
<div id="activity-grid" class="grid grid-cols-1 md:grid-cols-1 lg:grid-cols-1 xl:grid-cols-1 gap-8">
<div class="activity-card group bg-white rounded-3xl shadow-sm border border-slate-100 overflow-hidden flex flex-col h-full fade-in">
<div class="relative h-100 overflow-hidden">
<?php
$image = json_decode($kegiatan->image);
?>
@ -16,23 +16,17 @@
<div id="carousel-inner" class="flex transition-transform duration-500">
@foreach ($image as $img)
<div class="w-full flex-shrink-0">
<img src="{{ asset($img) }}" class="w-full lg:w-[100%] h-100 rounded-[10px] object-cover" alt="Image">
<img src="{{ asset($img) }}" class="w-full lg:w-[100%] vh-100 rounded-[10px] object-cover" alt="Image">
</div>
@endforeach
</div>
</div>
<!-- Prev button -->
<button id="prevBtn"
class="absolute left-2 top-1/2 -translate-y-1/2 bg-gray-800/60 text-white p-2 rounded-full">
</button>
<button id="prevBtn" class="absolute left-2 top-1/2 -translate-y-1/2 bg-gray-800/60 text-white p-2 rounded-full"> </button>
<!-- Next button -->
<button id="nextBtn"
class="absolute right-2 top-1/2 -translate-y-1/2 bg-gray-800/60 text-white p-2 rounded-full">
</button>
<button id="nextBtn" class="absolute right-2 top-1/2 -translate-y-1/2 bg-gray-800/60 text-white p-2 rounded-full"> </button>
<!-- Indicators -->
<div id="indicators" class="absolute bottom-3 left-1/2 -translate-x-1/2 flex space-x-2">
@ -41,65 +35,53 @@
@endforeach
</div>
</div>
<div class="flex flex-row gap-3 items-center">
<span class="p-2 bg-warning text-xs rounded-[10px] text-white">Kegiatan {{ $kegiatan->kategori }}</span>
<span class="text-xs opacity-[50%]">{{ date('D',strtotime($kegiatan->created_at)) }}, {{ date('d M Y',strtotime($kegiatan->created_at)) }}</span>
</div>
<h1 class="text-2xl text-black font-bold mt-2">{{ $kegiatan->judul }}</h1>
<div class="flex items-center gap-3">
<span class="text-sm font-medium text-gray-600">Bagikan:</span>
<div class="flex gap-2">
<a href="#" onclick="shareToLinkedIn()" class="flex items-center justify-center w-10 h-10 bg-primary text-white rounded-full hover:bg-green-600 transition-colors">
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
<path d="M16.338 16.338H13.67V12.16c0-.995-.017-2.277-1.387-2.277-1.39 0-1.601 1.086-1.601 2.207v4.248H8.014v-8.59h2.559v1.174h.037c.356-.675 1.227-1.387 2.526-1.387 2.703 0 3.203 1.778 3.203 4.092v4.711zM5.005 6.575a1.548 1.548 0 11-.003-3.096 1.548 1.548 0 01.003 3.096zm-1.337 9.763H6.34v-8.59H3.667v8.59zM17.668 1H2.328C1.595 1 1 1.581 1 2.298v15.403C1 18.418 1.595 19 2.328 19h15.34c.734 0 1.332-.582 1.332-1.299V2.298C19 1.581 18.402 1 17.668 1z"></path>
</svg>
</a>
<a href="#" onclick="shareToWhatsApp()" class="flex items-center justify-center w-10 h-10 bg-success text-white rounded-full hover:bg-green-600 transition-colors">
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
<path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893A11.821 11.821 0 0020.525 3.507"></path>
</svg>
</a>
<a href="#" onclick="shareToFacebook()" class="flex items-center justify-center w-10 h-10 bg-primary text-white rounded-full hover:bg-green-600 transition-colors">
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
<path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"></path>
</svg>
</a>
<a href="#" onclick="shareToTwitter()" class="flex items-center justify-center w-10 h-10 bg-black text-white rounded-full hover:bg-green-600 transition-colors">
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path>
</svg>
</a>
{{-- <img src="" class="w-full h-full object-cover group-hover:scale-105 transition duration-500" alt="SMAN 42: Peduli Bumi &amp; Lingkungan"> --}}
<div class="absolute top-4 left-4">
<span class="px-3 py-1 rounded-full text-[10px] font-bold uppercase tracking-wider bg-green-600 text-white">
{{ $kegiatan->kategori }}
</span>
</div>
</div>
<div class="text-sm opacity-[50%]">
<div class="p-6 flex flex-col flex-grow">
<div class="flex items-center text-slate-400 text-xs font-semibold mb-3">
<span class="material-symbols-outlined text-sm mr-1">calendar_today</span> {{ date('D',strtotime($kegiatan->created_at)) }}, {{ date('d M Y',strtotime($kegiatan->created_at)) }}
</div>
<h3 class="text-lg font-bold text-slate-900 mb-2 leading-tight group-hover:text-green-600 transition">{{ $kegiatan->judul }}</h3>
<div class="text-sm opacity-[50%] mt-5">
{!!$kegiatan->body !!}
</div>
</div>
</div>
</div>
<div class="hidden lg:block w-1/3">
<div class="p-3 shadow-[1px_1px_5px_0px_rgba(0,0,0,0.25)] rounded-[10px]">
<div class="flex flex-col gap-3">
<div id="activity-grid" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-8 mt-10">
@foreach($lainnya as $dataKeg)
<?php
$image = json_decode($dataKeg->image);
?>
<div class="flex items-center gap-3 flex-row pb-3">
<div class="flex justify-end w-2/5">
<img src="{{ asset($image[0]) }}" class="rounded-[10px] ">
<div class="activity-card group bg-white rounded-3xl shadow-sm border border-slate-100 overflow-hidden flex flex-col h-full fade-in">
<div class="relative h-48 overflow-hidden">
<img src="{{ asset($image[0]) }}" class="w-full h-full object-cover group-hover:scale-105 transition duration-500" alt="SMAN 42: Peduli Bumi &amp; Lingkungan">
<div class="absolute top-4 left-4">
<span class="px-3 py-1 rounded-full text-[10px] font-bold uppercase tracking-wider bg-green-600 text-white">
{{ $dataKeg->kategori }}
</span>
</div>
<div class="flex flex-col gap-3 justify-center w-3/5">
<span class="text-xs opacity-[50%]">{{ date('D',strtotime($dataKeg->created_at)) }}, {{ date('d M Y',strtotime($dataKeg->created_at)) }}</span>
<a href="{{ url('kegiatan/'.$dataKeg->slug) }}" class="text-xs text-black font-bold">{{ $dataKeg->judul }}</a>
</div>
<div class="p-6 flex flex-col flex-grow">
<div class="flex items-center text-slate-400 text-xs font-semibold mb-3">
<span class="material-symbols-outlined text-sm mr-1">calendar_today</span> {{ date('D',strtotime($dataKeg->created_at)) }}, {{ date('d M Y',strtotime($dataKeg->created_at)) }}
</div>
<h3 class="text-lg font-bold text-slate-900 mb-2 leading-tight group-hover:text-green-600 transition">{{ $dataKeg->judul }}</h3>
<a href="{{ url('kegiatan/'.$dataKeg->slug) }}" class="flex items-center justify-between group/btn py-2 text-green-600 font-bold text-sm">
<span>Lihat Selengkapnya</span>
<span class="material-symbols-outlined group-hover/btn:translate-x-1 transition">arrow_forward</span>
</a>
</div>
</div>
@endforeach
</div>
</div>
</div>
</div>
</section>
@endsection
@section('js')

View File

@ -0,0 +1,167 @@
@extends('layouts.app')
@section('title',@$title)
@section('content')
<section id="section3" class="container mx-auto p-12 md:py-12">
<div class="flex flex-row gap-10">
<div class="w-full lg:w-2/3">
<div class="p-3 shadow-[1px_1px_5px_0px_rgba(0,0,0,0.25)] rounded-[10px]">
<div class="flex flex-col gap-3">
<?php
$image = json_decode($kegiatan->image);
?>
<div id="carousel" class="relative w-full mx-auto">
<!-- Images -->
<div class="overflow-hidden rounded-xl relative">
<div id="carousel-inner" class="flex transition-transform duration-500">
@foreach ($image as $img)
<div class="w-full flex-shrink-0">
<img src="{{ asset($img) }}" class="w-full lg:w-[100%] h-100 rounded-[10px] object-cover" alt="Image">
</div>
@endforeach
</div>
</div>
<!-- Prev button -->
<button id="prevBtn"
class="absolute left-2 top-1/2 -translate-y-1/2 bg-gray-800/60 text-white p-2 rounded-full">
</button>
<!-- Next button -->
<button id="nextBtn"
class="absolute right-2 top-1/2 -translate-y-1/2 bg-gray-800/60 text-white p-2 rounded-full">
</button>
<!-- Indicators -->
<div id="indicators" class="absolute bottom-3 left-1/2 -translate-x-1/2 flex space-x-2">
@foreach ($image as $index => $img)
<button class="w-3 h-3 rounded-full {{ $index === 0 ? 'bg-white' : 'bg-gray-400' }}"></button>
@endforeach
</div>
</div>
<div class="flex flex-row gap-3 items-center">
<span class="p-2 bg-warning text-xs rounded-[10px] text-white">Kegiatan {{ $kegiatan->kategori }}</span>
<span class="text-xs opacity-[50%]">{{ date('D',strtotime($kegiatan->created_at)) }}, {{ date('d M Y',strtotime($kegiatan->created_at)) }}</span>
</div>
<h1 class="text-2xl text-black font-bold mt-2">{{ $kegiatan->judul }}</h1>
<div class="flex items-center gap-3">
<span class="text-sm font-medium text-gray-600">Bagikan:</span>
<div class="flex gap-2">
<a href="#" onclick="shareToLinkedIn()" class="flex items-center justify-center w-10 h-10 bg-primary text-white rounded-full hover:bg-green-600 transition-colors">
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 20 20">
<path d="M16.338 16.338H13.67V12.16c0-.995-.017-2.277-1.387-2.277-1.39 0-1.601 1.086-1.601 2.207v4.248H8.014v-8.59h2.559v1.174h.037c.356-.675 1.227-1.387 2.526-1.387 2.703 0 3.203 1.778 3.203 4.092v4.711zM5.005 6.575a1.548 1.548 0 11-.003-3.096 1.548 1.548 0 01.003 3.096zm-1.337 9.763H6.34v-8.59H3.667v8.59zM17.668 1H2.328C1.595 1 1 1.581 1 2.298v15.403C1 18.418 1.595 19 2.328 19h15.34c.734 0 1.332-.582 1.332-1.299V2.298C19 1.581 18.402 1 17.668 1z"></path>
</svg>
</a>
<a href="#" onclick="shareToWhatsApp()" class="flex items-center justify-center w-10 h-10 bg-success text-white rounded-full hover:bg-green-600 transition-colors">
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
<path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893A11.821 11.821 0 0020.525 3.507"></path>
</svg>
</a>
<a href="#" onclick="shareToFacebook()" class="flex items-center justify-center w-10 h-10 bg-primary text-white rounded-full hover:bg-green-600 transition-colors">
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
<path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"></path>
</svg>
</a>
<a href="#" onclick="shareToTwitter()" class="flex items-center justify-center w-10 h-10 bg-black text-white rounded-full hover:bg-green-600 transition-colors">
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
<path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"></path>
</svg>
</a>
</div>
</div>
<div class="text-sm opacity-[50%]">
{!!$kegiatan->body !!}
</div>
</div>
</div>
</div>
<div class="hidden lg:block w-1/3">
<div class="p-3 shadow-[1px_1px_5px_0px_rgba(0,0,0,0.25)] rounded-[10px]">
<div class="flex flex-col gap-3">
@foreach($lainnya as $dataKeg)
<?php
$image = json_decode($dataKeg->image);
?>
<div class="flex items-center gap-3 flex-row pb-3">
<div class="flex justify-end w-2/5">
<img src="{{ asset($image[0]) }}" class="rounded-[10px] ">
</div>
<div class="flex flex-col gap-3 justify-center w-3/5">
<span class="text-xs opacity-[50%]">{{ date('D',strtotime($dataKeg->created_at)) }}, {{ date('d M Y',strtotime($dataKeg->created_at)) }}</span>
<a href="{{ url('kegiatan/'.$dataKeg->slug) }}" class="text-xs text-black font-bold">{{ $dataKeg->judul }}</a>
</div>
</div>
@endforeach
</div>
</div>
</div>
</div>
</section>
@endsection
@section('js')
<script>
function shareToFacebook() {
const url = encodeURIComponent(window.location.href);
const title = encodeURIComponent(document.querySelector('h1').textContent);
window.open(`https://www.facebook.com/sharer/sharer.php?u=${url}`, '_blank', 'noopener,noreferrer,width=600,height=400');
}
function shareToTwitter() {
const url = encodeURIComponent(window.location.href);
const title = encodeURIComponent(document.querySelector('h1').textContent);
window.open(`https://twitter.com/intent/tweet?url=${url}&text=${title}`, '_blank', 'noopener,noreferrer,width=600,height=400');
}
function shareToWhatsApp() {
const url = encodeURIComponent(window.location.href);
const title = encodeURIComponent(document.querySelector('h1').textContent);
window.open(`https://wa.me/?text=${title}%20${url}`, '_blank', 'noopener,noreferrer');
}
function shareToLinkedIn() {
const url = encodeURIComponent(window.location.href);
const title = encodeURIComponent(document.querySelector('h1').textContent);
window.open(`https://www.linkedin.com/sharing/share-offsite/?url=${url}`, '_blank', 'noopener,noreferrer,width=600,height=400');
}
</script>
<script>
const carouselInner = document.getElementById("carousel-inner");
const prevBtn = document.getElementById("prevBtn");
const nextBtn = document.getElementById("nextBtn");
const indicators = document.querySelectorAll("#indicators button");
const totalSlides = indicators.length;
let currentIndex = 0;
function updateCarousel() {
carouselInner.style.transform = `translateX(-${currentIndex * 100}%)`;
indicators.forEach((dot, idx) => {
dot.classList.toggle("bg-white", idx === currentIndex);
dot.classList.toggle("bg-gray-400", idx !== currentIndex);
});
}
prevBtn.addEventListener("click", () => {
currentIndex = (currentIndex - 1 + totalSlides) % totalSlides;
updateCarousel();
});
nextBtn.addEventListener("click", () => {
currentIndex = (currentIndex + 1) % totalSlides;
updateCarousel();
});
indicators.forEach((dot, idx) => {
dot.addEventListener("click", () => {
currentIndex = idx;
updateCarousel();
});
});
</script>
@endsection

View File

@ -0,0 +1,33 @@
@extends('layouts.app')
@section('title',@$title)
@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 Sekolah Adiwiyata</h4>
</div>
<div class="flex flex-row">
<div class="grid grid-cols-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-[15px] text-black font-reguler mt-2">
<a href="{{ url('kegiatan/'.$dataKeg->slug) }}">{{ $dataKeg->judul }}</a>
</h4>
</div>
</div>
@endforeach
</div>
</div>
<div class="mt-10">
{!! $kegiatan->links() !!}
</div>
</section>
@endsection

View File

@ -143,7 +143,7 @@
<a href="{{ url('/') }}" class="text-sm font-semibold hover:text-emerald-600 transition">Beranda</a>
<a href="{{ url('/sekolah') }}" class="text-sm font-semibold hover:text-emerald-600 transition">Daftar Sekolah Adiwiyata</a>
<a href="{{ url('/kegiatan') }}" class="text-sm font-semibold hover:text-emerald-600 transition">Kegiatan Sekolah Adiwiyata</a>
<a href="{{ url('/galeri') }}" class="text-sm font-semibold hover:text-emerald-600 transition">Galeri</a>
{{-- <a href="{{ url('/galeri') }}" class="text-sm font-semibold hover:text-emerald-600 transition">Galeri</a> --}}
<div class="h-6 w-[1px] bg-slate-200"></div>
<a href="{{ url('login') }}" class="px-6 py-2.5 flex items-center gap-2 rounded-full green-gradient text-white text-sm font-bold shadow-lg shadow-emerald-200 hover:shadow-emerald-300 transform hover:scale-105 transition">Masuk <span class="material-symbols-outlined text-lg">login</span></a>
</div>

View File

@ -55,7 +55,7 @@ Route::get('/',[FrontController::class,'index'])->name('index');
Route::get('/sekolah',[FrontController::class,'sekolah'])->name('sekolah');
Route::get('/kegiatan',[FrontController::class,'kegiatan'])->name('kegiatan');
Route::get('/kegiatan/{slug}',[FrontController::class,'kegiatan_detail'])->name('kegiatan_detail');
Route::get('/galeri',[FrontController::class,'galeri'])->name('galeri');
// Route::get('/galeri',[FrontController::class,'galeri'])->name('galeri');
Route::get('/data/sekolah',[FrontController::class,'dataSekolah'])->name('dataSekolah');
// Auth::routes();