diff --git a/README.md b/README.md index 7ae7bf9..4b1afd4 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,19 @@ # iBlog2 -基于 Node.js 的开源个人博客系统,采用响应式布局,支持手机访问,功能全面,美观大方。 +基于 Node.js 的开源个人博客系统,现代化的 UI 和用户体验。采用响应式布局,支持手机访问,支持离线访问。 **不仅仅是博客,更是 Demo**,是适合新人入门学习的完整项目。 (基于 ASP.NET 的版本见 [这里](https://github.com/eshengsky/iBlog/)) ## 界面预览 -* 前台 +* PC模式 ![image](https://raw.githubusercontent.com/eshengsky/iBlog2/master/public/images/preview1.png) -* 后台 +* 手机模式 + [ServerLog](https://github.com/eshengsky/ServerLog/)查看日志 ![image](https://raw.githubusercontent.com/eshengsky/iBlog2/master/public/images/preview2.png) +* 管理后台 +![image](https://raw.githubusercontent.com/eshengsky/iBlog2/master/public/images/preview3.png) + ## 在线实例 我的博客 [https://skysun.name/](https://skysun.name/) @@ -28,7 +31,7 @@ * 关于 * 后台管理 * 网站统计 - * 博客管理 - 新的文章 (支持 UEditor 和 Markdown 编辑器) + * 博客管理 - 新的文章 (支持 [UEditor](https://ueditor.baidu.com/website/index.html) 和 Markdown 编辑器) * 博客管理 - 分类管理 * 博客管理 - 文章管理 * 评论管理 @@ -47,7 +50,7 @@ * Web字体 [Font Awesome](https://fontawesome.com/) * 持久化 [MongoDB](https://www.mongodb.org/) * 缓存(可选) [Redis](http://redis.io/) -* 日志 [winston](https://github.com/winstonjs/winston/) +* 日志 [ServerLog](https://github.com/eshengsky/ServerLog/) * 多语言 [i18n](https://github.com/mashpie/i18n-node) * 身份验证 [Passport](http://www.passportjs.org/) * Service Worker库 [Workbox](https://github.com/GoogleChrome/workbox/) @@ -185,13 +188,19 @@ $ NODE_ENV=production pm2 start bin/www -i 0 #### 使用noginx [noginx](https://github.com/eshengsky/noginx) 是基于 Node.js 的 HTTP 及反向代理服务器(类似 nginx),如果你有多台 iBlog2 服务器实例,你可以使用 [noginx](https://github.com/eshengsky/noginx) 进行代理转发和负载均衡。 +## 日志查看 + +* 本地开发环境,直接在终端中查看日志。 +* 使用 `pm2` 部署时,使用 `pm2 logs` 查看日志。 +* 使用 Chrome 扩展程序 [chrome-extension-server-log](https://github.com/eshengsky/ServerLog/tree/master/chrome-extension-server-log) 在开发者工具 (F12) 中查看日志。 + ## 贡献者们 感谢给 iBlog2 项目贡献代码的朋友,感谢他们的支持,详情 [点击这里](https://github.com/eshengsky/iBlog2/graphs/contributors)。 ## 许可协议 The MIT License (MIT) -Copyright (c) 2016 Sky +Copyright (c) 2019 Sky.Sun Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/app.js b/app.js index 4779dee..a517634 100644 --- a/app.js +++ b/app.js @@ -13,23 +13,34 @@ const auth = require('./routes/auth'); const admin = require('./routes/admin'); const locale = require('./routes/locale'); const ue = require('./routes/ue'); -const logger = require('./utility/logger'); +const tool = require('./utility/tool'); const passport = require('passport'); const i18n = require('./models/i18n'); +const serverlog = require('serverlog-node'); +serverlog.config({ + extension: { + enable: true, + key: 'iblog2_server_log_key' + } +}); +const logger = serverlog.getLogger('app'); +const log = require('./proxy/log'); const app = express(); /** * 记录未捕获异常 */ process.on('uncaughtException', err => { - logger.errLogger(err); + log.store('Error', err); + logger.error(err); }); /** * 记录未处理的Promise失败 */ process.on('unhandledRejection', reason => { - logger.errLogger(reason); + log.store('Error', reason); + logger.error(reason); }); // 设置模板引擎 @@ -42,9 +53,12 @@ app.locals.staticPrefix = app.get('env') === 'production' ? '/static/dist' : '/s // 增加安全性头部 app.use(helmet()); +// 注册 ServerLog 中间件以注入 req 对象给日志 +app.use(serverlog.middleware()); + // 记录所有请求 app.use((req, res, next) => { - logger.info(`${req.method.toUpperCase()}: ${req.protocol}://${req.get('Host')}${req.originalUrl}`); + logger.info(`${req.method.toUpperCase()} ${tool.getFullUrl(req)}`); next(); }); @@ -75,12 +89,14 @@ app.use(passport.session()); // 静态文件 app.use('/static', express.static(path.join(__dirname, 'public'))); +app.use('/uploads', express.static(path.join(__dirname, 'public', 'uploads'))); app.use('/nodeModules', express.static(path.join(__dirname, 'node_modules'))); // Service Worker app.get('/sw.js', (req, res) => { fs.readFile(path.resolve(__dirname, './sw.js'), (err, data) => { if (err) { + logger.error(err); throw err; } res.writeHead(200, { @@ -106,7 +122,8 @@ app.use('/admin', require('connect-ensure-login') app.use((req, res) => { const err = new Error(`Not Found! URL: ${req.originalUrl}`); err.status = 404; - logger.errLogger(err, req); + log.store('Warn', err); + logger.warn(`Not Found! URL: ${req.originalUrl}`); res.status(404) .render('./shared/error', { code: 404, @@ -118,7 +135,8 @@ app.use((req, res) => { app.use((err, req, res) => { const code = err.status || 500; err.status = code; - logger.errLogger(err, req); + log.store('Error', err); + logger.error(err); res.status(code) .render('./shared/error', { code, diff --git a/bin/www b/bin/www index c5b6801..f1a0d73 100644 --- a/bin/www +++ b/bin/www @@ -1,6 +1,7 @@ const app = require('../app'); const ssl = require('../config.json').ssl; -const logger = require('../utility/logger'); +const serverlog = require('serverlog-node'); +const logger = serverlog.getLogger('www'); const port = normalizePort(process.env.PORT || '3000'); app.set('port', port); diff --git a/models/db.js b/models/db.js index 2d5c0e6..fe03054 100644 --- a/models/db.js +++ b/models/db.js @@ -4,8 +4,7 @@ const mongoose = require('mongoose'); const extend = require('mongoose-schema-extend'); const i18n = require('./i18n'); -// use custom mongodb url or localhost -mongoose.connect(dbPath || 'mongodb://localhost/blogrift'); +mongoose.connect(dbPath); const db = mongoose.connection; db.on('error', err => { console.error(i18n.__('error.db_1') + err); diff --git a/models/log.js b/models/log.js index 4f0ca8a..d930a36 100644 --- a/models/log.js +++ b/models/log.js @@ -3,7 +3,7 @@ const mongoose = db.mongoose; const logSchema = new mongoose.Schema({ // 唯一键 - _id: { type: mongoose.Schema.Types.ObjectId }, + _id: { type: String, unique: true }, // 异常信息 message: { type: String }, diff --git a/package-lock.json b/package-lock.json index 02f8be3..91c23fc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -993,7 +993,6 @@ "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, "requires": { "color-convert": "1.9.3" } @@ -1641,7 +1640,6 @@ "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, "requires": { "ansi-styles": "3.2.1", "escape-string-regexp": "1.0.5", @@ -1870,7 +1868,6 @@ "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, "requires": { "color-name": "1.1.3" } @@ -1878,8 +1875,7 @@ "color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "color-support": { "version": "1.1.3", @@ -2559,8 +2555,7 @@ "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { "version": "5.16.0", @@ -4321,8 +4316,7 @@ "has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" }, "has-gulplog": { "version": "0.1.0", @@ -5025,6 +5019,11 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, "json5": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", @@ -5369,6 +5368,11 @@ "yallist": "2.1.2" } }, + "lz-string": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz", + "integrity": "sha1-wNjq82BZ9wV5bh40SBHPTEmNOiY=" + }, "make-dir": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz", @@ -7198,6 +7202,18 @@ "send": "0.16.2" } }, + "serverlog-node": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/serverlog-node/-/serverlog-node-1.0.2.tgz", + "integrity": "sha512-Q4R4g+R55rUOn1y6saku4qx/tAirSZqWw4/9mnEzwYticbfBMOm2ym3LH/Njft6LPCb8dZnaSjTawOaOGlvWog==", + "requires": { + "chalk": "2.4.2", + "json-stringify-safe": "5.0.1", + "lz-string": "1.4.4", + "moment": "2.24.0", + "shortid": "2.2.14" + } + }, "set-blocking": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", @@ -7681,7 +7697,6 @@ "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, "requires": { "has-flag": "3.0.0" } diff --git a/package.json b/package.json index fd4a9e0..9c3ed2f 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "scrollnav": "git+https://github.com/jimmynotjim/scrollNav.git#v2.7.3", "semver": "^5.5.0", "serve-favicon": "^2.5.0", + "serverlog-node": "^1.0.2", "shortid": "^2.2.4", "showdown": "^1.8.6", "simplemde": "^1.11.2", diff --git a/proxy/log.js b/proxy/log.js index 4aff767..2847394 100644 --- a/proxy/log.js +++ b/proxy/log.js @@ -1,3 +1,4 @@ +const shortid = require('shortid'); const logModel = require('../models/log') .LogModel; @@ -44,3 +45,21 @@ exports.getAllCount = () => { }); }); }; + +/** + * 持久化日志 + */ +exports.store = (level, err) => { + const newLog = new logModel({ + _id: shortid.generate(), + level, + message: err.message || '未知错误', + meta: err, + timestamp: new Date() + }); + newLog.save(err => { + if (err) { + return console.error(err); + } + }); +} \ No newline at end of file diff --git a/proxy/post.js b/proxy/post.js index b4dd012..fc1a740 100644 --- a/proxy/post.js +++ b/proxy/post.js @@ -2,6 +2,8 @@ const postModel = require('../models/post') .PostModel; const redisClient = require('../utility/redisClient'); const tool = require('../utility/tool'); +const serverlog = require('serverlog-node'); +const logger = serverlog.getLogger('post'); /** * 为首页数据查询构建条件对象 @@ -78,6 +80,8 @@ exports.getPosts = params => { if (posts) { redisClient.setItem(cache_key, posts, redisClient.defaultExpired); } + + logger.infoE('构建的查询对象:', query, '数据库返回结果:', posts) return resolve(posts); }); }, err => { diff --git a/public/dist/css/home-loading.css b/public/dist/css/home-loading.css index e7b4ad2..6c5d5e3 100644 --- a/public/dist/css/home-loading.css +++ b/public/dist/css/home-loading.css @@ -1 +1 @@ -.home-loading{position:fixed;left:0;top:0;right:0;bottom:0;width:100%;height:100%;background:#f3f3f4;z-index:9999}.home-loading .loading-con{position:absolute;left:50%;top:50%;margin-left:-50px;margin-top:-60px}.home-loading .loading-con img{position:absolute;top:8px;left:8px;width:80px;height:80px;-webkit-border-radius:50%;-moz-border-radius:50%;-o-border-radius:50%;-ms-border-radius:50%;border-radius:50%}.home-loading .loading-circle{box-sizing:content-box;width:80px;height:80px;border-top:8px solid #11994b;border-right:8px solid #f2a808;border-bottom:8px solid #2399e7;border-left:8px solid #c0392b;-webkit-border-radius:50%;-moz-border-radius:50%;-o-border-radius:50%;-ms-border-radius:50%;border-radius:50%;-webkit-animation:spin 1s infinite linear;-moz-animation:spin 1s infinite linear;-o-animation:spin 1s infinite linear;-ms-animation:spin 1s infinite linear;animation:spin 1s infinite linear}.loading-con p{position:relative;left:-3px;top:5px;color:#555}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@-moz-keyframes spin{0%{-moz-transform:rotate(0)}100%{-moz-transform:rotate(360deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0)}100%{-o-transform:rotate(360deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0)}100%{-ms-transform:rotate(360deg)}} \ No newline at end of file +.home-loading{position:fixed;left:0;top:0;right:0;bottom:0;width:100%;height:100%;background:#f3f3f4;z-index:9999}.home-loading .loading-con{position:absolute;left:50%;top:50%;margin-left:-50px;margin-top:-64px}.home-loading .loading-con img{position:absolute;top:8px;left:8px;width:80px;height:80px;-webkit-border-radius:50%;-moz-border-radius:50%;-o-border-radius:50%;-ms-border-radius:50%;border-radius:50%}.home-loading .loading-circle{box-sizing:content-box;width:80px;height:80px;border-top:8px solid #11994b;border-right:8px solid #f2a808;border-bottom:8px solid #2399e7;border-left:8px solid #c0392b;-webkit-border-radius:50%;-moz-border-radius:50%;-o-border-radius:50%;-ms-border-radius:50%;border-radius:50%;-webkit-animation:spin 1s infinite linear;-moz-animation:spin 1s infinite linear;-o-animation:spin 1s infinite linear;-ms-animation:spin 1s infinite linear;animation:spin 1s infinite linear}.loading-con p{position:relative;top:13px;color:#555;font-size:13px}@keyframes spin{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}@-moz-keyframes spin{0%{-moz-transform:rotate(0)}100%{-moz-transform:rotate(360deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0)}100%{-webkit-transform:rotate(360deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0)}100%{-o-transform:rotate(360deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0)}100%{-ms-transform:rotate(360deg)}} \ No newline at end of file diff --git a/public/dist/css/posts_style_custom.css b/public/dist/css/posts_style_custom.css index a9e6a0f..b658d85 100644 --- a/public/dist/css/posts_style_custom.css +++ b/public/dist/css/posts_style_custom.css @@ -1 +1 @@ -.post-copyright{position:relative;margin-bottom:1rem;padding:.5rem .8rem;border:1px solid #eee;-webkit-transition:box-shadow .3s ease-in-out;-moz-transition:box-shadow .3s ease-in-out;-o-transition:box-shadow .3s ease-in-out;-ms-transition:box-shadow .3s ease-in-out;transition:box-shadow .3s ease-in-out}.post-copyright::before{position:absolute;top:.5rem;right:.5rem;width:.8rem;height:.8rem;border-radius:.8rem;background:#49b1f5;content:""}.hljs{border:0;font-family:Consulas,"Courier New",Courier,mono,serif;font-size:12px;background:0 0;display:block;padding:1px;margin:0;width:100%;font-weight:200;color:#333;white-space:pre-wrap}.hljs ul{list-style:none;padding:0;padding-left:0!important}.hljs ul li{list-style:none;font-family:Consulas,"Courier New",Courier,mono,serif;font-weight:200;font-size:12px;padding-left:5px!important;margin:0!important;line-height:14px;word-break:break-all;word-wrap:break-word}.hljs ul li:nth-of-type(even){color:inherit}code.hljs{background:0 0}.hljs ul{list-style-type:none;margin-left:0}.hljs ul li{counter-increment:customlistcounter}.hljs ul li:before{content:counter(customlistcounter) " ";float:left;width:3em;margin-right:10px;color:#999;border-right:3px solid #6ce26c!important}.hljs ul :first-child{counter-reset:customlistcounter} \ No newline at end of file +.post-copyright{position:relative;margin-bottom:1rem;padding:.5rem .8rem;border:1px solid #eee;-webkit-transition:box-shadow .3s ease-in-out;-moz-transition:box-shadow .3s ease-in-out;-o-transition:box-shadow .3s ease-in-out;-ms-transition:box-shadow .3s ease-in-out;transition:box-shadow .3s ease-in-out}.post-copyright::before{position:absolute;top:.5rem;right:.5rem;width:.8rem;height:.8rem;border-radius:.8rem;background:#49b1f5;content:""} \ No newline at end of file diff --git a/public/dist/css/site.css b/public/dist/css/site.css index 53dd79e..850569e 100644 --- a/public/dist/css/site.css +++ b/public/dist/css/site.css @@ -1 +1 @@ -.render-body,.render-body .row:first-child,body,html{height:100%}body,html{padding:0;margin:0 auto;tap-highlight-color:transparent;focus-ring-color:transparent;-webkit-tap-highlight-color:transparent;-webkit-focus-ring-color:transparent}body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue",STHeiti,"Microsoft Yahei",Tahoma,Simsun,sans-serif;font-size:14px;display:none}body.shown{display:block}body.mCustomScrollbar .mCSB_scrollTools .mCSB_draggerContainer{top:70px}button{outline:medium none;-webkit-transition:all .5s;-moz-transition:all .5s;-ms-transition:all .5s;-o-transition:all .5s;transition:all .5s}.btn.active.focus,.btn.active:focus,.btn.focus,.btn.focus:active,.btn:active:focus,.btn:focus{outline:0}label{display:block}a{color:#444;transition:color .3s}a:focus,a:hover{color:#19aa8d;text-decoration:none;outline:0}.popover{font-family:inherit}::selection{background:#eb7350 none repeat scroll 0 0;color:#fff}::-moz-selection{background:#eb7350 none repeat scroll 0 0;color:#fff}blockquote{font-size:15px}.form-control:focus{border-color:#1ab394;box-shadow:none}.btn{-ms-border-radius:3px;border-radius:3px}.glyphicon{font-family:none!important}.dropdown-menu>li>a{padding:3px 13px}.navbar-default{background:#fff;background:rgba(255,255,255,.92)}.navbar-inverse{background-color:#293846;border-color:#222}.navbar-inverse .navbar-brand{color:#fff}.navbar .navbar-brand img{width:50px;height:50px;border-radius:50%;display:inline-block;margin-top:-4px;margin-right:6px}.navbar-default .navbar-nav>li>a{color:#333;-ms-opacity:.8;opacity:.8}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{-ms-opacity:1;opacity:1}.navbar .navbar-brand{height:70px;line-height:40px}.navbar-default .navbar-brand{color:#2b2b2b}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#2b2b2b}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:370px}.my-nav-pills li{clear:none}.my-nav-pills>li>a{font-size:16px;line-height:69px;padding:0 13px;border-bottom:1px solid transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{background:0 0;-ms-opacity:1;opacity:1}.nav-line{position:absolute;height:3px;border-radius:5px;bottom:0;left:37px;width:30px;display:none}.navbar-default .navbar-nav .nav-line{display:block}.navbar-default .navbar-nav .active.blog-nav a{color:#f60}.navbar-default .navbar-nav .active.blog-nav .nav-line{background:rgba(255,102,0,.8)}.navbar-default .navbar-nav .active.guestbook-nav a{color:#d243ff}.navbar-default .navbar-nav .active.guestbook-nav .nav-line{background:rgba(210,67,255,.8)}.navbar-default .navbar-nav .active.about-nav a{color:#01b7ee}.navbar-default .navbar-nav .active.about-nav .nav-line{background:rgba(1,183,238,.8)}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{background:0 0}.navbar .navbar-toggle{margin-top:18px}.navbar-default .navbar-toggle{background-color:#1ab394;border-color:transparent}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#18a689}.navbar-default .navbar-toggle .icon-bar{background-color:#fff}.category-block{background:#f3f3f4;padding:30px 0 0 15px;top:70px;bottom:0;position:fixed;z-index:1}.category-top{border:1px solid #e7eaec;height:60px;font-size:16px;padding-top:20px;padding-left:15px;background:#fff}.category-split{height:20px;border-left:1px solid #e7eaec;border-right:1px solid #e7eaec;background:#fff}.category-list{position:absolute;bottom:0;left:0;right:0;margin-left:15px;top:110px;background:#fff;border-left:1px solid #e7eaec;border-right:1px solid #e7eaec}.label-green{background-color:#1ab394;color:#fff;font-weight:400;margin-top:2px}.label-green-2{background-color:#1ab394;color:#fff;font-weight:400;margin-top:1px;padding:.3em .5em .3em}.nav-pills>li>a{-ms-border-radius:0;border-radius:0}.category-list .nav li a{border-bottom:1px solid transparent;border-top:1px solid transparent;font-size:15px;height:50px;position:relative;display:flex;align-items:center}.category-list .nav li a img{width:25px;height:25px;position:absolute}.category-list .nav li a span{padding-left:28px;display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.nav>li>a:focus,.nav>li>a:hover{color:#f60;background:0 0}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{background-color:#fff5ee;border-color:#f8d4bc;color:#f60}.nav-pills .badge{background:#555;color:#fff;float:right}.blog-list{padding-top:70px;height:100%}.top-bar{border-bottom:1px solid #e7eaec;height:59px!important;margin:0 -20px 20px -20px}.data-block{height:auto!important;min-height:100%;background:#f3f3f4}.list-wrap{margin:30px 6px 0;padding:0 20px 20px;background:#fff;border-color:#e7eaec;border-style:solid solid none;border-width:1px 0;min-height:64px}.list-wrap ol{margin-bottom:0}.blog-item{position:relative}.preview-link{display:block;cursor:alias;height:100%;left:0;position:absolute;right:0;top:0;z-index:1}.blog-item h4 a,.blog-item span{position:relative;z-index:2}.blog-item p,.blog-item span{color:#777}.blog-item p{margin-top:20px}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#242b32}.nav-stacked>li+li{margin-top:0}.hr-line-dashed{background-color:#fff;border-top:1px dashed #e7eaec;color:#fff;height:1px;margin:20px 0}.block-grey{background:#f3f3f4;padding-top:100px;padding-bottom:50px;min-height:100%}.block-white{background:#fff;min-height:95%;padding:25px 20px 20px}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#19aa8d}.icon-gear{vertical-align:bottom;color:#555}.icon-gear:focus,.icon-gear:hover{color:#242b32}.btn-round-icon-xs{-ms-border-radius:50%;border-radius:50%;width:22px}.margin-top-10{margin-top:10px}.margin-top-20{margin-top:20px}.margin-top-30{margin-top:30px}.margin-top-50{margin-top:50px}.margin-top-100{margin-top:100px}.field-validation-error{color:#b94a48}.field-validation-valid{display:none}input.input-validation-error,input.input-validation-error:focus,textarea.input-validation-error,textarea.input-validation-error:focus{border:1px solid #b94a48}input[type=checkbox].input-validation-error{border:0 none}.validation-summary-errors{color:#b94a48}.validation-summary-valid{display:none}.sweet-alert{font-family:微软雅黑!important}.sweet-alert h2{font-size:20px!important;font-weight:400!important;margin-bottom:10px!important}body.dragging,body.dragging *{cursor:move!important}.dragged{position:absolute;opacity:.5;z-index:2000}#cate-list li.placeholder{position:relative;border:medium none;margin:0;padding:0}#cate-list li.placeholder:before{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;border-color:transparent -moz-use-text-color transparent #19aa8d;border-image:none;border-style:solid none solid solid;border-width:5px medium 5px 5px;content:"";height:0;left:-5px;margin-top:-1px;position:absolute;top:-4px;width:0}#cate-list .fa-arrows{cursor:move;vertical-align:top;margin-top:5px}#cate-list li{padding-bottom:7px}#cate-list .placard{margin-top:-5px;margin-bottom:-8px}.btn-del-cate{padding:0;float:right}#loadCate{margin-top:50px}.sk-wave{margin:20px auto;width:50px;height:40px;text-align:center;font-size:10px}.sk-wave .sk-rect{background-color:#19aa8d;height:100%;width:6px;display:inline-block;-webkit-animation:sk-waveStretchDelay 1.2s infinite ease-in-out;animation:sk-waveStretchDelay 1.2s infinite ease-in-out}.sk-wave .sk-rect1{-webkit-animation-delay:-1.2s;animation-delay:-1.2s}.sk-wave .sk-rect2{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.sk-wave .sk-rect3{-webkit-animation-delay:-1s;animation-delay:-1s}.sk-wave .sk-rect4{-webkit-animation-delay:-.9s;animation-delay:-.9s}.sk-wave .sk-rect5{-webkit-animation-delay:-.8s;animation-delay:-.8s}@-webkit-keyframes sk-waveStretchDelay{0%,100%,40%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}20%{-webkit-transform:scaleY(1);transform:scaleY(1)}}@keyframes sk-waveStretchDelay{0%,100%,40%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}20%{-webkit-transform:scaleY(1);transform:scaleY(1)}}.list-wrap .spinner{margin:auto;width:70px;text-align:center;height:34px;padding-top:7px}.list-wrap .spinner>div{width:18px;height:18px;background-color:#1ab394;border-radius:100%;display:inline-block;-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both}.list-wrap .spinner .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s;margin-right:5px}.list-wrap .spinner .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s;margin-right:5px}@-webkit-keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}#btn-load{border-color:#ddd;color:#777}#btn-load:hover{border-color:#adadad;color:#555}.tooltip{z-index:1200}.tooltip-inner{background:#000 none repeat scroll!important;background:rgba(0,0,0,.8) none repeat scroll!important}.tooltip.top .tooltip-arrow{border-top-color:#000;border-top-color:rgba(0,0,0,.8)}.tooltip.top-left .tooltip-arrow{border-top-color:#000;border-top-color:rgba(0,0,0,.8)}.tooltip.top-right .tooltip-arrow{border-top-color:#000;border-top-color:rgba(0,0,0,.8)}.tooltip.right .tooltip-arrow{border-right-color:#000;border-right-color:rgba(0,0,0,.8)}.tooltip.left .tooltip-arrow{border-left-color:#000;border-left-color:rgba(0,0,0,.8)}.tooltip.bottom .tooltip-arrow{border-bottom-color:#000;border-bottom-color:rgba(0,0,0,.8)}.tooltip.bottom-left .tooltip-arrow{border-bottom-color:#000;border-bottom-color:rgba(0,0,0,.8)}.tooltip.bottom-right .tooltip-arrow{border-bottom-color:#000;border-bottom-color:rgba(0,0,0,.8)}.margin-left-20{margin-left:20px}.list-top-left{padding-top:20px}.list-top-left a{font-size:16px;color:#999;cursor:pointer}.list-top-left a.current{color:#333}.list-top-left a:focus,.list-top-left a:hover{color:#333}.list-top-left a:last-child{margin-left:10px}.list-top-center{padding-top:13px;padding-right:0;text-align:right}.list-top-right{padding-top:13px}.detail-container{background:#f3f3f4;min-height:100%}.detail-wrap{margin-top:100px;margin-bottom:20px;padding:40px 30px;background:#fff;border-color:#e7eaec;border-style:solid solid none;border-width:1px 0;transition:width .3s;min-height:400px}.post-title{margin:40px 0 100px}.post-title h1{font-size:25px}.post-label{background:#fff none repeat scroll 0 0;border:1px solid #e7eaec;border-radius:30px;line-height:1.5;padding:3px 8px;display:inline-block;text-align:center;vertical-align:middle;white-space:nowrap}.post-modal .post-label{margin-right:4px}.post-modal .mCSB_inside>.mCSB_container{margin-right:25px}.modal-open{overflow:hidden!important}.empty-block{position:fixed;top:70px;bottom:0;right:0;background:#f3f3f4}.post-content a{color:#00bfff}.post-content a:hover{color:#00a8e2}.post-content a.black-link{color:#585f69}.post-content a.black-link:focus,.post-content a.black-link:hover{color:#19aa8d}.post-content blockquote{font-size:14px;color:#666}.post-content blockquote h2{border-left:none!important;display:inline-block;font-size:14px;margin:0;padding:0;color:#666;font-weight:700}.post-content pre{padding:0;border:none}.post-content img{max-width:100%}.hr-article{margin-top:100px}.category-list .mCSB_inside>.mCSB_container{margin-right:7px}.category-list .mCSB_scrollTools{width:8px}.fixed-tool{position:fixed;right:14px;bottom:0;z-index:2}.fixed-tool a{display:block;width:40px;height:40px;background:#555;border-radius:50%;margin-top:10px;font-size:25px;text-align:center;color:#fff;cursor:pointer;opacity:.8}.fixed-tool a:hover{background:#1ab394}.fixed-tool .fa-qrcode{vertical-align:middle}.qr-li{position:relative}#qrBtn.opened{background:#1ab394}.qrcontain{left:-134px;top:-107px}.qrcontain.popover.left>.arrow{top:86%}.post-cover{display:none;background-color:#000;position:fixed;top:0;bottom:0;left:0;right:0;opacity:.5;z-index:3}.post-modal{position:fixed;transition:right .5s ease 0s;right:-1200px;top:70px;bottom:0;box-shadow:0 5px 15px rgba(0,0,0,.5);background-clip:padding-box;background-color:#fff;outline:0 none;z-index:4;padding-left:0;padding-right:0}.blog-item h4 a,.post-modal .modal-header h4{line-height:1.3;max-height:47px;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-all}.post-modal .modal-header h4{display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.post-modal .modal-body{position:absolute;width:100%;top:74px;bottom:64px;overflow-y:auto;padding:0 10px 15px 0}.post-modal .post-content{padding:0 15px 0 30px}.post-modal .post-content>div{margin-top:30px}.post-modal .modal-body p,.post-modal .modal-body span{cursor:text}.post-modal .modal-footer{bottom:0;position:absolute;width:100%}.sk-cube-grid{width:40px;height:40px;margin:100px auto}.sk-cube-grid .sk-cube{width:33%;height:33%;background-color:#1ab394;float:left;-webkit-animation:sk-cubeGridScaleDelay 1.3s infinite ease-in-out;animation:sk-cubeGridScaleDelay 1.3s infinite ease-in-out}.sk-cube-grid .sk-cube1{-webkit-animation-delay:.2s;animation-delay:.2s}.sk-cube-grid .sk-cube2{-webkit-animation-delay:.3s;animation-delay:.3s}.sk-cube-grid .sk-cube3{-webkit-animation-delay:.4s;animation-delay:.4s}.sk-cube-grid .sk-cube4{-webkit-animation-delay:.1s;animation-delay:.1s}.sk-cube-grid .sk-cube5{-webkit-animation-delay:.2s;animation-delay:.2s}.sk-cube-grid .sk-cube6{-webkit-animation-delay:.3s;animation-delay:.3s}.sk-cube-grid .sk-cube7{-webkit-animation-delay:0s;animation-delay:0s}.sk-cube-grid .sk-cube8{-webkit-animation-delay:.1s;animation-delay:.1s}.sk-cube-grid .sk-cube9{-webkit-animation-delay:.2s;animation-delay:.2s}@-webkit-keyframes sk-cubeGridScaleDelay{0%,100%,70%{-webkit-transform:scale3D(1,1,1);transform:scale3D(1,1,1)}35%{-webkit-transform:scale3D(0,0,1);transform:scale3D(0,0,1)}}@keyframes sk-cubeGridScaleDelay{0%,100%,70%{-webkit-transform:scale3D(1,1,1);transform:scale3D(1,1,1)}35%{-webkit-transform:scale3D(0,0,1);transform:scale3D(0,0,1)}}.syntaxhighlighter .container::after,.syntaxhighlighter .container::before{display:block}.fuelux .syntaxhighlighter{margin:0!important}.fuelux .form-group .radio-custom.checked::before{background:#1ab394 none repeat scroll 0 0;border-color:#1ab394}.post-content{min-height:200px;overflow:hidden}.post-content .syntaxhighlighter{background:#fff!important;border:1px dashed #ccc!important;border-radius:0!important;cursor:text}.post-content .syntaxhighlighter:hover{border:1px dashed #6495ed!important}.post-content .syntaxhighlighter:hover .gutter{background:#fbfbfb!important}.post-content .syntaxhighlighter *{font-size:14px!important;font-family:Monaco,Menlo,Consolas,"Courier New",微软雅黑!important}.post-content .syntaxhighlighter .gutter{color:#2b91af!important;background:#fff!important;border-right:1px dashed #ccc!important}.post-content .syntaxhighlighter .keyword{font-weight:400!important;color:#00f!important}.post-content .syntaxhighlighter .html.keyword{color:maroon!important}.post-content .syntaxhighlighter .string{color:maroon!important}.post-content .syntaxhighlighter .html.string{color:#00f!important}.post-content .syntaxhighlighter .html.color1{color:red!important}.post-content .syntaxhighlighter .comments{color:green!important}.post-content .syntaxhighlighter .css.plain{color:maroon!important}.post-content .syntaxhighlighter .css.keyword{color:red!important}.post-content .syntaxhighlighter .css.value{color:#00f!important}.sign-out-link{display:block;position:fixed;top:80px;right:20px;width:35px;height:35px;border:2px solid #1ab394;border-radius:50%;font-size:18px;color:#1ab394;text-align:center;vertical-align:middle;padding-top:2px;cursor:pointer}.sign-out-link:focus,.sign-out-link:hover{background:#1ab394;color:#fff}#scrollSpy{float:right;width:10px}#page-nav{position:fixed;top:100px;bottom:18px}#page-nav li:not(:last-child){padding-bottom:4px}#page-nav a{display:block;width:15px;height:100%;background:#fff;margin-right:2px;border-top:1px solid #e7eaec;border-bottom:1px solid #e7eaec}#page-nav li.current a{background:#edf6fa}.blog-list .footer{background:#f3f3f4}footer{color:#888;font-size:13px;text-align:center;padding:25px 0 10px}.about-block{min-height:700px}.p-lg{padding:30px}.navy-bg{background-color:#1ab394;color:#fff}.widget-head-color-box{border-radius:5px 5px 0 0;margin-top:160px}.m-b-md{margin-bottom:20px}img.profile-img{border:6px solid #fff;width:160px;height:160px}img.wechat-img{width:160px;height:160px}.m-b-md{margin-bottom:20px}.widget-text-box{background:#fff none repeat scroll 0 0;border:1px solid #e7eaec;padding:20px}.widget-text-box .fa-envelope,.widget-text-box .fa-github{color:#666}.widget-text-box .fa-qrcode{cursor:pointer}#job-title{font-size:20px}.scroll-nav{position:fixed;margin-top:100px;background:#fff;padding:25px 20px;width:230px;transition:all .2s ease 0s}.scroll-nav__heading{font-size:16px;margin-bottom:6px;display:block}.scroll-nav__list{list-style:none;padding-left:2px}.scroll-nav__sub-list{list-style:square;padding-left:32px}.scroll-nav__wrapper{padding:0 15px;position:relative}.scroll-nav__wrapper::after{background:#eee none repeat scroll 0 0;border-radius:5px;bottom:0;content:"";display:block;left:0;position:absolute;top:30px;width:3px}.scroll-nav__list *{font-size:13px}.scroll-nav__list a{display:block;padding:3px 0}.scroll-nav__item,.scroll-nav__sub-item{color:#777}.scroll-nav__item>a,.scroll-nav__sub-item>a{color:#777}.scroll-nav__item.active,.scroll-nav__item.active .scroll-nav__sub-item.active{color:#008e59}.scroll-nav__item:hover,.scroll-nav__item>a:hover,.scroll-nav__sub-item:hover,.scroll-nav__sub-item>a:hover{color:#008e59}.scroll-nav__item.active .scroll-nav__sub-item.active>a,.scroll-nav__item.active>a{color:#008e59;font-weight:700}.scroll-nav__item.active>a::before{border-left:3px solid #009a61;content:"";display:block;height:26px;left:0;margin-top:-3px;position:absolute;width:100%;z-index:1}.close-menu{position:fixed;margin-top:110px;margin-left:197px;padding:2px 6px;font-size:14px}.close-menu:hover{cursor:pointer}.btn-menu{height:40px;position:fixed;margin-top:-41px;border-color:#e7eaec;border-radius:0;transition:none;display:none}.btn-menu:active,.btn-menu:focus,.btn-menu:hover{border-color:#ccc}.font-controller{position:fixed;width:40px;margin-left:-70px;margin-top:-41px;background:#fff;transition:none}.font-controller .btn-font{float:left;width:40px;height:40px;line-height:40px;text-align:center;border:1px solid #e7eaec;user-select:none;font-size:14px!important}.font-controller .btn-font:hover{cursor:pointer;border-color:#ccc}.font-controller .btn-font:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.font-controller .btn-font.disabled{border-color:#ccc;opacity:.35}.font-controller .btn-font.disabled:hover{cursor:not-allowed}.font-controller .btn-font.disabled:active{-webkit-box-shadow:none;box-shadow:none}.font-controller .btn-font-minus{border-bottom-color:transparent}.post-content .normal-body h2{background:#fbfbfb none repeat scroll 0 0;border-left:4px solid #39c;color:#222;font-family:"Microsoft Yahei";font-size:16px;margin:30px -30px 10px;padding:17px 40px 16px 23px}.post-content .scroll-nav__section:nth-child(5n+1) h2{border-left-color:#b9d329}.post-content .scroll-nav__section:nth-child(5n+2) h2{border-left-color:#ffae5b}.post-content .scroll-nav__section:nth-child(5n+3) h2{border-left-color:#c0ebf7}.post-content .scroll-nav__section:nth-child(5n+4) h2{border-left-color:#69bcf3}.ueditor-body h2{background:#fbfbfb none repeat scroll 0 0;border-left:4px solid #39c;color:#222;font-family:"Microsoft Yahei";font-size:16px;margin:30px -20px 10px;padding:17px 40px 16px 23px}.post-content .normal-body h3{color:#444;font-size:15px;margin:26px auto 10px;font-weight:700}.post-content .normal-body h3::before{color:#39c;content:"■";margin-right:5px;position:relative;top:-2px}.post-content .scroll-nav__section>.scroll-nav__sub-section:nth-child(4n+1) h3::before{color:#fab4cc}.post-content .scroll-nav__section>.scroll-nav__sub-section:nth-child(4n+2) h3::before{color:#79d9f3}.post-content .scroll-nav__section>.scroll-nav__sub-section:nth-child(4n+3) h3::before{color:#acd180}.ueditor-body h3{color:#444;font-size:15px;margin:26px auto 10px;font-weight:700}.ueditor-body h3::before{color:#fab4cc;content:"■";margin-right:5px;position:relative;top:-2px}.thumbnail .caption{border-top:1px solid #eee}.lightbox .lb-data .lb-caption{font-size:14px;font-weight:400}#user_page li{clear:none}.nav>li>a.locale-link{font-size:12px;color:#666}.fa{position:relative}#filterForm .dropdown-toggle{width:71px;height:34px} \ No newline at end of file +.render-body,.render-body .row:first-child,body,html{height:100%}body,html{padding:0;margin:0 auto;tap-highlight-color:transparent;focus-ring-color:transparent;-webkit-tap-highlight-color:transparent;-webkit-focus-ring-color:transparent}body{font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Helvetica Neue",STHeiti,"Microsoft Yahei",Tahoma,Simsun,sans-serif;font-size:14px;transition:opacity .3s}body.shown{opacity:1}body.mCustomScrollbar .mCSB_scrollTools .mCSB_draggerContainer{top:70px}button{outline:medium none;-webkit-transition:all .5s;-moz-transition:all .5s;-ms-transition:all .5s;-o-transition:all .5s;transition:all .5s}.btn.active.focus,.btn.active:focus,.btn.focus,.btn.focus:active,.btn:active:focus,.btn:focus{outline:0}label{display:block}a{color:#444;transition:color .3s}a:focus,a:hover{color:#19aa8d;text-decoration:none;outline:0}.popover{font-family:inherit}::selection{background:#eb7350 none repeat scroll 0 0;color:#fff}::-moz-selection{background:#eb7350 none repeat scroll 0 0;color:#fff}blockquote{font-size:15px}.form-control:focus{border-color:#1ab394;box-shadow:none}.btn{-ms-border-radius:3px;border-radius:3px}.glyphicon{font-family:none!important}.dropdown-menu>li>a{padding:3px 13px}.navbar-default{background:#fff;background:rgba(255,255,255,.92)}.navbar-inverse{background-color:#293846;border-color:#222}.navbar-inverse .navbar-brand{color:#fff}.navbar .navbar-brand img{width:50px;height:50px;border-radius:50%;display:inline-block;margin-top:-4px;margin-right:6px}.navbar-default .navbar-nav>li>a{color:#333;-ms-opacity:.8;opacity:.8}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{-ms-opacity:1;opacity:1}.navbar .navbar-brand{height:70px;line-height:40px}.navbar-default .navbar-brand{color:#2b2b2b}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#2b2b2b}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:370px}.my-nav-pills li{clear:none}.my-nav-pills>li>a{font-size:16px;line-height:69px;padding:0 13px;border-bottom:1px solid transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{background:0 0;-ms-opacity:1;opacity:1}.nav-line{position:absolute;height:3px;border-radius:5px;bottom:0;left:37px;width:30px;display:none}.navbar-default .navbar-nav .nav-line{display:block}.navbar-default .navbar-nav .active.blog-nav a{color:#f60}.navbar-default .navbar-nav .active.blog-nav .nav-line{background:rgba(255,102,0,.8)}.navbar-default .navbar-nav .active.guestbook-nav a{color:#d243ff}.navbar-default .navbar-nav .active.guestbook-nav .nav-line{background:rgba(210,67,255,.8)}.navbar-default .navbar-nav .active.about-nav a{color:#01b7ee}.navbar-default .navbar-nav .active.about-nav .nav-line{background:rgba(1,183,238,.8)}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{background:0 0}.navbar .navbar-toggle{margin-top:18px}.navbar-default .navbar-toggle{background-color:#1ab394;border-color:transparent}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#18a689}.navbar-default .navbar-toggle .icon-bar{background-color:#fff}.category-block{background:#f3f3f4;padding:30px 0 0 15px;top:70px;bottom:0;position:fixed;z-index:1}.category-top{border:1px solid #e7eaec;height:60px;font-size:16px;padding-top:20px;padding-left:15px;background:#fff}.category-split{height:20px;border-left:1px solid #e7eaec;border-right:1px solid #e7eaec;background:#fff}.category-list{position:absolute;bottom:0;left:0;right:0;margin-left:15px;top:110px;background:#fff;border-left:1px solid #e7eaec;border-right:1px solid #e7eaec}.label-green{background-color:#1ab394;color:#fff;font-weight:400;margin-top:2px}.label-green-2{background-color:#1ab394;color:#fff;font-weight:400;margin-top:1px;padding:.3em .5em .3em}.nav-pills>li>a{-ms-border-radius:0;border-radius:0}.category-list .nav li a{border-bottom:1px solid transparent;border-top:1px solid transparent;font-size:15px;height:50px;position:relative;display:flex;align-items:center}.category-list .nav li a img{width:25px;height:25px;position:absolute}.category-list .nav li a span{padding-left:28px;display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.nav>li>a:focus,.nav>li>a:hover{color:#f60;background:0 0}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{background-color:#fff5ee;border-color:#f8d4bc;color:#f60}.nav-pills .badge{background:#555;color:#fff;float:right}.blog-list{padding-top:70px;height:100%}.top-bar{border-bottom:1px solid #e7eaec;height:59px!important;margin:0 -20px 20px -20px}.data-block{height:auto!important;min-height:100%;background:#f3f3f4}.list-wrap{margin:30px 6px 0;padding:0 20px 20px;background:#fff;border-color:#e7eaec;border-style:solid solid none;border-width:1px 0;min-height:64px}.list-wrap ol{margin-bottom:0}.blog-item{position:relative}.preview-link{display:block;cursor:alias;height:100%;left:0;position:absolute;right:0;top:0;z-index:1}.blog-item h4 a,.blog-item span{position:relative;z-index:2}.blog-item p,.blog-item span{color:#777}.blog-item p{margin-top:20px}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#242b32}.nav-stacked>li+li{margin-top:0}.hr-line-dashed{background-color:#fff;border-top:1px dashed #e7eaec;color:#fff;height:1px;margin:20px 0}.block-grey{background:#f3f3f4;padding-top:100px;padding-bottom:50px;min-height:100%}.block-white{background:#fff;min-height:95%;padding:25px 20px 20px}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#19aa8d}.icon-gear{vertical-align:bottom;color:#555}.icon-gear:focus,.icon-gear:hover{color:#242b32}.btn-round-icon-xs{-ms-border-radius:50%;border-radius:50%;width:22px}.margin-top-10{margin-top:10px}.margin-top-20{margin-top:20px}.margin-top-30{margin-top:30px}.margin-top-50{margin-top:50px}.margin-top-100{margin-top:100px}.field-validation-error{color:#b94a48}.field-validation-valid{display:none}input.input-validation-error,input.input-validation-error:focus,textarea.input-validation-error,textarea.input-validation-error:focus{border:1px solid #b94a48}input[type=checkbox].input-validation-error{border:0 none}.validation-summary-errors{color:#b94a48}.validation-summary-valid{display:none}.sweet-alert{font-family:微软雅黑!important}.sweet-alert h2{font-size:20px!important;font-weight:400!important;margin-bottom:10px!important}body.dragging,body.dragging *{cursor:move!important}.dragged{position:absolute;opacity:.5;z-index:2000}#cate-list li.placeholder{position:relative;border:medium none;margin:0;padding:0}#cate-list li.placeholder:before{-moz-border-bottom-colors:none;-moz-border-left-colors:none;-moz-border-right-colors:none;-moz-border-top-colors:none;border-color:transparent -moz-use-text-color transparent #19aa8d;border-image:none;border-style:solid none solid solid;border-width:5px medium 5px 5px;content:"";height:0;left:-5px;margin-top:-1px;position:absolute;top:-4px;width:0}#cate-list .fa-arrows{cursor:move;vertical-align:top;margin-top:5px}#cate-list li{padding-bottom:7px}#cate-list .placard{margin-top:-5px;margin-bottom:-8px}.btn-del-cate{padding:0;float:right}#loadCate{margin-top:50px}.sk-wave{margin:20px auto;width:50px;height:40px;text-align:center;font-size:10px}.sk-wave .sk-rect{background-color:#19aa8d;height:100%;width:6px;display:inline-block;-webkit-animation:sk-waveStretchDelay 1.2s infinite ease-in-out;animation:sk-waveStretchDelay 1.2s infinite ease-in-out}.sk-wave .sk-rect1{-webkit-animation-delay:-1.2s;animation-delay:-1.2s}.sk-wave .sk-rect2{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.sk-wave .sk-rect3{-webkit-animation-delay:-1s;animation-delay:-1s}.sk-wave .sk-rect4{-webkit-animation-delay:-.9s;animation-delay:-.9s}.sk-wave .sk-rect5{-webkit-animation-delay:-.8s;animation-delay:-.8s}@-webkit-keyframes sk-waveStretchDelay{0%,100%,40%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}20%{-webkit-transform:scaleY(1);transform:scaleY(1)}}@keyframes sk-waveStretchDelay{0%,100%,40%{-webkit-transform:scaleY(.4);transform:scaleY(.4)}20%{-webkit-transform:scaleY(1);transform:scaleY(1)}}.list-wrap .spinner{margin:auto;width:70px;text-align:center;height:34px;padding-top:7px}.list-wrap .spinner>div{width:18px;height:18px;background-color:#1ab394;border-radius:100%;display:inline-block;-webkit-animation:sk-bouncedelay 1.4s infinite ease-in-out both;animation:sk-bouncedelay 1.4s infinite ease-in-out both}.list-wrap .spinner .bounce1{-webkit-animation-delay:-.32s;animation-delay:-.32s;margin-right:5px}.list-wrap .spinner .bounce2{-webkit-animation-delay:-.16s;animation-delay:-.16s;margin-right:5px}@-webkit-keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes sk-bouncedelay{0%,100%,80%{-webkit-transform:scale(0);transform:scale(0)}40%{-webkit-transform:scale(1);transform:scale(1)}}#btn-load{border-color:#ddd;color:#777}#btn-load:hover{border-color:#adadad;color:#555}.tooltip{z-index:1200}.tooltip-inner{background:#000 none repeat scroll!important;background:rgba(0,0,0,.8) none repeat scroll!important}.tooltip.top .tooltip-arrow{border-top-color:#000;border-top-color:rgba(0,0,0,.8)}.tooltip.top-left .tooltip-arrow{border-top-color:#000;border-top-color:rgba(0,0,0,.8)}.tooltip.top-right .tooltip-arrow{border-top-color:#000;border-top-color:rgba(0,0,0,.8)}.tooltip.right .tooltip-arrow{border-right-color:#000;border-right-color:rgba(0,0,0,.8)}.tooltip.left .tooltip-arrow{border-left-color:#000;border-left-color:rgba(0,0,0,.8)}.tooltip.bottom .tooltip-arrow{border-bottom-color:#000;border-bottom-color:rgba(0,0,0,.8)}.tooltip.bottom-left .tooltip-arrow{border-bottom-color:#000;border-bottom-color:rgba(0,0,0,.8)}.tooltip.bottom-right .tooltip-arrow{border-bottom-color:#000;border-bottom-color:rgba(0,0,0,.8)}.margin-left-20{margin-left:20px}.list-top-left{padding-top:20px}.list-top-left a{font-size:16px;color:#999;cursor:pointer}.list-top-left a.current{color:#333}.list-top-left a:focus,.list-top-left a:hover{color:#333}.list-top-left a:last-child{margin-left:10px}.list-top-center{padding-top:13px;padding-right:0;text-align:right}.list-top-right{padding-top:13px}.detail-container{background:#f3f3f4;min-height:100%}.detail-wrap{margin-top:100px;margin-bottom:20px;padding:40px 30px;background:#fff;border-color:#e7eaec;border-style:solid solid none;border-width:1px 0;transition:width .3s;min-height:400px}.post-title{margin:40px 0 100px}.post-title h1{font-size:25px}.post-label{background:#fff none repeat scroll 0 0;border:1px solid #e7eaec;border-radius:30px;line-height:1.5;padding:3px 8px;display:inline-block;text-align:center;vertical-align:middle;white-space:nowrap}.post-modal .post-label{margin-right:4px}.post-modal .mCSB_inside>.mCSB_container{margin-right:25px}.modal-open{overflow:hidden!important}.empty-block{position:fixed;top:70px;bottom:0;right:0;background:#f3f3f4}.post-content a{color:#00bfff}.post-content a:hover{color:#00a8e2}.post-content a.black-link{color:#585f69}.post-content a.black-link:focus,.post-content a.black-link:hover{color:#19aa8d}.post-content blockquote{font-size:14px;color:#666}.post-content blockquote h2{border-left:none!important;display:inline-block;font-size:14px;margin:0;padding:0;color:#666;font-weight:700}.post-content pre{padding:0;border:none}.post-content img{max-width:100%}.hr-article{margin-top:100px}.category-list .mCSB_inside>.mCSB_container{margin-right:7px}.category-list .mCSB_scrollTools{width:8px}.fixed-tool{position:fixed;right:14px;bottom:0;z-index:2}.fixed-tool a{display:block;width:40px;height:40px;background:#555;border-radius:50%;margin-top:10px;font-size:25px;text-align:center;color:#fff;cursor:pointer;opacity:.8}.fixed-tool a:hover{background:#1ab394}.fixed-tool .fa-qrcode{vertical-align:middle}.qr-li{position:relative}#qrBtn.opened{background:#1ab394}.qrcontain{left:-134px;top:-107px}.qrcontain.popover.left>.arrow{top:86%}.post-cover{display:none;background-color:#000;position:fixed;top:0;bottom:0;left:0;right:0;opacity:.5;z-index:3}.post-modal{position:fixed;transition:right .5s ease 0s;right:-1200px;top:70px;bottom:0;box-shadow:0 5px 15px rgba(0,0,0,.5);background-clip:padding-box;background-color:#fff;outline:0 none;z-index:4;padding-left:0;padding-right:0}.blog-item h4 a,.post-modal .modal-header h4{line-height:1.3;max-height:47px;display:-webkit-box;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:2;-webkit-box-orient:vertical;word-break:break-all}.post-modal .modal-header h4{display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.post-modal .modal-body{position:absolute;width:100%;top:74px;bottom:64px;overflow-y:auto;padding:0 10px 15px 0}.post-modal .post-content{padding:0 15px 0 30px}.post-modal .post-content>div{margin-top:30px}.post-modal .modal-body p,.post-modal .modal-body span{cursor:text}.post-modal .modal-footer{bottom:0;position:absolute;width:100%}.sk-cube-grid{width:40px;height:40px;margin:100px auto}.sk-cube-grid .sk-cube{width:33%;height:33%;background-color:#1ab394;float:left;-webkit-animation:sk-cubeGridScaleDelay 1.3s infinite ease-in-out;animation:sk-cubeGridScaleDelay 1.3s infinite ease-in-out}.sk-cube-grid .sk-cube1{-webkit-animation-delay:.2s;animation-delay:.2s}.sk-cube-grid .sk-cube2{-webkit-animation-delay:.3s;animation-delay:.3s}.sk-cube-grid .sk-cube3{-webkit-animation-delay:.4s;animation-delay:.4s}.sk-cube-grid .sk-cube4{-webkit-animation-delay:.1s;animation-delay:.1s}.sk-cube-grid .sk-cube5{-webkit-animation-delay:.2s;animation-delay:.2s}.sk-cube-grid .sk-cube6{-webkit-animation-delay:.3s;animation-delay:.3s}.sk-cube-grid .sk-cube7{-webkit-animation-delay:0s;animation-delay:0s}.sk-cube-grid .sk-cube8{-webkit-animation-delay:.1s;animation-delay:.1s}.sk-cube-grid .sk-cube9{-webkit-animation-delay:.2s;animation-delay:.2s}@-webkit-keyframes sk-cubeGridScaleDelay{0%,100%,70%{-webkit-transform:scale3D(1,1,1);transform:scale3D(1,1,1)}35%{-webkit-transform:scale3D(0,0,1);transform:scale3D(0,0,1)}}@keyframes sk-cubeGridScaleDelay{0%,100%,70%{-webkit-transform:scale3D(1,1,1);transform:scale3D(1,1,1)}35%{-webkit-transform:scale3D(0,0,1);transform:scale3D(0,0,1)}}.syntaxhighlighter .container::after,.syntaxhighlighter .container::before{display:block}.fuelux .syntaxhighlighter{margin:0!important}.fuelux .form-group .radio-custom.checked::before{background:#1ab394 none repeat scroll 0 0;border-color:#1ab394}.post-content{min-height:200px;overflow:hidden}.post-content .syntaxhighlighter{background:#fff!important;border:1px dashed #ccc!important;border-radius:0!important;cursor:text}.post-content .syntaxhighlighter:hover{border:1px dashed #6495ed!important}.post-content .syntaxhighlighter:hover .gutter{background:#fbfbfb!important}.post-content .syntaxhighlighter *{font-size:14px!important;font-family:Monaco,Menlo,Consolas,"Courier New",微软雅黑!important}.post-content .syntaxhighlighter .gutter{color:#2b91af!important;background:#fff!important;border-right:1px dashed #ccc!important}.post-content .syntaxhighlighter .keyword{font-weight:400!important;color:#00f!important}.post-content .syntaxhighlighter .html.keyword{color:maroon!important}.post-content .syntaxhighlighter .string{color:maroon!important}.post-content .syntaxhighlighter .html.string{color:#00f!important}.post-content .syntaxhighlighter .html.color1{color:red!important}.post-content .syntaxhighlighter .comments{color:green!important}.post-content .syntaxhighlighter .css.plain{color:maroon!important}.post-content .syntaxhighlighter .css.keyword{color:red!important}.post-content .syntaxhighlighter .css.value{color:#00f!important}.sign-out-link{display:block;position:fixed;top:80px;right:20px;width:35px;height:35px;border:2px solid #1ab394;border-radius:50%;font-size:18px;color:#1ab394;text-align:center;vertical-align:middle;padding-top:2px;cursor:pointer}.sign-out-link:focus,.sign-out-link:hover{background:#1ab394;color:#fff}#scrollSpy{float:right;width:10px}#page-nav{position:fixed;top:100px;bottom:18px}#page-nav li:not(:last-child){padding-bottom:4px}#page-nav a{display:block;width:15px;height:100%;background:#fff;margin-right:2px;border-top:1px solid #e7eaec;border-bottom:1px solid #e7eaec}#page-nav li.current a{background:#edf6fa}.blog-list .footer{background:#f3f3f4}footer{color:#888;font-size:13px;text-align:center;padding:25px 0 10px}.about-block{min-height:700px}.p-lg{padding:30px}.navy-bg{background-color:#1ab394;color:#fff}.widget-head-color-box{border-radius:5px 5px 0 0;margin-top:160px}.m-b-md{margin-bottom:20px}img.profile-img{border:6px solid #fff;width:160px;height:160px}img.wechat-img{width:160px;height:160px}.m-b-md{margin-bottom:20px}.widget-text-box{background:#fff none repeat scroll 0 0;border:1px solid #e7eaec;padding:20px}.widget-text-box .fa-envelope,.widget-text-box .fa-github{color:#666}.widget-text-box .fa-qrcode{cursor:pointer}#job-title{font-size:20px}.scroll-nav{position:fixed;margin-top:100px;background:#fff;padding:25px 20px;width:230px;transition:all .2s ease 0s}.scroll-nav__heading{font-size:16px;margin-bottom:6px;display:block}.scroll-nav__list{list-style:none;padding-left:2px}.scroll-nav__sub-list{list-style:square;padding-left:32px}.scroll-nav__wrapper{padding:0 15px;position:relative}.scroll-nav__wrapper::after{background:#eee none repeat scroll 0 0;border-radius:5px;bottom:0;content:"";display:block;left:0;position:absolute;top:30px;width:3px}.scroll-nav__list *{font-size:13px}.scroll-nav__list a{display:block;padding:3px 0}.scroll-nav__item,.scroll-nav__sub-item{color:#777}.scroll-nav__item>a,.scroll-nav__sub-item>a{color:#777}.scroll-nav__item.active,.scroll-nav__item.active .scroll-nav__sub-item.active{color:#008e59}.scroll-nav__item:hover,.scroll-nav__item>a:hover,.scroll-nav__sub-item:hover,.scroll-nav__sub-item>a:hover{color:#008e59}.scroll-nav__item.active .scroll-nav__sub-item.active>a,.scroll-nav__item.active>a{color:#008e59;font-weight:700}.scroll-nav__item.active>a::before{border-left:3px solid #009a61;content:"";display:block;height:26px;left:0;margin-top:-3px;position:absolute;width:100%;z-index:1}.close-menu{position:fixed;margin-top:110px;margin-left:197px;padding:2px 6px;font-size:14px}.close-menu:hover{cursor:pointer}.btn-menu{height:40px;position:fixed;margin-top:-41px;border-color:#e7eaec;border-radius:0;transition:none;display:none}.btn-menu:active,.btn-menu:focus,.btn-menu:hover{border-color:#ccc}.font-controller{position:fixed;width:40px;margin-left:-70px;margin-top:-41px;background:#fff;transition:none}.font-controller .btn-font{float:left;width:40px;height:40px;line-height:40px;text-align:center;border:1px solid #e7eaec;user-select:none;font-size:14px!important}.font-controller .btn-font:hover{cursor:pointer;border-color:#ccc}.font-controller .btn-font:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.font-controller .btn-font.disabled{border-color:#ccc;opacity:.35}.font-controller .btn-font.disabled:hover{cursor:not-allowed}.font-controller .btn-font.disabled:active{-webkit-box-shadow:none;box-shadow:none}.font-controller .btn-font-minus{border-bottom-color:transparent}.post-content .normal-body h2{background:#fbfbfb none repeat scroll 0 0;border-left:4px solid #39c;color:#222;font-family:"Microsoft Yahei";font-size:16px;margin:30px -30px 10px;padding:17px 40px 16px 23px}.post-content .scroll-nav__section:nth-child(5n+1) h2{border-left-color:#b9d329}.post-content .scroll-nav__section:nth-child(5n+2) h2{border-left-color:#ffae5b}.post-content .scroll-nav__section:nth-child(5n+3) h2{border-left-color:#c0ebf7}.post-content .scroll-nav__section:nth-child(5n+4) h2{border-left-color:#69bcf3}.ueditor-body h2{background:#fbfbfb none repeat scroll 0 0;border-left:4px solid #39c;color:#222;font-family:"Microsoft Yahei";font-size:16px;margin:30px -20px 10px;padding:17px 40px 16px 23px}.post-content .normal-body h3{color:#444;font-size:15px;margin:26px auto 10px;font-weight:700}.post-content .normal-body h3::before{color:#39c;content:"■";margin-right:5px;position:relative;top:-2px}.post-content .scroll-nav__section>.scroll-nav__sub-section:nth-child(4n+1) h3::before{color:#fab4cc}.post-content .scroll-nav__section>.scroll-nav__sub-section:nth-child(4n+2) h3::before{color:#79d9f3}.post-content .scroll-nav__section>.scroll-nav__sub-section:nth-child(4n+3) h3::before{color:#acd180}.ueditor-body h3{color:#444;font-size:15px;margin:26px auto 10px;font-weight:700}.ueditor-body h3::before{color:#fab4cc;content:"■";margin-right:5px;position:relative;top:-2px}.thumbnail .caption{border-top:1px solid #eee}.lightbox .lb-data .lb-caption{font-size:14px;font-weight:400}#user_page li{clear:none}.nav>li>a.locale-link{font-size:12px;color:#666}.fa{position:relative}#filterForm .dropdown-toggle{width:71px;height:34px} \ No newline at end of file diff --git a/public/images/preview1.png b/public/images/preview1.png index ef0e779..b1730e8 100644 Binary files a/public/images/preview1.png and b/public/images/preview1.png differ diff --git a/public/images/preview2.png b/public/images/preview2.png index bfbe758..3fa020e 100644 Binary files a/public/images/preview2.png and b/public/images/preview2.png differ diff --git a/public/images/preview3.png b/public/images/preview3.png new file mode 100644 index 0000000..1daecb9 Binary files /dev/null and b/public/images/preview3.png differ diff --git a/public/src/css/home-loading.css b/public/src/css/home-loading.css index d22b37b..3adfe4a 100644 --- a/public/src/css/home-loading.css +++ b/public/src/css/home-loading.css @@ -12,10 +12,10 @@ .home-loading .loading-con { position: absolute; - left: 50%; - top: 50%; - margin-left: -50px; - margin-top: -60px; + left: 50%; + top: 50%; + margin-left: -50px; + margin-top: -64px; } .home-loading .loading-con img { @@ -53,9 +53,9 @@ .loading-con p { position: relative; - left: -3px; - top: 5px; + top: 13px; color: #555; + font-size: 13px; } @keyframes spin { diff --git a/public/src/css/posts_style_custom.css b/public/src/css/posts_style_custom.css index 75fff8d..7990647 100644 --- a/public/src/css/posts_style_custom.css +++ b/public/src/css/posts_style_custom.css @@ -19,60 +19,3 @@ background: #49b1f5; content: ""; } -.hljs { - border: 0; - font-family: "Consulas", "Courier New", Courier, mono, serif; - font-size: 12px; - background: transparent; - display: block; - padding: 1px; - margin: 0; - width: 100%; - font-weight: 200; - color: #333; - white-space: pre-wrap -} -.hljs ul { - list-style: none; - padding: 0px; - padding-left: 0em!important; -} -.hljs ul li { - list-style: none; - font-family: "Consulas", "Courier New", Courier, mono, serif; - font-weight: 200; - font-size: 12px; - padding-left: 5px!important; - margin: 0 !important; - line-height: 14px; - word-break: break-all; - word-wrap: break-word; -} -.hljs ul li:nth-of-type(even) { - color: inherit; -} -code.hljs{ - background: transparent; -} -.hljs ul { - list-style-type: none; - margin-left: 0; -} - -.hljs ul li { - counter-increment: customlistcounter; -} - -.hljs ul li:before { - content: counter(customlistcounter) " "; - /*font-weight: bold;*/ - float: left; - width: 3em; - margin-right: 10px; - color: #999; - border-right: 3px solid #6ce26c !important; -} - -.hljs ul :first-child { - counter-reset: customlistcounter; -} \ No newline at end of file diff --git a/public/src/css/site.css b/public/src/css/site.css index 81fc355..b32fa35 100644 --- a/public/src/css/site.css +++ b/public/src/css/site.css @@ -14,11 +14,11 @@ html, body { body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC","Helvetica Neue",STHeiti,"Microsoft Yahei",Tahoma,Simsun,sans-serif; font-size: 14px; - display: none; + transition: opacity .3s; } body.shown { - display: block; + opacity: 1; } body.mCustomScrollbar .mCSB_scrollTools .mCSB_draggerContainer { diff --git a/public/src/js/highlight_line_number.js b/public/src/js/highlight_line_number.js deleted file mode 100644 index f162afe..0000000 --- a/public/src/js/highlight_line_number.js +++ /dev/null @@ -1,4 +0,0 @@ -//代码高亮自定义 -$("code").each(function(){ - $(this).html(""); -}); \ No newline at end of file diff --git a/public/uploads/QtcjVQ8GpE/img/品牌馆@3x_ChIGWeJkLb.png b/public/uploads/QtcjVQ8GpE/img/品牌馆@3x_ChIGWeJkLb.png new file mode 100644 index 0000000..d405b37 Binary files /dev/null and b/public/uploads/QtcjVQ8GpE/img/品牌馆@3x_ChIGWeJkLb.png differ diff --git a/public/uploads/zQy02fdv4/img/prev_en_Nl4FDClFym.png b/public/uploads/zQy02fdv4/img/prev_en_Nl4FDClFym.png new file mode 100644 index 0000000..ecb5c72 Binary files /dev/null and b/public/uploads/zQy02fdv4/img/prev_en_Nl4FDClFym.png differ diff --git a/routes/auth.js b/routes/auth.js index 8d9ba07..8b2f86f 100644 --- a/routes/auth.js +++ b/routes/auth.js @@ -5,7 +5,9 @@ const path = require('path'); const passport = require('passport'); const Strategy = require('passport-local') .Strategy; -const logger = require('../utility/logger'); +const serverlog = require('serverlog-node'); +const logger = serverlog.getLogger('auth'); +const log = require('../proxy/log'); passport.use(new Strategy({ // 页面上的用户名字段的name属性值 @@ -57,7 +59,8 @@ router.post('/login', (req, res, next) => { if (err) { next(err); } else if (!user) { - logger.errLogger(new Error(res.__('auth.wrong_info')), req); + log.store('Error', new Error(res.__('auth.wrong_info'))); + logger.error('尝试登录出错!'); res.json({ valid: false, message: res.__('auth.wrong_info') diff --git a/routes/blog.js b/routes/blog.js index 5da385f..ce8f8b5 100644 --- a/routes/blog.js +++ b/routes/blog.js @@ -153,7 +153,7 @@ router.get('/:category/:article', (req, res, next) => { res.redirect(util.format('/blog/%s/%s', trueCateAlias, alias)); } - const labels = article.Labels; + let labels = article.Labels; const labelList = []; if (labels) { labels = JSON.parse(labels); diff --git a/sw.js b/sw.js index f6c5b15..67d78cf 100644 --- a/sw.js +++ b/sw.js @@ -43,7 +43,7 @@ if (workbox) { }, { "url": "/static/dist/css/home-loading.css", - "revision": "0040777e852deb1657e343e5a483a672" + "revision": "d8d57135f44a3ca78e3b0b945a5d99bf" }, { "url": "/static/dist/css/icon-font.css", @@ -55,7 +55,7 @@ if (workbox) { }, { "url": "/static/dist/css/posts_style_custom.css", - "revision": "c1873b2be213829f17c7869ba875c797" + "revision": "e0cc4825c1e0787844c849596cc2c581" }, { "url": "/static/dist/css/selectlist.css", @@ -67,7 +67,7 @@ if (workbox) { }, { "url": "/static/dist/css/site.css", - "revision": "68283ca50b966c109182c7edb5a90af8" + "revision": "b9af29af14ca66646db81b4924d72ec5" }, { "url": "/static/dist/js/about.js", @@ -171,11 +171,15 @@ if (workbox) { }, { "url": "/static/images/preview1.png", - "revision": "621700a2a57bbe582a936990810223fa" + "revision": "3a69a936b49612c2d7094c03dac4fc5f" }, { "url": "/static/images/preview2.png", - "revision": "e668889e93d0193946e6bc163a1edeb2" + "revision": "2fb815f85212a5d3a952baea77c57d56" + }, + { + "url": "/static/images/preview3.png", + "revision": "2649fa08b9721e2a7352a819ec933da1" }, { "url": "/static/images/s1.jpg", @@ -235,7 +239,7 @@ if (workbox) { }, { "url": "/static/src/css/home-loading.css", - "revision": "f07362ac7a8e5a35108b34761c23330e" + "revision": "b65e14aca9079b322da083198c33b590" }, { "url": "/static/src/css/icon-font.css", @@ -247,7 +251,7 @@ if (workbox) { }, { "url": "/static/src/css/posts_style_custom.css", - "revision": "22211a68383fcc12c4a25b5d25e17c4a" + "revision": "f90dd10040b94d222d315af5e1814725" }, { "url": "/static/src/css/selectlist.css", @@ -259,7 +263,7 @@ if (workbox) { }, { "url": "/static/src/css/site.css", - "revision": "a7b643d0c7e0befb1101674480bce4ef" + "revision": "d867e43098e168aa47d70cc2fcb211f1" }, { "url": "/static/src/js/about.js", @@ -313,10 +317,6 @@ if (workbox) { "url": "/static/src/js/guestbook.js", "revision": "c5440a16034df3ae132aa391cc5e5c92" }, - { - "url": "/static/src/js/highlight_line_number.js", - "revision": "46e28b74d69247b91c80b056398aa0f0" - }, { "url": "/static/src/js/index.js", "revision": "94c5e685de18bbd298e0ee5fd6063c12" @@ -349,6 +349,14 @@ if (workbox) { "url": "/static/uploads/415gQEpsx/img/zhr_VJH5Q4asx.jpg", "revision": "cc21e17dd614e359b6223f0dea7d482c" }, + { + "url": "/static/uploads/QtcjVQ8GpE/img/品牌馆@3x_ChIGWeJkLb.png", + "revision": "c513d36d407f28668c8bf0d4126381ef" + }, + { + "url": "/static/uploads/zQy02fdv4/img/prev_en_Nl4FDClFym.png", + "revision": "bb55cd09f52293a8aad365f0b4eb6c36" + }, { "url": "/static/ZeroClipboard.swf", "revision": "a573941f02f4331f81046356ebb667eb" diff --git a/utility/logger.js b/utility/logger.js deleted file mode 100644 index ed13623..0000000 --- a/utility/logger.js +++ /dev/null @@ -1,50 +0,0 @@ -const winston = require('winston'); -const dbPath = require('../config.json') - .mongoUrl; -const os = require('os'); -require('winston-mongodb') - .MongoDB; - -const logger = new winston.Logger({ - transports: [ - new (winston.transports.Console)({ - colorize: true - }), - new (winston.transports.MongoDB)({ - db: dbPath, - level: 'warn', - }) - ], - exitOnError: false -}); - -logger.errLogger = function (err, req) { - let obj = {}, - message = err.message; - obj.process = { - pid: process.pid, - uid: process.getuid ? process.getuid() : null - }; - obj.os = { - hostname: os.hostname() - }; - obj.stack = err.stack && err.stack.split('\n'); - obj.code = err.status || 500; - if (req) { - const query = {}; - for (const q in req.query) { - query[q] = req.query[q]; - } - obj.req = { - baseUrl: req.baseUrl, - originalUrl: req.originalUrl, - query, - body: req.body, - ip: req.ip, - route: req.route - }; - } - logger.error(message, obj); -}; - -module.exports = logger; diff --git a/views/blog/article.pug b/views/blog/article.pug index e12a6cf..902b094 100644 --- a/views/blog/article.pug +++ b/views/blog/article.pug @@ -94,7 +94,6 @@ block content script(type='text/javascript', src='/nodeModules/scrollnav/dist/jquery.scrollNav.min.js', charset='utf-8') script(type='text/javascript', src='https://cdn.bootcss.com/highlight.js/9.12.0/highlight.min.js', charset='utf-8') script(type='text/javascript', src=`${staticPrefix}/js/article.js`, charset='utf-8') - script(type='text/javascript', src=`${staticPrefix}/js/highlight_line_number.js`, charset='utf-8') script. var expandMenu = '#{settings.ExpandMenu}'; var logoPath = "#{settings.LogoPath}"; diff --git a/views/shared/artical_footer.pug b/views/shared/artical_footer.pug index 7bb6309..018049b 100644 --- a/views/shared/artical_footer.pug +++ b/views/shared/artical_footer.pug @@ -29,6 +29,5 @@ p(style="max-width: 100%; min-height: 1em; color: rgb(62, 62, 62); font-size: 14 script. url=window.location.href - console.log(url) document.getElementById("declaration_url").innerHTML=url; document.getElementById("declaration_url").href=url; \ No newline at end of file diff --git a/views/shared/layout.pug b/views/shared/layout.pug index 578bd0f..00016cf 100644 --- a/views/shared/layout.pug +++ b/views/shared/layout.pug @@ -13,6 +13,10 @@ html(lang='zh-CN') link(href='/nodeModules/@fortawesome/fontawesome-free/css/all.min.css', rel='stylesheet') link(href=`${staticPrefix}/css/share.css`, rel='stylesheet') link(href=`${staticPrefix}/css/animate-custom.css`, rel='stylesheet') + style. + body { + opacity: 0; + } title=title body.fuelux #home-loading.home-loading(style='display: none;')