├── .gitattributes ├── README.md ├── app.js ├── data ├── WiredTiger ├── WiredTiger.lock ├── WiredTiger.turtle ├── WiredTiger.wt ├── WiredTigerLAS.wt ├── _mdb_catalog.wt ├── collection-0--832133662362206685.wt ├── collection-0--8742254205632790019.wt ├── collection-0-5822136254814741816.wt ├── collection-2--8742254205632790019.wt ├── collection-2-857697725211246568.wt ├── diagnostic.data │ ├── metrics.2016-11-18T18-47-52Z-00000 │ ├── metrics.2016-11-19T04-11-50Z-00000 │ ├── metrics.2016-11-20T13-46-26Z-00000 │ ├── metrics.2016-11-22T14-34-38Z-00000 │ ├── metrics.2016-11-23T17-31-15Z-00000 │ ├── metrics.2016-11-23T17-35-25Z-00000 │ ├── metrics.2016-11-24T13-34-59Z-00000 │ ├── metrics.2016-11-25T11-27-12Z-00000 │ ├── metrics.2016-11-25T18-47-27Z-00000 │ ├── metrics.2016-11-26T17-22-48Z-00000 │ ├── metrics.2016-11-27T05-16-40Z-00000 │ ├── metrics.2016-11-27T17-33-23Z-00000 │ ├── metrics.2016-11-28T14-40-48Z-00000 │ ├── metrics.2016-12-10T10-59-02Z-00000 │ ├── metrics.2016-12-11T01-39-41Z-00000 │ ├── metrics.2016-12-14T12-56-51Z-00000 │ ├── metrics.2016-12-14T13-11-39Z-00000 │ ├── metrics.2016-12-14T16-17-09Z-00000 │ ├── metrics.2016-12-15T06-19-37Z-00000 │ ├── metrics.2016-12-15T11-23-55Z-00000 │ ├── metrics.2016-12-17T09-51-34Z-00000 │ ├── metrics.2016-12-17T17-29-42Z-00000 │ ├── metrics.2017-01-17T06-09-41Z-00000 │ └── metrics.2017-01-24T09-04-32Z-00000 ├── index-1--832133662362206685.wt ├── index-1--8742254205632790019.wt ├── index-1-5822136254814741816.wt ├── index-3--8742254205632790019.wt ├── index-3-857697725211246568.wt ├── journal │ ├── WiredTigerLog.0000000024 │ ├── WiredTigerPreplog.0000000001 │ └── WiredTigerPreplog.0000000002 ├── mongod.lock ├── sizeStorer.wt └── storage.bson ├── model ├── db.js ├── md5.js └── setting.js ├── package.json ├── public ├── admin │ ├── animate.css │ ├── bootstrap.min.css │ ├── bootstrap.min.js │ ├── jquery-2.1.1.js │ └── style.css ├── css │ ├── animate.css │ ├── bootstrap.css │ ├── bootstrap.min.css │ ├── dashboard.css │ ├── lightbox.css │ ├── style.css │ ├── style2.css │ └── sweetalert.css ├── font-awesome │ ├── css │ │ ├── font-awesome.css │ │ └── font-awesome.min.css │ └── fonts │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 ├── fonts │ ├── OpenSans-Bold.ttf │ ├── OpenSans-ExtraBold.ttf │ ├── OpenSans-Regular.ttf │ ├── OpenSans-Semibold.ttf │ └── glyphicons-halflings-regular.woff ├── images │ ├── abt.jpg │ ├── bnr3.jpg │ ├── close.png │ ├── icon2.png │ ├── lines.png │ ├── next.png │ ├── pic1.jpg │ ├── pic2.jpg │ ├── pic3.jpg │ ├── pic4.jpg │ ├── pic5.jpg │ ├── pic6.jpg │ ├── pic7.jpg │ ├── pic8.jpg │ ├── prev.png │ ├── profile_small.jpg │ ├── social.png │ ├── t1.jpg │ ├── t2.jpg │ ├── t3.jpg │ └── t4.jpg ├── js │ ├── bootstrap.min.js │ ├── inspinia.js │ ├── jquery.metisMenu.js │ ├── jquery.min.js │ ├── jquery.slimscroll.min.js │ ├── lightbox-plus-jquery.min.js │ ├── pace.min.js │ ├── responsiveslides.min.js │ ├── sweetalert.min.js │ └── underscore-noflect.js ├── libs │ └── ueditor │ │ ├── dialogs │ │ ├── emotion │ │ │ ├── emotion.css │ │ │ ├── emotion.html │ │ │ ├── emotion.js │ │ │ └── images │ │ │ │ ├── 0.gif │ │ │ │ ├── bface.gif │ │ │ │ ├── cface.gif │ │ │ │ ├── fface.gif │ │ │ │ ├── jxface2.gif │ │ │ │ ├── neweditor-tab-bg.png │ │ │ │ ├── tface.gif │ │ │ │ ├── wface.gif │ │ │ │ └── yface.gif │ │ ├── help │ │ │ ├── help.css │ │ │ ├── help.html │ │ │ └── help.js │ │ ├── image │ │ │ ├── image.css │ │ │ ├── image.html │ │ │ ├── image.js │ │ │ └── images │ │ │ │ ├── alignicon.jpg │ │ │ │ ├── bg.png │ │ │ │ ├── icons.gif │ │ │ │ ├── icons.png │ │ │ │ ├── image.png │ │ │ │ ├── progress.png │ │ │ │ ├── success.gif │ │ │ │ └── success.png │ │ ├── internal.js │ │ └── link │ │ │ └── link.html │ │ ├── index.html │ │ ├── lang │ │ └── zh-cn │ │ │ ├── images │ │ │ ├── copy.png │ │ │ ├── localimage.png │ │ │ ├── music.png │ │ │ └── upload.png │ │ │ └── zh-cn.js │ │ ├── nodejs │ │ └── config.json │ │ ├── themes │ │ ├── default │ │ │ ├── css │ │ │ │ ├── ueditor.css │ │ │ │ └── ueditor.min.css │ │ │ ├── dialogbase.css │ │ │ └── images │ │ │ │ ├── anchor.gif │ │ │ │ ├── arrow.png │ │ │ │ ├── arrow_down.png │ │ │ │ ├── arrow_up.png │ │ │ │ ├── button-bg.gif │ │ │ │ ├── cancelbutton.gif │ │ │ │ ├── charts.png │ │ │ │ ├── cursor_h.gif │ │ │ │ ├── cursor_h.png │ │ │ │ ├── cursor_v.gif │ │ │ │ ├── cursor_v.png │ │ │ │ ├── dialog-title-bg.png │ │ │ │ ├── filescan.png │ │ │ │ ├── highlighted.gif │ │ │ │ ├── icons-all.gif │ │ │ │ ├── icons.gif │ │ │ │ ├── icons.png │ │ │ │ ├── loaderror.png │ │ │ │ ├── loading.gif │ │ │ │ ├── lock.gif │ │ │ │ ├── neweditor-tab-bg.png │ │ │ │ ├── pagebreak.gif │ │ │ │ ├── scale.png │ │ │ │ ├── sortable.png │ │ │ │ ├── spacer.gif │ │ │ │ ├── sparator_v.png │ │ │ │ ├── table-cell-align.png │ │ │ │ ├── tangram-colorpicker.png │ │ │ │ ├── toolbar_bg.png │ │ │ │ ├── unhighlighted.gif │ │ │ │ ├── upload.png │ │ │ │ ├── videologo.gif │ │ │ │ ├── word.gif │ │ │ │ └── wordpaste.png │ │ └── iframe.css │ │ ├── third-party │ │ ├── codemirror │ │ │ ├── codemirror.css │ │ │ └── codemirror.js │ │ ├── jquery-1.10.2.js │ │ ├── jquery-1.10.2.min.js │ │ ├── jquery-1.10.2.min.map │ │ └── webuploader │ │ │ ├── Uploader.swf │ │ │ ├── webuploader.css │ │ │ ├── webuploader.custom.js │ │ │ ├── webuploader.custom.min.js │ │ │ ├── webuploader.flashonly.js │ │ │ ├── webuploader.flashonly.min.js │ │ │ ├── webuploader.html5only.js │ │ │ ├── webuploader.html5only.min.js │ │ │ ├── webuploader.js │ │ │ ├── webuploader.min.js │ │ │ ├── webuploader.withoutimage.js │ │ │ └── webuploader.withoutimage.min.js │ │ ├── ueditor.all.js │ │ ├── ueditor.all.min.js │ │ ├── ueditor.config.js │ │ ├── ueditor.parse.js │ │ └── ueditor.parse.min.js ├── stylesheets │ └── style.css └── upload │ ├── 799665895743033344.png │ └── 801781463870738432.png ├── routers └── router.js └── views ├── Environment.ejs ├── JavaScript.ejs ├── NodeJS.ejs ├── about.ejs ├── article.ejs ├── comment.ejs ├── comment.html ├── haha.ejs ├── index.ejs ├── login.ejs ├── manage.ejs ├── recording.ejs ├── register.ejs └── userdata.ejs /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=JavaScript 2 | *.css linguist-language=JavaScript 3 | *.html linguist-language=JavaScript 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # EJblog 2 | Nodejs(Express)+MongoDB+jQuery+Bootstrap Personal blog. 3 | 4 | 顾名思义 Express (E) jQuery(J) 5 | 6 | ## 这是一个开源的个人博客系统。 7 | 8 | 个人纯碎为了练习nodejs而做出来的一个博客,给个Star就是我最大的动力! 9 | 10 | 该系统已停止更新维护,等我有机会接触NodeJS再来写关于NodeJS的博客。 11 | 12 | ## 用Node.JS+MongoDB搭建个人博客系列 逐行代码分析: 13 | 14 | ### [用Node.JS+MongoDB搭建个人博客(成品展示)](http://www.cnblogs.com/scottjeremy/p/7027790.html) 15 | 16 | ### [用Node.JS+MongoDB搭建个人博客(安装环境)(一)](http://www.cnblogs.com/scottjeremy/p/6993480.html) 17 | 18 | ### [用Node.JS+MongoDB搭建个人博客(app.js接口文件)(二)](http://www.cnblogs.com/scottjeremy/p/7238131.html) 19 | 20 | ### [用Node.JS+MongoDB搭建个人博客(model目录)(三)](http://www.cnblogs.com/scottjeremy/p/7245802.html) 21 | 22 | ### [用Node.JS+MongoDB搭建个人博客(万众期待的router.js)(四)](http://www.cnblogs.com/scottjeremy/p/7238941.html) 23 | 24 | ### [用Node.JS+MongoDB搭建个人博客(页面模板)(五)(结束)](http://www.cnblogs.com/scottjeremy/p/7250684.html) 25 | 26 | ## 技术选型: 27 | 28 | * 后台:采用Express作为框架 MongoDB作为数据库 ejs作为模板引擎   29 | 30 | * 前台:采用jQuery库 Bootstrap作为前端UI框架 31 | 32 | ## 功能 33 | 34 | * 文章:发布文章,文章分类,删除文章 获取访问用户的地理位置(采用CX网和高德的API) 35 | 36 | ## 目录结构: 37 | 38 | ``` 39 | data 数据库文件夹 40 | model 模块目录 41 | ---- db.js 封装了对数据库的操作(增删改查) 42 | ---- md5.js 封装了md5加密函数 43 | ---- setting.js 封装了对数据库的接口 44 | node_modules 项目依赖包 45 | public 静态资源目录 46 | routers 路由目录 47 | ---- router.js 对请求接口的统一处理 48 | views 模板目录 49 | app.js 入口文件 50 | package.json 文件依赖配置包 51 | ``` 52 | 53 | ## Install 54 | 55 | ##### 安装EJblog前要先安装node环境和MongoDB数据库,具体安装请自行Google。 56 | 57 | ##### 作为例子,我已经写入一些数据可提供使用观看。数据位置在data文件夹内 58 | 59 | 第一步: 60 | 61 | 安装依赖包 62 | 63 | ``` 64 | npm install 65 | ``` 66 | 67 | 第二步: 68 | 69 | 启动MongoDB数据库和保存数据库的位置,data是相对路径。 70 | ``` 71 |  mongod --dbpath data 72 | ``` 73 | 74 | 第三步: 75 | 76 | ``` 77 | node app.js 78 | ``` 79 | #### 登陆后台(localhost:3000/login) 帐号:123123 密码:123123 80 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | var express = require("express"); 2 | var app = express(); 3 | var router = require("./routers/router.js"); 4 | var path = require('path'); 5 | var bodyParser = require('body-parser'); 6 | var ejs = require('ejs'); 7 | var ueditor = require('ueditor'); 8 | var session = require('express-session'); 9 | //require('./proxy'); 10 | 11 | //使用session 12 | app.use(session({ 13 | secret : 'keyboard cat', 14 | resave : false, 15 | saveUninitialized : true 16 | })); 17 | 18 | 19 | app.use(bodyParser.json()); 20 | 21 | app.use(express.static("./public")); 22 | 23 | //ueditor 24 | app.use("/libs/ueditor/ue", ueditor(path.join(__dirname, 'public'), function (req, res, next) { 25 | 26 | // ueditor 客户发起上传图片请求 27 | if (req.query.action === 'uploadimage') { 28 | var foo = req.ueditor; 29 | 30 | var imgname = req.ueditor.filename; 31 | 32 | var img_url = '/upload'; 33 | res.ue_up(img_url); //你只要输入要保存的地址 。保存操作交给ueditor来做 34 | } 35 | 36 | // 客户端发起图片列表请求 37 | else if (req.query.action === 'listimage') { 38 | var dir_url = '/upload'; 39 | res.ue_list(dir_url); // 客户端会列出 dir_url 目录下的所有图片 40 | } 41 | 42 | // 客户端发起其它请求 43 | else { 44 | 45 | res.setHeader('Content-Type', 'application/json'); 46 | res.redirect('/libs/ueditor/nodejs/config.json') 47 | } 48 | 49 | })); 50 | //模板引擎 51 | app.set("view engine","ejs"); 52 | 53 | //首页 54 | app.get("/",router.showIndex); 55 | //编写页面 56 | app.get("/recording", router.showRecording); 57 | //执行保存 58 | app.post("/doRecording", router.doRecording); 59 | 60 | //取得文章 61 | app.post("/getArticle", router.getArticle); 62 | //取得总页数 63 | app.post("/getAllAmount", router.getAllAmount); 64 | //文章页面 65 | app.get("/article", router.showArticle); 66 | //删除文章 67 | app.post("/delArticle", router.delArticle); 68 | 69 | //注册页面 70 | app.get("/register", router.showRegister); 71 | app.post("/doRegister",router.doRegister); 72 | 73 | //登陆页面 74 | app.get("/login", router.showLogin); 75 | app.post("/doLogin", router.doLogin); 76 | 77 | //分类文章 78 | //javascript! 79 | app.get("/JavaScript",router.showJavaScript); 80 | app.post("/getJavaScript", router.getJavaScript); 81 | //javascript 82 | 83 | //NodeJS! 84 | app.get("/NodeJS",router.showNodeJS); 85 | app.post("/getNodeJS", router.getNodeJS); 86 | //NodeJS 87 | 88 | //Environment! 89 | app.get("/Environment", router.showEnvironment); 90 | app.post("/getEnvironment", router.getEnvironment); 91 | //Environment 92 | 93 | //About! 94 | app.get("/About", router.showAbout); 95 | //About 96 | 97 | //Comment! 98 | app.get("/Comment", router.showComment); 99 | app.post("/doComment", router.doComment); 100 | app.post("/getComment", router.getComment); 101 | app.post("/getAllCountComment", router.getAllCountComment); 102 | //Comment 103 | 104 | //后台页面 105 | app.get("/manage",router.getManage); 106 | 107 | //访问用户数据! 108 | app.get("/userdata", router.showUserdata); 109 | app.post("/getUserdata", router.getUserdata); 110 | app.post("/countUserdata", router.countUserdata); 111 | app.post("/delUserdata", router.delUserdata); 112 | //访问用户数据 113 | 114 | //后台页面! 115 | 116 | //获取用户地理位置 117 | app.post("/getAddress", router.getAddress); 118 | 119 | //VisitorNum(游览数) 120 | app.post("/addVisitorNum", router.addVisitorNum); 121 | 122 | //addThumbsUp(点赞数) 123 | app.post("/addThumbsUp", router.addThumbsUp); 124 | 125 | console.log("Server running"); 126 | 127 | 128 | 129 | 130 | 131 | app.listen(3000); 132 | -------------------------------------------------------------------------------- /data/WiredTiger: -------------------------------------------------------------------------------- 1 | WiredTiger 2 | WiredTiger 2.8.1: (March 24, 2016) 3 | -------------------------------------------------------------------------------- /data/WiredTiger.lock: -------------------------------------------------------------------------------- 1 | WiredTiger lock file 2 | -------------------------------------------------------------------------------- /data/WiredTiger.turtle: -------------------------------------------------------------------------------- 1 | WiredTiger version string 2 | WiredTiger 2.8.1: (March 24, 2016) 3 | WiredTiger version 4 | major=2,minor=8,patch=1 5 | file:WiredTiger.wt 6 | allocation_size=4KB,app_metadata=,block_allocation=best,block_compressor=,cache_resident=0,checkpoint=(WiredTigerCheckpoint.324=(addr="018781e4254b0e5c8881e4cb0dc4898d81e477f70622808080e2cfc0e3145fc0",order=324,time=1485248933,size=1343488,write_gen=647)),checkpoint_lsn=(24,5888),checksum=uncompressed,collator=,columns=,dictionary=0,encryption=(keyid=,name=),format=btree,huffman_key=,huffman_value=,id=0,internal_item_max=0,internal_key_max=0,internal_key_truncate=,internal_page_max=4KB,key_format=S,key_gap=10,leaf_item_max=0,leaf_key_max=0,leaf_page_max=32KB,leaf_value_max=0,log=(enabled=),memory_page_max=5MB,os_cache_dirty_max=0,os_cache_max=0,prefix_compression=0,prefix_compression_min=4,split_deepen_min_child=0,split_deepen_per_child=0,split_pct=75,value_format=S,version=(major=1,minor=1) 7 | -------------------------------------------------------------------------------- /data/WiredTiger.wt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/WiredTiger.wt -------------------------------------------------------------------------------- /data/WiredTigerLAS.wt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/WiredTigerLAS.wt -------------------------------------------------------------------------------- /data/_mdb_catalog.wt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/_mdb_catalog.wt -------------------------------------------------------------------------------- /data/collection-0--832133662362206685.wt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/collection-0--832133662362206685.wt -------------------------------------------------------------------------------- /data/collection-0--8742254205632790019.wt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/collection-0--8742254205632790019.wt -------------------------------------------------------------------------------- /data/collection-0-5822136254814741816.wt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/collection-0-5822136254814741816.wt -------------------------------------------------------------------------------- /data/collection-2--8742254205632790019.wt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/collection-2--8742254205632790019.wt -------------------------------------------------------------------------------- /data/collection-2-857697725211246568.wt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/collection-2-857697725211246568.wt -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-11-18T18-47-52Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-11-18T18-47-52Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-11-19T04-11-50Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-11-19T04-11-50Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-11-20T13-46-26Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-11-20T13-46-26Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-11-22T14-34-38Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-11-22T14-34-38Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-11-23T17-31-15Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-11-23T17-31-15Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-11-23T17-35-25Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-11-23T17-35-25Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-11-24T13-34-59Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-11-24T13-34-59Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-11-25T11-27-12Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-11-25T11-27-12Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-11-25T18-47-27Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-11-25T18-47-27Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-11-26T17-22-48Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-11-26T17-22-48Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-11-27T05-16-40Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-11-27T05-16-40Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-11-27T17-33-23Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-11-27T17-33-23Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-11-28T14-40-48Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-11-28T14-40-48Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-12-10T10-59-02Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-12-10T10-59-02Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-12-11T01-39-41Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-12-11T01-39-41Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-12-14T12-56-51Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-12-14T12-56-51Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-12-14T13-11-39Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-12-14T13-11-39Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-12-14T16-17-09Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-12-14T16-17-09Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-12-15T06-19-37Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-12-15T06-19-37Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-12-15T11-23-55Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-12-15T11-23-55Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-12-17T09-51-34Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-12-17T09-51-34Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2016-12-17T17-29-42Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2016-12-17T17-29-42Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2017-01-17T06-09-41Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2017-01-17T06-09-41Z-00000 -------------------------------------------------------------------------------- /data/diagnostic.data/metrics.2017-01-24T09-04-32Z-00000: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/diagnostic.data/metrics.2017-01-24T09-04-32Z-00000 -------------------------------------------------------------------------------- /data/index-1--832133662362206685.wt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/index-1--832133662362206685.wt -------------------------------------------------------------------------------- /data/index-1--8742254205632790019.wt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/index-1--8742254205632790019.wt -------------------------------------------------------------------------------- /data/index-1-5822136254814741816.wt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/index-1-5822136254814741816.wt -------------------------------------------------------------------------------- /data/index-3--8742254205632790019.wt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/index-3--8742254205632790019.wt -------------------------------------------------------------------------------- /data/index-3-857697725211246568.wt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/index-3-857697725211246568.wt -------------------------------------------------------------------------------- /data/journal/WiredTigerLog.0000000024: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/journal/WiredTigerLog.0000000024 -------------------------------------------------------------------------------- /data/journal/WiredTigerPreplog.0000000001: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/journal/WiredTigerPreplog.0000000001 -------------------------------------------------------------------------------- /data/journal/WiredTigerPreplog.0000000002: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/journal/WiredTigerPreplog.0000000002 -------------------------------------------------------------------------------- /data/mongod.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/mongod.lock -------------------------------------------------------------------------------- /data/sizeStorer.wt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/data/sizeStorer.wt -------------------------------------------------------------------------------- /data/storage.bson: -------------------------------------------------------------------------------- 1 | _storageQengine wiredTigeroptions,directoryPerDBdirectoryForIndexes -------------------------------------------------------------------------------- /model/db.js: -------------------------------------------------------------------------------- 1 | //这个模块里面封装了所有对数据库的常用操作 2 | var MongoClient = require('mongodb').MongoClient; 3 | var settings = require("./setting.js"); 4 | //不管数据库什么操作,都是先连接数据库,所以我们可以把连接数据库 5 | //封装成为内部函数 6 | function _connectDB(callback) { 7 | var url = settings.dburl; //从settings文件中,都数据库地址 8 | //连接数据库 9 | MongoClient.connect(url, function (err, db) { 10 | if (err) { 11 | callback(err, null); 12 | return; 13 | } 14 | callback(err, db); 15 | }); 16 | } 17 | 18 | //插入数据 19 | exports.insertOne = function (collectionName, json, callback) { 20 | _connectDB(function (err, db) { 21 | db.collection(collectionName).insertOne(json, function (err, result) { 22 | callback(err, result); 23 | db.close(); //关闭数据库 24 | }) 25 | }) 26 | }; 27 | 28 | //查找数据,找到所有数据。args是个对象{"pageamount":10,"page":10} 29 | exports.find = function (collectionName, json, C, D) { 30 | var result = []; //结果数组 31 | if (arguments.length == 3) { 32 | //那么参数C就是callback,参数D没有传。 33 | var callback = C; 34 | var skipnumber = 0; 35 | //数目限制 36 | var limit = 0; 37 | } else if (arguments.length == 4) { 38 | var callback = D; 39 | var args = C; 40 | //应该省略的条数 41 | var skipnumber = args.pageamount * args.page || 0; 42 | //数目限制 43 | var limit = args.pageamount || 0; 44 | //排序方式 45 | var sort = args.sort || {}; 46 | } else { 47 | throw new Error("find函数的参数个数,必须是3个,或者4个。"); 48 | return; 49 | } 50 | 51 | //连接数据库,连接之后查找所有 52 | _connectDB(function (err, db) { 53 | var cursor = db.collection(collectionName).find(json).skip(skipnumber).limit(limit).sort(sort); 54 | cursor.each(function (err, doc) { 55 | if (err) { 56 | callback(err, null); 57 | db.close(); //关闭数据库 58 | return; 59 | } 60 | if (doc != null) { 61 | result.push(doc); //放入结果数组 62 | } else { 63 | //遍历结束,没有更多的文档了 64 | callback(null, result); 65 | db.close(); //关闭数据库 66 | } 67 | }); 68 | }); 69 | }; 70 | 71 | //删除 72 | exports.deleteMany = function (collectionName, json, callback) { 73 | _connectDB(function (err, db) { 74 | //删除 75 | db.collection(collectionName).deleteMany( 76 | json, 77 | function (err, results) { 78 | callback(err, results); 79 | db.close(); //关闭数据库 80 | } 81 | ); 82 | }); 83 | }; 84 | 85 | //修改 86 | exports.updateMany = function (collectionName, json1, json2, callback) { 87 | _connectDB(function (err, db) { 88 | db.collection(collectionName).updateMany( 89 | json1, 90 | json2, 91 | function (err, results) { 92 | callback(err, results); 93 | db.close(); 94 | }); 95 | }); 96 | }; 97 | 98 | exports.getAllCount = function (collectionName,callback) { 99 | _connectDB(function (err, db) { 100 | db.collection(collectionName).count({}).then(function(count) { 101 | callback(count); 102 | db.close(); 103 | }); 104 | }) 105 | }; -------------------------------------------------------------------------------- /model/md5.js: -------------------------------------------------------------------------------- 1 | var crypto = require('crypto'); 2 | module.exports = function (pwd) { 3 | var md5 = crypto.createHash('md5'); 4 | var password = md5.update(pwd).digest('base64'); 5 | return password; 6 | } 7 | 8 | 9 | -------------------------------------------------------------------------------- /model/setting.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | "dburl" : "mongodb://localhost:27017/comment" 3 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blog", 3 | "version": "1.1.0", 4 | "description": "Secend init", 5 | "main": "app.js", 6 | "dependencies": { 7 | "assert": "^1.4.1", 8 | "body-parser": "^1.15.2", 9 | "crypto": "0.0.3", 10 | "ejs": "^2.5.5", 11 | "express": "^4.14.0", 12 | "express-session": "^1.14.2", 13 | "formidable": "^1.0.17", 14 | "gm": "^1.23.0", 15 | "moment": "^2.17.1", 16 | "mongodb": "^2.2.16", 17 | "morgan": "^1.5.3", 18 | "serve-favicon": "^2.2.1", 19 | "ueditor": "^1.1.4" 20 | }, 21 | "devDependencies": {}, 22 | "scripts": { 23 | "test": "echo \"Error: no test specified\" && exit 1" 24 | }, 25 | "author": "Scott Jeremy", 26 | "license": "3000" 27 | } 28 | -------------------------------------------------------------------------------- /public/css/dashboard.css: -------------------------------------------------------------------------------- 1 | /* 2 | * Base structure 3 | */ 4 | 5 | /* Move down content because we have a fixed navbar that is 50px tall */ 6 | body { 7 | padding-top: 50px; 8 | } 9 | 10 | 11 | /* 12 | * Global add-ons 13 | */ 14 | 15 | .sub-header { 16 | padding-bottom: 10px; 17 | border-bottom: 1px solid #eee; 18 | } 19 | 20 | /* 21 | * Top navigation 22 | * Hide default border to remove 1px line. 23 | */ 24 | .navbar-fixed-top { 25 | border: 0; 26 | } 27 | 28 | /* 29 | * Sidebar 30 | */ 31 | 32 | /* Hide for mobile, show later */ 33 | .sidebar { 34 | display:block; 35 | } 36 | @media (min-width: 768px) { 37 | .sidebar { 38 | position: fixed; 39 | top: 51px; 40 | bottom: 0; 41 | left: 0; 42 | z-index: 1000; 43 | display: block; 44 | padding: 20px; 45 | overflow-x: hidden; 46 | overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */ 47 | background-color: #f5f5f5; 48 | } 49 | } 50 | 51 | /* Sidebar navigation */ 52 | .nav-sidebar { 53 | margin-right: -21px; /* 20px padding + 1px border */ 54 | margin-bottom: 20px; 55 | margin-left: -20px; 56 | } 57 | .nav-sidebar > li > a { 58 | padding-right: 20px; 59 | padding-left: 20px; 60 | } 61 | .nav-sidebar > .active > a, 62 | .nav-sidebar > .active > a:hover, 63 | .nav-sidebar > .active > a:focus { 64 | color: #fff; 65 | background-color: #428bca; 66 | } 67 | 68 | 69 | /* 70 | * Main content 71 | */ 72 | 73 | .main { 74 | padding: 20px; 75 | } 76 | @media (min-width: 768px) { 77 | .main { 78 | padding-right: 40px; 79 | padding-left: 40px; 80 | } 81 | } 82 | .main .page-header { 83 | margin-top: 0; 84 | } 85 | 86 | 87 | /* 88 | * Placeholder dashboard ideas 89 | */ 90 | 91 | .placeholders { 92 | margin-bottom: 30px; 93 | text-align: center; 94 | } 95 | .placeholders h4 { 96 | margin-bottom: 0; 97 | } 98 | .placeholder { 99 | margin-bottom: 20px; 100 | } 101 | .placeholder img { 102 | display: inline-block; 103 | border-radius: 50%; 104 | } 105 | -------------------------------------------------------------------------------- /public/css/lightbox.css: -------------------------------------------------------------------------------- 1 | /* Preload images */ 2 | body:after { 3 | content: url(../images/close.png) url(../images/loading.gif) url(../images/prev.png) url(../images/next.png); 4 | display: none; 5 | } 6 | 7 | .lightboxOverlay { 8 | position: absolute; 9 | top: 0; 10 | left: 0; 11 | z-index: 9999; 12 | background-color: black; 13 | filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80); 14 | opacity: 0.8; 15 | display: none; 16 | } 17 | 18 | .lightbox { 19 | position: absolute; 20 | left: 0; 21 | width: 100%; 22 | z-index: 10000; 23 | text-align: center; 24 | line-height: 0; 25 | font-weight: normal; 26 | } 27 | 28 | .lightbox .lb-image { 29 | display: block; 30 | height: auto; 31 | max-width: inherit; 32 | -webkit-border-radius: 3px; 33 | -moz-border-radius: 3px; 34 | -ms-border-radius: 3px; 35 | -o-border-radius: 3px; 36 | border-radius: 3px; 37 | } 38 | 39 | .lightbox a img { 40 | border: none; 41 | } 42 | 43 | .lb-outerContainer { 44 | position: relative; 45 | background-color: white; 46 | *zoom: 1; 47 | width: 250px; 48 | height: 250px; 49 | margin:5em auto 0.5em auto; 50 | -webkit-border-radius: 4px; 51 | -moz-border-radius: 4px; 52 | -ms-border-radius: 4px; 53 | -o-border-radius: 4px; 54 | border-radius: 4px; 55 | } 56 | 57 | .lb-outerContainer:after { 58 | content: ""; 59 | display: table; 60 | clear: both; 61 | } 62 | 63 | .lb-container { 64 | padding: 4px; 65 | } 66 | 67 | .lb-loader { 68 | position: absolute; 69 | top: 43%; 70 | left: 0; 71 | height: 25%; 72 | width: 100%; 73 | text-align: center; 74 | line-height: 0; 75 | } 76 | 77 | .lb-cancel { 78 | display: block; 79 | width: 32px; 80 | height: 32px; 81 | margin: 0 auto; 82 | background: url(../images/loading.gif) no-repeat; 83 | } 84 | 85 | .lb-nav { 86 | position: absolute; 87 | top: 0; 88 | left: 0; 89 | height: 100%; 90 | width: 100%; 91 | z-index: 10; 92 | } 93 | 94 | .lb-container > .nav { 95 | left: 0; 96 | } 97 | 98 | .lb-nav a { 99 | outline: none; 100 | background-image: url('data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=='); 101 | } 102 | 103 | .lb-prev, .lb-next { 104 | height: 100%; 105 | cursor: pointer; 106 | display: block; 107 | } 108 | 109 | .lb-nav a.lb-prev { 110 | width: 34%; 111 | left: 0; 112 | float: left; 113 | background: url(../images/prev.png) left 48% no-repeat; 114 | filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); 115 | opacity: 0; 116 | -webkit-transition: opacity 0.6s; 117 | -moz-transition: opacity 0.6s; 118 | -o-transition: opacity 0.6s; 119 | transition: opacity 0.6s; 120 | } 121 | 122 | .lb-nav a.lb-prev:hover { 123 | filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); 124 | opacity: 1; 125 | } 126 | 127 | .lb-nav a.lb-next { 128 | width: 64%; 129 | right: 0; 130 | float: right; 131 | background: url(../images/next.png) right 48% no-repeat; 132 | filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0); 133 | opacity: 0; 134 | -webkit-transition: opacity 0.6s; 135 | -moz-transition: opacity 0.6s; 136 | -o-transition: opacity 0.6s; 137 | transition: opacity 0.6s; 138 | } 139 | 140 | .lb-nav a.lb-next:hover { 141 | filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); 142 | opacity: 1; 143 | } 144 | 145 | .lb-dataContainer { 146 | margin: 0 auto; 147 | padding-top: 5px; 148 | *zoom: 1; 149 | width: 100%; 150 | -moz-border-radius-bottomleft: 4px; 151 | -webkit-border-bottom-left-radius: 4px; 152 | border-bottom-left-radius: 4px; 153 | -moz-border-radius-bottomright: 4px; 154 | -webkit-border-bottom-right-radius: 4px; 155 | border-bottom-right-radius: 4px; 156 | } 157 | 158 | .lb-dataContainer:after { 159 | content: ""; 160 | display: table; 161 | clear: both; 162 | } 163 | 164 | .lb-data { 165 | padding: 0 4px; 166 | color: #ccc; 167 | } 168 | 169 | .lb-data .lb-details { 170 | width: 85%; 171 | float: left; 172 | text-align: left; 173 | line-height: 1.1em; 174 | } 175 | 176 | .lb-data .lb-caption { 177 | font-size: 13px; 178 | font-weight: bold; 179 | line-height: 1em; 180 | } 181 | 182 | .lb-data .lb-number { 183 | display: block; 184 | clear: left; 185 | padding-bottom: 1em; 186 | font-size: 12px; 187 | color: #999999; 188 | } 189 | 190 | .lb-data .lb-close { 191 | display: block; 192 | float: right; 193 | width: 30px; 194 | height: 30px; 195 | background: url(../images/close.png) top right no-repeat; 196 | text-align: right; 197 | outline: none; 198 | filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70); 199 | opacity: 0.7; 200 | -webkit-transition: opacity 0.2s; 201 | -moz-transition: opacity 0.2s; 202 | -o-transition: opacity 0.2s; 203 | transition: opacity 0.2s; 204 | } 205 | 206 | .lb-data .lb-close:hover { 207 | cursor: pointer; 208 | filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100); 209 | opacity: 1; 210 | } 211 | @media (max-width: 768px){ 212 | } 213 | -------------------------------------------------------------------------------- /public/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /public/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /public/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /public/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /public/fonts/OpenSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/fonts/OpenSans-Bold.ttf -------------------------------------------------------------------------------- /public/fonts/OpenSans-ExtraBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/fonts/OpenSans-ExtraBold.ttf -------------------------------------------------------------------------------- /public/fonts/OpenSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/fonts/OpenSans-Regular.ttf -------------------------------------------------------------------------------- /public/fonts/OpenSans-Semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/fonts/OpenSans-Semibold.ttf -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/images/abt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/abt.jpg -------------------------------------------------------------------------------- /public/images/bnr3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/bnr3.jpg -------------------------------------------------------------------------------- /public/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/close.png -------------------------------------------------------------------------------- /public/images/icon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/icon2.png -------------------------------------------------------------------------------- /public/images/lines.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/lines.png -------------------------------------------------------------------------------- /public/images/next.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/next.png -------------------------------------------------------------------------------- /public/images/pic1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/pic1.jpg -------------------------------------------------------------------------------- /public/images/pic2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/pic2.jpg -------------------------------------------------------------------------------- /public/images/pic3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/pic3.jpg -------------------------------------------------------------------------------- /public/images/pic4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/pic4.jpg -------------------------------------------------------------------------------- /public/images/pic5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/pic5.jpg -------------------------------------------------------------------------------- /public/images/pic6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/pic6.jpg -------------------------------------------------------------------------------- /public/images/pic7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/pic7.jpg -------------------------------------------------------------------------------- /public/images/pic8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/pic8.jpg -------------------------------------------------------------------------------- /public/images/prev.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/prev.png -------------------------------------------------------------------------------- /public/images/profile_small.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/profile_small.jpg -------------------------------------------------------------------------------- /public/images/social.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/social.png -------------------------------------------------------------------------------- /public/images/t1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/t1.jpg -------------------------------------------------------------------------------- /public/images/t2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/t2.jpg -------------------------------------------------------------------------------- /public/images/t3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/t3.jpg -------------------------------------------------------------------------------- /public/images/t4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scottjeremy/EJblog/300960f3a95f877dc278a7b3cb16321917db4619/public/images/t4.jpg -------------------------------------------------------------------------------- /public/js/inspinia.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * INSPINIA - Responsive Admin Theme 4 | * version 2.4 5 | * 6 | */ 7 | 8 | 9 | $(document).ready(function () { 10 | 11 | 12 | // Add body-small class if window less than 768px 13 | if ($(this).width() < 769) { 14 | $('body').addClass('body-small') 15 | } else { 16 | $('body').removeClass('body-small') 17 | } 18 | 19 | // MetsiMenu 20 | $('#side-menu').metisMenu(); 21 | 22 | // Collapse ibox function 23 | $('.collapse-link').click(function () { 24 | var ibox = $(this).closest('div.ibox'); 25 | var button = $(this).find('i'); 26 | var content = ibox.find('div.ibox-content'); 27 | content.slideToggle(200); 28 | button.toggleClass('fa-chevron-up').toggleClass('fa-chevron-down'); 29 | ibox.toggleClass('').toggleClass('border-bottom'); 30 | setTimeout(function () { 31 | ibox.resize(); 32 | ibox.find('[id^=map-]').resize(); 33 | }, 50); 34 | }); 35 | 36 | // Close ibox function 37 | $('.close-link').click(function () { 38 | var content = $(this).closest('div.ibox'); 39 | content.remove(); 40 | }); 41 | 42 | // Fullscreen ibox function 43 | $('.fullscreen-link').click(function () { 44 | var ibox = $(this).closest('div.ibox'); 45 | var button = $(this).find('i'); 46 | $('body').toggleClass('fullscreen-ibox-mode'); 47 | button.toggleClass('fa-expand').toggleClass('fa-compress'); 48 | ibox.toggleClass('fullscreen'); 49 | setTimeout(function () { 50 | $(window).trigger('resize'); 51 | }, 100); 52 | }); 53 | 54 | // Close menu in canvas mode 55 | $('.close-canvas-menu').click(function () { 56 | $("body").toggleClass("mini-navbar"); 57 | SmoothlyMenu(); 58 | }); 59 | 60 | // Run menu of canvas 61 | $('body.canvas-menu .sidebar-collapse').slimScroll({ 62 | height: '100%', 63 | railOpacity: 0.9 64 | }); 65 | 66 | // Open close right sidebar 67 | $('.right-sidebar-toggle').click(function () { 68 | $('#right-sidebar').toggleClass('sidebar-open'); 69 | }); 70 | 71 | // Initialize slimscroll for right sidebar 72 | $('.sidebar-container').slimScroll({ 73 | height: '100%', 74 | railOpacity: 0.4, 75 | wheelStep: 10 76 | }); 77 | 78 | // Open close small chat 79 | $('.open-small-chat').click(function () { 80 | $(this).children().toggleClass('fa-comments').toggleClass('fa-remove'); 81 | $('.small-chat-box').toggleClass('active'); 82 | }); 83 | 84 | // Initialize slimscroll for small chat 85 | $('.small-chat-box .content').slimScroll({ 86 | height: '234px', 87 | railOpacity: 0.4 88 | }); 89 | 90 | // Small todo handler 91 | $('.check-link').click(function () { 92 | var button = $(this).find('i'); 93 | var label = $(this).next('span'); 94 | button.toggleClass('fa-check-square').toggleClass('fa-square-o'); 95 | label.toggleClass('todo-completed'); 96 | return false; 97 | }); 98 | 99 | // Append config box / Only for demo purpose 100 | // Uncomment on server mode to enable XHR calls 101 | /*$.get("skin-config.html", function (data) { 102 | if (!$('body').hasClass('no-skin-config')) 103 | $('body').append(data); 104 | });*/ 105 | 106 | // Minimalize menu 107 | $('.navbar-minimalize').click(function () { 108 | $("body").toggleClass("mini-navbar"); 109 | SmoothlyMenu(); 110 | 111 | }); 112 | 113 | // Tooltips demo 114 | $('.tooltip-demo').tooltip({ 115 | selector: "[data-toggle=tooltip]", 116 | container: "body" 117 | }); 118 | 119 | // Move modal to body 120 | // Fix Bootstrap backdrop issu with animation.css 121 | $('.modal').appendTo("body"); 122 | 123 | // Full height of sidebar 124 | function fix_height() { 125 | var heightWithoutNavbar = $("body > #wrapper").height() - 61; 126 | $(".sidebard-panel").css("min-height", heightWithoutNavbar + "px"); 127 | 128 | var navbarHeigh = $('nav.navbar-default').height(); 129 | var wrapperHeigh = $('#page-wrapper').height(); 130 | 131 | if (navbarHeigh > wrapperHeigh) { 132 | $('#page-wrapper').css("min-height", navbarHeigh + "px"); 133 | } 134 | 135 | if (navbarHeigh < wrapperHeigh) { 136 | $('#page-wrapper').css("min-height", $(window).height() + "px"); 137 | } 138 | 139 | if ($('body').hasClass('fixed-nav')) { 140 | if (navbarHeigh > wrapperHeigh) { 141 | $('#page-wrapper').css("min-height", navbarHeigh - 60 + "px"); 142 | } else { 143 | $('#page-wrapper').css("min-height", $(window).height() - 60 + "px"); 144 | } 145 | } 146 | 147 | } 148 | 149 | fix_height(); 150 | 151 | // Fixed Sidebar 152 | $(window).bind("load", function () { 153 | if ($("body").hasClass('fixed-sidebar')) { 154 | $('.sidebar-collapse').slimScroll({ 155 | height: '100%', 156 | railOpacity: 0.9 157 | }); 158 | } 159 | }); 160 | 161 | // Move right sidebar top after scroll 162 | $(window).scroll(function () { 163 | if ($(window).scrollTop() > 0 && !$('body').hasClass('fixed-nav')) { 164 | $('#right-sidebar').addClass('sidebar-top'); 165 | } else { 166 | $('#right-sidebar').removeClass('sidebar-top'); 167 | } 168 | }); 169 | 170 | $(window).bind("load resize scroll", function () { 171 | if (!$("body").hasClass('body-small')) { 172 | fix_height(); 173 | } 174 | }); 175 | 176 | $("[data-toggle=popover]") 177 | .popover(); 178 | 179 | // Add slimscroll to element 180 | $('.full-height-scroll').slimscroll({ 181 | height: '100%' 182 | }) 183 | }); 184 | 185 | 186 | // Minimalize menu when screen is less than 768px 187 | $(window).bind("resize", function () { 188 | if ($(this).width() < 769) { 189 | $('body').addClass('body-small') 190 | } else { 191 | $('body').removeClass('body-small') 192 | } 193 | }); 194 | 195 | // Local Storage functions 196 | // Set proper body class and plugins based on user configuration 197 | $(document).ready(function () { 198 | if (localStorageSupport) { 199 | 200 | var collapse = localStorage.getItem("collapse_menu"); 201 | var fixedsidebar = localStorage.getItem("fixedsidebar"); 202 | var fixednavbar = localStorage.getItem("fixednavbar"); 203 | var boxedlayout = localStorage.getItem("boxedlayout"); 204 | var fixedfooter = localStorage.getItem("fixedfooter"); 205 | 206 | var body = $('body'); 207 | 208 | if (fixedsidebar == 'on') { 209 | body.addClass('fixed-sidebar'); 210 | $('.sidebar-collapse').slimScroll({ 211 | height: '100%', 212 | railOpacity: 0.9 213 | }); 214 | } 215 | 216 | if (collapse == 'on') { 217 | if (body.hasClass('fixed-sidebar')) { 218 | if (!body.hasClass('body-small')) { 219 | body.addClass('mini-navbar'); 220 | } 221 | } else { 222 | if (!body.hasClass('body-small')) { 223 | body.addClass('mini-navbar'); 224 | } 225 | 226 | } 227 | } 228 | 229 | if (fixednavbar == 'on') { 230 | $(".navbar-static-top").removeClass('navbar-static-top').addClass('navbar-fixed-top'); 231 | body.addClass('fixed-nav'); 232 | } 233 | 234 | if (boxedlayout == 'on') { 235 | body.addClass('boxed-layout'); 236 | } 237 | 238 | if (fixedfooter == 'on') { 239 | $(".footer").addClass('fixed'); 240 | } 241 | } 242 | }); 243 | 244 | // check if browser support HTML5 local storage 245 | function localStorageSupport() { 246 | return (('localStorage' in window) && window['localStorage'] !== null) 247 | } 248 | 249 | // For demo purpose - animation css script 250 | function animationHover(element, animation) { 251 | element = $(element); 252 | element.hover( 253 | function () { 254 | element.addClass('animated ' + animation); 255 | }, 256 | function () { 257 | //wait for animation to finish before removing classes 258 | window.setTimeout(function () { 259 | element.removeClass('animated ' + animation); 260 | }, 2000); 261 | }); 262 | } 263 | 264 | function SmoothlyMenu() { 265 | if (!$('body').hasClass('mini-navbar') || $('body').hasClass('body-small')) { 266 | // Hide menu in order to smoothly turn on when maximize menu 267 | $('#side-menu').hide(); 268 | // For smoothly turn on menu 269 | setTimeout( 270 | function () { 271 | $('#side-menu').fadeIn(400); 272 | }, 200); 273 | } else if ($('body').hasClass('fixed-sidebar')) { 274 | $('#side-menu').hide(); 275 | setTimeout( 276 | function () { 277 | $('#side-menu').fadeIn(400); 278 | }, 100); 279 | } else { 280 | // Remove all inline style from jquery fadeIn function to reset menu state 281 | $('#side-menu').removeAttr('style'); 282 | } 283 | } 284 | 285 | // Dragable panels 286 | function WinMove() { 287 | var element = "[class*=col]"; 288 | var handle = ".ibox-title"; 289 | var connect = "[class*=col]"; 290 | $(element).sortable( 291 | { 292 | handle: handle, 293 | connectWith: connect, 294 | tolerance: 'pointer', 295 | forcePlaceholderSize: true, 296 | opacity: 0.8 297 | }) 298 | .disableSelection(); 299 | } 300 | 301 | 302 | -------------------------------------------------------------------------------- /public/js/jquery.metisMenu.js: -------------------------------------------------------------------------------- 1 | /* 2 | * metismenu - v2.0.2 3 | * A jQuery menu plugin 4 | * https://github.com/onokumus/metisMenu 5 | * 6 | * Made by Osman Nuri Okumus 7 | * Under MIT License 8 | */ 9 | 10 | !function(a){"use strict";function b(){var a=document.createElement("mm"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}function c(b){return this.each(function(){var c=a(this),d=c.data("mm"),f=a.extend({},e.DEFAULTS,c.data(),"object"==typeof b&&b);d||c.data("mm",d=new e(this,f)),"string"==typeof b&&d[b]()})}a.fn.emulateTransitionEnd=function(b){var c=!1,e=this;a(this).one("mmTransitionEnd",function(){c=!0});var f=function(){c||a(e).trigger(d.end)};return setTimeout(f,b),this};var d=b();d&&(a.event.special.mmTransitionEnd={bindType:d.end,delegateType:d.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}});var e=function(b,c){this.$element=a(b),this.options=a.extend({},e.DEFAULTS,c),this.transitioning=null,this.init()};e.TRANSITION_DURATION=350,e.DEFAULTS={toggle:!0,doubleTapToGo:!1,activeClass:"active"},e.prototype.init=function(){var b=this,c=this.options.activeClass;this.$element.find("li."+c).has("ul").children("ul").addClass("collapse in"),this.$element.find("li").not("."+c).has("ul").children("ul").addClass("collapse"),this.options.doubleTapToGo&&this.$element.find("li."+c).has("ul").children("a").addClass("doubleTapToGo"),this.$element.find("li").has("ul").children("a").on("click.metisMenu",function(d){var e=a(this),f=e.parent("li"),g=f.children("ul");return d.preventDefault(),f.hasClass(c)?b.hide(g):b.show(g),b.options.doubleTapToGo&&b.doubleTapToGo(e)&&"#"!==e.attr("href")&&""!==e.attr("href")?(d.stopPropagation(),void(document.location=e.attr("href"))):void 0})},e.prototype.doubleTapToGo=function(a){var b=this.$element;return a.hasClass("doubleTapToGo")?(a.removeClass("doubleTapToGo"),!0):a.parent().children("ul").length?(b.find(".doubleTapToGo").removeClass("doubleTapToGo"),a.addClass("doubleTapToGo"),!1):void 0},e.prototype.show=function(b){var c=this.options.activeClass,f=a(b),g=f.parent("li");if(!this.transitioning&&!f.hasClass("in")){g.addClass(c),this.options.toggle&&this.hide(g.siblings().children("ul.in")),f.removeClass("collapse").addClass("collapsing").height(0),this.transitioning=1;var h=function(){f.removeClass("collapsing").addClass("collapse in").height(""),this.transitioning=0};return d?void f.one("mmTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(e.TRANSITION_DURATION).height(f[0].scrollHeight):h.call(this)}},e.prototype.hide=function(b){var c=this.options.activeClass,f=a(b);if(!this.transitioning&&f.hasClass("in")){f.parent("li").removeClass(c),f.height(f.height())[0].offsetHeight,f.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var g=function(){this.transitioning=0,f.removeClass("collapsing").addClass("collapse")};return d?void f.height(0).one("mmTransitionEnd",a.proxy(g,this)).emulateTransitionEnd(e.TRANSITION_DURATION):g.call(this)}};var f=a.fn.metisMenu;a.fn.metisMenu=c,a.fn.metisMenu.Constructor=e,a.fn.metisMenu.noConflict=function(){return a.fn.metisMenu=f,this}}(jQuery); -------------------------------------------------------------------------------- /public/js/jquery.slimscroll.min.js: -------------------------------------------------------------------------------- 1 | /*! Copyright (c) 2011 Piotr Rochala (http://rocha.la) 2 | * Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) 3 | * and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses. 4 | * 5 | * Version: 1.3.6 6 | * 7 | */ 8 | (function(e){e.fn.extend({slimScroll:function(g){var a=e.extend({width:"auto",height:"250px",size:"7px",color:"#000",position:"right",distance:"1px",start:"top",opacity:.4,alwaysVisible:!1,disableFadeOut:!1,railVisible:!1,railColor:"#333",railOpacity:.2,railDraggable:!0,railClass:"slimScrollRail",barClass:"slimScrollBar",wrapperClass:"slimScrollDiv",allowPageScroll:!1,wheelStep:20,touchScrollStep:200,borderRadius:"7px",railBorderRadius:"7px"},g);this.each(function(){function v(d){if(r){d=d||window.event; 9 | var c=0;d.wheelDelta&&(c=-d.wheelDelta/120);d.detail&&(c=d.detail/3);e(d.target||d.srcTarget||d.srcElement).closest("."+a.wrapperClass).is(b.parent())&&m(c,!0);d.preventDefault&&!k&&d.preventDefault();k||(d.returnValue=!1)}}function m(d,e,g){k=!1;var f=d,h=b.outerHeight()-c.outerHeight();e&&(f=parseInt(c.css("top"))+d*parseInt(a.wheelStep)/100*c.outerHeight(),f=Math.min(Math.max(f,0),h),f=0=b.outerHeight()?k=!0:(c.stop(!0, 11 | !0).fadeIn("fast"),a.railVisible&&h.stop(!0,!0).fadeIn("fast"))}function p(){a.alwaysVisible||(B=setTimeout(function(){a.disableFadeOut&&r||y||z||(c.fadeOut("slow"),h.fadeOut("slow"))},1E3))}var r,y,z,B,A,u,l,C,k=!1,b=e(this);if(b.parent().hasClass(a.wrapperClass)){var n=b.scrollTop(),c=b.closest("."+a.barClass),h=b.closest("."+a.railClass);x();if(e.isPlainObject(g)){if("height"in g&&"auto"==g.height){b.parent().css("height","auto");b.css("height","auto");var q=b.parent().parent().height();b.parent().css("height", 12 | q);b.css("height",q)}if("scrollTo"in g)n=parseInt(a.scrollTo);else if("scrollBy"in g)n+=parseInt(a.scrollBy);else if("destroy"in g){c.remove();h.remove();b.unwrap();return}m(n,!1,!0)}}else if(!(e.isPlainObject(g)&&"destroy"in g)){a.height="auto"==a.height?b.parent().height():a.height;n=e("
").addClass(a.wrapperClass).css({position:"relative",overflow:"hidden",width:a.width,height:a.height});b.css({overflow:"hidden",width:a.width,height:a.height});var h=e("
").addClass(a.railClass).css({width:a.size, 13 | height:"100%",position:"absolute",top:0,display:a.alwaysVisible&&a.railVisible?"block":"none","border-radius":a.railBorderRadius,background:a.railColor,opacity:a.railOpacity,zIndex:90}),c=e("
").addClass(a.barClass).css({background:a.color,width:a.size,position:"absolute",top:0,opacity:a.opacity,display:a.alwaysVisible?"block":"none","border-radius":a.borderRadius,BorderRadius:a.borderRadius,MozBorderRadius:a.borderRadius,WebkitBorderRadius:a.borderRadius,zIndex:99}),q="right"==a.position? 14 | {right:a.distance}:{left:a.distance};h.css(q);c.css(q);b.wrap(n);b.parent().append(c);b.parent().append(h);a.railDraggable&&c.bind("mousedown",function(a){var b=e(document);z=!0;t=parseFloat(c.css("top"));pageY=a.pageY;b.bind("mousemove.slimscroll",function(a){currTop=t+a.pageY-pageY;c.css("top",currTop);m(0,c.position().top,!1)});b.bind("mouseup.slimscroll",function(a){z=!1;p();b.unbind(".slimscroll")});return!1}).bind("selectstart.slimscroll",function(a){a.stopPropagation();a.preventDefault();return!1}); 15 | h.hover(function(){w()},function(){p()});c.hover(function(){y=!0},function(){y=!1});b.hover(function(){r=!0;w();p()},function(){r=!1;p()});b.bind("touchstart",function(a,b){a.originalEvent.touches.length&&(A=a.originalEvent.touches[0].pageY)});b.bind("touchmove",function(b){k||b.originalEvent.preventDefault();b.originalEvent.touches.length&&(m((A-b.originalEvent.touches[0].pageY)/a.touchScrollStep,!0),A=b.originalEvent.touches[0].pageY)});x();"bottom"===a.start?(c.css({top:b.outerHeight()-c.outerHeight()}), 16 | m(0,!0)):"top"!==a.start&&(m(e(a.start).position().top,null,!0),a.alwaysVisible||c.hide());window.addEventListener?(this.addEventListener("DOMMouseScroll",v,!1),this.addEventListener("mousewheel",v,!1)):document.attachEvent("onmousewheel",v)}});return this}});e.fn.extend({slimscroll:e.fn.slimScroll})})(jQuery); -------------------------------------------------------------------------------- /public/js/responsiveslides.min.js: -------------------------------------------------------------------------------- 1 | /*! http://responsiveslides.com v1.54 by @viljamis */ 2 | (function(c,I,B){c.fn.responsiveSlides=function(l){var a=c.extend({auto:!0,speed:500,timeout:4E3,pager:!1,nav:!1,random:!1,pause:!1,pauseControls:!0,prevText:"Previous",nextText:"Next",maxwidth:"",navContainer:"",manualControls:"",namespace:"rslides",before:c.noop,after:c.noop},l);return this.each(function(){B++;var f=c(this),s,r,t,m,p,q,n=0,e=f.children(),C=e.size(),h=parseFloat(a.speed),D=parseFloat(a.timeout),u=parseFloat(a.maxwidth),g=a.namespace,d=g+B,E=g+"_nav "+d+"_nav",v=g+"_here",j=d+"_on", 3 | w=d+"_s",k=c("