diff --git a/controllers/site.js b/controllers/site.js index 3fdcc6c..f7e58a0 100644 --- a/controllers/site.js +++ b/controllers/site.js @@ -174,3 +174,11 @@ exports.sitemap = function (req, res, next) { } })); }; + +exports.appDownload = function (req, res, next) { + if (/Android/i.test(req.headers['user-agent'])) { + res.redirect('http://fir.im/ks4u'); + } else { + res.redirect('https://itunes.apple.com/cn/app/id954734793'); + } +}; diff --git a/public/stylesheets/style.less b/public/stylesheets/style.less index 6a4b02f..fd03ccc 100644 --- a/public/stylesheets/style.less +++ b/public/stylesheets/style.less @@ -1257,3 +1257,6 @@ textarea.editor { .jiathis_style_24x24 { display: inline-block; } +#app_download { + text-align: center; +} diff --git a/views/sidebar.html b/views/sidebar.html index b327231..5edeec2 100644 --- a/views/sidebar.html +++ b/views/sidebar.html @@ -104,5 +104,15 @@ +
+
+ 客户端二维码 +
+
+ +
+ iOS/Android +
+
diff --git a/views/static/about.html b/views/static/about.html index f70f365..78d023b 100644 --- a/views/static/about.html +++ b/views/static/about.html @@ -24,13 +24,10 @@ CNode 的 SLA 保证是,一个9,即 90.000000%。 ### 移动客户端 客户端由 [@ilanceli](http://cnodejs.org/user/ilanceli) 开发维护。 + 源码地址:[https://github.com/lanceli/cnodejs-ionic](https://github.com/lanceli/cnodejs-ionic)。 -[iOS客户端](https://itunes.apple.com/cn/app/cnodejs-node.js-zhong-wen/id954734793) -![iOS qrcode](http://ww3.sinaimg.cn/large/658e3191gw1eo6j4b8p0nj205k05kwet.jpg) - -[Android客户端](http://fir.im/ks4u) -![Android qrcode](http://ww2.sinaimg.cn/large/658e3191gw1eo6j4maqj6j205k05kjrm.jpg) +立即体验 CNode 客户端,直接扫描页面右侧二维码,或者应用市场搜索“CNode社区”下载。 */ })) %> diff --git a/web_router.js b/web_router.js index 75d9072..3263244 100644 --- a/web_router.js +++ b/web_router.js @@ -31,6 +31,8 @@ var router = express.Router(); router.get('/', site.index); // sitemap router.get('/sitemap.xml', site.sitemap); +// app download +router.get('/app/download', site.appDownload); // sign controller if (config.allow_sign_up) {