-
Notifications
You must be signed in to change notification settings - Fork 7
/
layout.vue
70 lines (63 loc) · 1.29 KB
/
layout.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
64
65
66
67
68
69
70
<template functional>
<div class="preview-code">
<div class="preview block">
<slot name="preview"></slot>
</div>
<div :class="`language-${props.lang} editor block`">
<slot name="editor"></slot>
</div>
</div>
</template>
<script>
import "prismjs/themes/prism-tomorrow.css";
import "vue-prism-editor/dist/prismeditor.min.css";
export default {};
</script>
<style>
.preview-code {
display: flex;
flex-flow: row-reverse wrap;
border-radius: 6px;
overflow: hidden;
border: 1px solid #e2e2e2;
}
.preview-code .block {
flex-grow: 1;
width: 50%;
border-radius: 0;
}
.preview-code .editor pre {
margin: 0;
box-sizing: border-box;
height: 100%;
border-radius: 0;
}
.preview-code .preview {
background-color: rgb(249, 245, 245);
text-align: center;
box-sizing: border-box;
padding: 12px;
}
.preview-code .prism-editor-wrapper {
color: white;
padding: 0;
}
.preview-code .prism-editor-wrapper .prism-editor__textarea,
.preview-code .prism-editor-wrapper .prism-editor__editor {
padding: 20px;
}
@media only screen and (max-width: 568px) {
.preview-code {
display: block;
}
.preview-code .block {
width: auto;
}
}
@media only screen and (max-width: 419px) {
.preview-code {
margin: 0.85rem -1.5rem;
border-radius: 0;
}
}
</style>