sekolah_adiwiyata/resources/views/index.blade.php

247 lines
12 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

@extends('layouts.app')
@section('title',@$title)
@section('content')
<section id="section1" class="relative overflow-hidden md:py-50 md:pt-20 md:px-20">
<!-- Enhanced Animated Background Elements -->
<div class="absolute inset-0 bg-gradient-to-br from-slate-50 via-white to-gray-100">
<div class="absolute inset-0 bg-grid-pattern opacity-[0.03]"></div>
<div class="absolute top-0 left-0 w-full h-full overflow-hidden">
<div class="blob blob-1 absolute top-[10%] right-[15%] w-[40vw] h-[40vw] rounded-full mix-blend-multiply filter blur-[80px] animate-blob-slow opacity-15 bg-gradient-to-br from-green-300 to-emerald-400"></div>
<div class="blob blob-2 absolute bottom-[5%] left-[20%] w-[35vw] h-[35vw] rounded-full mix-blend-multiply filter blur-[80px] animate-blob-slow animation-delay-2000 opacity-15 bg-gradient-to-br from-amber-300 to-orange-400"></div>
<div class="blob blob-3 absolute top-[30%] left-[10%] w-[30vw] h-[30vw] rounded-full mix-blend-multiply filter blur-[80px] animate-blob-slow animation-delay-4000 opacity-15 bg-gradient-to-tr from-green-400 to-teal-300"></div>
</div>
</div>
<div class="flex flex-col md:flex-row px-4 container mx-auto my-40 md:my-0 gap-3">
<div class="w-full md:w-3/5 z-10 relative items-center">
<div class="flex flex-col justify-center text-center md:text-left item-center gap-0">
<h4 class="mb-2 text-lg font-semibold animate-fade-in" style="animation-delay: 0.4s">
<span class="text-black">Selamat Datang di Portal Resmi SIDIA Jakarta</span>
</h4>
<h2 class="mb-5 text-3xl md:text-3xl lg:text-4xl font-extrabold animate-fade-in" style="animation-delay: 0.4s">
<span class="text-warning">Sistem Informasi Sekolah Adiwiyata</span> <br>
<span class="text-black">DKI Jakarta (SIDIA Jakarta)</span>
</h2>
<p class="mb-5 text-gray-600 text-lg max-w-2xl leading-relaxed mb-2 animate-fade-in" style="animation-delay: 0.8s">
Sistem Informasi Sekolah Adiwiyata DKI Jakarta <br>
Bersama kita wujudkan pendidikan yang berwawasan lingkungan, terintegrasi, dan berkelanjutan
</p>
<a onclick="document.getElementById('section2').scrollIntoView({ behavior: 'smooth' });" class="p-3 cursor-pointer text-white bg-success rounded-[10px] mx-auto md:mx-0 w-50 text-center flex flex-row gap-3 shadow-[10px_10px_10px_0px_rgba(0,0,0,0.25)]">
<span>Lihat Selengkapnya</span> <x-lucide-arrow-down width="20" class="text-white"/>
</a>
</div>
</div>
<div class="w-2/5 relative flex md:block hidden">
<div class="flex flex-col absolute top-0 left-0 right-10 w-full h-full">
<img class="left-[100px] top-0 absolute " src="{{ asset('img2.svg') }}" />
<img class="left-0 top-[90px] absolute " src="{{ asset('img1.svg') }}" />
</div>
</div>
</div>
</section>
<section id="section2" class="container mx-auto p-12 md:py-12">
<div class="grid grid-rows-1 md:grid-cols-3 gap-5">
<div class="bg-danger flex flex-col justify-around text-white rounded-xl gap-3 py-10 shadow-[10px_10px_10px_0px_rgba(0,0,0,0.25)]">
<div class="text-6xl lg:text-7xl font-extrabold text-center">{{ $usulan['kota'] }}</div>
<div class="flex justify-around items-center">
<div class="flex flex-col">
<span class="font-extrabold">Kota</span>
<span class="opacity-[70%]">Sekolah Adiwiyata</span>
</div>
<div>
<span class="font-extrabold">2025</span>
</div>
</div>
</div>
<div class="bg-info flex flex-col justify-around text-white rounded-xl gap-3 py-10 shadow-[10px_10px_10px_0px_rgba(0,0,0,0.25)]">
<div class="text-6xl lg:text-7xl font-extrabold text-center">{{ $usulan['provinsi'] }}</div>
<div class="flex justify-around items-center">
<div class="flex flex-col">
<span class="font-extrabold">Provinsi</span>
<span class="opacity-[70%]">Sekolah Adiwiyata</span>
</div>
<div>
<span class="font-extrabold">2025</span>
</div>
</div>
</div>
<div class="bg-warning flex flex-col justify-around text-white rounded-xl gap-3 py-10 shadow-[10px_10px_10px_0px_rgba(0,0,0,0.25)]">
<div class="text-6xl lg:text-7xl font-extrabold text-center">{{ $usulan['nasional'] }}</div>
<div class="flex justify-around items-center">
<div class="flex flex-col">
<span class="font-extrabold">Nasional</span>
<span class="opacity-[70%]">Sekolah Adiwiyata</span>
</div>
<div>
<span class="font-extrabold">2025</span>
</div>
</div>
</div>
</div>
</section>
<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>
<a href="{{ url('kegiatan') }}" class="p-2 text-white text-sm bg-warning rounded-[10px] mx-auto md:mx-0 text-center flex flex-row justify-between gap-3 ">
<span>Lihat Semua</span> <x-lucide-arrow-right width="20" class="text-white text-right"/>
</a>
</div>
<div class="flex flex-row gap-10">
<div class="w-full lg:w-2/3">
<div class="flex flex-col gap-3">
<?php
$image = json_decode(@$kegiatan[0]->image);
?>
<img src="{{ asset(@$image[0]) }}" alt="" class="w-full lg:w-[100%] rounded-[10px]">
<div class="flex flex-row gap-3 items-center">
<span class="p-2 bg-warning text-xs rounded-[10px] text-white">Kegiatan {{ @$kegiatan[0]->kategori }}</span>
<span class="text-xs opacity-[50%]">{{ date('D',strtotime(@$kegiatan[0]->created_at)) }}, {{ date('d M Y',strtotime(@$kegiatan[0]->created_at)) }}</span>
</div>
<h4 class="text-2xl text-black font-bold mt-2">{{ @$kegiatan[0]->judul }}</h4>
<div class="text-sm opacity-[50%]">
{!! substr(strip_tags(@$kegiatan[0]->body),0,1000) !!}
</div>
<a href="{{ url('kegiatan/'.@$kegiatan[0]->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>
<div class="hidden lg:block w-1/3">
<div class="flex flex-col gap-3">
@foreach($side_kegiatan as $dataKeg)
<?php
$images = json_decode($dataKeg->image);
?>
<div class="flex items-center gap-3 flex-row border-b-1 border-b-[#eee] pb-3">
<div class="flex justify-end w-2/5">
<img src="{{ asset(@$images[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>
</section>
<section id="section4" 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">Galeri Sekolah Adiwiyata</h4>
<a href="{{ url('galeri') }}" class="p-2 text-white text-sm bg-warning rounded-[10px] mx-auto md:mx-0 text-center flex flex-row justify-between gap-3 ">
<span>Lihat Semua</span> <x-lucide-arrow-right width="20" class="text-white text-right"/>
</a>
</div>
<div class="flex flex-row gap-10">
<div class="grid grid-cols-1 md:grid-cols-3 lg:grid-cols-4 gap-5">
@foreach($kegiatan as $dataKeg)
<?php
$images = json_decode($dataKeg->image);
?>
<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">{{ 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"/>
</a>
</div>
</div>
@endforeach
</div>
</div>
</section>
<section id="helpdesk" class="bg-gradient-to-r from-[#009D66] to-[#F7AE15]">
<div class="container mx-auto p-12 md:py-12">
<div class="flex flex-col md:flex-row items-center justify-between">
<div class="flex flex-col gap-1">
<h4 class="text-white">Ada Kendala Terkait Sekolah Adiwiyata ?</h4>
<h4 class="text-3xl md:text-4xl font-extrabold text-white">Hubungi Helpdesk Kami</h4>
</div>
<div class="flex flex-col mt-5 md:mt-0 md:flex-row gap-2">
<div class="border rounded text-white px-3 py-3 hover:bg-white hover:border-white hover:text-[#009D66] transition">
<a target="_blank" href="https://api.whatsapp.com/send/?phone=628521243172" class=" flex">
<span class="mt-1"><x-lucide-phone width="18" class=""/></span>&nbsp;0852-1243-1726
</a>
</div>
<div class="border rounded text-white px-3 py-3 hover:bg-white hover:border-white hover:text-[#009D66] transition">
<a target="_blank" href="mailto:dinaslh@jakarta.go.id" class=" flex">
<span class="mt-1"><x-lucide-mail width="18" class=""/></span>&nbsp;dinaslh@jakarta.go.id
</a>
</div>
<div class="border rounded text-white px-3 py-3 hover:bg-white hover:border-white hover:text-[#009D66] transition">
<a target="_blank" href="{{ asset('manual_book.pdf') }}" download class=" flex">
<span class="mt-1"><x-lucide-download width="18" class=""/></span>&nbsp;Download Panduan
</a>
</div>
</div>
</div>
{{-- <br> --}}
{{-- <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Necessitatibus odio quo mollitia blanditiis ab dolor commodi rerum eaque! Tempore corporis doloribus amet culpa repudiandae similique! Blanditiis a dolorem soluta vero.</p> --}}
</div>
</section>
<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">
<!-- tombol navigasi -->
<button id="prev" class="absolute left-0 top-1/2 transform -translate-y-1/2 bg-gray-800 text-white px-3 py-1 rounded"></button>
<button id="next" class="absolute right-0 top-1/2 transform -translate-y-1/2 bg-gray-800 text-white px-3 py-1 rounded"></button>
</div>
<div class="flex justify-end space-x-2 mt-1">
<button onclick="closeModal()" class="bg-gray-300 text-gray-700 px-4 py-2 cursor-pointer rounded">Tutup</button>
</div>
</div>
</div>
@endsection
@section('js')
<script src="https://code.jquery.com/jquery-3.7.1.js"></script>
<script>
let slides = [];
let currentIndex = 0;
$('.btnmodal').on('click', function(e){
e.preventDefault();
$('#myModal').removeClass('hidden');
$('#judul').html($(this).data('judul'));
// ambil data-images dan parse JSON
slides = $(this).data('url');
if (!Array.isArray(slides)) {
slides = JSON.parse(slides);
}
console.log(slides);
currentIndex = 0;
$('#image').attr('src', "{{ asset('/') }}"+slides[currentIndex]);
});
// tombol navigasi
$('#next').on('click', function(){
if(slides.length > 0){
currentIndex = (currentIndex + 1) % slides.length;
$('#image').attr('src', "{{ asset('/') }}"+slides[currentIndex]);
}
});
$('#prev').on('click', function(){
if(slides.length > 0){
currentIndex = (currentIndex - 1 + slides.length) % slides.length;
$('#image').attr('src', "{{ asset('/') }}"+slides[currentIndex]);
}
});
function closeModal(){
$('#myModal').addClass('hidden');
}
</script>
@endsection