diff --git a/static/css/about.css b/static/css/about.css index 2003acf..a1680f3 100644 --- a/static/css/about.css +++ b/static/css/about.css @@ -1,3 +1,43 @@ #dialogAbout { - + margin: 35px 100px 0 100px; + line-height: 20px; +} + +#dialogAbout a { + color: #4183c4; + text-decoration: none; +} + +#dialogAbout a:hover { + text-decoration: underline; +} + +#startPage label { + color: #666; +} + +#dialogAbout img { + width: 100px; + float: left; + margin-right: 60px; +} + +#dialogAbout .space { + margin-bottom: 10px; +} + +#dialogAbout .thx, +#dialogAbout .thx ul { + margin-left: 50px; +} + +#dialogAbout .thx a { + width: 100px; + display: inline-block; +} + +#dialogAbout .license { + color: #999; + font-size: 12px; + line-height: normal; } \ No newline at end of file diff --git a/static/js/dialog.js b/static/js/dialog.js index 10a8183..073ca4d 100644 --- a/static/js/dialog.js +++ b/static/js/dialog.js @@ -141,7 +141,8 @@ top = settings.position.top; left = settings.position.left; } else { - top = parseInt((windowH - dialogH) / 2); + // 20(footer) + 23(header) + top = parseInt((windowH - dialogH - 43) / 2); left = parseInt((windowW - dialogW) / 2); } $dialog.css({ diff --git a/static/js/wide.js b/static/js/wide.js index 135a8f2..8929004 100644 --- a/static/js/wide.js +++ b/static/js/wide.js @@ -272,13 +272,28 @@ var wide = { $("#dialogAbout").dialog({ "modal": true, "height": 460, - "width": 860, + "width": 800, "title": config.label.about, - "hideFooter": true + "hideFooter": true, + "afterOpen": function () { + $.ajax({ + url: "http://rhythm.b3log.org/version/wide/latest", + type: "GET", + dataType: "jsonp", + jsonp: "callback", + success: function (data, textStatus) { + if ($("#dialogAbout .version").text() === data.wideVersion) { + $(".upgrade").text('当前已是最新版本'); + } else { + $(".upgrade").html("请下载最新版本" + data.wideVersion + ""); + } + } + }); + } }); // TODO: remove - // $("#dialogAbout").dialog("open"); + $("#dialogAbout").dialog("open"); }); }, _initLayout: function () { @@ -585,7 +600,7 @@ var wide = { }, goget: function () { wide.saveAllFiles(); - + var currentPath = editors.getCurrentPath(); if (!currentPath) { return false; diff --git a/view/about.html b/view/about.html index 79d40ba..e99913e 100644 --- a/view/about.html +++ b/view/about.html @@ -1,14 +1,71 @@ -logo -Hello, 世界 -Coding with Go on the Wide way. -wide 当前版本 -检查更新 +
+ +
+

Hello, 世界

+

Coding with Go on the Wide way.

+
+
+
+
+ + {{.ver}}
+ 正在检查更新... +
-开发团队 -项目地址 -捐赠 -许可协议 -致谢 +
+
+ + $G #20 (comment), $GOOS, $GOARCH
+ + Windows +
-go环境 -操作系统 + + github.com/b3log/wide
+ + + B3log
+ + + B3log +
+
+ 致谢{{.i18n.colon}} + +
+
+
+
+ 许可协议 +
+ /* + * Copyright (C) 2011, Liyuan Li + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +
+
+