Skip to content

Commit

Permalink
[feat]: update style
Browse files Browse the repository at this point in the history
  • Loading branch information
pizn committed Jan 21, 2016
1 parent ebc53ff commit 1c1db4e
Show file tree
Hide file tree
Showing 13 changed files with 103 additions and 70 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@
"validate": "npm ls"
},
"theme": {
"primary-color": "#738bd7",
"link-color": "#738bd7",
"primary-color": "#343434",
"link-color": "#343434",
"border-color-base": "#e2e7ec",
"btn-border-radius-base": "32px"
}
Expand Down
20 changes: 10 additions & 10 deletions src/components/Desktop/AddFile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ class CreateFileForm extends Component {
return (
<Modal ref="modal"
visible={modalVisible}
title='添加'
title='Add'
onOk={modalHandleOk}
onCancel={modalHandleCancel}
footer={[
<Button key="back" type="ghost" onClick={modalHandleCancel}>取 消</Button>,
<Button key="back" type="ghost" onClick={modalHandleCancel}>Cancle</Button>,
<Button key="submit" type="primary" onClick={this.modalHandleOk.bind(this)}>
提 交
Submit
</Button>
]}>
<Form horizontal>
Expand All @@ -39,7 +39,7 @@ class CreateFileForm extends Component {
type: "string",
required: true,
pattern: /^(((?:19|20)\d\d)-(0[1-9]|1[012])-(0[1-9]|[12][0-9]|3[01])-)+([a-zA-Z0-9-_])+(\.md|\.markdown|\.mdown|\.mkd|\.mkdown|\.ron|\.txt)$/,
message: "请输入 URL, 例如: 2016-01-18-hello-world.md"
message: "URL, eg: 2016-01-18-hello-world.md"
},
]})}
/>
Expand All @@ -48,17 +48,17 @@ class CreateFileForm extends Component {
</Col>
</FormItem>
<FormItem
label="标题:"
label="Title:"
labelCol={{span: 6}}
wrapperCol={{span: 14}}
validateStatus={getFieldError('title') ? 'error' : 'success'}
>
<Input type="text" name="title" autoComplete="off" placeholder="文章标题"
<Input type="text" name="title" autoComplete="off" placeholder="title"
{...getFieldProps('title', {
rules: [{
type: "string",
required: true,
message: "请输入文章标题"
message: "Please input the title"
},
]})}
/>
Expand All @@ -67,17 +67,17 @@ class CreateFileForm extends Component {
</Col>
</FormItem>
<FormItem
label="描述:"
label="Description:"
labelCol={{span: 6}}
wrapperCol={{span: 14}}
validateStatus={getFieldError('description') ? 'error' : 'success'}
>
<Input type="textarea" name="description" autoComplete="off" rows="5" placeholder="这是一篇关于...的文章"
<Input type="textarea" name="description" autoComplete="off" rows="5"
{...getFieldProps('description', {
rules: [{
type: "string",
required: true,
message: "请输入文章描述"
message: "Please input the description"
},
]})}
/>
Expand Down
12 changes: 6 additions & 6 deletions src/components/Desktop/Aside.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,25 +40,25 @@ class Aside extends Component {
<span>{tree.data.length}</span>
</span>
</Link>
<p className="text">文章</p>
<p className="text">_posts</p>
</li>
<li className="body-menu-item">
<div className="link">
<span className="icon"><Icon type="file-text" /></span>
</div>
<p className="text">草稿</p>
<p className="text">_drafts</p>
</li>
<li className="body-menu-item">
<div className="link">
<span className="icon"><Icon type="picture" /></span>
</div>
<p className="text">素材</p>
<p className="text">_media</p>
</li>
<li className="body-menu-item">
<div className="link">
<span className="icon"><Icon type="setting" /></span>
</div>
<p className="text">配置</p>
<p className="text">_setting</p>
</li>
</ul>
</div>
Expand All @@ -75,13 +75,13 @@ class Aside extends Component {
</Col>
<ul className="foot-user-actions">
<li className="item">
<a onClick={this.logout.bind(this)} >登出 <Icon type="logout" /></a>
<a onClick={this.logout.bind(this)} ><Icon type="poweroff" />Logout</a>
</li>
</ul>
</Row>
}
<Row className="foot-copyright">
<p>Build width in China.</p>
<p>Write with <span className="love">Love</span> in Eevee.</p>
</Row>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Desktop/Head.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Head extends Component {
</h2>
</Col>
<Col span="4" className="action">
<Button type="ghost" onClick={addFile}><Icon type="plus" /> 添加</Button>
<Button type="ghost" onClick={addFile}><Icon type="plus" /> Create</Button>
</Col>
</Row>
}
Expand Down
12 changes: 6 additions & 6 deletions src/components/Login/loginForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class loginForm extends Component {
return (
<Form horizontal>
{auth.error &&
<Alert message="Github 账号或密码错误" type="error" showIcon />
<Alert message="GitHub account or passsword is wrong." type="error" showIcon />
}
<FormItem
label=""
Expand All @@ -39,12 +39,12 @@ class loginForm extends Component {
validateStatus={ getFieldError('email') ? 'error' : '' }
required
>
<Input className="ant-input" type="text" size="large" name="email" autoComplete="off" placeholder="账号"
<Input className="ant-input" type="text" size="large" name="email" autoComplete="off" placeholder="Email"
{...getFieldProps('email', {
rules: [{
required: true,
pattern: /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
message: "请输入账号",
message: "Please input your GitHub Email",
}] })}
/>
<Col span="19">
Expand All @@ -58,10 +58,10 @@ class loginForm extends Component {
validateStatus={ getFieldError('pass') ? 'error' : '' }
required
>
<Input className="ant-input" size="large" type="password" name="pass" placeholder="密码"
<Input className="ant-input" size="large" type="password" name="pass" placeholder="Password"
{...getFieldProps('pass', { rules: [{
required: true,
message: "请输入密码",
message: "Please input your GitHub password",
}] })}
/>
<Col span="24">
Expand All @@ -71,7 +71,7 @@ class loginForm extends Component {
<Row>
<Col span="24">
<Button type="primary" size="large" htmlType="submit" onClick={this.onSubmit.bind(this)}>
登 录 <Icon type="github" />
Login <Icon type="github" />
</Button>
</Col>
</Row>
Expand Down
26 changes: 13 additions & 13 deletions src/components/Post/Editor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -245,12 +245,12 @@ class Editor extends Component {

return (
<div className="leaf-editor-tool-list">
<Tooltip title="撤销 (Cmd+U)" placement="bottom">
<Tooltip title="Undo (Cmd+U)" placement="bottom">
<button className={historyClassName} onClick={this.handleUndo.bind(this)}>
<span className="edit-icon edit-icon-undo" />
</button>
</Tooltip>
<Tooltip title="重做 (Cmd+Shift+U)" placement="bottom">
<Tooltip title="Redo (Cmd+Shift+U)" placement="bottom">
<button className={historyClassName} onClick={this.handleRedo.bind(this)}>
<span className="edit-icon edit-icon-redo" />
</button>
Expand All @@ -260,19 +260,19 @@ class Editor extends Component {
{this.renderButton('h2', 'H2 (Cmd+2)')}
{this.renderButton('h3', 'H3 (Cmd+3)')}
<span className="leaf-editor-tool-separator" />
{this.renderButton('bold', '粗体 (Cmd+B')}
{this.renderButton('italic', '斜体 (Cmd+I)')}
{this.renderButton('del', '删除线 (Cmd+Alt+G)')}
{this.renderButton('quote', '引用 (Cmd+Alt+E)')}
{this.renderButton('bold', 'Blod (Cmd+B')}
{this.renderButton('italic', 'Italic (Cmd+I)')}
{this.renderButton('del', 'Strikethrough (Cmd+Alt+G)')}
{this.renderButton('quote', 'Quote (Cmd+Alt+E)')}
<span className="leaf-editor-tool-separator" />
{this.renderButton('oList', '有序列表 (Cmd+Alt+O)')}
{this.renderButton('uList', '无序列表 (Cmd+Alt+U)')}
{this.renderButton('oList', 'Order List (Cmd+Alt+O)')}
{this.renderButton('uList', 'Unorder List (Cmd+Alt+U)')}
<span className="leaf-editor-tool-separator" />
{this.renderButton('link', '超链接 (Cmd+Alt+L)')}
{this.renderButton('image', '图片 (Cmd+Alt+P)')}
{this.renderButton('code', '代码 (Cmd+Alt+C)')}
{this.renderButton('link', 'Link (Cmd+Alt+L)')}
{this.renderButton('image', 'Image (Cmd+Alt+P)')}
{this.renderButton('code', 'Code (Cmd+Alt+C)')}
<span className="leaf-editor-tool-separator" />
<Tooltip placement="bottom" title="预览 (Cmd+0)">
<Tooltip placement="bottom" title="Preview (Cmd+0)">
<button className={previewIconActive} onClick={this.handlePreviewEvent.bind(this)}>
<span className={previewClassName} />
</button>
Expand Down Expand Up @@ -367,7 +367,7 @@ class Editor extends Component {
}
</div>
<div className="leaf-editor-footer clearfix">
<p>文章编写于 <a href="https://github.com/pizn/eevee" target="_blank">伊布</a></p>
<p>Write with <span className="love">Love</span> in <a href="https://github.com/pizn/eevee" target="_blank">Eevee</a> :)</p>
</div>
</div>
</div>
Expand Down
13 changes: 6 additions & 7 deletions src/components/Post/Head.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class Head extends Component {
let backDir;
if (blob.loaded) {
backDir = params.splat.split(blob.data.name)[0];
console.log(backDir);
backDir = backDir !== '' ? 'd/' + backDir : '';
}

Expand All @@ -52,24 +51,24 @@ class Head extends Component {
<div className="meta-card">
{ meta.description &&
<Row className="meta-card-item">
<Col span="4" className="name">描述:</Col>
<Col span="4" className="name">Description:</Col>
<Col span="20" className="cnt">{meta.description}</Col>
</Row>
}
{ meta.categories &&
<Row className="meta-card-item">
<Col span="4" className="name">分类:</Col>
<Col span="4" className="name">Categories:</Col>
<Col span="20" className="cnt">{meta.categories}</Col>
</Row>
}
{ meta.tags &&
<Row className="meta-card-item">
<Col span="4" className="name">标签:</Col>
<Col span="4" className="name">Tags:</Col>
<Col span="20" className="cnt">{meta.tags}</Col>
</Row>
}
<a onClick={this.handleEditMeta.bind(this)} className="meta-card-edit">
编辑
Edit
</a>
</div>
</div>
Expand All @@ -86,8 +85,8 @@ class Head extends Component {
<Icon type="ellipsis" />
</div>
<ul className="action-list-dropdown">
<li className="item"><a href={blob.data.html_url} target="_blank"><Icon type="code" /> 源文件</a></li>
<li className="item"><a onClick={this.remove.bind(this)}><Icon type="delete" /> 删除</a></li>
<li className="item"><a href={blob.data.html_url} target="_blank"><Icon type="code" /> Source</a></li>
<li className="item"><a onClick={this.remove.bind(this)}><Icon type="delete" /> Remove</a></li>
</ul>
</div>
</Col>
Expand Down
8 changes: 4 additions & 4 deletions src/components/Post/Meta.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ class MetaForm extends Component {
return (
<Modal ref="modal"
visible={modalVisible}
title='编辑'
title='Edit'
onOk={modalHandleOk}
onCancel={modalHandleCancel}
footer={[
<Button key="back" type="ghost" onClick={modalHandleCancel}>取 消</Button>,
<Button key="back" type="ghost" onClick={modalHandleCancel}>Cancle</Button>,
<Button key="submit" type="primary" onClick={this.modalHandleOk.bind(this)}>
提 交
Submit
</Button>
]}>
<Form horizontal>
Expand All @@ -35,7 +35,7 @@ class MetaForm extends Component {
rules: [{
type: "string",
required: true,
message: "请输入文章基本信息"
message: "Please input the meta info"
},
]})}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Desktop.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class Desktop extends Component {
this.setState({
addFile: false
});
const msg = message.loading('正在保存...', 0);
const msg = message.loading('Saving...', 0);
dispatch(actions.addRepoBlob(repo))
.then(() => {
msg();
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Dir.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class Dir extends Component {
this.setState({
addFile: false
});
const msg = message.loading('正在保存...', 0);
const msg = message.loading('Saving...', 0);
dispatch(actions.addRepoBlob(repo))
.then(() => {
msg();
Expand Down
4 changes: 2 additions & 2 deletions src/containers/Login.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class Login extends Component {
}

logout() {
const { dispatch, history } = this.props;
const { dispatch } = this.props;
const that = this;
dispatch(actions.logout())
.then(() => {
Expand Down Expand Up @@ -110,7 +110,7 @@ class Login extends Component {
</div>
}
<div className="leaf-login-foot">
<p><a href="https://github.com/pizn/eevee" target="_blank">关于伊布</a> · <a href="https://github.com/pizn/eevee/issues" target="_blank">联系作者</a></p>
<p>Write with <span className="love">Love</span> in <a href="https://github.com/pizn/eevee" target="_blank">Eevee</a>.</p>
</div>
</div>

Expand Down
8 changes: 4 additions & 4 deletions src/containers/Post.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class Post extends Component {
content: cnt,
}

const msg = message.loading('正在保存...', 0);
const msg = message.loading('Saving...', 0);
dispatch(actions.updateRepoBlob(repo))
.then(() => {
msg();
Expand All @@ -139,8 +139,8 @@ class Post extends Component {
const { params } = this.props;
const that = this;
confirm({
title: '删除文章',
content: '注意: 文件 "' + params.splat + '" 将被永久删除',
title: 'Remove this post',
content: 'The file "' + params.splat + '" will be remove forever.',
onOk: function() {
that.handleRemoveReques();
},
Expand All @@ -155,7 +155,7 @@ class Post extends Component {
reponame: repoInfo.data.name,
path: '_posts/' + params.splat
}
const msg = message.loading('正在删除...', 0);
const msg = message.loading('Removing...', 0);

dispatch(actions.removeRepoBlob(repo))
.then(() => {
Expand Down
Loading

0 comments on commit 1c1db4e

Please sign in to comment.