-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedit.slim
87 lines (81 loc) · 1.56 KB
/
edit.slim
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
include global/header
scss:
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}
// ハンバーガーメニューが#appの後ろに隠れてしまうため
.navbar {
z-index: 1000
}
#app {
position: absolute;
width: 100%;
top: 52px;
bottom: 0;
}
#edit-container {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}
#editor {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 50%;
& > textarea {
resize: none;
white-space: pre;
word-break: break-all;
word-wrap: break-word;
font-size: 85%;
font-family: monospace;
line-height: 1.1;
padding: .5em;
}
}
#editor-header {
position: absolute;
top: 0;
height: 10em;
width: 100%;
}
#editor-content {
position: absolute;
top: 10em;
bottom: 0;
width: 100%;
}
#preview {
position: absolute;
top: 0;
bottom: 0;
left: 50%;
right: 0;
padding: 1em;
overflow: auto;
}
#app v-cloak=""
span.hidden#token = @token
span.hidden#owner = @owner
span.hidden#repo = @repo
span.hidden#branch = @branch
span.hidden#directory = @directory
span.hidden#filename = @filename
#edit-container
#editor
textarea#editor-header v-model="header"
textarea#editor-content v-model="content"
#preview
div v-html="content | marked"
include global/libs
/ marked.js
script src="/vendor/marked/marked.min.js"
script src="/vendor/base64/base64.min.js"
script src="/edit.coffee"
include global/footer