forked from vuejs/docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTutorialRepl.vue
63 lines (54 loc) · 1.16 KB
/
TutorialRepl.vue
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
<script setup>
import { Repl, ReplStore } from '@vue/repl'
import '@vue/repl/style.css'
const store = new ReplStore()
// TODO make dynamic
const preference = document.documentElement.classList.contains(
'prefer-composition'
)
? 'composition'
: 'options'
</script>
<template>
<div class="tutorial">
<div class="instruction">
<h1>1. Hello World</h1>
<p>Let's do get something on the screen!</p>
<p>Next Step ></p>
</div>
<Repl :store="store" :showCompileOutput="false" />
</div>
</template>
<style scoped>
.tutorial {
--ins-height: min(30vh, 250px);
}
.vue-repl,
.instruction {
max-width: 1105px;
border-right: 1px solid var(--vt-c-divider-light);
}
.instruction {
height: var(--ins-height);
padding: 24px 32px;
border-bottom: 1px solid var(--vt-c-divider-light);
font-size: 15px;
overflow-y: auto;
}
.instruction h1 {
font-weight: 600;
font-size: 18px;
margin-bottom: 0.5em;
}
.vue-repl {
height: calc(100vh - var(--vp-nav-height) - var(--ins-height));
}
@media (max-width: 960px) {
.vue-repl {
border: none;
height: calc(
100vh - var(--vp-nav-height) - var(--ins-height) - 48px
);
}
}
</style>