Skip to content

Commit

Permalink
细节调整
Browse files Browse the repository at this point in the history
  • Loading branch information
fy0 committed Sep 15, 2017
1 parent 8fe9249 commit 1a11332
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 43 deletions.
2 changes: 1 addition & 1 deletion page/src/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ footer {
.nav-top { margin-top: -30px; }
.nav-bar {
height: 100%;
font-size: 1.1em;
font-size: 1.10em;
padding-top: 3px;
padding-right: 20px;
margin-right: 20px;
Expand Down
4 changes: 4 additions & 0 deletions page/src/assets/css/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,7 @@ a.am-close:hover {
hr.white {
border: none;
}

h3 {
font-size: 1.17em;
}
2 changes: 1 addition & 1 deletion page/src/components/about.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<h4>关于我</h4>
<h3>关于我</h3>
<p>没什么可说的</p>
</div>
</template>
Expand Down
2 changes: 1 addition & 1 deletion page/src/components/tag.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div v-if="page_info">
<div class="tagtitle">标签:<span>{{tagname}}</span></div>
<h3 class="tagtitle">标签:<span>{{tagname}}</span></h3>
<div v-if="page_info.items">
<TopicItem v-for="item in page_info.items" :item="item.data" :key="item.id"></TopicItem>
<ul class="ic-pages">
Expand Down
2 changes: 1 addition & 1 deletion page/src/components/tags.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<h4>标签列表</h4>
<h3>标签列表</h3>
<p v-for="tag in page_info" :key="tag.id">
<router-link :to="{ name: 'tag', params: {name: tag.name}}">{{tag.name}}</router-link>
</p>
Expand Down
37 changes: 26 additions & 11 deletions page/src/components/topic_new.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<template>
<div class="">
<div>
<div class="edit-page-title">
<h3 class="" v-if="!is_edit">新建主题</h3>
<h3 class="" v-else>编辑主题</h3>
<el-button class="right-top-btn" type="primary" :disabled="loading" @click="send">{{loading ? '...' : '发布'}}</el-button>
<el-button class="right-top-btn" type="primary" :loading="loading" @click="send">{{postButtonText}}</el-button>
</div>

<form class="pure-form" id="form_topic" method="POST" @submit.prevent="send">
Expand All @@ -29,7 +29,7 @@
<textarea style="width:100%" rows="15" id="editor" name="content" placeholder="这里填写内容 ..." autofocus></textarea>
</div>
<div class="form-item">
<el-button style="float: right" type="primary" :disabled="loading" @click="send">{{loading ? '...' : '发布'}}</el-button>
<el-button style="float: right" type="primary" :loading="loading" @click="send">{{postButtonText}}</el-button>
</div>
</fieldset>
</form>
Expand All @@ -38,6 +38,18 @@


<style>
.edit-page-title {
display: flex;
justify-content: space-between;
align-items: center;
}
.edit-page-title > h3 {
}
.right-top-btn {
}
.form-item {
margin-bottom: 10px;
}
Expand All @@ -46,12 +58,6 @@
background-color: #fff;
color: #1f2d3d;
}
.right-top-btn {
right: 6.5%;
margin-top: -53.5px;
position: absolute;
}
</style>


Expand Down Expand Up @@ -103,6 +109,10 @@ export default {
is_edit () {
return this.$route.name == 'topic_edit'
},
postButtonText: function () {
return this.loading ? '请等待'
: (this.is_edit ? '编辑' : '发布');
}
},
methods: {
send: async function (e) {
Expand Down Expand Up @@ -154,9 +164,9 @@ export default {
$.message_success(success_text);
} else {
$.message_error(failed_text);
// 注意:发布成功会跳转,故不做复位,失败则复位
this.loading = false;
}
this.loading = false;
}
},
mounted: async function () {
Expand Down Expand Up @@ -197,6 +207,11 @@ export default {
this.title = this.editing_data.title;
this.date = date;
this.editor.value(this.editing_data.content);
// 这么搞有点绕,我忘了当初是为什么,大概只是太菜写的不好
// 懒得改了
this.link_to = this.editing_data.link_to;
this.topicState = this.editing_data.state;
} else {
this.title = localStorage.getItem('topic-post-title') || '';
}
Expand Down
2 changes: 1 addition & 1 deletion page/src/components/user/signin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<router-link :to="{ path: '/signout' }">注销</router-link>
</div>
<div v-else>
<h4>登录</h4>
<h3>登录</h3>
<el-form :model="form" ref="form" label-width="60px" :rules="form_rules" style="width:50%;margin-left:-15px">
<el-form-item label="账号" prop="username">
<el-input type="text" v-model.trim="form.username" auto-complete="off"></el-input>
Expand Down
2 changes: 1 addition & 1 deletion page/src/components/user/signup.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="">
<h4>注册</h4>
<h3>注册</h3>
<el-form :model="form" ref="form" label-width="60px" :rules="form_rules" style="width:50%;margin-left:-15px">
<el-form-item label="账号" prop="username">
<el-input type="text" v-model.trim="form.username" auto-complete="off"></el-input>
Expand Down
22 changes: 12 additions & 10 deletions page/src/components/utils/loading.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<style>
/* Timer*/
.timer{
.timer {
width: 48px;
height: 48px;
background-color: transparent;
Expand All @@ -15,12 +15,12 @@
margin-right: auto;
top: 20vh;
}
.timer:after, .timer:before{
.timer:after, .timer:before {
position: absolute;
content:"";
background-color: rgba(170,170,170,1);
}
.timer:after{
.timer:after {
width: 20px;
height: 2px;
top: 22px;
Expand All @@ -33,7 +33,7 @@
animation: minhand 1s linear infinite;
}
.timer:before{
.timer:before {
width: 16px;
height: 2px;
top: 22px;
Expand All @@ -46,28 +46,30 @@
animation: hrhand 4s linear infinite;
}
@-webkit-keyframes minhand{
@-webkit-keyframes minhand {
0%{-webkit-transform:rotate(0deg)}
100%{-webkit-transform:rotate(360deg)}
}
@-moz-keyframes minhand{
@-moz-keyframes minhand {
0%{-moz-transform:rotate(0deg)}
100%{-moz-transform:rotate(360deg)}
}
@keyframes minhand{
@keyframes minhand {
0%{transform:rotate(0deg)}
100%{transform:rotate(360deg)}
}
@-webkit-keyframes hrhand{
@-webkit-keyframes hrhand {
0%{-webkit-transform:rotate(0deg)}
100%{-webkit-transform:rotate(360deg)}
}
@-moz-keyframes hrhand{
@-moz-keyframes hrhand {
0%{-moz-transform:rotate(0deg)}
100%{-moz-transform:rotate(360deg)}
}
@keyframes hrhand{
@keyframes hrhand {
0%{transform:rotate(0deg)}
100%{transform:rotate(360deg)}
}
Expand Down
32 changes: 16 additions & 16 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,42 +16,42 @@

### ver 1.0.4 planning

* 新增:游客评论
* 新增*:游客评论

* 破坏性改动:无
* 新增*:用户离开编辑,以及同时进行两个编辑的时候给出提示

* 新增*:新建文章为草稿

### ver 1.0.3 wip
* 新增*:知乎同款复制文章版权声明

* 修正:markdown 中引用的代码被不正常转义的一种情况
* 优化*:顶端对齐

* 新增:显示点击量
* 破坏性改动:无

* 优化:评论字数上线扩充至 65536 个

* 优化:首页等位置显示文章预览内容时,不再会出现截断文本、样式喧宾夺主等情况
### ver 1.0.3 update 2017.09.16

* 新增:给 markdown 的 \`\` 语法加上了高亮
* 新增:显示点击量

* 修正:仍然有文本在预览时被横着截断成半行的问题
* 新增:给 markdown 的 \`\` 语法加上了高亮

* 新增:现在文章作者可以看到自己隐藏的主题

* 新增:编辑页面右上角增加了一个发布/编辑按钮

* 优化:文章访问安全性提升
* 新增:文章引用功能

* 优化:所有文章预览项被统一为 TopicItem 组件
* 修正:markdown 中引用的代码被不正常转义的一种情况

* 优化:点击发布/编辑后禁用交互,等待完成
* 优化:评论字数上线扩充至 65536 个

* 新增*:用户离开编辑,以及同时进行两个编辑的时候给出提示
* 优化:首页等位置显示文章预览内容时,不再会出现截断文本、样式喧宾夺主等情况

* 新增*:新建文章为草稿
* 优化:文章访问安全性提升

* 新增*:知乎同款复制文章版权声明
* 优化:所有文章预览项被统一为 TopicItem 组件

* 新增:文章引用功能
* 优化:点击发布/编辑后禁用交互,等待完成

* 破坏性改动:若无评论,删除 comments 表重启后端

Expand Down

0 comments on commit 1a11332

Please sign in to comment.