File tree Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
2
import { useHead } from ' @vueuse/head'
3
3
import { computed } from ' vue'
4
+ import { useNavigateControls } from ' ./logic'
4
5
import { scale , targetHeight , targetWidth } from ' ./logic/scale'
5
6
6
7
useHead ({
7
8
title: ' Vite Slides' ,
8
9
meta: [],
9
10
})
10
11
12
+ const controls = useNavigateControls ()
11
13
const style = computed (() => ({
12
14
height: ` ${targetHeight }px ` ,
13
15
width: ` ${targetWidth }px ` ,
14
16
transform: ` translate(-50%, -50%) scale(${scale .value }) ` ,
15
17
}))
18
+
19
+ function onClick(e : MouseEvent ) {
20
+ const classList = (e .target as HTMLElement )?.classList
21
+ if (classList ?.contains (' page-root' ))
22
+ controls .next ()
23
+ }
16
24
</script >
17
25
18
26
<template >
19
- <div class =" page" >
27
+ <div class =" page-root " @click = " onClick " >
20
28
<div class =" slide-container" :style =" style" >
21
29
<RouterView />
22
30
</div >
23
31
</div >
24
32
<SlideControls />
25
33
</template >
26
34
27
- <style >
28
- .page {
29
- @apply w-screen h-screen relative overflow-hidden bg-black ;
35
+ <style lang="postcss" >
36
+ .page-root {
37
+ @apply w-screen h-screen relative overflow-hidden bg-black select-none ;
30
38
}
31
39
32
40
.slide-container {
Original file line number Diff line number Diff line change 8
8
.master {
9
9
@apply px-14 py-10 text-[1.1rem] ;
10
10
11
+ h1 , h2 , h3 , h4 , p , div {
12
+ @apply select-none;
13
+ }
14
+
15
+ pre , code {
16
+ @apply select-text;
17
+ }
18
+
11
19
h1 {
12
20
@apply text-4xl mb-4 -ml-[0.05em] ;
13
21
}
Original file line number Diff line number Diff line change 4
4
</main >
5
5
</template >
6
6
7
- <style >
7
+ <style lang="postcss" >
8
8
.master.end {
9
- @apply text-white text-opacity- 85 text-xl tracking-widest bg-black h-full text-center grid place-content-center ;
9
+ @apply text-white text-opacity-85 text-xl tracking-widest bg-black h-full text-center grid place-content-center select-none ;
10
10
}
11
11
</style >
You can’t perform that action at this time.
0 commit comments