From 1369712796ffa92b3bd0ec2fb702fb4f769342a8 Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Mon, 27 Feb 2023 23:16:14 +0700 Subject: [PATCH 1/6] Perbaiki slider tidak bisa lebih dari 4 --- public/css/slider.css | 382 ++---------------- .../views/layouts/frontends/slider.blade.php | 123 ++---- 2 files changed, 75 insertions(+), 430 deletions(-) diff --git a/public/css/slider.css b/public/css/slider.css index 87c117c22..d95fd6f5a 100644 --- a/public/css/slider.css +++ b/public/css/slider.css @@ -1,22 +1,19 @@ /* @media only screen and (min-width:768px) { */ -#slider { +.swiper { width: 100%; - height: 160px; + height: 450px; position: relative; overflow: hidden; } -.slides { +.swiper-wrapper { width: 400%; height: 100%; position: relative; - -webkit-animation: slide 30s infinite; - -moz-animation: slide 30s infinite; - animation: slide 30s infinite; } .slider-class { - width: 25%; + width: 100%; height: 100%; float: left; position: relative; @@ -45,8 +42,8 @@ } .legend { - border: 220px solid transparent; - border-left: 220px solid rgba(52, 73, 94, 0.7); + border: 520px solid transparent; + border-left: 520px solid rgba(52, 73, 94, 0.7); border-bottom: 0; position: absolute; bottom: 0; @@ -65,22 +62,19 @@ height: 50px; float: left; position: relative; - top: 55px; - -webkit-animation: content-s 7.5s infinite; - -moz-animation: content-s 7.5s infinite; - animation: content-s 7.5s infinite; + top: 255px; } .content-txt h1 { font-family: "Avant Garde", Avantgarde, "Century Gothic", CenturyGothic, "AppleGothic", sans-serif; text-transform: uppercase; - font-size: 11px; + font-size: 24px; color: #f39c12; text-align: left; - margin-left: 10px; + margin-left: 20px; padding-bottom: 0px; - width: 125px; + width: 325px; text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.2); } @@ -88,371 +82,57 @@ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; font-weight: normal; - font-size: 8.5px; + font-size: 18px; font-style: italic; color: #fff; text-align: left; - margin-left: 10px; + margin-left: 20px; margin-top: 10px; - width: 150px; + width: 350px; line-height: 12px; } -.switch { - width: 100px; - height: 10px; - position: absolute; - bottom: 10px; - z-index: 1; - left: 10px; -} - -.switch > ul { - list-style: none; -} - -.switch > ul > li { - width: 8px; - height: 8px; - border-radius: 50%; - background: #333; - float: left; - margin-right: 5px; - cursor: pointer; -} - -.switch ul { - overflow: hidden; +.swiper-pagination-bullet-active { + background: #ff4900 !important; } /* Desktop */ -@media screen and (min-width: 768px) { +@media screen and (max-width: 768px) { #slider { height: 400px; } + .swiper { + height: 180px; + } + + .content-slide { + width: 23%; + } + .content-txt { - top: 200px; + top: 60px; } .content-txt h1 { - font-size: 24px; - margin-left: 30px; - padding-bottom: 10px; + font-size: 12px; width: auto; } .content-txt h2 { - font-size: 14px; - margin-left: 30px; - margin-top: 20px; + font-size: 10px; + margin-top: 10px; width: auto; line-height: 18px; } .legend { - border: 500px solid transparent; - border-left: 500px solid rgba(52, 73, 94, 0.7); + border: 280px solid transparent; + border-left: 280px solid rgba(52, 73, 94, 0.7); border-bottom: 0; position: absolute; bottom: 0; } - - .switch { - width: 120px; - height: 10px; - left: 30px; - } - - .switch > ul { - list-style: none; - } - - .switch > ul > li { - width: 10px; - height: 10px; - } -} - -.on { - width: 100%; - height: 100%; - border-radius: 50%; - background: #ff4900; - position: relative; - -webkit-animation: on 30s infinite; - -moz-animation: on 30s infinite; - animation: on 30s infinite; -} - -@-webkit-keyframes slide { - 0%, - 100% { - margin-left: 0; - } - 21% { - margin-left: 0; - } - 25% { - margin-left: -100%; - } - 46% { - margin-left: -100%; - } - 50% { - margin-left: -200%; - } - 71% { - margin-left: -200%; - } - 75% { - margin-left: -300%; - } - 96% { - margin-left: -300%; - } -} - -@-moz-keyframes slide { - 0%, - 100% { - margin-left: 0; - } - 21% { - margin-left: 0; - } - 25% { - margin-left: -100%; - } - 46% { - margin-left: -100%; - } - 50% { - margin-left: -200%; - } - 71% { - margin-left: -200%; - } - 75% { - margin-left: -300%; - } - 96% { - margin-left: -300%; - } -} - -@keyframes slide { - 0%, - 100% { - margin-left: 0; - } - 21% { - margin-left: 0; - } - 25% { - margin-left: -100%; - } - 46% { - margin-left: -100%; - } - 50% { - margin-left: -200%; - } - 71% { - margin-left: -200%; - } - 75% { - margin-left: -300%; - } - 96% { - margin-left: -300%; - } -} - -@-webkit-keyframes content-s { - 0% { - left: -420px; - } - 10% { - left: 0; - } - 30% { - left: 0; - } - 40% { - left: 0; - } - 50% { - left: 0; - } - 60% { - left: 0; - } - 70% { - left: 0; - } - 80% { - left: -420px; - } - 90% { - left: -420px; - } - 100% { - left: -420px; - } -} - -@-moz-keyframes content-s { - 0% { - left: -420px; - } - 10% { - left: 0; - } - 30% { - left: 0; - } - 40% { - left: 0; - } - 50% { - left: 0; - } - 60% { - left: 0; - } - 70% { - left: 0; - } - 80% { - left: -420px; - } - 90% { - left: -420px; - } - 100% { - left: -420px; - } -} - -@keyframes content-s { - 0% { - left: -420px; - } - 10% { - left: 20px; - } - 15% { - left: 0; - } - 30% { - left: 0; - } - 40% { - left: 0; - } - 50% { - left: 0; - } - 60% { - left: 0; - } - 70% { - left: 0; - } - 80% { - left: -420px; - } - 90% { - left: -420px; - } - 100% { - left: -420px; - } -} - -@-webkit-keyframes on { - 0%, - 100% { - margin-left: 0; - } - 21% { - margin-left: 0; - } - 25% { - margin-left: 15px; - } - 46% { - margin-left: 15px; - } - 50% { - margin-left: 30px; - } - 71% { - margin-left: 30px; - } - 75% { - margin-left: 45px; - } - 96% { - margin-left: 45px; - } -} - -@-moz-keyframes on { - 0%, - 100% { - margin-left: 0; - } - 21% { - margin-left: 0; - } - 25% { - margin-left: 15px; - } - 46% { - margin-left: 15px; - } - 50% { - margin-left: 30px; - } - 71% { - margin-left: 30px; - } - 75% { - margin-left: 45px; - } - 96% { - margin-left: 45px; - } -} - -@keyframes on { - 0%, - 100% { - margin-left: 0; - } - 21% { - margin-left: 0; - } - 25% { - margin-left: 15px; - } - 46% { - margin-left: 15px; - } - 50% { - margin-left: 30px; - } - 71% { - margin-left: 30px; - } - 75% { - margin-left: 45px; - } - 96% { - margin-left: 45px; - } } .dk-line { @@ -460,4 +140,4 @@ background: #ff4900; position: relative; padding: 2px 10px; -} +} \ No newline at end of file diff --git a/resources/views/layouts/frontends/slider.blade.php b/resources/views/layouts/frontends/slider.blade.php index 6c577a8cd..8d542b100 100644 --- a/resources/views/layouts/frontends/slider.blade.php +++ b/resources/views/layouts/frontends/slider.blade.php @@ -1,86 +1,51 @@ @if (Route::currentRouteName() === 'beranda') -
-
- @php $slides = \App\Models\Slide::orderBy('created_at','DESC')->take(4)->get(); @endphp - @forelse ($slides as $slide) - -
-
-
-
-

{{ $slide->judul }}

-

{{ $slide->deskripsi }}

+
+
+ @php $slides = \App\Models\Slide::orderBy('created_at','DESC')->get(); @endphp + @foreach ($slides as $slide) +
+
+
+
+
+

{{ $slide->judul }}

+

{{ $slide->deskripsi }}

+
-
-
- -
-
- @empty -
-
-
-
-

Pantai Garassikang

-

Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan

-
-
-
- -
-
-
-
-
-
-

Batu Siping

-

Lokasi: Karampuang, Desa Garassikang, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan.

+
+
-
- -
-
-
-
-
-

Bukit Sinalu Bulu Jaya

-

Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan

-
-
-
- -
-
-
-
-
-
-

Pantai Tamarunang

-

Lokasi: Tamarunang, Pabiringa, Kecamatan Binamu, Kabupaten Jeneponto, Sulawesi Selatan

-
-
-
- -
-
- @endforelse - - + @endforeach
-
-
    -
  • -
    -
  • -
  • -
  • -
  • -
-
-
-
-
-@endif \ No newline at end of file + +
+
+ +
+
+
+@endif + +@push('scripts') + + @endpush \ No newline at end of file From e02df5e2131cd6f804ebeb16c3d9bbc9ccbea70e Mon Sep 17 00:00:00 2001 From: yogiperdana Date: Mon, 27 Feb 2023 16:17:31 +0000 Subject: [PATCH 2/6] Fix styling --- database/seeds/DemoDatabaseSeeder.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/seeds/DemoDatabaseSeeder.php b/database/seeds/DemoDatabaseSeeder.php index 932a69e97..21ff5b106 100644 --- a/database/seeds/DemoDatabaseSeeder.php +++ b/database/seeds/DemoDatabaseSeeder.php @@ -34,6 +34,7 @@ use Database\Seeds\Demo\DemoAPBDesaSeeder; use Database\Seeds\Demo\DemoDasDataDesaTableSeeder; use Database\Seeds\Demo\DemoDasDataUmumTableSeeder; +use Database\Seeds\Demo\DemoDasPengurusTableSeeder; use Database\Seeds\Demo\DemoDasProfilTableSeeder; use Database\Seeds\Demo\DemoEpidemiPenyakitSeeder; use Database\Seeds\Demo\DemoFasilitasPaudSeeder; @@ -42,7 +43,6 @@ use Database\Seeds\Demo\DemoPutusSekolahSeeder; use Database\Seeds\Demo\DemoTingkatPendidikanSeeder; use Database\Seeds\Demo\DemoToiletSanitasiSeeder; -use Database\Seeds\Demo\DemoDasPengurusTableSeeder; use Illuminate\Database\Seeder; class DemoDatabaseSeeder extends Seeder From dde7c4a7ebcc89d409bf4fe25c648710d22f930e Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Sun, 5 Mar 2023 01:11:18 +0700 Subject: [PATCH 3/6] Pindah script ke controller --- app/Http/Controllers/Controller.php | 53 ++++++++++++++----- public/css/slider.css | 2 +- .../views/layouts/frontends/slider.blade.php | 1 - 3 files changed, 42 insertions(+), 14 deletions(-) diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index efedc93de..c5cfdc235 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -31,26 +31,27 @@ namespace App\Http\Controllers; +use Exception; +use App\Models\Event; +use App\Models\Slide; +use App\Models\Profil; +use App\Models\Program; use App\Models\DataDesa; use App\Models\DataUmum; -use App\Models\Event; use App\Models\Keluarga; -use App\Models\MediaSosial; use App\Models\Penduduk; use App\Models\Pengurus; -use App\Models\Profil; -use App\Models\Program; -use App\Models\SettingAplikasi; -use App\Models\SinergiProgram; +use App\Models\MediaSosial; use App\Models\TipePotensi; -use Exception; -use Illuminate\Foundation\Auth\Access\AuthorizesRequests; -use Illuminate\Foundation\Bus\DispatchesJobs; -use Illuminate\Foundation\Validation\ValidatesRequests; -use Illuminate\Routing\Controller as BaseController; -use Illuminate\Support\Facades\Http; +use App\Models\SinergiProgram; +use App\Models\SettingAplikasi; use Illuminate\Support\Facades\Log; +use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\View; +use Illuminate\Foundation\Bus\DispatchesJobs; +use Illuminate\Routing\Controller as BaseController; +use Illuminate\Foundation\Validation\ValidatesRequests; +use Illuminate\Foundation\Auth\Access\AuthorizesRequests; class Controller extends BaseController { @@ -93,6 +94,33 @@ public function __construct() $navdesa = DataDesa::all(); $navpotensi = TipePotensi::orderby('nama_kategori', 'ASC')->get(); $pengurus = Pengurus::status()->get(); + $slides = Slide::orderBy('created_at','DESC')->get(); + + if (count($slides) < 1) { + $slides = collect([ + (object) [ + 'judul' => 'Pantai Garassikang', + 'deskripsi' => 'Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan', + 'gambar' => '/slide/slide-1.png', + ], + (object) [ + 'judul' => 'Bukit Sinalu Bulu Jaya', + 'deskripsi' => 'Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan', + 'gambar' => '/slide/slide-2.png', + ], + (object) [ + 'judul' => 'Bukit Sinalu Bulu Jaya', + 'deskripsi' => 'Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan', + 'gambar' => '/slide/slide-3.png', + ], + (object) [ + 'judul' => 'Bukit Sinalu Bulu Jaya', + 'deskripsi' => 'Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan', + 'gambar' => '/slide/slide-4.png', + ], + ]); + + } View::share([ 'profil' => $this->profil, @@ -106,6 +134,7 @@ public function __construct() 'navpotensi' => $navpotensi, 'camat' => $this->nama_camat, 'pengurus' => $pengurus->sortBy('jabatan.jenis'), + 'slides' => $slides, ]); } diff --git a/public/css/slider.css b/public/css/slider.css index d95fd6f5a..34638c25e 100644 --- a/public/css/slider.css +++ b/public/css/slider.css @@ -89,7 +89,7 @@ margin-left: 20px; margin-top: 10px; width: 350px; - line-height: 12px; + line-height: 16px; } .swiper-pagination-bullet-active { diff --git a/resources/views/layouts/frontends/slider.blade.php b/resources/views/layouts/frontends/slider.blade.php index 8d542b100..d466522e1 100644 --- a/resources/views/layouts/frontends/slider.blade.php +++ b/resources/views/layouts/frontends/slider.blade.php @@ -2,7 +2,6 @@
- @php $slides = \App\Models\Slide::orderBy('created_at','DESC')->get(); @endphp @foreach ($slides as $slide)
From e992566f51a4cba07da4d9264d83fdc007444774 Mon Sep 17 00:00:00 2001 From: Yogi Perdana Date: Sun, 5 Mar 2023 01:15:23 +0700 Subject: [PATCH 4/6] Sesuaikan deskripsi --- app/Http/Controllers/Controller.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index c5cfdc235..33f6e64a5 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -104,8 +104,8 @@ public function __construct() 'gambar' => '/slide/slide-1.png', ], (object) [ - 'judul' => 'Bukit Sinalu Bulu Jaya', - 'deskripsi' => 'Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan', + 'judul' => 'Batu Siping', + 'deskripsi' => 'Lokasi: Karampuang, Desa Garassikang, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan', 'gambar' => '/slide/slide-2.png', ], (object) [ @@ -114,8 +114,8 @@ public function __construct() 'gambar' => '/slide/slide-3.png', ], (object) [ - 'judul' => 'Bukit Sinalu Bulu Jaya', - 'deskripsi' => 'Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan', + 'judul' => 'Pantai Tamarunang', + 'deskripsi' => 'Lokasi: Tamarunang, Pabiringa, Kecamatan Binamu, Kabupaten Jeneponto, Sulawesi Selatan', 'gambar' => '/slide/slide-4.png', ], ]); From 954a2f3ba9e9fab901f019164936c184f3daddfc Mon Sep 17 00:00:00 2001 From: yogiperdana Date: Sat, 4 Mar 2023 18:15:55 +0000 Subject: [PATCH 5/6] Fix styling --- app/Http/Controllers/Controller.php | 45 ++++++++++++++--------------- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/app/Http/Controllers/Controller.php b/app/Http/Controllers/Controller.php index 33f6e64a5..450a987fe 100644 --- a/app/Http/Controllers/Controller.php +++ b/app/Http/Controllers/Controller.php @@ -31,27 +31,27 @@ namespace App\Http\Controllers; -use Exception; -use App\Models\Event; -use App\Models\Slide; -use App\Models\Profil; -use App\Models\Program; use App\Models\DataDesa; use App\Models\DataUmum; +use App\Models\Event; use App\Models\Keluarga; +use App\Models\MediaSosial; use App\Models\Penduduk; use App\Models\Pengurus; -use App\Models\MediaSosial; -use App\Models\TipePotensi; -use App\Models\SinergiProgram; +use App\Models\Profil; +use App\Models\Program; use App\Models\SettingAplikasi; -use Illuminate\Support\Facades\Log; -use Illuminate\Support\Facades\Http; -use Illuminate\Support\Facades\View; +use App\Models\SinergiProgram; +use App\Models\Slide; +use App\Models\TipePotensi; +use Exception; +use Illuminate\Foundation\Auth\Access\AuthorizesRequests; use Illuminate\Foundation\Bus\DispatchesJobs; -use Illuminate\Routing\Controller as BaseController; use Illuminate\Foundation\Validation\ValidatesRequests; -use Illuminate\Foundation\Auth\Access\AuthorizesRequests; +use Illuminate\Routing\Controller as BaseController; +use Illuminate\Support\Facades\Http; +use Illuminate\Support\Facades\Log; +use Illuminate\Support\Facades\View; class Controller extends BaseController { @@ -94,32 +94,31 @@ public function __construct() $navdesa = DataDesa::all(); $navpotensi = TipePotensi::orderby('nama_kategori', 'ASC')->get(); $pengurus = Pengurus::status()->get(); - $slides = Slide::orderBy('created_at','DESC')->get(); + $slides = Slide::orderBy('created_at', 'DESC')->get(); if (count($slides) < 1) { $slides = collect([ (object) [ - 'judul' => 'Pantai Garassikang', - 'deskripsi' => 'Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan', + 'judul' => 'Pantai Garassikang', + 'deskripsi' => 'Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan', 'gambar' => '/slide/slide-1.png', ], (object) [ - 'judul' => 'Batu Siping', - 'deskripsi' => 'Lokasi: Karampuang, Desa Garassikang, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan', + 'judul' => 'Batu Siping', + 'deskripsi' => 'Lokasi: Karampuang, Desa Garassikang, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan', 'gambar' => '/slide/slide-2.png', ], (object) [ - 'judul' => 'Bukit Sinalu Bulu Jaya', - 'deskripsi' => 'Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan', + 'judul' => 'Bukit Sinalu Bulu Jaya', + 'deskripsi' => 'Lokasi: Bulu Jaya, Kecamatan Bangkala Barat, Kabupaten Jeneponto, Sulawesi Selatan', 'gambar' => '/slide/slide-3.png', ], (object) [ - 'judul' => 'Pantai Tamarunang', - 'deskripsi' => 'Lokasi: Tamarunang, Pabiringa, Kecamatan Binamu, Kabupaten Jeneponto, Sulawesi Selatan', + 'judul' => 'Pantai Tamarunang', + 'deskripsi' => 'Lokasi: Tamarunang, Pabiringa, Kecamatan Binamu, Kabupaten Jeneponto, Sulawesi Selatan', 'gambar' => '/slide/slide-4.png', ], ]); - } View::share([ From 0a2b15f99ee05cbf021a56a5f8e7dd96f9117b28 Mon Sep 17 00:00:00 2001 From: Afila Date: Mon, 6 Mar 2023 14:20:57 +0700 Subject: [PATCH 6/6] Update catatan_rilis.md --- catatan_rilis.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/catatan_rilis.md b/catatan_rilis.md index 0c7e5ef1a..3e4bf5a09 100644 --- a/catatan_rilis.md +++ b/catatan_rilis.md @@ -4,9 +4,7 @@ Di rilis v23.03.01 berisi perbaikan yang diminta Komunitas OpenDK. #### Perbaikan bug -1. [#626](https://github.com/OpenSID/OpenDK/issues/626) Perbaikan eror menu keluarga. -2. [#628](https://github.com/OpenSID/OpenDK/issues/628) Perbaikan eror data demo. -3. [#641](https://github.com/OpenSID/OpenDK/issues/641) Perbaikan sambutan camat kosong -4. [#637](https://github.com/OpenSID/OpenDK/issues/637) Perbaikan preview gambar slider -5. [#639](https://github.com/OpenSID/OpenDK/issues/639) Perbaikan pengisian kolom sejarah. -6. [#2089](https://github.com/OpenSID/premium/issues/2089) Perbaikan validasi saat unggah gambar di artikel. +1. [#638](https://github.com/OpenSID/OpenDK/issues/638) Perbaiki slider tidak bisa lebih dari 4. + +#### Teknis +1. [#2089](https://github.com/OpenSID/premium/issues/2089) Perbaikan validasi saat unggah gambar di artikel.