Skip to content

Commit 96dafdc

Browse files
authored
Merge branch 'master' into add-user-homepage-fisher
2 parents 39567ee + 3786c01 commit 96dafdc

File tree

8 files changed

+59
-15
lines changed

8 files changed

+59
-15
lines changed

src/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<template>
22
<div id="app">
3-
<NavBar/>
3+
<NavBar />
44
<div id="main">
55
<div id="content">
66
<router-view></router-view>
77
</div>
88
</div>
9-
<Footer/>
9+
<Footer />
1010
<UserLogin></UserLogin>
1111
<UserRegister></UserRegister>
1212
</div>

src/assets/css/basic.css

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,3 +137,15 @@ body {
137137
.highzindex {
138138
z-index: 10000 !important;
139139
}
140+
141+
.no-margin {
142+
margin: 0;
143+
}
144+
145+
.no-bottom-margin {
146+
margin-bottom: 0;
147+
}
148+
149+
.no-top-margin {
150+
margin-top: 0;
151+
}

src/assets/css/mde.css

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.CodeMirror {
2+
height: 500px;
3+
}

src/assets/css/theme.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,9 @@ a {
6363
a:hover {
6464
color: #66b1ff;
6565
}
66+
67+
.CodeMirror .CodeMirror-code .cm-comment {
68+
background-color: #ffffff00 !important;
69+
font-family: "Fira Code";
70+
color: #cc6666;
71+
}

src/components/lib/MarkdownEditor.vue

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@
55
<el-tab-pane label="Preview" name="second" />
66
</el-tabs>
77
<div :class="editorVisbleClassName">
8-
<textarea
9-
:value="value"
10-
@input="handleInput($event.target.value)"
11-
class="markdown-editor-value-placeholder"
12-
:id="uid + '-markdown-editor'"
8+
<textarea
9+
:value="value"
10+
@input="handleInput($event.target.value)"
11+
class="markdown-editor-value-placeholder"
12+
:id="uid + '-markdown-editor'"
1313
/>
14-
1514
</div>
16-
<MarkdownContainer v-if="showPreview" :content="content" />
15+
<div id="markdown-container-outline" v-if="showPreview">
16+
<MarkdownContainer :content="content" />
17+
</div>
1718
</div>
1819
</template>
1920

@@ -22,6 +23,7 @@ import MarkdownContainer from './MarkdownContainer.vue';
2223
2324
import SimpleMDE from 'simplemde';
2425
import 'simplemde/dist/simplemde.min.css';
26+
import './../../assets/css/mde.css';
2527
2628
export default {
2729
name: 'MarkdownEditor',
@@ -123,4 +125,10 @@ export default {
123125
.markdown-editor-value-placeholder {
124126
display: none;
125127
}
128+
129+
#markdown-container-outline {
130+
padding: 10px;
131+
border: 1px solid #dddddd;
132+
margin-bottom: 20px;
133+
}
126134
</style>

src/components/problem/content.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,6 @@ export default {
143143
144144
.header {
145145
font-size: 35px;
146-
font-weight: 400;
147146
color: #303133;
148147
}
149148

src/components/problem/edit.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<template>
22
<div>
3-
<span class="text-extra-big">Edit problem #.{{this.$route.params.id}}</span>
3+
<span class="text-extra-big">Edit problem #{{this.$route.params.id}}</span>
4+
<h3 class="no-bottom-margin">Problem Name</h3>
45
<el-input v-model="title" placeholder="input problem title here"></el-input>
6+
<h3 class="no-bottom-margin">Problem Content</h3>
57
<MarkdownEditor v-model="mdContent" />
68
<el-button type="primary" @click="submit();" :loading="buttonLoading">Submit</el-button>
79
<el-button @click="back();">Back</el-button>
@@ -73,4 +75,4 @@ export default {
7375
MarkdownEditor
7476
}
7577
};
76-
</script>
78+
</script>

src/components/problem/submit.vue

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
3-
<span class="text-extra-big">Submit problem #.{{this.$route.params.id}}</span>
3+
<span class="text-extra-big">Submit problem #{{this.$route.params.id}}</span>
44
<el-select v-model="lang_num" placeholder="Select language">
55
<el-option
66
v-for="item in options"
@@ -9,8 +9,15 @@
99
:value="item.value">
1010
</el-option>
1111
</el-select>
12-
<br>
13-
<textarea placeholder="Input your code here" required v-model="code" />
12+
<el-input
13+
class="code-input"
14+
type="textarea"
15+
:rows="20"
16+
placeholder="Paste your code"
17+
required
18+
v-model="code"
19+
>
20+
</el-input>
1421
<br>
1522
<el-button type="primary" @click="submit();" :loading="buttonLoading">Submit</el-button>
1623
<el-button @click="back();">Back</el-button>
@@ -115,3 +122,10 @@ export default {
115122
}
116123
};
117124
</script>
125+
126+
<style scoped>
127+
.code-input {
128+
margin-top: 20px;
129+
margin-bottom: 20px;
130+
}
131+
</style>

0 commit comments

Comments
 (0)