File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 5
5
<NuxtLink to =" /atelier" >Return</NuxtLink >
6
6
</div >
7
7
<div
8
+ @click =" nextSlides()"
8
9
@keydown.enter.space.right =" nextSlides()"
9
10
@keydown.left =" prevSlides()"
11
+ @mousemove =" onCursorMoved"
10
12
tabindex =" 0"
11
13
class =" live"
12
14
>
13
15
<AtelierRender />
16
+ <div
17
+ :class =" {
18
+ 'opacity-0': !cursorMoved,
19
+ }"
20
+ class =" overlay"
21
+ >
22
+ <p >Page {{ currentSlidesIndex + 1 }} / {{ slides.length }}</p >
23
+ </div >
14
24
</div >
15
25
</template >
16
26
17
27
<style scoped lang="postcss">
18
28
.live {
19
29
@apply h-screen select-none;
20
30
@apply flex justify-center items-center;
31
+
32
+ .overlay {
33
+ @apply fixed bottom-18 bg-dark-900 p-3 rounded-6 text-3;
34
+ @apply transition-opacity duration-300;
35
+ }
21
36
}
22
37
</style >
23
38
@@ -27,6 +42,19 @@ import { RealtimeChannel } from "@supabase/supabase-js";
27
42
const client = useSupabaseClient <Database >();
28
43
29
44
const { fetchDeck, fetchAllSlides, nextSlides, prevSlides } = useDeckStore ();
45
+ const { slides, currentSlidesIndex } = storeToRefs (useDeckStore ());
46
+
47
+ const cursorMoved = ref (false );
48
+
49
+ function onCursorMoved() {
50
+ if (cursorMoved .value ) return ;
51
+
52
+ cursorMoved .value = true ;
53
+
54
+ setTimeout (() => {
55
+ cursorMoved .value = false ;
56
+ }, 5000 );
57
+ }
30
58
31
59
let deckRC: RealtimeChannel , slidesRC: RealtimeChannel ;
32
60
You can’t perform that action at this time.
0 commit comments