mirror of
https://github.com/hyprwm/hyprland-website.git
synced 2024-11-17 02:45:59 +01:00
pluginSlice fix fullscreen btn with sliding
This commit is contained in:
parent
8b291f8821
commit
07417aca1f
2 changed files with 20 additions and 18 deletions
|
@ -3,7 +3,6 @@
|
|||
import PlayIcon from '~icons/mingcute/play-circle-line'
|
||||
import { inview } from 'svelte-inview'
|
||||
import IconFullscreen from '~icons/mingcute/fullscreen-fill'
|
||||
import { onMount } from 'svelte'
|
||||
|
||||
/** @type {string} */
|
||||
export let src
|
||||
|
@ -55,8 +54,6 @@
|
|||
on:pause={() => (isPaused = true)}
|
||||
{autoplay}
|
||||
on:play={() => (isPaused = false)}
|
||||
on:mouseenter
|
||||
on:mouseleave
|
||||
/>
|
||||
|
||||
<button on:click={makeFullscreen} class="absolute bottom-2 left-2 z-10">
|
||||
|
|
|
@ -118,21 +118,26 @@
|
|||
isHoveringVideo && '-translate-x-56'
|
||||
)}
|
||||
>
|
||||
{#each items as { src, poster }, index}
|
||||
<Video
|
||||
{src}
|
||||
{poster}
|
||||
autoplay
|
||||
bind:videoElement={videos[index]}
|
||||
class="z-10 aspect-video h-[inherit] origin-left rounded-lg object-cover object-left shadow-xl shadow-cyan-700/50 outline outline-2 outline-cyan-500 duration-500"
|
||||
hidden={index !== activeIndex}
|
||||
on:pause={pauseVideos}
|
||||
on:play={playVideos}
|
||||
videoClass="h-[inherit] aspect-video"
|
||||
on:mouseenter={slideVideoIn}
|
||||
on:mouseleave={slideVideoOut}
|
||||
/>
|
||||
{/each}
|
||||
<div
|
||||
class="h-full w-full"
|
||||
on:mouseenter={slideVideoIn}
|
||||
on:mouseleave={slideVideoOut}
|
||||
role="complementary"
|
||||
>
|
||||
{#each items as { src, poster }, index}
|
||||
<Video
|
||||
{src}
|
||||
{poster}
|
||||
autoplay
|
||||
bind:videoElement={videos[index]}
|
||||
class="z-10 aspect-video h-[inherit] origin-left rounded-lg object-cover object-left shadow-xl shadow-cyan-700/50 outline outline-2 outline-cyan-500 duration-500"
|
||||
hidden={index !== activeIndex}
|
||||
on:pause={pauseVideos}
|
||||
on:play={playVideos}
|
||||
videoClass="h-[inherit] aspect-video"
|
||||
/>
|
||||
{/each}
|
||||
</div>
|
||||
<div
|
||||
class="pt-5 text-sm font-medium text-slate-300 md:text-base [&>a:hover]:text-cyan-300 [&>a:hover]:underline [&>a]:font-bold"
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue