-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathapp.vue
More file actions
73 lines (63 loc) · 1.7 KB
/
app.vue
File metadata and controls
73 lines (63 loc) · 1.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<template>
<div class='hello-world-page'>
<div class='title'>
<h2 class='title-text'>Hello World for NuxtJS</h2>
<img class='title-logo' src="./assets/logo.svg" alt="logo" />
</div>
<div class='buttons-container'>
<button @click="mode = 'video'" :style="{ backgroundColor: mode === 'video' ? 'rgb(255, 174, 55)' : '#FFFFFF' }">Video Capture</button>
<button @click="mode = 'image'" :style="{ backgroundColor: mode === 'image' ? 'rgb(255, 174, 55)' : '#FFFFFF' }">Image Capture</button>
</div>
<client-only>
<VideoCapture v-if="mode === 'video'" />
<ImageCapture v-else />
</client-only>
</div>
</template>
<script setup lang="ts">
import { ref, type Ref } from "vue";
import VideoCapture from "./components/VideoCapture.client.vue";
import ImageCapture from "./components/ImageCapture.client.vue";
const mode: Ref<string> = ref("video");
</script>
<style scoped>
@import "./assets/main.css";
.title {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20px;
}
.title .title-logo {
width: 30px;
height: 30px;
margin-left: 10px;
}
.buttons-container {
width: 30%;
margin: 20px auto;
text-align: center;
}
.buttons-container button {
display: inline-block;
border: 1px solid black;
padding: 5px 15px;
background-color: transparent;
cursor: pointer;
}
.buttons-container button:first-child {
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
border-right: transparent;
}
.buttons-container button:nth-child(2) {
border-top-right-radius: 10px;
border-bottom-right-radius: 10px;
border-left: transparent;
}
@media screen and (max-width: 800px) {
.buttons-container {
width: 70%;
}
}
</style>