improved ui homayon & autoplay theme part

master
A1Gard 2 weeks ago
parent 639136d37c
commit dd40d445bc

@ -7,6 +7,7 @@
@foreach(\App\Models\Clip::where('status',1)->get() as $clip) @foreach(\App\Models\Clip::where('status',1)->get() as $clip)
<div class="autoplay-clip-item"> <div class="autoplay-clip-item">
<a href="{{$clip->webUrl()}}"> <a href="{{$clip->webUrl()}}">
<i class="ri-play-circle-line"></i>
<video preload="none" src="{{$clip->fileUrl()}}" poster="{{$clip->imgUrl()}}" muted ></video> <video preload="none" src="{{$clip->fileUrl()}}" poster="{{$clip->imgUrl()}}" muted ></video>
</a> </a>
{{-- <img src="{{$clip->imgUrl()}}" alt="">--}} {{-- <img src="{{$clip->imgUrl()}}" alt="">--}}

@ -3,6 +3,7 @@ document.addEventListener('DOMContentLoaded', function () {
el.addEventListener('mouseenter', function () { el.addEventListener('mouseenter', function () {
try { try {
this.querySelector('video').play(); this.querySelector('video').play();
this.querySelector('i').style.display = 'none';
} catch { } catch {
} }
@ -10,6 +11,7 @@ document.addEventListener('DOMContentLoaded', function () {
el.addEventListener('mouseleave', function () { el.addEventListener('mouseleave', function () {
try { try {
this.querySelector('video').pause(); this.querySelector('video').pause();
this.querySelector('i').style.display = 'block';
} catch { } catch {
} }
}); });

@ -10,6 +10,18 @@
display: flex; display: flex;
column-gap: .5rem; 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 { .autoplay-clip-item {
transition: 700ms; 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;
}
}

@ -1,4 +1,4 @@
<header class='HomayonMenu live-setting' data-live="{{$data->area_name.'_'.$data->part}}" > <header class='HomayonMenu live-setting' data-live="{{$data->area_name.'_'.$data->part}}">
<div class="homayon-logo" <div class="homayon-logo"
style="background-image: url('{{asset('upload/images/'.$data->area_name.'.'.$data->part.'.svg')}}')"> style="background-image: url('{{asset('upload/images/'.$data->area_name.'.'.$data->part.'.svg')}}')">
<div class="logo-container"> <div class="logo-container">
@ -85,6 +85,28 @@
<a href="{{$item->webUrl()}}"> <a href="{{$item->webUrl()}}">
{{$item->title}} {{$item->title}}
</a> </a>
@if($item->meta == null)
@switch($item->menuable_type)
@case(\App\Models\Group::class)
@case(\App\Models\Category::class)
@if($item->dest->children()->count() > 0)
<ul class="sub-menu-item">
@foreach($item->dest->children as $itm)
<li>
<a href="{{$itm->webUrl()}}">
{{$itm->name}}
</a>
</li>
@endforeach
</ul>
@break
@endif
@default
@endswitch
@endif
</li> </li>
@endforeach @endforeach
</ul> </ul>
@ -92,7 +114,7 @@
</div> </div>
</div> </div>
<nav class="homayon-resp-menu" style="display: none"> <nav class="homayon-resp-menu" style="display: none">
<ul > <ul>
@foreach(getMenuBySettingItems($data->area_name.'_'.$data->part.'_menu') as $item) @foreach(getMenuBySettingItems($data->area_name.'_'.$data->part.'_menu') as $item)
<li> <li>
<a href="{{$item->webUrl()}}"> <a href="{{$item->webUrl()}}">

@ -93,19 +93,72 @@
justify-content: space-between; justify-content: space-between;
list-style: none; list-style: none;
text-align: center; text-align: center;
overflow: hidden; height: 48px;
//overflow: hidden;
background: var(--homayon-bg-menu); background: var(--homayon-bg-menu);
border-bottom-right-radius: 35px; border-bottom-right-radius: 35px;
border-bottom-left-radius: 35px; border-bottom-left-radius: 35px;
li { li {
transition: 500ms; transition: 500ms;
flex: 1; flex: 1;
position: relative;
a { a {
padding: .75rem; padding: .75rem;
display: block; display: block;
} }
}
.sub-menu-item{
opacity: 0;
pointer-events: none;
max-height: 0;
width: 0;
transition: 600ms;
height: auto;
}
li:hover {
.sub-menu-item {
max-height: 50vh;
opacity: .9;
pointer-events: all;
position: absolute;
top: 100%;
display: block;
inset-inline-start: 0;
width: 200px;
text-align: start;
padding: 0;
box-shadow: var(--xshop-shadow);
li {
a {
padding: 10px;
&:hover {
background: #ffffff33;
}
&:after {
display: none;
}
}
&:last-child {
a {
border-bottom-right-radius: 35px;
border-bottom-left-radius: 35px;
}
}
}
}
} }
.homayon-divider { .homayon-divider {
@ -195,14 +248,16 @@
@media (max-width: 875px) { @media (max-width: 875px) {
.homayon-logo { .homayon-logo {
background: none !important; background: none !important;
img{
img {
width: 40px; width: 40px;
margin-top: 5px; margin-top: 5px;
} }
} }
} }
} }
.homayon-resp-menu{
.homayon-resp-menu {
display: none; display: none;
position: fixed; position: fixed;
overflow-y: auto; overflow-y: auto;
@ -212,10 +267,12 @@
bottom: 0; bottom: 0;
z-index: 77; z-index: 77;
inset-inline-end: 0; inset-inline-end: 0;
ul{
ul {
padding-top: .5rem; padding-top: .5rem;
list-style: none; list-style: none;
a{
a {
display: block; display: block;
padding: .5rem; padding: .5rem;
} }

Loading…
Cancel
Save