Skip to content
Merged
Binary file modified public/favicon.ico
Binary file not shown.
4 changes: 4 additions & 0 deletions src/assets/css/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ h3::before {
content: "# ";
}

.markdown-container img {
max-width: 100%;
}

.markdown-container h1,
.cm-header-1 {
font-size: 30px;
Expand Down
34 changes: 34 additions & 0 deletions src/assets/icon/SOJ-thick-white.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 0 additions & 4 deletions src/components/home/page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ export default {
}
};
</script>

<style scoped>

</style>
1 change: 1 addition & 0 deletions src/components/page/navbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
text-color="#fff"
active-text-color="rgb(233, 233, 235)"
>
<el-menu-item index=""><img src="./../../assets/icon/SOJ-thick-white.svg" style="height: 40px;" /></el-menu-item>
<el-menu-item index="/"><i class="el-icon-s-home" /> Home</el-menu-item>
<el-menu-item index="/problem/list"><i class="el-icon-s-order" />Problem List</el-menu-item>
<el-submenu index="2" id="user">
Expand Down
7 changes: 6 additions & 1 deletion src/components/problem/content.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
<div class="tool-content">{{title}}</div>
<el-divider class="divider">PID</el-divider>
<div class="tool-content">#{{pid}}</div>
<el-divider class="divider">Date Created</el-divider>
<div class="tool-content">{{timeAdd}}</div>
</el-card>
<el-card shadow="never" class="margin-top">
<div><i class="el-icon-menu" /> Limitation </div>
Expand All @@ -70,6 +72,7 @@
</template>

<script>
import timeFormat from './../../methods/time';
import apiurl from './../../apiurl';
import MarkdownContainer from './../lib/MarkdownContainer.vue';

Expand All @@ -78,14 +81,15 @@ export default {
data() {
return {
description: null,
title: '-',
title: 'Unknown',
pid: this.$route.params.id,
allowHTML: false,
isWider: false,
enable: true,
hidden: false,
time: '-',
memery: '-',
timeAdd: 'Unknown',
problemLoading: true
};
},
Expand All @@ -102,6 +106,7 @@ export default {
this.memery = data.memory_limit / 1000;
this.time = data.time_limit;
this.hidden = !data.enabled;
this.timeAdd = timeFormat(data.date_added);
this.problemLoading = false;
})
.catch(err => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/problem/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ export default {
if (!x.enabled) {
x.title = (
<div>
<router-link to={'/problem/' + String(x.pid)} class={color + ' text-normal'}>{ x.title } </router-link>
<el-tag effect="dark" type="warning">Hidden</el-tag>
<router-link to={'/problem/' + String(x.pid)} class={color + ' text-normal'}> { x.title }</router-link>
</div>
);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/components/problem/submit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default {
data() {
return {
code: '',
lang_num: null,
lang_num: '-',
buttonLoading: false,
options: [{
value: '0',
Expand Down
43 changes: 33 additions & 10 deletions src/components/user/content.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<el-button @click="$router.go(-1);">Back</el-button>
</el-card>
</div>
<div id="info">
<div id="info" v-loading="userLoading">
<el-row :gutter="20">
<el-col :span="18">
<el-card shadow="never">
Expand All @@ -25,10 +25,26 @@
</el-card>
</el-col>
</el-row>
<el-card shadow="never" class="item">
<div slot="header" class="clearfix"><i class="el-icon-message" /> Email</div>
{{email}}
</el-card>
<el-row :gutter="20">
<el-col :span="12">
<el-card shadow="never" class="item">
<div slot="header" class="clearfix"><i class="el-icon-message" /> Email</div>
{{email}}
</el-card>
</el-col>
<el-col :span="6">
<el-card shadow="never" class="item">
<div slot="header" class="clearfix"><i class="el-icon-date" /> Time Joined</div>
{{timeJoin}}
</el-card>
</el-col>
<el-col :span="6">
<el-card shadow="never" class="item">
<div slot="header" class="clearfix"><i class="el-icon-time" /> Last Login</div>
{{lastLogin}}
</el-card>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-card shadow="never" class="item">
Expand All @@ -39,7 +55,7 @@
<el-col :span="8">
<el-card shadow="never" class="item">
<div slot="header" class="clearfix"><i class="el-icon-upload2" /> Submited</div>
{{submit}} Problems
{{submit}} Times
</el-card>
</el-col>
<el-col :span="8">
Expand All @@ -58,21 +74,25 @@
</template>

<script>
import timeFormat from './../../methods/time';
import apiurl from './../../apiurl';
import MarkdownContainer from './../lib/MarkdownContainer.vue';

export default {
name: 'UserHomepage',
data() {
return {
username: '-',
username: 'Unknown',
userid: '-',
email: '-',
email: 'Unknown',
introduction: null,
solved: '-',
submit: '-',
rate: '-',
ismine: false
rate: 100,
ismine: false,
timeJoin: 'Unknown',
lastLogin: 'Unknown',
userLoading: true
};
},
methods: {
Expand All @@ -87,6 +107,9 @@ export default {
this.introduction = data.introduction;
this.solved = data.solved;
this.submit = data.submit_time;
this.timeJoin = timeFormat(data.date_joined);
this.lastLogin = timeFormat(data.last_login);
this.userLoading = false;
if (this.solved == 0) {
this.rate = 100;
} else {
Expand Down
7 changes: 7 additions & 0 deletions src/methods/time.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
let timeFormat = (origin) => {
let time = new Date(origin);
let res = time.getFullYear() + '-' + (time.getMonth() + 1) + '-' + time.getDate();
return res;
};

export default timeFormat;