From dd40d445bc62f830ef9d912e4dc30d82f6a771b8 Mon Sep 17 00:00:00 2001 From: A1Gard Date: Mon, 9 Dec 2024 14:14:27 +0330 Subject: [PATCH] improved ui homayon & autoplay theme part --- .../AutoPlayClips/AutoPlayClips.blade.php | 1 + .../clips/AutoPlayClips/AutoPlayClips.js | 2 + .../clips/AutoPlayClips/AutoPlayClips.scss | 21 ++++++ .../menu/HomayonMenu/HomayonMenu.blade.php | 26 ++++++- .../menu/HomayonMenu/HomayonMenu.scss | 67 +++++++++++++++++-- 5 files changed, 110 insertions(+), 7 deletions(-) diff --git a/resources/views/segments/clips/AutoPlayClips/AutoPlayClips.blade.php b/resources/views/segments/clips/AutoPlayClips/AutoPlayClips.blade.php index 581e584..c966f76 100644 --- a/resources/views/segments/clips/AutoPlayClips/AutoPlayClips.blade.php +++ b/resources/views/segments/clips/AutoPlayClips/AutoPlayClips.blade.php @@ -7,6 +7,7 @@ @foreach(\App\Models\Clip::where('status',1)->get() as $clip)
+ {{-- --}} diff --git a/resources/views/segments/clips/AutoPlayClips/AutoPlayClips.js b/resources/views/segments/clips/AutoPlayClips/AutoPlayClips.js index 244bcd7..c584d7b 100644 --- a/resources/views/segments/clips/AutoPlayClips/AutoPlayClips.js +++ b/resources/views/segments/clips/AutoPlayClips/AutoPlayClips.js @@ -3,6 +3,7 @@ document.addEventListener('DOMContentLoaded', function () { el.addEventListener('mouseenter', function () { try { this.querySelector('video').play(); + this.querySelector('i').style.display = 'none'; } catch { } @@ -10,6 +11,7 @@ document.addEventListener('DOMContentLoaded', function () { el.addEventListener('mouseleave', function () { try { this.querySelector('video').pause(); + this.querySelector('i').style.display = 'block'; } catch { } }); diff --git a/resources/views/segments/clips/AutoPlayClips/AutoPlayClips.scss b/resources/views/segments/clips/AutoPlayClips/AutoPlayClips.scss index 6f9d8e9..ec8cc63 100644 --- a/resources/views/segments/clips/AutoPlayClips/AutoPlayClips.scss +++ b/resources/views/segments/clips/AutoPlayClips/AutoPlayClips.scss @@ -10,6 +10,18 @@ display: flex; column-gap: .5rem; } + a{ + display: block; + position: relative; + i{ + position: absolute; + left: 50%; + top: 50%; + transform: translate(-50%,-50%); + font-size: 75px; + color: white; + } + } .autoplay-clip-item { transition: 700ms; @@ -25,3 +37,12 @@ } } } + + +/*-768px width*/ +@media (max-width: 768px) { + .autoplay-clip-list { + display: grid !important; + grid-template-columns: repeat(2,1fr) !important; + } +} diff --git a/resources/views/segments/menu/HomayonMenu/HomayonMenu.blade.php b/resources/views/segments/menu/HomayonMenu/HomayonMenu.blade.php index 5f20ef7..4840a74 100644 --- a/resources/views/segments/menu/HomayonMenu/HomayonMenu.blade.php +++ b/resources/views/segments/menu/HomayonMenu/HomayonMenu.blade.php @@ -1,4 +1,4 @@ -
+