├── .gitattributes ├── .gitignore ├── Procfile ├── README.md ├── app.js ├── models ├── comment.js ├── post.js └── user.js ├── package.json ├── public ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.svg │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── images │ ├── N_Blog_注册登录页.png │ ├── N_Blog_表单_正确.png │ ├── N_Blog_表单_错误.png │ ├── N_blog_bootstrap_style.PNG │ ├── N_blog_http_firebug.png │ ├── N_blog_http_header_request.png │ ├── N_blog_http_header_response.png │ ├── N_blog_initial_style.PNG │ ├── N_blog_知乎注册登录页.png │ └── love.jpg ├── javascripts │ └── script.js ├── kindeditor │ ├── kindeditor-all-min.js │ ├── kindeditor-all.js │ ├── kindeditor-min.js │ ├── kindeditor.js │ ├── lang │ │ ├── ar.js │ │ ├── en.js │ │ ├── ko.js │ │ ├── zh_CN.js │ │ └── zh_TW.js │ ├── license.txt │ ├── plugins │ │ ├── anchor │ │ │ └── anchor.js │ │ ├── autoheight │ │ │ └── autoheight.js │ │ ├── baidumap │ │ │ ├── baidumap.js │ │ │ ├── index.html │ │ │ └── map.html │ │ ├── clearhtml │ │ │ └── clearhtml.js │ │ ├── code │ │ │ ├── code.js │ │ │ ├── prettify.css │ │ │ └── prettify.js │ │ ├── emoticons │ │ │ ├── emoticons.js │ │ │ └── images │ │ │ │ ├── 0.gif │ │ │ │ ├── 1.gif │ │ │ │ ├── 10.gif │ │ │ │ ├── 100.gif │ │ │ │ ├── 101.gif │ │ │ │ ├── 102.gif │ │ │ │ ├── 103.gif │ │ │ │ ├── 104.gif │ │ │ │ ├── 105.gif │ │ │ │ ├── 106.gif │ │ │ │ ├── 107.gif │ │ │ │ ├── 108.gif │ │ │ │ ├── 109.gif │ │ │ │ ├── 11.gif │ │ │ │ ├── 110.gif │ │ │ │ ├── 111.gif │ │ │ │ ├── 112.gif │ │ │ │ ├── 113.gif │ │ │ │ ├── 114.gif │ │ │ │ ├── 115.gif │ │ │ │ ├── 116.gif │ │ │ │ ├── 117.gif │ │ │ │ ├── 118.gif │ │ │ │ ├── 119.gif │ │ │ │ ├── 12.gif │ │ │ │ ├── 120.gif │ │ │ │ ├── 121.gif │ │ │ │ ├── 122.gif │ │ │ │ ├── 123.gif │ │ │ │ ├── 124.gif │ │ │ │ ├── 125.gif │ │ │ │ ├── 126.gif │ │ │ │ ├── 127.gif │ │ │ │ ├── 128.gif │ │ │ │ ├── 129.gif │ │ │ │ ├── 13.gif │ │ │ │ ├── 130.gif │ │ │ │ ├── 131.gif │ │ │ │ ├── 132.gif │ │ │ │ ├── 133.gif │ │ │ │ ├── 134.gif │ │ │ │ ├── 14.gif │ │ │ │ ├── 15.gif │ │ │ │ ├── 16.gif │ │ │ │ ├── 17.gif │ │ │ │ ├── 18.gif │ │ │ │ ├── 19.gif │ │ │ │ ├── 2.gif │ │ │ │ ├── 20.gif │ │ │ │ ├── 21.gif │ │ │ │ ├── 22.gif │ │ │ │ ├── 23.gif │ │ │ │ ├── 24.gif │ │ │ │ ├── 25.gif │ │ │ │ ├── 26.gif │ │ │ │ ├── 27.gif │ │ │ │ ├── 28.gif │ │ │ │ ├── 29.gif │ │ │ │ ├── 3.gif │ │ │ │ ├── 30.gif │ │ │ │ ├── 31.gif │ │ │ │ ├── 32.gif │ │ │ │ ├── 33.gif │ │ │ │ ├── 34.gif │ │ │ │ ├── 35.gif │ │ │ │ ├── 36.gif │ │ │ │ ├── 37.gif │ │ │ │ ├── 38.gif │ │ │ │ ├── 39.gif │ │ │ │ ├── 4.gif │ │ │ │ ├── 40.gif │ │ │ │ ├── 41.gif │ │ │ │ ├── 42.gif │ │ │ │ ├── 43.gif │ │ │ │ ├── 44.gif │ │ │ │ ├── 45.gif │ │ │ │ ├── 46.gif │ │ │ │ ├── 47.gif │ │ │ │ ├── 48.gif │ │ │ │ ├── 49.gif │ │ │ │ ├── 5.gif │ │ │ │ ├── 50.gif │ │ │ │ ├── 51.gif │ │ │ │ ├── 52.gif │ │ │ │ ├── 53.gif │ │ │ │ ├── 54.gif │ │ │ │ ├── 55.gif │ │ │ │ ├── 56.gif │ │ │ │ ├── 57.gif │ │ │ │ ├── 58.gif │ │ │ │ ├── 59.gif │ │ │ │ ├── 6.gif │ │ │ │ ├── 60.gif │ │ │ │ ├── 61.gif │ │ │ │ ├── 62.gif │ │ │ │ ├── 63.gif │ │ │ │ ├── 64.gif │ │ │ │ ├── 65.gif │ │ │ │ ├── 66.gif │ │ │ │ ├── 67.gif │ │ │ │ ├── 68.gif │ │ │ │ ├── 69.gif │ │ │ │ ├── 7.gif │ │ │ │ ├── 70.gif │ │ │ │ ├── 71.gif │ │ │ │ ├── 72.gif │ │ │ │ ├── 73.gif │ │ │ │ ├── 74.gif │ │ │ │ ├── 75.gif │ │ │ │ ├── 76.gif │ │ │ │ ├── 77.gif │ │ │ │ ├── 78.gif │ │ │ │ ├── 79.gif │ │ │ │ ├── 8.gif │ │ │ │ ├── 80.gif │ │ │ │ ├── 81.gif │ │ │ │ ├── 82.gif │ │ │ │ ├── 83.gif │ │ │ │ ├── 84.gif │ │ │ │ ├── 85.gif │ │ │ │ ├── 86.gif │ │ │ │ ├── 87.gif │ │ │ │ ├── 88.gif │ │ │ │ ├── 89.gif │ │ │ │ ├── 9.gif │ │ │ │ ├── 90.gif │ │ │ │ ├── 91.gif │ │ │ │ ├── 92.gif │ │ │ │ ├── 93.gif │ │ │ │ ├── 94.gif │ │ │ │ ├── 95.gif │ │ │ │ ├── 96.gif │ │ │ │ ├── 97.gif │ │ │ │ ├── 98.gif │ │ │ │ ├── 99.gif │ │ │ │ └── static.gif │ │ ├── filemanager │ │ │ ├── filemanager.js │ │ │ └── images │ │ │ │ ├── file-16.gif │ │ │ │ ├── file-64.gif │ │ │ │ ├── folder-16.gif │ │ │ │ ├── folder-64.gif │ │ │ │ └── go-up.gif │ │ ├── flash │ │ │ └── flash.js │ │ ├── image │ │ │ ├── image.js │ │ │ └── images │ │ │ │ ├── align_left.gif │ │ │ │ ├── align_right.gif │ │ │ │ ├── align_top.gif │ │ │ │ └── refresh.png │ │ ├── insertfile │ │ │ └── insertfile.js │ │ ├── lineheight │ │ │ └── lineheight.js │ │ ├── link │ │ │ └── link.js │ │ ├── map │ │ │ ├── map.html │ │ │ └── map.js │ │ ├── media │ │ │ └── media.js │ │ ├── multiimage │ │ │ ├── images │ │ │ │ ├── image.png │ │ │ │ ├── select-files-en.png │ │ │ │ ├── select-files-zh_CN.png │ │ │ │ └── swfupload.swf │ │ │ └── multiimage.js │ │ ├── pagebreak │ │ │ └── pagebreak.js │ │ ├── plainpaste │ │ │ └── plainpaste.js │ │ ├── preview │ │ │ └── preview.js │ │ ├── quickformat │ │ │ └── quickformat.js │ │ ├── table │ │ │ └── table.js │ │ ├── template │ │ │ ├── html │ │ │ │ ├── 1.html │ │ │ │ ├── 2.html │ │ │ │ └── 3.html │ │ │ └── template.js │ │ └── wordpaste │ │ │ └── wordpaste.js │ └── themes │ │ ├── common │ │ ├── anchor.gif │ │ ├── blank.gif │ │ ├── flash.gif │ │ ├── loading.gif │ │ ├── media.gif │ │ └── rm.gif │ │ ├── default │ │ ├── background.png │ │ ├── default.css │ │ └── default.png │ │ ├── qq │ │ ├── editor.gif │ │ └── qq.css │ │ └── simple │ │ └── simple.css └── stylesheets │ └── style.css ├── routes └── index.js ├── settings.js └── views ├── 404.ejs ├── archive.ejs ├── article.ejs ├── comment.ejs ├── edit.ejs ├── flash.ejs ├── footer.ejs ├── header.ejs ├── index.ejs ├── links.ejs ├── main.ejs ├── nav.ejs ├── paging.ejs ├── post.ejs ├── search.ejs ├── sidebar_about.ejs ├── sidebar_archive.ejs ├── sidebar_tags.ejs ├── tag.ejs ├── tags.ejs ├── upload.ejs └── user.ejs /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | access.log 2 | *.log -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: node app.js -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # blog 2 | 基于[nswbmw](https://github.com/nswbmw)的[N-blog](https://github.com/nswbmw/N-blog)项目仿写的多人博客系统,这个暂时是最终分支。主要改进点: 3 | * 引入bootstrap全面改造样式,利用bootstrap的[登录模板](http://v3.bootcss.com/examples/signin/)仿照知乎的注册和登录页面,并通过[bootstrap标签页组件](http://v3.bootcss.com/components/#nav-tabs)实现注册和登录表单的切换 4 | * 仿照了知乎的导航条样式 5 | * 引入jQuery validation plugin完成前端表单验证,并通过设置css样式改变了表单验证错误消息的位置,放到了输入框中 6 | * 合并了css文件,删除了多余的文件 7 | * 简单的SEO代码优化 8 | * 后端用node.js的compression中间件进行了gzip压缩 9 | 10 | 更详细的介绍见[wiki](https://github.com/seed-fe/blog/wiki) 11 | 项目演示地址:[N-blog bootstrap demo](https://demo-bootstrap-blog.herokuapp.com/) 12 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var accessLog = fs.createWriteStream('access.log', {flags: 'a'}); 3 | var errorLog = fs.createWriteStream('error.log', {flags: 'a'}); 4 | var compression = require('compression'); 5 | var express = require('express'); 6 | var path = require('path'); 7 | var favicon = require('serve-favicon'); 8 | var logger = require('morgan'); 9 | // var cookieParser = require('cookie-parser'); 10 | var bodyParser = require('body-parser'); 11 | 12 | var routes = require('./routes/index'); 13 | var settings = require('./settings'); 14 | var flash = require('connect-flash'); 15 | var session = require('express-session'); 16 | var MongoStore = require('connect-mongo')(session); 17 | // 生成一个express实例app 18 | var app = express(); 19 | 20 | // 设置端口号 21 | app.set('port', process.env.PORT || 3000); 22 | // view engine setup 23 | // 设置 views 文件夹为存放视图文件的目录, 即存放模板文件的地方,__dirname 为全局变量,存储当前正在执行的脚本所在的目录 24 | app.set('views', path.join(__dirname, 'views')); 25 | // 通过 express -e blog 只是初始化了一个使用 ejs 模板引擎的工程而已,比如 node_modules 下添加了 ejs 模块,views 文件夹下有 index.ejs 。并不是说强制该工程只能使用 ejs 不能使用其他的模板引擎比如 jade,真正指定使用哪个模板引擎的是 app.set('view engine', 'ejs'); 26 | // 设置视图模板引擎为 ejs; 通过 express -e blog 只是初始化了一个使用 ejs 模板引擎的工程而已,比如 node_modules 下添加了 ejs 模块,views 文件夹下有 index.ejs 。并不是说强制该工程只能使用 ejs 不能使用其他的模板引擎比如 jade,真正指定使用哪个模板引擎的是 app.set('view engine', 'ejs'); 27 | app.set('view engine', 'ejs'); 28 | app.use(compression()); 29 | 30 | // app.use([path,] function [, function...]), app.use用来准备中间件,第一个参数是路径(可选),不指定的话就是'/',对app的每个请求都会执行回调函数,否则就只对指定路径执行回调函数 31 | // flash 是一个在 session 中用于存储信息的特定区域。信息写入 flash ,下一次显示完毕后即被清除。典型的应用是结合重定向的功能,确保信息是提供给下一个被渲染的页面 32 | app.use(flash()); 33 | // uncomment after placing your favicon in /public 34 | // 设置/public/favicon.ico为favicon图标。 35 | //app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); 36 | // 加载日志中间件 37 | app.use(logger('dev')); 38 | app.use(logger("combined", {stream: accessLog})); 39 | // 加载解析json的中间件 40 | app.use(bodyParser.json()); 41 | // 加载解析urlencoded请求体的中间件 42 | app.use(bodyParser.urlencoded({ extended: false })); 43 | // 加载解析cookie的中间件 44 | // app.use(cookieParser()); 45 | // 设置了静态文件目录为 public 文件夹 46 | app.use(express.static(path.join(__dirname, 'public'))); 47 | app.use(function (err, req, res, next) { 48 | var meta = '[' + new Date() + '] ' + req.url + '\n'; 49 | errorLog.write(meta + err.stack + '\n'); 50 | next(); 51 | }); 52 | // 使用 express-session 和 connect-mongo 模块实现了将会话信息存储到mongodb中。 53 | app.use(session({ 54 | // secret用来防止篡改 cookie 55 | secret: settings.cookieSecret, 56 | resave: false, 57 | saveUninitialized: false, 58 | key: settings.db,//cookie name 59 | cookie: {maxAge: 1000 * 60 * 60 * 24 * 30},//30 days,cookie 的生存期,毫秒为单位,过期后cookie的sessionID就自动删除了 60 | // store选项设置会话存储实例 61 | // 设置它的 store 参数为 MongoStore 实例,把会话信息存储到数据库中,以避免丢失 62 | store: new MongoStore({ 63 | url: settings.url 64 | }) 65 | })); 66 | // 把实现路由功能的代码都放在 routes/index.js 里,把路由控制器和实现路由功能的函数都放到 index.js 里,app.js 中只有一个总的路由接口,也就是这里的routes(app) 67 | routes(app); 68 | // app.get('port')取得端口号 69 | app.listen(app.get('port'), function() { 70 | console.log('Express server listening on port ' + app.get('port')); 71 | }); 72 | /*app.use('/', routes); 73 | app.use('/users', users); 74 | 75 | // catch 404 and forward to error handler 76 | app.use(function(req, res, next) { 77 | var err = new Error('Not Found'); 78 | err.status = 404; 79 | next(err); 80 | }); 81 | 82 | // error handlers 83 | 84 | // development error handler 85 | // will print stacktrace 86 | if (app.get('env') === 'development') { 87 | app.use(function(err, req, res, next) { 88 | res.status(err.status || 500); 89 | res.render('error', { 90 | message: err.message, 91 | error: err 92 | }); 93 | }); 94 | } 95 | 96 | // production error handler 97 | // no stacktraces leaked to user 98 | app.use(function(err, req, res, next) { 99 | res.status(err.status || 500); 100 | res.render('error', { 101 | message: err.message, 102 | error: {} 103 | }); 104 | }); 105 | 106 | 107 | module.exports = app; 108 | */ -------------------------------------------------------------------------------- /models/comment.js: -------------------------------------------------------------------------------- 1 | // 用户评论模型 2 | var mongodb = require('mongodb'), 3 | settings = require('../settings'); 4 | 5 | function Comment (name, day, title, comment) { 6 | // body... 7 | this.name = name; 8 | this.day = day; 9 | this.title = title; 10 | this.comment = comment; 11 | } 12 | 13 | module.exports = Comment; 14 | // 存储一条留言信息 15 | Comment.prototype.save = function (callback) { 16 | var name = this.name, 17 | day = this.day, 18 | title = this.title, 19 | comment = this.comment; 20 | // 打开数据库 21 | mongodb.MongoClient.connect(settings.url, function (err, db) { 22 | if (err) { 23 | return callback(err); 24 | } 25 | // 读取posts集合 26 | db.collection('posts', function(err, collection) { 27 | if (err) { 28 | db.close(); 29 | return callback(err); 30 | } 31 | // 通过用户名、时间及标题查找文档,并把一条留言对象添加到该文档的comments数组里 32 | collection.update({ 33 | "name": name, 34 | "time.day": day, 35 | "title": title 36 | }, { 37 | $push: {"comments": comment} 38 | }, function(err) { 39 | db.close(); 40 | if (err) { 41 | return callback(err); 42 | } 43 | callback(null); 44 | }); 45 | }); 46 | }); 47 | }; -------------------------------------------------------------------------------- /models/user.js: -------------------------------------------------------------------------------- 1 | var crypto = require('crypto'); 2 | var mongodb = require('mongodb'), 3 | settings = require('../settings'); 4 | // 构造函数模式创建User对象 5 | function User (user) { 6 | this.name = user.name; 7 | this.password = user.password; 8 | this.email = user.email; 9 | }; 10 | 11 | module.exports = User; 12 | 13 | // 存储用户信息,每一个User实例都会共享save方法,这里通过原型添加了非静态方法,只能通过原型对象或者实例访问 14 | User.prototype.save = function (callback) { 15 | var md5 = crypto.createHash('md5'), 16 | email_MD5 = md5.update(this.email.toLowerCase()).digest('hex'), 17 | head = "http://www.gravatar.com/avatar/" + email_MD5 + "?s=48"; 18 | // 要存入数据库的用户文档 19 | var user = { 20 | name: this.name, 21 | password: this.password, 22 | email: this.email, 23 | head: head 24 | }; 25 | // 打开数据库 26 | mongodb.MongoClient.connect(settings.url, function (err, db) { 27 | if (err) { 28 | return callback(err);//错误,直接return err信息,后面的程序就不运行了 29 | } 30 | // 读取users集合 31 | db.collection('users', function(err, collection) { 32 | if (err) { 33 | db.close(); 34 | return callback(err);//错误,直接return err信息,后面的程序就不运行了 35 | } 36 | // 将用户数据插入users集合; insert(docs, options, callback); insetWriteOpCallback(err, result), result: the result object if the command was executed successfully 37 | collection.insertOne(user, { 38 | safe: true 39 | }, function(err, user) { 40 | db.close(); 41 | if (err) { 42 | return callback(err);//错误,直接return err信息,后面的程序就不运行了 43 | } 44 | callback(null, user);//成功!err 为 null,并返回存储后的用户文档 45 | }); 46 | }); 47 | }); 48 | }; 49 | // 读取用户信息,这里添加的get是静态方法,不能通过实例访问,直接通过类名(这里是User)访问 50 | User.get = function(name, callback) { 51 | // 打开数据库 52 | mongodb.MongoClient.connect(settings.url, function (err, db) { 53 | if (err) { 54 | return callback(err);//错误,返回 err 信息 55 | } 56 | //读取 users 集合 57 | db.collection('users', function (err, collection) { 58 | if (err) { 59 | db.close(); 60 | return callback(err);//错误,返回 err 信息 61 | } 62 | // 查找用户名(name键)值为name一个文档 63 | // findOne(query, options, callback): Fetches the first document that matches the query 64 | collection.findOne({ 65 | name: name 66 | }, function(err, user) { 67 | db.close(); 68 | if (err) { 69 | return callback(err);//失败,直接return err信息 70 | } 71 | // 72 | callback(null, user);//成功!返回查询的用户信息;成功了callback才传入user参数 73 | }); 74 | }); 75 | }); 76 | }; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blog", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "body-parser": "~1.15.1", 10 | "cookie-parser": "~1.4.3", 11 | "debug": "~2.2.0", 12 | "ejs": "~2.4.1", 13 | "express": "~4.13.4", 14 | "morgan": "~1.7.0", 15 | "serve-favicon": "~2.3.0", 16 | "mongodb": "2.0.42", 17 | "mongoose": "*", 18 | "express-session": "1.9.1", 19 | "connect-mongo": "0.8.2", 20 | "connect-flash": "0.1.1", 21 | "markdown": "0.5.0", 22 | "multer": "1.1.0", 23 | "compression": "1.6.2" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/images/N_Blog_注册登录页.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/images/N_Blog_注册登录页.png -------------------------------------------------------------------------------- /public/images/N_Blog_表单_正确.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/images/N_Blog_表单_正确.png -------------------------------------------------------------------------------- /public/images/N_Blog_表单_错误.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/images/N_Blog_表单_错误.png -------------------------------------------------------------------------------- /public/images/N_blog_bootstrap_style.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/images/N_blog_bootstrap_style.PNG -------------------------------------------------------------------------------- /public/images/N_blog_http_firebug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/images/N_blog_http_firebug.png -------------------------------------------------------------------------------- /public/images/N_blog_http_header_request.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/images/N_blog_http_header_request.png -------------------------------------------------------------------------------- /public/images/N_blog_http_header_response.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/images/N_blog_http_header_response.png -------------------------------------------------------------------------------- /public/images/N_blog_initial_style.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/images/N_blog_initial_style.PNG -------------------------------------------------------------------------------- /public/images/N_blog_知乎注册登录页.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/images/N_blog_知乎注册登录页.png -------------------------------------------------------------------------------- /public/images/love.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/images/love.jpg -------------------------------------------------------------------------------- /public/javascripts/script.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function() { 2 | // 字符串中不包含任何数字字符时会转换为NaN,对于减法操作符,如果有一个是NaN,结果就是NaN 3 | /*var a="password"-"repeat"; 4 | console.log(a);*/// NaN 5 | // 6 | highlight(); 7 | /*注册表单验证*/ 8 | $('#reg').validate({ 9 | // 校验通过后不能提交,便于本地调试,不需要和后端交互 10 | // debug:true, 11 | // 校验规则,和表单控件的name属性匹配 12 | rules:{ 13 | name:{ 14 | required:true, 15 | rangelength:[2,10], 16 | remote:{ 17 | url:"/validate_reg" 18 | } 19 | }, 20 | password:{ 21 | required:true, 22 | rangelength:[6,16] 23 | }, 24 | // 这里加双引号是因为有'-',会把字符串转换为数值然后相减 25 | "password-repeat":{ 26 | required:true, 27 | // password 的id属性,这里是一个选择器 28 | equalTo: "#regpassword" 29 | }, 30 | email:{ 31 | required:true, 32 | email:true 33 | } 34 | }, 35 | // 校验提示信息 36 | messages:{ 37 | name:{ 38 | required:"请填写用户名", 39 | rangelength:"用户名长度需在2-10位之间", 40 | remote:"用户名已存在" 41 | }, 42 | password:{ 43 | required:"请输入密码", 44 | rangelength:"密码长度在6位到16位之间" 45 | }, 46 | "password-repeat":{ 47 | required:"请再次输入密码确认", 48 | equalTo: "两次输入密码不一致" 49 | }, 50 | email:{ 51 | required:"请输入邮箱", 52 | email:"请输入合法的邮箱格式" 53 | } 54 | }, 55 | //自定义错误消息放到哪里 56 | errorPlacement : function(error, element) { 57 | element.next().remove();//删除显示的√图标 58 | // 加上×图标 59 | element.after(''); 60 | element.closest('.form-group').append(error);//显示错误消息提示 61 | }, 62 | //给未通过验证的元素进行处理 63 | highlight : function(element) { 64 | $(element).closest('.form-group').removeClass('has-success').addClass('has-error'); 65 | }, 66 | //验证通过的处理 67 | success : function(label) { 68 | var el=label.closest('.form-group').find("input"); 69 | el.next().remove();//与errorPlacement相似,删除×图标 70 | el.after(''); 71 | label.closest('.form-group').removeClass('has-error').addClass("has-success"); 72 | label.remove();//删掉错误消息 73 | } 74 | }); 75 | // 登录表单验证 76 | $('#login').validate({ 77 | rules:{ 78 | name:{ 79 | required:true, 80 | rangelength:[2,10], 81 | remote:{ 82 | url:"/validate" 83 | } 84 | }, 85 | password:{ 86 | required:true, 87 | rangelength:[6,16] 88 | } 89 | }, 90 | messages:{ 91 | name:{ 92 | required:"请输入用户名", 93 | rangelength:"用户名长度需在2-10位之间", 94 | remote:"用户名不存在" 95 | }, 96 | password:{ 97 | required:"请输入密码", 98 | rangelength:"密码长度在6位到16位之间" 99 | } 100 | }, 101 | //自定义错误消息放到哪里 102 | errorPlacement : function(error, element) { 103 | element.next().remove();//删除显示的√图标 104 | // 加上×图标 105 | element.after(''); 106 | element.closest('.form-group').append(error);//显示错误消息提示 107 | }, 108 | //给未通过验证的元素进行处理 109 | highlight : function(element) { 110 | $(element).closest('.form-group').removeClass('has-success').addClass('has-error'); 111 | }, 112 | //验证通过的处理 113 | success : function(label) { 114 | var el=label.closest('.form-group').find("input"); 115 | el.next().remove();//与errorPlacement相似,删除×图标 116 | el.after(''); 117 | label.closest('.form-group').removeClass('has-error').addClass("has-success"); 118 | label.remove();//删掉错误消息 119 | } 120 | }) 121 | }); 122 | 123 | // 给导航栏动态添加active类 124 | function highlight () { 125 | // 关于子元素的选择,'>'只选择直接子元素,' '选择所有满足条件的子元素 126 | var links = $('#bs-example-navbar-collapse-1 a'); 127 | for (var i = 0; i < links.length; i++) { 128 | if (window.location.href.indexOf(links[i].href)!=-1) { 129 | // 这里不能写成links[i].parent,会提示parent is not a function,因为links[i]是一个dom元素,$(links[i])才是一个jQuery object 130 | $(links[i]).parent().addClass('active'); 131 | } 132 | } 133 | } 134 | -------------------------------------------------------------------------------- /public/kindeditor/lang/ar.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | * Arabic Translation By daif alotaibi (http://daif.net/) 9 | *******************************************************************************/ 10 | 11 | KindEditor.lang({ 12 | source : 'عرض المصدر', 13 | preview : 'معاينة الصفحة', 14 | undo : 'تراجع(Ctrl+Z)', 15 | redo : 'إعادة التراجع(Ctrl+Y)', 16 | cut : 'قص(Ctrl+X)', 17 | copy : 'نسخ(Ctrl+C)', 18 | paste : 'لصق(Ctrl+V)', 19 | plainpaste : 'لصق كنص عادي', 20 | wordpaste : 'لصق من مايكروسفت ورد', 21 | selectall : 'تحديد الكل', 22 | justifyleft : 'محاذاه لليسار', 23 | justifycenter : 'محاذاه للوسط', 24 | justifyright : 'محاذاه لليمين', 25 | justifyfull : 'محاذاه تلقائية', 26 | insertorderedlist : 'قائمة مرقمه', 27 | insertunorderedlist : 'قائمة نقطية', 28 | indent : 'إزاحه النص', 29 | outdent : 'إلغاء الازاحة', 30 | subscript : 'أسفل النص', 31 | superscript : 'أعلى النص', 32 | formatblock : 'Paragraph format', 33 | fontname : 'نوع الخط', 34 | fontsize : 'حجم الخط', 35 | forecolor : 'لون النص', 36 | hilitecolor : 'لون خلفية النص', 37 | bold : 'عريض(Ctrl+B)', 38 | italic : 'مائل(Ctrl+I)', 39 | underline : 'خط تحت النص(Ctrl+U)', 40 | strikethrough : 'خط على النص', 41 | removeformat : 'إزالة التنسيق', 42 | image : 'إدراج صورة', 43 | multiimage : 'Multi image', 44 | flash : 'إدراج فلاش', 45 | media : 'إدراج وسائط متعددة', 46 | table : 'إدراج جدول', 47 | tablecell : 'خلية', 48 | hr : 'إدراج خط أفقي', 49 | emoticons : 'إدراج وجه ضاحك', 50 | link : 'رابط', 51 | unlink : 'إزالة الرابط', 52 | fullscreen : 'محرر ملئ الشاشة', 53 | about : 'حول', 54 | print : 'طباعة', 55 | filemanager : 'مدير الملفات', 56 | code : 'إدراج نص برمجي', 57 | map : 'خرائط قووقل', 58 | baidumap : 'خرائط قووقل', 59 | lineheight : 'إرتفاع السطر', 60 | clearhtml : 'مسح كود HTML', 61 | pagebreak : 'إدراج فاصل صفحات', 62 | quickformat : 'تنسيق سريع', 63 | insertfile : 'إدراج ملف', 64 | template : 'إدراج قالب', 65 | anchor : 'رابط', 66 | yes : 'موافق', 67 | no : 'إلغاء', 68 | close : 'إغلاق', 69 | editImage : 'خصائص الصورة', 70 | deleteImage : 'حذفالصورة', 71 | editFlash : 'خصائص الفلاش', 72 | deleteFlash : 'حذف الفلاش', 73 | editMedia : 'خصائص الوسائط', 74 | deleteMedia : 'حذف الوسائط', 75 | editLink : 'خصائص الرابط', 76 | deleteLink : 'إزالة الرابط', 77 | tableprop : 'خصائص الجدول', 78 | tablecellprop : 'خصائص الخلية', 79 | tableinsert : 'إدراج جدول', 80 | tabledelete : 'حذف جدول', 81 | tablecolinsertleft : 'إدراج عمود لليسار', 82 | tablecolinsertright : 'إدراج عمود لليسار', 83 | tablerowinsertabove : 'إدراج صف للأعلى', 84 | tablerowinsertbelow : 'إدراج صف للأسفل', 85 | tablerowmerge : 'دمج للأسفل', 86 | tablecolmerge : 'دمج لليمين', 87 | tablerowsplit : 'تقسم الصف', 88 | tablecolsplit : 'تقسيم العمود', 89 | tablecoldelete : 'حذف العمود', 90 | tablerowdelete : 'حذف الصف', 91 | noColor : 'إفتراضي', 92 | pleaseSelectFile : 'Please select file.', 93 | invalidImg : "الرجاء إدخال رابط صحيح.\nالملفات المسموح بها: jpg,gif,bmp,png", 94 | invalidMedia : "الرجاء إدخال رابط صحيح.\nالملفات المسموح بها: swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb", 95 | invalidWidth : "العرض يجب أن يكون رقم.", 96 | invalidHeight : "الإرتفاع يجب أن يكون رقم.", 97 | invalidBorder : "عرض الحد يجب أن يكون رقم.", 98 | invalidUrl : "الرجاء إدخال رابط حيح.", 99 | invalidRows : 'صفوف غير صحيح.', 100 | invalidCols : 'أعمدة غير صحيحة.', 101 | invalidPadding : 'The padding must be number.', 102 | invalidSpacing : 'The spacing must be number.', 103 | invalidJson : 'Invalid JSON string.', 104 | uploadSuccess : 'تم رفع الملف بنجاح.', 105 | cutError : 'حاليا غير مدعومة من المتصفح, إستخدم إختصار لوحة المفاتيح (Ctrl+X).', 106 | copyError : 'حاليا غير مدعومة من المتصفح, إستخدم إختصار لوحة المفاتيح (Ctrl+C).', 107 | pasteError : 'حاليا غير مدعومة من المتصفح, إستخدم إختصار لوحة المفاتيح (Ctrl+V).', 108 | ajaxLoading : 'Loading ...', 109 | uploadLoading : 'Uploading ...', 110 | uploadError : 'Upload Error', 111 | 'plainpaste.comment' : 'إستخدم إختصار لوحة المفاتيح (Ctrl+V) للصق داخل النافذة.', 112 | 'wordpaste.comment' : 'إستخدم إختصار لوحة المفاتيح (Ctrl+V) للصق داخل النافذة.', 113 | 'code.pleaseInput' : 'Please input code.', 114 | 'link.url' : 'الرابط', 115 | 'link.linkType' : 'الهدف', 116 | 'link.newWindow' : 'نافذة جديدة', 117 | 'link.selfWindow' : 'نفس النافذة', 118 | 'flash.url' : 'الرابط', 119 | 'flash.width' : 'العرض', 120 | 'flash.height' : 'الإرتفاع', 121 | 'flash.upload' : 'رفع', 122 | 'flash.viewServer' : 'أستعراض', 123 | 'media.url' : 'الرابط', 124 | 'media.width' : 'العرض', 125 | 'media.height' : 'الإرتفاع', 126 | 'media.autostart' : 'تشغيل تلقائي', 127 | 'media.upload' : 'رفع', 128 | 'media.viewServer' : 'أستعراض', 129 | 'image.remoteImage' : 'إدراج الرابط', 130 | 'image.localImage' : 'رفع', 131 | 'image.remoteUrl' : 'الرابط', 132 | 'image.localUrl' : 'الملف', 133 | 'image.size' : 'الحجم', 134 | 'image.width' : 'العرض', 135 | 'image.height' : 'الإرتفاع', 136 | 'image.resetSize' : 'إستعادة الأبعاد', 137 | 'image.align' : 'محاذاة', 138 | 'image.defaultAlign' : 'الإفتراضي', 139 | 'image.leftAlign' : 'اليسار', 140 | 'image.rightAlign' : 'اليمين', 141 | 'image.imgTitle' : 'العنوان', 142 | 'image.upload' : 'أستعراض', 143 | 'image.viewServer' : 'أستعراض', 144 | 'multiimage.uploadDesc' : 'Allows users to upload <%=uploadLimit%> images, single image size not exceeding <%=sizeLimit%>', 145 | 'multiimage.startUpload' : 'Start upload', 146 | 'multiimage.clearAll' : 'Clear all', 147 | 'multiimage.insertAll' : 'Insert all', 148 | 'multiimage.queueLimitExceeded' : 'Queue limit exceeded.', 149 | 'multiimage.fileExceedsSizeLimit' : 'File exceeds size limit.', 150 | 'multiimage.zeroByteFile' : 'Zero byte file.', 151 | 'multiimage.invalidFiletype' : 'Invalid file type.', 152 | 'multiimage.unknownError' : 'Unknown upload error.', 153 | 'multiimage.pending' : 'Pending ...', 154 | 'multiimage.uploadError' : 'Upload error', 155 | 'filemanager.emptyFolder' : 'فارغ', 156 | 'filemanager.moveup' : 'المجلد الأب', 157 | 'filemanager.viewType' : 'العرض: ', 158 | 'filemanager.viewImage' : 'مصغرات', 159 | 'filemanager.listImage' : 'قائمة', 160 | 'filemanager.orderType' : 'الترتيب: ', 161 | 'filemanager.fileName' : 'بالإسم', 162 | 'filemanager.fileSize' : 'بالحجم', 163 | 'filemanager.fileType' : 'بالنوع', 164 | 'insertfile.url' : 'الرابط', 165 | 'insertfile.title' : 'العنوان', 166 | 'insertfile.upload' : 'رفع', 167 | 'insertfile.viewServer' : 'أستعراض', 168 | 'table.cells' : 'خلايا', 169 | 'table.rows' : 'صفوف', 170 | 'table.cols' : 'أعمدة', 171 | 'table.size' : 'الأبعاد', 172 | 'table.width' : 'العرض', 173 | 'table.height' : 'الإرتفاع', 174 | 'table.percent' : '%', 175 | 'table.px' : 'px', 176 | 'table.space' : 'الخارج', 177 | 'table.padding' : 'الداخل', 178 | 'table.spacing' : 'الفراغات', 179 | 'table.align' : 'محاذاه', 180 | 'table.textAlign' : 'افقى', 181 | 'table.verticalAlign' : 'رأسي', 182 | 'table.alignDefault' : 'إفتراضي', 183 | 'table.alignLeft' : 'يسار', 184 | 'table.alignCenter' : 'وسط', 185 | 'table.alignRight' : 'يمين', 186 | 'table.alignTop' : 'أعلى', 187 | 'table.alignMiddle' : 'منتصف', 188 | 'table.alignBottom' : 'أسفل', 189 | 'table.alignBaseline' : 'Baseline', 190 | 'table.border' : 'الحدود', 191 | 'table.borderWidth' : 'العرض', 192 | 'table.borderColor' : 'اللون', 193 | 'table.backgroundColor' : 'الخلفية', 194 | 'map.address' : 'العنوان: ', 195 | 'map.search' : 'بحث', 196 | 'baidumap.address' : 'العنوان: ', 197 | 'baidumap.search' : 'بحث', 198 | 'baidumap.insertDynamicMap' : 'Dynamic Map', 199 | 'anchor.name' : 'إسم الرابط', 200 | 'formatblock.formatBlock' : { 201 | h1 : 'عنوان 1', 202 | h2 : 'عنوان 2', 203 | h3 : 'عنوان 3', 204 | h4 : 'عنوان 4', 205 | p : 'عادي' 206 | }, 207 | 'fontname.fontName' : { 208 | 'Arial' : 'Arial', 209 | 'Arial Black' : 'Arial Black', 210 | 'Comic Sans MS' : 'Comic Sans MS', 211 | 'Courier New' : 'Courier New', 212 | 'Garamond' : 'Garamond', 213 | 'Georgia' : 'Georgia', 214 | 'Tahoma' : 'Tahoma', 215 | 'Times New Roman' : 'Times New Roman', 216 | 'Trebuchet MS' : 'Trebuchet MS', 217 | 'Verdana' : 'Verdana' 218 | }, 219 | 'lineheight.lineHeight' : [ 220 | {'1' : 'إرتفاع السطر 1'}, 221 | {'1.5' : 'إرتفاع السطر 1.5'}, 222 | {'2' : 'إرتفاع السطر 2'}, 223 | {'2.5' : 'إرتفاع السطر 2.5'}, 224 | {'3' : 'إرتفاع السطر 3'} 225 | ], 226 | 'template.selectTemplate' : 'قالب', 227 | 'template.replaceContent' : 'إستبدال المحتوى الحالي', 228 | 'template.fileList' : { 229 | '1.html' : 'صورة ونص', 230 | '2.html' : 'جدول', 231 | '3.html' : 'قائمة' 232 | } 233 | }, 'ar'); 234 | -------------------------------------------------------------------------------- /public/kindeditor/lang/en.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.lang({ 11 | source : 'Source', 12 | preview : 'Preview', 13 | undo : 'Undo(Ctrl+Z)', 14 | redo : 'Redo(Ctrl+Y)', 15 | cut : 'Cut(Ctrl+X)', 16 | copy : 'Copy(Ctrl+C)', 17 | paste : 'Paste(Ctrl+V)', 18 | plainpaste : 'Paste as plain text', 19 | wordpaste : 'Paste from Word', 20 | selectall : 'Select all', 21 | justifyleft : 'Align left', 22 | justifycenter : 'Align center', 23 | justifyright : 'Align right', 24 | justifyfull : 'Align full', 25 | insertorderedlist : 'Ordered list', 26 | insertunorderedlist : 'Unordered list', 27 | indent : 'Increase indent', 28 | outdent : 'Decrease indent', 29 | subscript : 'Subscript', 30 | superscript : 'Superscript', 31 | formatblock : 'Paragraph format', 32 | fontname : 'Font family', 33 | fontsize : 'Font size', 34 | forecolor : 'Text color', 35 | hilitecolor : 'Highlight color', 36 | bold : 'Bold(Ctrl+B)', 37 | italic : 'Italic(Ctrl+I)', 38 | underline : 'Underline(Ctrl+U)', 39 | strikethrough : 'Strikethrough', 40 | removeformat : 'Remove format', 41 | image : 'Image', 42 | multiimage : 'Multi image', 43 | flash : 'Flash', 44 | media : 'Embeded media', 45 | table : 'Table', 46 | tablecell : 'Cell', 47 | hr : 'Insert horizontal line', 48 | emoticons : 'Insert emoticon', 49 | link : 'Link', 50 | unlink : 'Unlink', 51 | fullscreen : 'Toggle fullscreen mode', 52 | about : 'About', 53 | print : 'Print', 54 | filemanager : 'File Manager', 55 | code : 'Insert code', 56 | map : 'Google Maps', 57 | baidumap : 'Baidu Maps', 58 | lineheight : 'Line height', 59 | clearhtml : 'Clear HTML code', 60 | pagebreak : 'Insert Page Break', 61 | quickformat : 'Quick Format', 62 | insertfile : 'Insert file', 63 | template : 'Insert Template', 64 | anchor : 'Anchor', 65 | yes : 'OK', 66 | no : 'Cancel', 67 | close : 'Close', 68 | editImage : 'Image properties', 69 | deleteImage : 'Delete image', 70 | editFlash : 'Flash properties', 71 | deleteFlash : 'Delete flash', 72 | editMedia : 'Media properties', 73 | deleteMedia : 'Delete media', 74 | editLink : 'Link properties', 75 | deleteLink : 'Unlink', 76 | tableprop : 'Table properties', 77 | tablecellprop : 'Cell properties', 78 | tableinsert : 'Insert table', 79 | tabledelete : 'Delete table', 80 | tablecolinsertleft : 'Insert column left', 81 | tablecolinsertright : 'Insert column right', 82 | tablerowinsertabove : 'Insert row above', 83 | tablerowinsertbelow : 'Insert row below', 84 | tablerowmerge : 'Merge down', 85 | tablecolmerge : 'Merge right', 86 | tablerowsplit : 'Split row', 87 | tablecolsplit : 'Split column', 88 | tablecoldelete : 'Delete column', 89 | tablerowdelete : 'Delete row', 90 | noColor : 'Default', 91 | pleaseSelectFile : 'Please select file.', 92 | invalidImg : "Please type valid URL.\nAllowed file extension: jpg,gif,bmp,png", 93 | invalidMedia : "Please type valid URL.\nAllowed file extension: swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb", 94 | invalidWidth : "The width must be number.", 95 | invalidHeight : "The height must be number.", 96 | invalidBorder : "The border must be number.", 97 | invalidUrl : "Please type valid URL.", 98 | invalidRows : 'Invalid rows.', 99 | invalidCols : 'Invalid columns.', 100 | invalidPadding : 'The padding must be number.', 101 | invalidSpacing : 'The spacing must be number.', 102 | invalidJson : 'Invalid JSON string.', 103 | uploadSuccess : 'Upload success.', 104 | cutError : 'Currently not supported by your browser, use keyboard shortcut(Ctrl+X) instead.', 105 | copyError : 'Currently not supported by your browser, use keyboard shortcut(Ctrl+C) instead.', 106 | pasteError : 'Currently not supported by your browser, use keyboard shortcut(Ctrl+V) instead.', 107 | ajaxLoading : 'Loading ...', 108 | uploadLoading : 'Uploading ...', 109 | uploadError : 'Upload Error', 110 | 'plainpaste.comment' : 'Use keyboard shortcut(Ctrl+V) to paste the text into the window.', 111 | 'wordpaste.comment' : 'Use keyboard shortcut(Ctrl+V) to paste the text into the window.', 112 | 'code.pleaseInput' : 'Please input code.', 113 | 'link.url' : 'URL', 114 | 'link.linkType' : 'Target', 115 | 'link.newWindow' : 'New window', 116 | 'link.selfWindow' : 'Same window', 117 | 'flash.url' : 'URL', 118 | 'flash.width' : 'Width', 119 | 'flash.height' : 'Height', 120 | 'flash.upload' : 'Upload', 121 | 'flash.viewServer' : 'Browse', 122 | 'media.url' : 'URL', 123 | 'media.width' : 'Width', 124 | 'media.height' : 'Height', 125 | 'media.autostart' : 'Auto start', 126 | 'media.upload' : 'Upload', 127 | 'media.viewServer' : 'Browse', 128 | 'image.remoteImage' : 'Insert URL', 129 | 'image.localImage' : 'Upload', 130 | 'image.remoteUrl' : 'URL', 131 | 'image.localUrl' : 'File', 132 | 'image.size' : 'Size', 133 | 'image.width' : 'Width', 134 | 'image.height' : 'Height', 135 | 'image.resetSize' : 'Reset dimensions', 136 | 'image.align' : 'Align', 137 | 'image.defaultAlign' : 'Default', 138 | 'image.leftAlign' : 'Left', 139 | 'image.rightAlign' : 'Right', 140 | 'image.imgTitle' : 'Title', 141 | 'image.upload' : 'Browse', 142 | 'image.viewServer' : 'Browse', 143 | 'multiimage.uploadDesc' : 'Allows users to upload <%=uploadLimit%> images, single image size not exceeding <%=sizeLimit%>', 144 | 'multiimage.startUpload' : 'Start upload', 145 | 'multiimage.clearAll' : 'Clear all', 146 | 'multiimage.insertAll' : 'Insert all', 147 | 'multiimage.queueLimitExceeded' : 'Queue limit exceeded.', 148 | 'multiimage.fileExceedsSizeLimit' : 'File exceeds size limit.', 149 | 'multiimage.zeroByteFile' : 'Zero byte file.', 150 | 'multiimage.invalidFiletype' : 'Invalid file type.', 151 | 'multiimage.unknownError' : 'Unknown upload error.', 152 | 'multiimage.pending' : 'Pending ...', 153 | 'multiimage.uploadError' : 'Upload error', 154 | 'filemanager.emptyFolder' : 'Blank', 155 | 'filemanager.moveup' : 'Parent folder', 156 | 'filemanager.viewType' : 'Display: ', 157 | 'filemanager.viewImage' : 'Thumbnails', 158 | 'filemanager.listImage' : 'List', 159 | 'filemanager.orderType' : 'Sorting: ', 160 | 'filemanager.fileName' : 'By name', 161 | 'filemanager.fileSize' : 'By size', 162 | 'filemanager.fileType' : 'By type', 163 | 'insertfile.url' : 'URL', 164 | 'insertfile.title' : 'Title', 165 | 'insertfile.upload' : 'Upload', 166 | 'insertfile.viewServer' : 'Browse', 167 | 'table.cells' : 'Cells', 168 | 'table.rows' : 'Rows', 169 | 'table.cols' : 'Columns', 170 | 'table.size' : 'Dimensions', 171 | 'table.width' : 'Width', 172 | 'table.height' : 'Height', 173 | 'table.percent' : '%', 174 | 'table.px' : 'px', 175 | 'table.space' : 'Space', 176 | 'table.padding' : 'Padding', 177 | 'table.spacing' : 'Spacing', 178 | 'table.align' : 'Align', 179 | 'table.textAlign' : 'Horizontal', 180 | 'table.verticalAlign' : 'Vertical', 181 | 'table.alignDefault' : 'Default', 182 | 'table.alignLeft' : 'Left', 183 | 'table.alignCenter' : 'Center', 184 | 'table.alignRight' : 'Right', 185 | 'table.alignTop' : 'Top', 186 | 'table.alignMiddle' : 'Middle', 187 | 'table.alignBottom' : 'Bottom', 188 | 'table.alignBaseline' : 'Baseline', 189 | 'table.border' : 'Border', 190 | 'table.borderWidth' : 'Width', 191 | 'table.borderColor' : 'Color', 192 | 'table.backgroundColor' : 'Background', 193 | 'map.address' : 'Address: ', 194 | 'map.search' : 'Search', 195 | 'baidumap.address' : 'Address: ', 196 | 'baidumap.search' : 'Search', 197 | 'baidumap.insertDynamicMap' : 'Dynamic Map', 198 | 'anchor.name' : 'Anchor name', 199 | 'formatblock.formatBlock' : { 200 | h1 : 'Heading 1', 201 | h2 : 'Heading 2', 202 | h3 : 'Heading 3', 203 | h4 : 'Heading 4', 204 | p : 'Normal' 205 | }, 206 | 'fontname.fontName' : { 207 | 'Arial' : 'Arial', 208 | 'Arial Black' : 'Arial Black', 209 | 'Comic Sans MS' : 'Comic Sans MS', 210 | 'Courier New' : 'Courier New', 211 | 'Garamond' : 'Garamond', 212 | 'Georgia' : 'Georgia', 213 | 'Tahoma' : 'Tahoma', 214 | 'Times New Roman' : 'Times New Roman', 215 | 'Trebuchet MS' : 'Trebuchet MS', 216 | 'Verdana' : 'Verdana' 217 | }, 218 | 'lineheight.lineHeight' : [ 219 | {'1' : 'Line height 1'}, 220 | {'1.5' : 'Line height 1.5'}, 221 | {'2' : 'Line height 2'}, 222 | {'2.5' : 'Line height 2.5'}, 223 | {'3' : 'Line height 3'} 224 | ], 225 | 'template.selectTemplate' : 'Template', 226 | 'template.replaceContent' : 'Replace current content', 227 | 'template.fileList' : { 228 | '1.html' : 'Image and Text', 229 | '2.html' : 'Table', 230 | '3.html' : 'List' 231 | } 232 | }, 'en'); 233 | -------------------------------------------------------------------------------- /public/kindeditor/lang/ko.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Composite 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.lang({ 11 | source : '소스', 12 | preview : '미리보기', 13 | undo : '작업취소(Ctrl+Z)', 14 | redo : '작업재개(Ctrl+Y)', 15 | cut : '잘라내기(Ctrl+X)', 16 | copy : '복사(Ctrl+C)', 17 | paste : '붙여넣기(Ctrl+V)', 18 | plainpaste : '일반 텍스트로 붙여넣기', 19 | wordpaste : '워드 문서로 붙여넣기', 20 | selectall : '전체 선택', 21 | justifyleft : '왼쪽 정렬', 22 | justifycenter : '가운데 정렬', 23 | justifyright : '오른쪽 정렬', 24 | justifyfull : '양쪽 정렬', 25 | insertorderedlist : '순서 목록', 26 | insertunorderedlist : '비순서 목록', 27 | indent : '들여쓰기', 28 | outdent : '내어쓰기', 29 | subscript : '아랫첨자', 30 | superscript : '윗첨자', 31 | formatblock : '문단 형식', 32 | fontname : '글꼴', 33 | fontsize : '글자 크기', 34 | forecolor : '글자색', 35 | hilitecolor : '강조색', 36 | bold : '굵게(Ctrl+B)', 37 | italic : '이텔릭(Ctrl+I)', 38 | underline : '빝줄(Ctrl+U)', 39 | strikethrough : '취소선', 40 | removeformat : '형식 제거', 41 | image : '이미지 추가', 42 | multiimage : '여러 이미지 추가', 43 | flash : '플래시 추가', 44 | media : '미디어 추가', 45 | table : '표', 46 | tablecell : '열', 47 | hr : '구분선 추가', 48 | emoticons : '이모티콘 추가', 49 | link : '링크', 50 | unlink : '링크 제거', 51 | fullscreen : '전체 화면 모드', 52 | about : '이 에디터는...', 53 | print : '인쇄', 54 | filemanager : '파일 관리자', 55 | code : '코드 추가', 56 | map : '구글 맵 추가', 57 | baidumap : '바이두 맵 추가', 58 | lineheight : '행 간격', 59 | clearhtml : 'HTML 코드 정리', 60 | pagebreak : '페이지 구분 추가', 61 | quickformat : '빠른 형식', 62 | insertfile : '파일 추가', 63 | template : '템플릿 추가', 64 | anchor : '책갈피', 65 | yes : '확인', 66 | no : '취소', 67 | close : '닫기', 68 | editImage : '이미지 속성', 69 | deleteImage : '이미지 삭제', 70 | editFlash : '플래시 속성', 71 | deleteFlash : '플래시 삭제', 72 | editMedia : '미디어 속성', 73 | deleteMedia : '미디어 삭제', 74 | editLink : '링크 속성', 75 | deleteLink : '링크 삭제', 76 | tableprop : '표 속성', 77 | tablecellprop : '열 속성', 78 | tableinsert : '표 추가', 79 | tabledelete : '표 삭제', 80 | tablecolinsertleft : '왼쪽으로 열 추가', 81 | tablecolinsertright : '오른쪽으로 열 추가', 82 | tablerowinsertabove : '위쪽으로 열 추가', 83 | tablerowinsertbelow : '아래쪽으로 열 추가', 84 | tablerowmerge : '아래로 병합', 85 | tablecolmerge : '오른쪽으로 병합', 86 | tablerowsplit : '행 나누기', 87 | tablecolsplit : '열 나누기', 88 | tablecoldelete : '열 삭제', 89 | tablerowdelete : '행 삭제', 90 | noColor : '기본색', 91 | pleaseSelectFile : '파일 선택', 92 | invalidImg : "올바른 주소를 입력하세요.\njpg,gif,bmp,png 형식이 가능합니다.", 93 | invalidMedia : "올바른 주소를 입력하세요.\nswf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb 형식이 가능합니다.", 94 | invalidWidth : "넓이 값은 숫자여야 합니다.", 95 | invalidHeight : "높이 값은 숫자여야 합니다.", 96 | invalidBorder : "굵기 값은 숫자여야 합니다.", 97 | invalidUrl : "올바른 주소를 입력하세요.", 98 | invalidRows : '올바른 행이 아닙니다.', 99 | invalidCols : '올바른 열이 아닙니다.', 100 | invalidPadding : '안쪽 여백 값은 숫자여야 합니다.', 101 | invalidSpacing : '간격 길이 값은 숫자여야 합니다.', 102 | invalidJson : '올바른 JSON 형식이 아닙니다.', 103 | uploadSuccess : '업로드가 완료되었습니다.', 104 | cutError : '브라우저가 잘라내기 기능을 지원하지 않습니다, 단축키로 대신 사용하세요. (Ctrl+X)', 105 | copyError : '브라우저가 복사 기능을 지원하지 않습니다, 단축키로 대신 사용하세요. (Ctrl+X)', 106 | pasteError : '브라우저가 붙여넣기 기능을 지원하지 않습니다, 단축키로 대신 사용하세요. (Ctrl+X)', 107 | ajaxLoading : '불러오는 중 ...', 108 | uploadLoading : '업로드 중 ...', 109 | uploadError : '업로드 오류', 110 | 'plainpaste.comment' : '단축키(Ctrl+V)를 통하여 여기에 텍스트를 붙여넣으세요.', 111 | 'wordpaste.comment' : '단축키(Ctrl+V)를 통하여 여기에 워드 텍스트를 붙여넣으세요.', 112 | 'code.pleaseInput' : 'Please input code.', 113 | 'link.url' : '주소', 114 | 'link.linkType' : '창', 115 | 'link.newWindow' : '새 창', 116 | 'link.selfWindow' : '현재 창', 117 | 'flash.url' : '주소', 118 | 'flash.width' : '넓이', 119 | 'flash.height' : '높이', 120 | 'flash.upload' : '업로드', 121 | 'flash.viewServer' : '찾아보기', 122 | 'media.url' : '주소', 123 | 'media.width' : '넓이', 124 | 'media.height' : '높이', 125 | 'media.autostart' : '자동 시작', 126 | 'media.upload' : '업로드', 127 | 'media.viewServer' : '찾아보기', 128 | 'image.remoteImage' : '외부 이미지', 129 | 'image.localImage' : '내부 이미지', 130 | 'image.remoteUrl' : '주소', 131 | 'image.localUrl' : '파일', 132 | 'image.size' : '크기', 133 | 'image.width' : '넓이', 134 | 'image.height' : '높이', 135 | 'image.resetSize' : '기본 크기로', 136 | 'image.align' : '정렬', 137 | 'image.defaultAlign' : '기본', 138 | 'image.leftAlign' : '왼쪽', 139 | 'image.rightAlign' : '오른쪽', 140 | 'image.imgTitle' : '제목', 141 | 'image.upload' : '찾아보기', 142 | 'image.viewServer' : '찾아보기', 143 | 'multiimage.uploadDesc' : '최대 이미지 개수: <%=uploadLimit%>개, 개당 이미지 크기: <%=sizeLimit%>', 144 | 'multiimage.startUpload' : '업로드 시작', 145 | 'multiimage.clearAll' : '모두 삭제', 146 | 'multiimage.insertAll' : '모두 삽입', 147 | 'multiimage.queueLimitExceeded' : '업로드 개수가 초과되었습니다.', 148 | 'multiimage.fileExceedsSizeLimit' : '업로드 크기가 초과되었습니다.', 149 | 'multiimage.zeroByteFile' : '파일 크기가 없습니다.', 150 | 'multiimage.invalidFiletype' : '올바른 이미지가 아닙니다.', 151 | 'multiimage.unknownError' : '알 수 없는 업로드 오류가 발생하였습니다.', 152 | 'multiimage.pending' : '처리 중 ...', 153 | 'multiimage.uploadError' : '업로드 오류', 154 | 'filemanager.emptyFolder' : '빈 폴더', 155 | 'filemanager.moveup' : '위로', 156 | 'filemanager.viewType' : '보기 방식: ', 157 | 'filemanager.viewImage' : '미리 보기', 158 | 'filemanager.listImage' : '목록', 159 | 'filemanager.orderType' : '정렬 방식: ', 160 | 'filemanager.fileName' : '이름별', 161 | 'filemanager.fileSize' : '크기별', 162 | 'filemanager.fileType' : '종류별', 163 | 'insertfile.url' : '주소', 164 | 'insertfile.title' : '제목', 165 | 'insertfile.upload' : '업로드', 166 | 'insertfile.viewServer' : '찾아보기', 167 | 'table.cells' : '열', 168 | 'table.rows' : '행', 169 | 'table.cols' : '열', 170 | 'table.size' : '표 크기', 171 | 'table.width' : '넓이', 172 | 'table.height' : '높이', 173 | 'table.percent' : '%', 174 | 'table.px' : 'px', 175 | 'table.space' : '간격', 176 | 'table.padding' : '안쪽여백', 177 | 'table.spacing' : '간격', 178 | 'table.align' : '정렬', 179 | 'table.textAlign' : '수직', 180 | 'table.verticalAlign' : '수평', 181 | 'table.alignDefault' : '기본', 182 | 'table.alignLeft' : '왼쪽', 183 | 'table.alignCenter' : '가운데', 184 | 'table.alignRight' : '오른쪽', 185 | 'table.alignTop' : '위쪽', 186 | 'table.alignMiddle' : '중간', 187 | 'table.alignBottom' : '아래쪽', 188 | 'table.alignBaseline' : '글자기준', 189 | 'table.border' : '테두리', 190 | 'table.borderWidth' : '크기', 191 | 'table.borderColor' : '색상', 192 | 'table.backgroundColor' : '배경', 193 | 'map.address' : '주소: ', 194 | 'map.search' : '검색', 195 | 'baidumap.address' : '주소: ', 196 | 'baidumap.search' : '검색', 197 | 'baidumap.insertDynamicMap' : '동적 지도', 198 | 'anchor.name' : '책갈피명', 199 | 'formatblock.formatBlock' : { 200 | h1 : '제목 1', 201 | h2 : '제목 2', 202 | h3 : '제목 3', 203 | h4 : '제목 4', 204 | p : '본문' 205 | }, 206 | 'fontname.fontName' : { 207 | 'Gulim' : '굴림', 208 | 'Dotum' : '돋움', 209 | 'Batang' : '바탕', 210 | 'Gungsuh' : '궁서', 211 | 'Malgun Gothic' : '맑은 고딕', 212 | 'Arial' : 'Arial', 213 | 'Arial Black' : 'Arial Black', 214 | 'Comic Sans MS' : 'Comic Sans MS', 215 | 'Courier New' : 'Courier New', 216 | 'Garamond' : 'Garamond', 217 | 'Georgia' : 'Georgia', 218 | 'Tahoma' : 'Tahoma', 219 | 'Times New Roman' : 'Times New Roman', 220 | 'Trebuchet MS' : 'Trebuchet MS', 221 | 'Verdana' : 'Verdana' 222 | }, 223 | 'lineheight.lineHeight' : [ 224 | {'1' : '행간 1'}, 225 | {'1.5' : '행간 1.5'}, 226 | {'2' : '행간 2'}, 227 | {'2.5' : '행간 2.5'}, 228 | {'3' : '행간 3'} 229 | ], 230 | 'template.selectTemplate' : '템플릿', 231 | 'template.replaceContent' : '내용 바꾸기', 232 | 'template.fileList' : { 233 | '1.html' : '이미지와 텍스트', 234 | '2.html' : '표', 235 | '3.html' : '목록' 236 | } 237 | }, 'ko'); 238 | -------------------------------------------------------------------------------- /public/kindeditor/lang/zh_CN.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.lang({ 11 | source : 'HTML代码', 12 | preview : '预览', 13 | undo : '后退(Ctrl+Z)', 14 | redo : '前进(Ctrl+Y)', 15 | cut : '剪切(Ctrl+X)', 16 | copy : '复制(Ctrl+C)', 17 | paste : '粘贴(Ctrl+V)', 18 | plainpaste : '粘贴为无格式文本', 19 | wordpaste : '从Word粘贴', 20 | selectall : '全选(Ctrl+A)', 21 | justifyleft : '左对齐', 22 | justifycenter : '居中', 23 | justifyright : '右对齐', 24 | justifyfull : '两端对齐', 25 | insertorderedlist : '编号', 26 | insertunorderedlist : '项目符号', 27 | indent : '增加缩进', 28 | outdent : '减少缩进', 29 | subscript : '下标', 30 | superscript : '上标', 31 | formatblock : '段落', 32 | fontname : '字体', 33 | fontsize : '文字大小', 34 | forecolor : '文字颜色', 35 | hilitecolor : '文字背景', 36 | bold : '粗体(Ctrl+B)', 37 | italic : '斜体(Ctrl+I)', 38 | underline : '下划线(Ctrl+U)', 39 | strikethrough : '删除线', 40 | removeformat : '删除格式', 41 | image : '图片', 42 | multiimage : '批量图片上传', 43 | flash : 'Flash', 44 | media : '视音频', 45 | table : '表格', 46 | tablecell : '单元格', 47 | hr : '插入横线', 48 | emoticons : '插入表情', 49 | link : '超级链接', 50 | unlink : '取消超级链接', 51 | fullscreen : '全屏显示', 52 | about : '关于', 53 | print : '打印(Ctrl+P)', 54 | filemanager : '文件空间', 55 | code : '插入程序代码', 56 | map : 'Google地图', 57 | baidumap : '百度地图', 58 | lineheight : '行距', 59 | clearhtml : '清理HTML代码', 60 | pagebreak : '插入分页符', 61 | quickformat : '一键排版', 62 | insertfile : '插入文件', 63 | template : '插入模板', 64 | anchor : '锚点', 65 | yes : '确定', 66 | no : '取消', 67 | close : '关闭', 68 | editImage : '图片属性', 69 | deleteImage : '删除图片', 70 | editFlash : 'Flash属性', 71 | deleteFlash : '删除Flash', 72 | editMedia : '视音频属性', 73 | deleteMedia : '删除视音频', 74 | editLink : '超级链接属性', 75 | deleteLink : '取消超级链接', 76 | editAnchor : '锚点属性', 77 | deleteAnchor : '删除锚点', 78 | tableprop : '表格属性', 79 | tablecellprop : '单元格属性', 80 | tableinsert : '插入表格', 81 | tabledelete : '删除表格', 82 | tablecolinsertleft : '左侧插入列', 83 | tablecolinsertright : '右侧插入列', 84 | tablerowinsertabove : '上方插入行', 85 | tablerowinsertbelow : '下方插入行', 86 | tablerowmerge : '向下合并单元格', 87 | tablecolmerge : '向右合并单元格', 88 | tablerowsplit : '拆分行', 89 | tablecolsplit : '拆分列', 90 | tablecoldelete : '删除列', 91 | tablerowdelete : '删除行', 92 | noColor : '无颜色', 93 | pleaseSelectFile : '请选择文件。', 94 | invalidImg : "请输入有效的URL地址。\n只允许jpg,gif,bmp,png格式。", 95 | invalidMedia : "请输入有效的URL地址。\n只允许swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb格式。", 96 | invalidWidth : "宽度必须为数字。", 97 | invalidHeight : "高度必须为数字。", 98 | invalidBorder : "边框必须为数字。", 99 | invalidUrl : "请输入有效的URL地址。", 100 | invalidRows : '行数为必选项,只允许输入大于0的数字。', 101 | invalidCols : '列数为必选项,只允许输入大于0的数字。', 102 | invalidPadding : '边距必须为数字。', 103 | invalidSpacing : '间距必须为数字。', 104 | invalidJson : '服务器发生故障。', 105 | uploadSuccess : '上传成功。', 106 | cutError : '您的浏览器安全设置不允许使用剪切操作,请使用快捷键(Ctrl+X)来完成。', 107 | copyError : '您的浏览器安全设置不允许使用复制操作,请使用快捷键(Ctrl+C)来完成。', 108 | pasteError : '您的浏览器安全设置不允许使用粘贴操作,请使用快捷键(Ctrl+V)来完成。', 109 | ajaxLoading : '加载中,请稍候 ...', 110 | uploadLoading : '上传中,请稍候 ...', 111 | uploadError : '上传错误', 112 | 'plainpaste.comment' : '请使用快捷键(Ctrl+V)把内容粘贴到下面的方框里。', 113 | 'wordpaste.comment' : '请使用快捷键(Ctrl+V)把内容粘贴到下面的方框里。', 114 | 'code.pleaseInput' : '请输入程序代码。', 115 | 'link.url' : 'URL', 116 | 'link.linkType' : '打开类型', 117 | 'link.newWindow' : '新窗口', 118 | 'link.selfWindow' : '当前窗口', 119 | 'flash.url' : 'URL', 120 | 'flash.width' : '宽度', 121 | 'flash.height' : '高度', 122 | 'flash.upload' : '上传', 123 | 'flash.viewServer' : '文件空间', 124 | 'media.url' : 'URL', 125 | 'media.width' : '宽度', 126 | 'media.height' : '高度', 127 | 'media.autostart' : '自动播放', 128 | 'media.upload' : '上传', 129 | 'media.viewServer' : '文件空间', 130 | 'image.remoteImage' : '网络图片', 131 | 'image.localImage' : '本地上传', 132 | 'image.remoteUrl' : '图片地址', 133 | 'image.localUrl' : '上传文件', 134 | 'image.size' : '图片大小', 135 | 'image.width' : '宽', 136 | 'image.height' : '高', 137 | 'image.resetSize' : '重置大小', 138 | 'image.align' : '对齐方式', 139 | 'image.defaultAlign' : '默认方式', 140 | 'image.leftAlign' : '左对齐', 141 | 'image.rightAlign' : '右对齐', 142 | 'image.imgTitle' : '图片说明', 143 | 'image.upload' : '浏览...', 144 | 'image.viewServer' : '图片空间', 145 | 'multiimage.uploadDesc' : '允许用户同时上传<%=uploadLimit%>张图片,单张图片容量不超过<%=sizeLimit%>', 146 | 'multiimage.startUpload' : '开始上传', 147 | 'multiimage.clearAll' : '全部清空', 148 | 'multiimage.insertAll' : '全部插入', 149 | 'multiimage.queueLimitExceeded' : '文件数量超过限制。', 150 | 'multiimage.fileExceedsSizeLimit' : '文件大小超过限制。', 151 | 'multiimage.zeroByteFile' : '无法上传空文件。', 152 | 'multiimage.invalidFiletype' : '文件类型不正确。', 153 | 'multiimage.unknownError' : '发生异常,无法上传。', 154 | 'multiimage.pending' : '等待上传', 155 | 'multiimage.uploadError' : '上传失败', 156 | 'filemanager.emptyFolder' : '空文件夹', 157 | 'filemanager.moveup' : '移到上一级文件夹', 158 | 'filemanager.viewType' : '显示方式:', 159 | 'filemanager.viewImage' : '缩略图', 160 | 'filemanager.listImage' : '详细信息', 161 | 'filemanager.orderType' : '排序方式:', 162 | 'filemanager.fileName' : '名称', 163 | 'filemanager.fileSize' : '大小', 164 | 'filemanager.fileType' : '类型', 165 | 'insertfile.url' : 'URL', 166 | 'insertfile.title' : '文件说明', 167 | 'insertfile.upload' : '上传', 168 | 'insertfile.viewServer' : '文件空间', 169 | 'table.cells' : '单元格数', 170 | 'table.rows' : '行数', 171 | 'table.cols' : '列数', 172 | 'table.size' : '大小', 173 | 'table.width' : '宽度', 174 | 'table.height' : '高度', 175 | 'table.percent' : '%', 176 | 'table.px' : 'px', 177 | 'table.space' : '边距间距', 178 | 'table.padding' : '边距', 179 | 'table.spacing' : '间距', 180 | 'table.align' : '对齐方式', 181 | 'table.textAlign' : '水平对齐', 182 | 'table.verticalAlign' : '垂直对齐', 183 | 'table.alignDefault' : '默认', 184 | 'table.alignLeft' : '左对齐', 185 | 'table.alignCenter' : '居中', 186 | 'table.alignRight' : '右对齐', 187 | 'table.alignTop' : '顶部', 188 | 'table.alignMiddle' : '中部', 189 | 'table.alignBottom' : '底部', 190 | 'table.alignBaseline' : '基线', 191 | 'table.border' : '边框', 192 | 'table.borderWidth' : '边框', 193 | 'table.borderColor' : '颜色', 194 | 'table.backgroundColor' : '背景颜色', 195 | 'map.address' : '地址: ', 196 | 'map.search' : '搜索', 197 | 'baidumap.address' : '地址: ', 198 | 'baidumap.search' : '搜索', 199 | 'baidumap.insertDynamicMap' : '插入动态地图', 200 | 'anchor.name' : '锚点名称', 201 | 'formatblock.formatBlock' : { 202 | h1 : '标题 1', 203 | h2 : '标题 2', 204 | h3 : '标题 3', 205 | h4 : '标题 4', 206 | p : '正 文' 207 | }, 208 | 'fontname.fontName' : { 209 | 'SimSun' : '宋体', 210 | 'NSimSun' : '新宋体', 211 | 'FangSong_GB2312' : '仿宋_GB2312', 212 | 'KaiTi_GB2312' : '楷体_GB2312', 213 | 'SimHei' : '黑体', 214 | 'Microsoft YaHei' : '微软雅黑', 215 | 'Arial' : 'Arial', 216 | 'Arial Black' : 'Arial Black', 217 | 'Times New Roman' : 'Times New Roman', 218 | 'Courier New' : 'Courier New', 219 | 'Tahoma' : 'Tahoma', 220 | 'Verdana' : 'Verdana' 221 | }, 222 | 'lineheight.lineHeight' : [ 223 | {'1' : '单倍行距'}, 224 | {'1.5' : '1.5倍行距'}, 225 | {'2' : '2倍行距'}, 226 | {'2.5' : '2.5倍行距'}, 227 | {'3' : '3倍行距'} 228 | ], 229 | 'template.selectTemplate' : '可选模板', 230 | 'template.replaceContent' : '替换当前内容', 231 | 'template.fileList' : { 232 | '1.html' : '图片和文字', 233 | '2.html' : '表格', 234 | '3.html' : '项目编号' 235 | } 236 | }, 'zh_CN'); 237 | -------------------------------------------------------------------------------- /public/kindeditor/lang/zh_TW.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.lang({ 11 | source : '原始碼', 12 | preview : '預覽', 13 | undo : '復原(Ctrl+Z)', 14 | redo : '重複(Ctrl+Y)', 15 | cut : '剪下(Ctrl+X)', 16 | copy : '複製(Ctrl+C)', 17 | paste : '貼上(Ctrl+V)', 18 | plainpaste : '貼為純文字格式', 19 | wordpaste : '自Word貼上', 20 | selectall : '全選(Ctrl+A)', 21 | justifyleft : '靠左對齊', 22 | justifycenter : '置中', 23 | justifyright : '靠右對齊', 24 | justifyfull : '左右對齊', 25 | insertorderedlist : '編號清單', 26 | insertunorderedlist : '項目清單', 27 | indent : '增加縮排', 28 | outdent : '減少縮排', 29 | subscript : '下標', 30 | superscript : '上標', 31 | formatblock : '標題', 32 | fontname : '字體', 33 | fontsize : '文字大小', 34 | forecolor : '文字顏色', 35 | hilitecolor : '背景顏色', 36 | bold : '粗體(Ctrl+B)', 37 | italic : '斜體(Ctrl+I)', 38 | underline : '底線(Ctrl+U)', 39 | strikethrough : '刪除線', 40 | removeformat : '清除格式', 41 | image : '影像', 42 | multiimage : '批量影像上傳', 43 | flash : 'Flash', 44 | media : '多媒體', 45 | table : '表格', 46 | hr : '插入水平線', 47 | emoticons : '插入表情', 48 | link : '超連結', 49 | unlink : '移除超連結', 50 | fullscreen : '最大化', 51 | about : '關於', 52 | print : '列印(Ctrl+P)', 53 | fileManager : '瀏覽伺服器', 54 | code : '插入程式代碼', 55 | map : 'Google地圖', 56 | baidumap : 'Baidu地圖', 57 | lineheight : '行距', 58 | clearhtml : '清理HTML代碼', 59 | pagebreak : '插入分頁符號', 60 | quickformat : '快速排版', 61 | insertfile : '插入文件', 62 | template : '插入樣板', 63 | anchor : '錨點', 64 | yes : '確定', 65 | no : '取消', 66 | close : '關閉', 67 | editImage : '影像屬性', 68 | deleteImage : '刪除影像', 69 | editFlash : 'Flash屬性', 70 | deleteFlash : '删除Flash', 71 | editMedia : '多媒體屬性', 72 | deleteMedia : '删除多媒體', 73 | editLink : '超連結屬性', 74 | deleteLink : '移除超連結', 75 | tableprop : '表格屬性', 76 | tablecellprop : '儲存格屬性', 77 | tableinsert : '插入表格', 78 | tabledelete : '刪除表格', 79 | tablecolinsertleft : '向左插入列', 80 | tablecolinsertright : '向右插入列', 81 | tablerowinsertabove : '向上插入欄', 82 | tablerowinsertbelow : '下方插入欄', 83 | tablerowmerge : '向下合併單元格', 84 | tablecolmerge : '向右合併單元格', 85 | tablerowsplit : '分割欄', 86 | tablecolsplit : '分割列', 87 | tablecoldelete : '删除列', 88 | tablerowdelete : '删除欄', 89 | noColor : '自動', 90 | pleaseSelectFile : '請選擇文件。', 91 | invalidImg : "請輸入有效的URL。\n只允許jpg,gif,bmp,png格式。", 92 | invalidMedia : "請輸入有效的URL。\n只允許swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb格式。", 93 | invalidWidth : "寬度必須是數字。", 94 | invalidHeight : "高度必須是數字。", 95 | invalidBorder : "邊框必須是數字。", 96 | invalidUrl : "請輸入有效的URL。", 97 | invalidRows : '欄數是必須輸入項目,只允許輸入大於0的數字。', 98 | invalidCols : '列數是必須輸入項目,只允許輸入大於0的數字。', 99 | invalidPadding : '內距必須是數字。', 100 | invalidSpacing : '間距必須是數字。', 101 | invalidBorder : '边框必须为数字。', 102 | pleaseInput : "請輸入內容。", 103 | invalidJson : '伺服器發生故障。', 104 | uploadSuccess : '上傳成功。', 105 | cutError : '您的瀏覽器安全設置不允許使用剪下操作,請使用快捷鍵(Ctrl+X)完成。', 106 | copyError : '您的瀏覽器安全設置不允許使用剪下操作,請使用快捷鍵(Ctrl+C)完成。', 107 | pasteError : '您的瀏覽器安全設置不允許使用剪下操作,請使用快捷鍵(Ctrl+V)完成。', 108 | ajaxLoading : '加載中,請稍候 ...', 109 | uploadLoading : '上傳中,請稍候 ...', 110 | uploadError : '上傳錯誤', 111 | 'plainpaste.comment' : '請使用快捷鍵(Ctrl+V)把內容貼到下方區域裡。', 112 | 'wordpaste.comment' : '請使用快捷鍵(Ctrl+V)把內容貼到下方區域裡。', 113 | 'code.pleaseInput' : 'Please input code.', 114 | 'link.url' : 'URL', 115 | 'link.linkType' : '打開類型', 116 | 'link.newWindow' : '新窗口', 117 | 'link.selfWindow' : '本頁窗口', 118 | 'flash.url' : 'URL', 119 | 'flash.width' : '寬度', 120 | 'flash.height' : '高度', 121 | 'flash.upload' : '上傳', 122 | 'flash.viewServer' : '瀏覽', 123 | 'media.url' : 'URL', 124 | 'media.width' : '寬度', 125 | 'media.height' : '高度', 126 | 'media.autostart' : '自動播放', 127 | 'media.upload' : '上傳', 128 | 'media.viewServer' : '瀏覽', 129 | 'image.remoteImage' : '網絡影像', 130 | 'image.localImage' : '上傳影像', 131 | 'image.remoteUrl' : '影像URL', 132 | 'image.localUrl' : '影像URL', 133 | 'image.size' : '影像大小', 134 | 'image.width' : '寬度', 135 | 'image.height' : '高度', 136 | 'image.resetSize' : '原始大小', 137 | 'image.align' : '對齊方式', 138 | 'image.defaultAlign' : '未設定', 139 | 'image.leftAlign' : '向左對齊', 140 | 'image.rightAlign' : '向右對齊', 141 | 'image.imgTitle' : '影像說明', 142 | 'image.upload' : '瀏覽...', 143 | 'image.viewServer' : '瀏覽...', 144 | 'multiimage.uploadDesc' : 'Allows users to upload <%=uploadLimit%> images, single image size not exceeding <%=sizeLimit%>', 145 | 'multiimage.startUpload' : 'Start upload', 146 | 'multiimage.clearAll' : 'Clear all', 147 | 'multiimage.insertAll' : 'Insert all', 148 | 'multiimage.queueLimitExceeded' : 'Queue limit exceeded.', 149 | 'multiimage.fileExceedsSizeLimit' : 'File exceeds size limit.', 150 | 'multiimage.zeroByteFile' : 'Zero byte file.', 151 | 'multiimage.invalidFiletype' : 'Invalid file type.', 152 | 'multiimage.unknownError' : 'Unknown upload error.', 153 | 'multiimage.pending' : 'Pending ...', 154 | 'multiimage.uploadError' : 'Upload error', 155 | 'filemanager.emptyFolder' : '空文件夾', 156 | 'filemanager.moveup' : '至上一級文件夾', 157 | 'filemanager.viewType' : '顯示方式:', 158 | 'filemanager.viewImage' : '縮略圖', 159 | 'filemanager.listImage' : '詳細信息', 160 | 'filemanager.orderType' : '排序方式:', 161 | 'filemanager.fileName' : '名稱', 162 | 'filemanager.fileSize' : '大小', 163 | 'filemanager.fileType' : '類型', 164 | 'insertfile.url' : 'URL', 165 | 'insertfile.title' : '文件說明', 166 | 'insertfile.upload' : '上傳', 167 | 'insertfile.viewServer' : '瀏覽', 168 | 'table.cells' : '儲存格數', 169 | 'table.rows' : '欄數', 170 | 'table.cols' : '列數', 171 | 'table.size' : '表格大小', 172 | 'table.width' : '寬度', 173 | 'table.height' : '高度', 174 | 'table.percent' : '%', 175 | 'table.px' : 'px', 176 | 'table.space' : '內距間距', 177 | 'table.padding' : '內距', 178 | 'table.spacing' : '間距', 179 | 'table.align' : '對齊方式', 180 | 'table.textAlign' : '水平對齊', 181 | 'table.verticalAlign' : '垂直對齊', 182 | 'table.alignDefault' : '未設定', 183 | 'table.alignLeft' : '向左對齊', 184 | 'table.alignCenter' : '置中', 185 | 'table.alignRight' : '向右對齊', 186 | 'table.alignTop' : '靠上', 187 | 'table.alignMiddle' : '置中', 188 | 'table.alignBottom' : '靠下', 189 | 'table.alignBaseline' : '基線', 190 | 'table.border' : '表格邊框', 191 | 'table.borderWidth' : '邊框', 192 | 'table.borderColor' : '顏色', 193 | 'table.backgroundColor' : '背景顏色', 194 | 'map.address' : '住所: ', 195 | 'map.search' : '尋找', 196 | 'baidumap.address' : '住所: ', 197 | 'baidumap.search' : '尋找', 198 | 'baidumap.insertDynamicMap' : '插入動態地圖', 199 | 'anchor.name' : '錨點名稱', 200 | 'formatblock.formatBlock' : { 201 | h1 : '標題 1', 202 | h2 : '標題 2', 203 | h3 : '標題 3', 204 | h4 : '標題 4', 205 | p : '一般' 206 | }, 207 | 'fontname.fontName' : { 208 | 'MingLiU' : '細明體', 209 | 'PMingLiU' : '新細明體', 210 | 'DFKai-SB' : '標楷體', 211 | 'SimSun' : '宋體', 212 | 'NSimSun' : '新宋體', 213 | 'FangSong' : '仿宋體', 214 | 'Arial' : 'Arial', 215 | 'Arial Black' : 'Arial Black', 216 | 'Times New Roman' : 'Times New Roman', 217 | 'Courier New' : 'Courier New', 218 | 'Tahoma' : 'Tahoma', 219 | 'Verdana' : 'Verdana' 220 | }, 221 | 'lineheight.lineHeight' : [ 222 | {'1' : '单倍行距'}, 223 | {'1.5' : '1.5倍行距'}, 224 | {'2' : '2倍行距'}, 225 | {'2.5' : '2.5倍行距'}, 226 | {'3' : '3倍行距'} 227 | ], 228 | 'template.selectTemplate' : '可選樣板', 229 | 'template.replaceContent' : '取代當前內容', 230 | 'template.fileList' : { 231 | '1.html' : '影像和文字', 232 | '2.html' : '表格', 233 | '3.html' : '项目清單' 234 | } 235 | }, 'zh_TW'); 236 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/anchor/anchor.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('anchor', function(K) { 11 | var self = this, name = 'anchor', lang = self.lang(name + '.'); 12 | self.plugin.anchor = { 13 | edit : function() { 14 | var html = ['
', 15 | '
', 16 | '', 17 | '', 18 | '
', 19 | '
'].join(''); 20 | var dialog = self.createDialog({ 21 | name : name, 22 | width : 300, 23 | title : self.lang(name), 24 | body : html, 25 | yesBtn : { 26 | name : self.lang('yes'), 27 | click : function(e) { 28 | self.insertHtml('').hideDialog().focus(); 29 | } 30 | } 31 | }); 32 | var div = dialog.div, 33 | nameBox = K('input[name="name"]', div); 34 | var img = self.plugin.getSelectedAnchor(); 35 | if (img) { 36 | nameBox.val(unescape(img.attr('data-ke-name'))); 37 | } 38 | nameBox[0].focus(); 39 | nameBox[0].select(); 40 | }, 41 | 'delete' : function() { 42 | self.plugin.getSelectedAnchor().remove(); 43 | } 44 | }; 45 | self.clickToolbar(name, self.plugin.anchor.edit); 46 | }); 47 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/autoheight/autoheight.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('autoheight', function(K) { 11 | var self = this; 12 | 13 | if (!self.autoHeightMode) { 14 | return; 15 | } 16 | 17 | var edit = self.edit; 18 | var body = edit.doc.body; 19 | var minHeight = K.removeUnit(self.height); 20 | 21 | edit.iframe[0].scroll = 'no'; 22 | body.style.overflowY = 'hidden'; 23 | 24 | edit.afterChange(function() { 25 | self.resize(null, Math.max((K.IE ? body.scrollHeight : body.offsetHeight) + 62, minHeight)); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/baidumap/baidumap.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | // Baidu Maps: http://dev.baidu.com/wiki/map/index.php?title=%E9%A6%96%E9%A1%B5 11 | 12 | KindEditor.plugin('baidumap', function(K) { 13 | var self = this, name = 'baidumap', lang = self.lang(name + '.'); 14 | var mapWidth = K.undef(self.mapWidth, 558); 15 | var mapHeight = K.undef(self.mapHeight, 360); 16 | self.clickToolbar(name, function() { 17 | var html = ['
', 18 | '
', 19 | // left start 20 | '
', 21 | lang.address + ' ', 22 | '', 23 | '', 24 | '', 25 | '
', 26 | // right start 27 | '
', 28 | ' ', 29 | '
', 30 | '
', 31 | '
', 32 | '
', 33 | '
'].join(''); 34 | var dialog = self.createDialog({ 35 | name : name, 36 | width : mapWidth + 42, 37 | title : self.lang(name), 38 | body : html, 39 | yesBtn : { 40 | name : self.lang('yes'), 41 | click : function(e) { 42 | var map = win.map; 43 | var centerObj = map.getCenter(); 44 | var center = centerObj.lng + ',' + centerObj.lat; 45 | var zoom = map.getZoom(); 46 | var url = [checkbox[0].checked ? self.pluginsPath + 'baidumap/index.html' : 'http://api.map.baidu.com/staticimage', 47 | '?center=' + encodeURIComponent(center), 48 | '&zoom=' + encodeURIComponent(zoom), 49 | '&width=' + mapWidth, 50 | '&height=' + mapHeight, 51 | '&markers=' + encodeURIComponent(center), 52 | '&markerStyles=' + encodeURIComponent('l,A')].join(''); 53 | if (checkbox[0].checked) { 54 | self.insertHtml(''); 55 | } else { 56 | self.exec('insertimage', url); 57 | } 58 | self.hideDialog().focus(); 59 | } 60 | }, 61 | beforeRemove : function() { 62 | searchBtn.remove(); 63 | if (doc) { 64 | doc.write(''); 65 | } 66 | iframe.remove(); 67 | } 68 | }); 69 | var div = dialog.div, 70 | addressBox = K('[name="address"]', div), 71 | searchBtn = K('[name="searchBtn"]', div), 72 | checkbox = K('[name="insertDynamicMap"]', dialog.div), 73 | win, doc; 74 | var iframe = K(''); 75 | function ready() { 76 | win = iframe[0].contentWindow; 77 | doc = K.iframeDoc(iframe); 78 | } 79 | iframe.bind('load', function() { 80 | iframe.unbind('load'); 81 | if (K.IE) { 82 | ready(); 83 | } else { 84 | setTimeout(ready, 0); 85 | } 86 | }); 87 | K('.ke-map', div).replaceWith(iframe); 88 | // search map 89 | searchBtn.click(function() { 90 | win.search(addressBox.val()); 91 | }); 92 | }); 93 | }); 94 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/baidumap/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 百度地图API自定义地图 8 | 9 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 83 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/baidumap/map.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Baidu Maps 6 | 10 | 11 | 39 | 40 | 41 |
42 | 43 | 44 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/clearhtml/clearhtml.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('clearhtml', function(K) { 11 | var self = this, name = 'clearhtml'; 12 | self.clickToolbar(name, function() { 13 | self.focus(); 14 | var html = self.html(); 15 | html = html.replace(/(]*>)([\s\S]*?)(<\/script>)/ig, ''); 16 | html = html.replace(/(]*>)([\s\S]*?)(<\/style>)/ig, ''); 17 | html = K.formatHtml(html, { 18 | a : ['href', 'target'], 19 | embed : ['src', 'width', 'height', 'type', 'loop', 'autostart', 'quality', '.width', '.height', 'align', 'allowscriptaccess'], 20 | img : ['src', 'width', 'height', 'border', 'alt', 'title', '.width', '.height'], 21 | table : ['border'], 22 | 'td,th' : ['rowspan', 'colspan'], 23 | 'div,hr,br,tbody,tr,p,ol,ul,li,blockquote,h1,h2,h3,h4,h5,h6' : [] 24 | }); 25 | self.html(html); 26 | self.cmd.selection(true); 27 | self.addBookmark(); 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/code/code.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | // google code prettify: http://google-code-prettify.googlecode.com/ 11 | // http://google-code-prettify.googlecode.com/ 12 | 13 | KindEditor.plugin('code', function(K) { 14 | var self = this, name = 'code'; 15 | self.clickToolbar(name, function() { 16 | var lang = self.lang(name + '.'), 17 | html = ['
', 18 | '
', 19 | '', 35 | '
', 36 | '', 37 | '
'].join(''), 38 | dialog = self.createDialog({ 39 | name : name, 40 | width : 450, 41 | title : self.lang(name), 42 | body : html, 43 | yesBtn : { 44 | name : self.lang('yes'), 45 | click : function(e) { 46 | var type = K('.ke-code-type', dialog.div).val(), 47 | code = textarea.val(), 48 | cls = type === '' ? '' : ' lang-' + type, 49 | html = '
\n' + K.escape(code) + '
'; 50 | if (K.trim(code) === '') { 51 | alert(lang.pleaseInput); 52 | textarea[0].focus(); 53 | return; 54 | } 55 | self.insertHtml(html).hideDialog().focus(); 56 | } 57 | } 58 | }), 59 | textarea = K('textarea', dialog.div); 60 | textarea[0].focus(); 61 | }); 62 | }); 63 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/code/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} 2 | 3 | pre.prettyprint { 4 | border: 0; 5 | border-left: 3px solid rgb(204, 204, 204); 6 | margin-left: 2em; 7 | padding: 0.5em; 8 | font-size: 110%; 9 | display: block; 10 | font-family: "Consolas", "Monaco", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; 11 | margin: 1em 0px; 12 | white-space: pre; 13 | } 14 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/emoticons.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('emoticons', function(K) { 11 | var self = this, name = 'emoticons', 12 | path = (self.emoticonsPath || self.pluginsPath + 'emoticons/images/'), 13 | allowPreview = self.allowPreviewEmoticons === undefined ? true : self.allowPreviewEmoticons, 14 | currentPageNum = 1; 15 | self.clickToolbar(name, function() { 16 | var rows = 5, cols = 9, total = 135, startNum = 0, 17 | cells = rows * cols, pages = Math.ceil(total / cells), 18 | colsHalf = Math.floor(cols / 2), 19 | wrapperDiv = K('
'), 20 | elements = [], 21 | menu = self.createMenu({ 22 | name : name, 23 | beforeRemove : function() { 24 | removeEvent(); 25 | } 26 | }); 27 | menu.div.append(wrapperDiv); 28 | var previewDiv, previewImg; 29 | if (allowPreview) { 30 | previewDiv = K('
').css('right', 0); 31 | previewImg = K(''); 32 | wrapperDiv.append(previewDiv); 33 | previewDiv.append(previewImg); 34 | } 35 | function bindCellEvent(cell, j, num) { 36 | if (previewDiv) { 37 | cell.mouseover(function() { 38 | if (j > colsHalf) { 39 | previewDiv.css('left', 0); 40 | previewDiv.css('right', ''); 41 | } else { 42 | previewDiv.css('left', ''); 43 | previewDiv.css('right', 0); 44 | } 45 | previewImg.attr('src', path + num + '.gif'); 46 | K(this).addClass('ke-on'); 47 | }); 48 | } else { 49 | cell.mouseover(function() { 50 | K(this).addClass('ke-on'); 51 | }); 52 | } 53 | cell.mouseout(function() { 54 | K(this).removeClass('ke-on'); 55 | }); 56 | cell.click(function(e) { 57 | self.insertHtml('').hideMenu().focus(); 58 | e.stop(); 59 | }); 60 | } 61 | function createEmoticonsTable(pageNum, parentDiv) { 62 | var table = document.createElement('table'); 63 | parentDiv.append(table); 64 | if (previewDiv) { 65 | K(table).mouseover(function() { 66 | previewDiv.show('block'); 67 | }); 68 | K(table).mouseout(function() { 69 | previewDiv.hide(); 70 | }); 71 | elements.push(K(table)); 72 | } 73 | table.className = 'ke-table'; 74 | table.cellPadding = 0; 75 | table.cellSpacing = 0; 76 | table.border = 0; 77 | var num = (pageNum - 1) * cells + startNum; 78 | for (var i = 0; i < rows; i++) { 79 | var row = table.insertRow(i); 80 | for (var j = 0; j < cols; j++) { 81 | var cell = K(row.insertCell(j)); 82 | cell.addClass('ke-cell'); 83 | bindCellEvent(cell, j, num); 84 | var span = K('') 85 | .css('background-position', '-' + (24 * num) + 'px 0px') 86 | .css('background-image', 'url(' + path + 'static.gif)'); 87 | cell.append(span); 88 | elements.push(cell); 89 | num++; 90 | } 91 | } 92 | return table; 93 | } 94 | var table = createEmoticonsTable(currentPageNum, wrapperDiv); 95 | function removeEvent() { 96 | K.each(elements, function() { 97 | this.unbind(); 98 | }); 99 | } 100 | var pageDiv; 101 | function bindPageEvent(el, pageNum) { 102 | el.click(function(e) { 103 | removeEvent(); 104 | table.parentNode.removeChild(table); 105 | pageDiv.remove(); 106 | table = createEmoticonsTable(pageNum, wrapperDiv); 107 | createPageTable(pageNum); 108 | currentPageNum = pageNum; 109 | e.stop(); 110 | }); 111 | } 112 | function createPageTable(currentPageNum) { 113 | pageDiv = K('
'); 114 | wrapperDiv.append(pageDiv); 115 | for (var pageNum = 1; pageNum <= pages; pageNum++) { 116 | if (currentPageNum !== pageNum) { 117 | var a = K('
[' + pageNum + ']'); 118 | bindPageEvent(a, pageNum); 119 | pageDiv.append(a); 120 | elements.push(a); 121 | } else { 122 | pageDiv.append(K('@[' + pageNum + ']')); 123 | } 124 | pageDiv.append(K('@ ')); 125 | } 126 | } 127 | createPageTable(currentPageNum); 128 | }); 129 | }); 130 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/0.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/1.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/10.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/100.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/100.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/101.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/101.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/102.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/102.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/103.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/103.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/104.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/104.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/105.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/105.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/106.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/106.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/107.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/107.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/108.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/108.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/109.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/109.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/11.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/110.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/110.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/111.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/111.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/112.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/112.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/113.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/113.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/114.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/114.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/115.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/115.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/116.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/116.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/117.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/117.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/118.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/118.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/119.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/119.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/12.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/120.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/120.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/121.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/121.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/122.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/122.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/123.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/123.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/124.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/124.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/125.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/125.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/126.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/126.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/127.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/127.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/128.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/128.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/129.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/129.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/13.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/130.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/130.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/131.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/131.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/132.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/132.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/133.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/133.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/134.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/134.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/14.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/15.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/16.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/17.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/18.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/19.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/2.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/20.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/21.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/22.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/23.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/24.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/25.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/26.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/27.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/28.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/29.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/3.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/30.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/31.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/32.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/33.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/34.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/35.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/36.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/37.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/38.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/39.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/4.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/40.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/41.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/42.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/43.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/44.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/45.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/46.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/47.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/48.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/49.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/5.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/50.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/51.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/52.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/53.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/54.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/55.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/56.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/57.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/58.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/59.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/6.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/60.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/61.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/62.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/63.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/64.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/65.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/66.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/67.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/68.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/69.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/7.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/70.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/71.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/72.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/72.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/73.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/73.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/74.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/74.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/75.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/75.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/76.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/76.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/77.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/77.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/78.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/78.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/79.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/79.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/8.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/80.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/80.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/81.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/81.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/82.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/82.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/83.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/83.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/84.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/84.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/85.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/85.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/86.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/86.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/87.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/87.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/88.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/88.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/89.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/89.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/9.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/90.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/90.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/91.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/91.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/92.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/92.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/93.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/93.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/94.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/94.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/95.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/95.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/96.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/96.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/97.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/97.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/98.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/98.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/99.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/99.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/emoticons/images/static.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/emoticons/images/static.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/filemanager/filemanager.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('filemanager', function(K) { 11 | var self = this, name = 'filemanager', 12 | fileManagerJson = K.undef(self.fileManagerJson, self.basePath + 'php/file_manager_json.php'), 13 | imgPath = self.pluginsPath + name + '/images/', 14 | lang = self.lang(name + '.'); 15 | function makeFileTitle(filename, filesize, datetime) { 16 | return filename + ' (' + Math.ceil(filesize / 1024) + 'KB, ' + datetime + ')'; 17 | } 18 | function bindTitle(el, data) { 19 | if (data.is_dir) { 20 | el.attr('title', data.filename); 21 | } else { 22 | el.attr('title', makeFileTitle(data.filename, data.filesize, data.datetime)); 23 | } 24 | } 25 | self.plugin.filemanagerDialog = function(options) { 26 | var width = K.undef(options.width, 650), 27 | height = K.undef(options.height, 510), 28 | dirName = K.undef(options.dirName, ''), 29 | viewType = K.undef(options.viewType, 'VIEW').toUpperCase(), // "LIST" or "VIEW" 30 | clickFn = options.clickFn; 31 | var html = [ 32 | '
', 33 | // header start 34 | '
', 35 | // left start 36 | '
', 37 | ' ', 38 | '' + lang.moveup + '', 39 | '
', 40 | // right start 41 | '
', 42 | lang.viewType + ' ', 46 | lang.orderType + ' ', 51 | '
', 52 | '
', 53 | '
', 54 | // body start 55 | '
', 56 | '
' 57 | ].join(''); 58 | var dialog = self.createDialog({ 59 | name : name, 60 | width : width, 61 | height : height, 62 | title : self.lang(name), 63 | body : html 64 | }), 65 | div = dialog.div, 66 | bodyDiv = K('.ke-plugin-filemanager-body', div), 67 | moveupImg = K('[name="moveupImg"]', div), 68 | moveupLink = K('[name="moveupLink"]', div), 69 | viewServerBtn = K('[name="viewServer"]', div), 70 | viewTypeBox = K('[name="viewType"]', div), 71 | orderTypeBox = K('[name="orderType"]', div); 72 | function reloadPage(path, order, func) { 73 | var param = 'path=' + path + '&order=' + order + '&dir=' + dirName; 74 | dialog.showLoading(self.lang('ajaxLoading')); 75 | K.ajax(K.addParam(fileManagerJson, param + '&' + new Date().getTime()), function(data) { 76 | dialog.hideLoading(); 77 | func(data); 78 | }); 79 | } 80 | var elList = []; 81 | function bindEvent(el, result, data, createFunc) { 82 | var fileUrl = K.formatUrl(result.current_url + data.filename, 'absolute'), 83 | dirPath = encodeURIComponent(result.current_dir_path + data.filename + '/'); 84 | if (data.is_dir) { 85 | el.click(function(e) { 86 | reloadPage(dirPath, orderTypeBox.val(), createFunc); 87 | }); 88 | } else if (data.is_photo) { 89 | el.click(function(e) { 90 | clickFn.call(this, fileUrl, data.filename); 91 | }); 92 | } else { 93 | el.click(function(e) { 94 | clickFn.call(this, fileUrl, data.filename); 95 | }); 96 | } 97 | elList.push(el); 98 | } 99 | function createCommon(result, createFunc) { 100 | // remove events 101 | K.each(elList, function() { 102 | this.unbind(); 103 | }); 104 | moveupLink.unbind(); 105 | viewTypeBox.unbind(); 106 | orderTypeBox.unbind(); 107 | // add events 108 | if (result.current_dir_path) { 109 | moveupLink.click(function(e) { 110 | reloadPage(result.moveup_dir_path, orderTypeBox.val(), createFunc); 111 | }); 112 | } 113 | function changeFunc() { 114 | if (viewTypeBox.val() == 'VIEW') { 115 | reloadPage(result.current_dir_path, orderTypeBox.val(), createView); 116 | } else { 117 | reloadPage(result.current_dir_path, orderTypeBox.val(), createList); 118 | } 119 | } 120 | viewTypeBox.change(changeFunc); 121 | orderTypeBox.change(changeFunc); 122 | bodyDiv.html(''); 123 | } 124 | function createList(result) { 125 | createCommon(result, createList); 126 | var table = document.createElement('table'); 127 | table.className = 'ke-table'; 128 | table.cellPadding = 0; 129 | table.cellSpacing = 0; 130 | table.border = 0; 131 | bodyDiv.append(table); 132 | var fileList = result.file_list; 133 | for (var i = 0, len = fileList.length; i < len; i++) { 134 | var data = fileList[i], row = K(table.insertRow(i)); 135 | row.mouseover(function(e) { 136 | K(this).addClass('ke-on'); 137 | }) 138 | .mouseout(function(e) { 139 | K(this).removeClass('ke-on'); 140 | }); 141 | var iconUrl = imgPath + (data.is_dir ? 'folder-16.gif' : 'file-16.gif'), 142 | img = K('' + data.filename + ''), 143 | cell0 = K(row[0].insertCell(0)).addClass('ke-cell ke-name').append(img).append(document.createTextNode(' ' + data.filename)); 144 | if (!data.is_dir || data.has_file) { 145 | row.css('cursor', 'pointer'); 146 | cell0.attr('title', data.filename); 147 | bindEvent(cell0, result, data, createList); 148 | } else { 149 | cell0.attr('title', lang.emptyFolder); 150 | } 151 | K(row[0].insertCell(1)).addClass('ke-cell ke-size').html(data.is_dir ? '-' : Math.ceil(data.filesize / 1024) + 'KB'); 152 | K(row[0].insertCell(2)).addClass('ke-cell ke-datetime').html(data.datetime); 153 | } 154 | } 155 | function createView(result) { 156 | createCommon(result, createView); 157 | var fileList = result.file_list; 158 | for (var i = 0, len = fileList.length; i < len; i++) { 159 | var data = fileList[i], 160 | div = K('
'); 161 | bodyDiv.append(div); 162 | var photoDiv = K('
') 163 | .mouseover(function(e) { 164 | K(this).addClass('ke-on'); 165 | }) 166 | .mouseout(function(e) { 167 | K(this).removeClass('ke-on'); 168 | }); 169 | div.append(photoDiv); 170 | var fileUrl = result.current_url + data.filename, 171 | iconUrl = data.is_dir ? imgPath + 'folder-64.gif' : (data.is_photo ? fileUrl : imgPath + 'file-64.gif'); 172 | var img = K('' + data.filename + ''); 173 | if (!data.is_dir || data.has_file) { 174 | photoDiv.css('cursor', 'pointer'); 175 | bindTitle(photoDiv, data); 176 | bindEvent(photoDiv, result, data, createView); 177 | } else { 178 | photoDiv.attr('title', lang.emptyFolder); 179 | } 180 | photoDiv.append(img); 181 | div.append('
' + data.filename + '
'); 182 | } 183 | } 184 | viewTypeBox.val(viewType); 185 | reloadPage('', orderTypeBox.val(), viewType == 'VIEW' ? createView : createList); 186 | return dialog; 187 | } 188 | 189 | }); 190 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/filemanager/images/file-16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/filemanager/images/file-16.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/filemanager/images/file-64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/filemanager/images/file-64.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/filemanager/images/folder-16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/filemanager/images/folder-16.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/filemanager/images/folder-64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/filemanager/images/folder-64.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/filemanager/images/go-up.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/filemanager/images/go-up.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/flash/flash.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('flash', function(K) { 11 | var self = this, name = 'flash', lang = self.lang(name + '.'), 12 | allowFlashUpload = K.undef(self.allowFlashUpload, true), 13 | allowFileManager = K.undef(self.allowFileManager, false), 14 | formatUploadUrl = K.undef(self.formatUploadUrl, true), 15 | extraParams = K.undef(self.extraFileUploadParams, {}), 16 | filePostName = K.undef(self.filePostName, 'imgFile'), 17 | uploadJson = K.undef(self.uploadJson, self.basePath + 'php/upload_json.php'); 18 | self.plugin.flash = { 19 | edit : function() { 20 | var html = [ 21 | '
', 22 | //url 23 | '
', 24 | '', 25 | '  ', 26 | '  ', 27 | '', 28 | '', 29 | '', 30 | '
', 31 | //width 32 | '
', 33 | '', 34 | ' ', 35 | '
', 36 | //height 37 | '
', 38 | '', 39 | ' ', 40 | '
', 41 | '
' 42 | ].join(''); 43 | var dialog = self.createDialog({ 44 | name : name, 45 | width : 450, 46 | title : self.lang(name), 47 | body : html, 48 | yesBtn : { 49 | name : self.lang('yes'), 50 | click : function(e) { 51 | var url = K.trim(urlBox.val()), 52 | width = widthBox.val(), 53 | height = heightBox.val(); 54 | if (url == 'http://' || K.invalidUrl(url)) { 55 | alert(self.lang('invalidUrl')); 56 | urlBox[0].focus(); 57 | return; 58 | } 59 | if (!/^\d*$/.test(width)) { 60 | alert(self.lang('invalidWidth')); 61 | widthBox[0].focus(); 62 | return; 63 | } 64 | if (!/^\d*$/.test(height)) { 65 | alert(self.lang('invalidHeight')); 66 | heightBox[0].focus(); 67 | return; 68 | } 69 | var html = K.mediaImg(self.themesPath + 'common/blank.gif', { 70 | src : url, 71 | type : K.mediaType('.swf'), 72 | width : width, 73 | height : height, 74 | quality : 'high' 75 | }); 76 | self.insertHtml(html).hideDialog().focus(); 77 | } 78 | } 79 | }), 80 | div = dialog.div, 81 | urlBox = K('[name="url"]', div), 82 | viewServerBtn = K('[name="viewServer"]', div), 83 | widthBox = K('[name="width"]', div), 84 | heightBox = K('[name="height"]', div); 85 | urlBox.val('http://'); 86 | 87 | if (allowFlashUpload) { 88 | var uploadbutton = K.uploadbutton({ 89 | button : K('.ke-upload-button', div)[0], 90 | fieldName : filePostName, 91 | extraParams : extraParams, 92 | url : K.addParam(uploadJson, 'dir=flash'), 93 | afterUpload : function(data) { 94 | dialog.hideLoading(); 95 | if (data.error === 0) { 96 | var url = data.url; 97 | if (formatUploadUrl) { 98 | url = K.formatUrl(url, 'absolute'); 99 | } 100 | urlBox.val(url); 101 | if (self.afterUpload) { 102 | self.afterUpload.call(self, url, data, name); 103 | } 104 | alert(self.lang('uploadSuccess')); 105 | } else { 106 | alert(data.message); 107 | } 108 | }, 109 | afterError : function(html) { 110 | dialog.hideLoading(); 111 | self.errorDialog(html); 112 | } 113 | }); 114 | uploadbutton.fileBox.change(function(e) { 115 | dialog.showLoading(self.lang('uploadLoading')); 116 | uploadbutton.submit(); 117 | }); 118 | } else { 119 | K('.ke-upload-button', div).hide(); 120 | } 121 | 122 | if (allowFileManager) { 123 | viewServerBtn.click(function(e) { 124 | self.loadPlugin('filemanager', function() { 125 | self.plugin.filemanagerDialog({ 126 | viewType : 'LIST', 127 | dirName : 'flash', 128 | clickFn : function(url, title) { 129 | if (self.dialogs.length > 1) { 130 | K('[name="url"]', div).val(url); 131 | if (self.afterSelectFile) { 132 | self.afterSelectFile.call(self, url); 133 | } 134 | self.hideDialog(); 135 | } 136 | } 137 | }); 138 | }); 139 | }); 140 | } else { 141 | viewServerBtn.hide(); 142 | } 143 | 144 | var img = self.plugin.getSelectedFlash(); 145 | if (img) { 146 | var attrs = K.mediaAttrs(img.attr('data-ke-tag')); 147 | urlBox.val(attrs.src); 148 | widthBox.val(K.removeUnit(img.css('width')) || attrs.width || 0); 149 | heightBox.val(K.removeUnit(img.css('height')) || attrs.height || 0); 150 | } 151 | urlBox[0].focus(); 152 | urlBox[0].select(); 153 | }, 154 | 'delete' : function() { 155 | self.plugin.getSelectedFlash().remove(); 156 | // [IE] 删除图片后立即点击图片按钮出错 157 | self.addBookmark(); 158 | } 159 | }; 160 | self.clickToolbar(name, self.plugin.flash.edit); 161 | }); 162 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/image/images/align_left.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/image/images/align_left.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/image/images/align_right.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/image/images/align_right.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/image/images/align_top.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/image/images/align_top.gif -------------------------------------------------------------------------------- /public/kindeditor/plugins/image/images/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/image/images/refresh.png -------------------------------------------------------------------------------- /public/kindeditor/plugins/insertfile/insertfile.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('insertfile', function(K) { 11 | var self = this, name = 'insertfile', 12 | allowFileUpload = K.undef(self.allowFileUpload, true), 13 | allowFileManager = K.undef(self.allowFileManager, false), 14 | formatUploadUrl = K.undef(self.formatUploadUrl, true), 15 | uploadJson = K.undef(self.uploadJson, self.basePath + 'php/upload_json.php'), 16 | extraParams = K.undef(self.extraFileUploadParams, {}), 17 | filePostName = K.undef(self.filePostName, 'imgFile'), 18 | lang = self.lang(name + '.'); 19 | self.plugin.fileDialog = function(options) { 20 | var fileUrl = K.undef(options.fileUrl, 'http://'), 21 | fileTitle = K.undef(options.fileTitle, ''), 22 | clickFn = options.clickFn; 23 | var html = [ 24 | '
', 25 | '
', 26 | '', 27 | '  ', 28 | '  ', 29 | '', 30 | '', 31 | '', 32 | '
', 33 | //title 34 | '
', 35 | '', 36 | '
', 37 | '
', 38 | //form end 39 | '', 40 | '' 41 | ].join(''); 42 | var dialog = self.createDialog({ 43 | name : name, 44 | width : 450, 45 | title : self.lang(name), 46 | body : html, 47 | yesBtn : { 48 | name : self.lang('yes'), 49 | click : function(e) { 50 | var url = K.trim(urlBox.val()), 51 | title = titleBox.val(); 52 | if (url == 'http://' || K.invalidUrl(url)) { 53 | alert(self.lang('invalidUrl')); 54 | urlBox[0].focus(); 55 | return; 56 | } 57 | if (K.trim(title) === '') { 58 | title = url; 59 | } 60 | clickFn.call(self, url, title); 61 | } 62 | } 63 | }), 64 | div = dialog.div; 65 | 66 | var urlBox = K('[name="url"]', div), 67 | viewServerBtn = K('[name="viewServer"]', div), 68 | titleBox = K('[name="title"]', div); 69 | 70 | if (allowFileUpload) { 71 | var uploadbutton = K.uploadbutton({ 72 | button : K('.ke-upload-button', div)[0], 73 | fieldName : filePostName, 74 | url : K.addParam(uploadJson, 'dir=file'), 75 | extraParams : extraParams, 76 | afterUpload : function(data) { 77 | dialog.hideLoading(); 78 | if (data.error === 0) { 79 | var url = data.url; 80 | if (formatUploadUrl) { 81 | url = K.formatUrl(url, 'absolute'); 82 | } 83 | urlBox.val(url); 84 | if (self.afterUpload) { 85 | self.afterUpload.call(self, url, data, name); 86 | } 87 | alert(self.lang('uploadSuccess')); 88 | } else { 89 | alert(data.message); 90 | } 91 | }, 92 | afterError : function(html) { 93 | dialog.hideLoading(); 94 | self.errorDialog(html); 95 | } 96 | }); 97 | uploadbutton.fileBox.change(function(e) { 98 | dialog.showLoading(self.lang('uploadLoading')); 99 | uploadbutton.submit(); 100 | }); 101 | } else { 102 | K('.ke-upload-button', div).hide(); 103 | } 104 | if (allowFileManager) { 105 | viewServerBtn.click(function(e) { 106 | self.loadPlugin('filemanager', function() { 107 | self.plugin.filemanagerDialog({ 108 | viewType : 'LIST', 109 | dirName : 'file', 110 | clickFn : function(url, title) { 111 | if (self.dialogs.length > 1) { 112 | K('[name="url"]', div).val(url); 113 | if (self.afterSelectFile) { 114 | self.afterSelectFile.call(self, url); 115 | } 116 | self.hideDialog(); 117 | } 118 | } 119 | }); 120 | }); 121 | }); 122 | } else { 123 | viewServerBtn.hide(); 124 | } 125 | urlBox.val(fileUrl); 126 | titleBox.val(fileTitle); 127 | urlBox[0].focus(); 128 | urlBox[0].select(); 129 | }; 130 | self.clickToolbar(name, function() { 131 | self.plugin.fileDialog({ 132 | clickFn : function(url, title) { 133 | var html = '' + title + ''; 134 | self.insertHtml(html).hideDialog().focus(); 135 | } 136 | }); 137 | }); 138 | }); 139 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/lineheight/lineheight.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('lineheight', function(K) { 11 | var self = this, name = 'lineheight', lang = self.lang(name + '.'); 12 | self.clickToolbar(name, function() { 13 | var curVal = '', commonNode = self.cmd.commonNode({'*' : '.line-height'}); 14 | if (commonNode) { 15 | curVal = commonNode.css('line-height'); 16 | } 17 | var menu = self.createMenu({ 18 | name : name, 19 | width : 150 20 | }); 21 | K.each(lang.lineHeight, function(i, row) { 22 | K.each(row, function(key, val) { 23 | menu.addItem({ 24 | title : val, 25 | checked : curVal === key, 26 | click : function() { 27 | self.cmd.toggle('', { 28 | span : '.line-height=' + key 29 | }); 30 | self.updateState(); 31 | self.addBookmark(); 32 | self.hideMenu(); 33 | } 34 | }); 35 | }); 36 | }); 37 | }); 38 | }); 39 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/link/link.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('link', function(K) { 11 | var self = this, name = 'link'; 12 | self.plugin.link = { 13 | edit : function() { 14 | var lang = self.lang(name + '.'), 15 | html = '
' + 16 | //url 17 | '
' + 18 | '' + 19 | '
' + 20 | //type 21 | '
' + 22 | '' + 23 | '' + 24 | '
' + 25 | '
', 26 | dialog = self.createDialog({ 27 | name : name, 28 | width : 450, 29 | title : self.lang(name), 30 | body : html, 31 | yesBtn : { 32 | name : self.lang('yes'), 33 | click : function(e) { 34 | var url = K.trim(urlBox.val()); 35 | if (url == 'http://' || K.invalidUrl(url)) { 36 | alert(self.lang('invalidUrl')); 37 | urlBox[0].focus(); 38 | return; 39 | } 40 | self.exec('createlink', url, typeBox.val()).hideDialog().focus(); 41 | } 42 | } 43 | }), 44 | div = dialog.div, 45 | urlBox = K('input[name="url"]', div), 46 | typeBox = K('select[name="type"]', div); 47 | urlBox.val('http://'); 48 | typeBox[0].options[0] = new Option(lang.newWindow, '_blank'); 49 | typeBox[0].options[1] = new Option(lang.selfWindow, ''); 50 | self.cmd.selection(); 51 | var a = self.plugin.getSelectedLink(); 52 | if (a) { 53 | self.cmd.range.selectNode(a[0]); 54 | self.cmd.select(); 55 | urlBox.val(a.attr('data-ke-src')); 56 | typeBox.val(a.attr('target')); 57 | } 58 | urlBox[0].focus(); 59 | urlBox[0].select(); 60 | }, 61 | 'delete' : function() { 62 | self.exec('unlink', null); 63 | } 64 | }; 65 | self.clickToolbar(name, self.plugin.link.edit); 66 | }); 67 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/map/map.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 10 | 11 | 53 | 54 | 55 |
56 | 57 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/map/map.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | // Google Maps: http://code.google.com/apis/maps/index.html 11 | 12 | KindEditor.plugin('map', function(K) { 13 | var self = this, name = 'map', lang = self.lang(name + '.'); 14 | self.clickToolbar(name, function() { 15 | var html = ['
', 16 | '
', 17 | lang.address + ' ', 18 | '', 19 | '', 20 | '', 21 | '
', 22 | '
', 23 | '
'].join(''); 24 | var dialog = self.createDialog({ 25 | name : name, 26 | width : 600, 27 | title : self.lang(name), 28 | body : html, 29 | yesBtn : { 30 | name : self.lang('yes'), 31 | click : function(e) { 32 | var geocoder = win.geocoder, 33 | map = win.map, 34 | center = map.getCenter().lat() + ',' + map.getCenter().lng(), 35 | zoom = map.getZoom(), 36 | maptype = map.getMapTypeId(), 37 | url = 'http://maps.googleapis.com/maps/api/staticmap'; 38 | url += '?center=' + encodeURIComponent(center); 39 | url += '&zoom=' + encodeURIComponent(zoom); 40 | url += '&size=558x360'; 41 | url += '&maptype=' + encodeURIComponent(maptype); 42 | url += '&markers=' + encodeURIComponent(center); 43 | url += '&language=' + self.langType; 44 | url += '&sensor=false'; 45 | self.exec('insertimage', url).hideDialog().focus(); 46 | } 47 | }, 48 | beforeRemove : function() { 49 | searchBtn.remove(); 50 | if (doc) { 51 | doc.write(''); 52 | } 53 | iframe.remove(); 54 | } 55 | }); 56 | var div = dialog.div, 57 | addressBox = K('[name="address"]', div), 58 | searchBtn = K('[name="searchBtn"]', div), 59 | win, doc; 60 | var iframeHtml = ['', 61 | '', 62 | '', 67 | '', 68 | '', 110 | '', 111 | '', 112 | '
', 113 | ''].join('\n'); 114 | // TODO:用doc.write(iframeHtml)方式加载时,在IE6上第一次加载报错,暂时使用src方式 115 | var iframe = K(''); 116 | function ready() { 117 | win = iframe[0].contentWindow; 118 | doc = K.iframeDoc(iframe); 119 | //doc.open(); 120 | //doc.write(iframeHtml); 121 | //doc.close(); 122 | } 123 | iframe.bind('load', function() { 124 | iframe.unbind('load'); 125 | if (K.IE) { 126 | ready(); 127 | } else { 128 | setTimeout(ready, 0); 129 | } 130 | }); 131 | K('.ke-map', div).replaceWith(iframe); 132 | // search map 133 | searchBtn.click(function() { 134 | win.search(addressBox.val()); 135 | }); 136 | }); 137 | }); 138 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/media/media.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('media', function(K) { 11 | var self = this, name = 'media', lang = self.lang(name + '.'), 12 | allowMediaUpload = K.undef(self.allowMediaUpload, true), 13 | allowFileManager = K.undef(self.allowFileManager, false), 14 | formatUploadUrl = K.undef(self.formatUploadUrl, true), 15 | extraParams = K.undef(self.extraFileUploadParams, {}), 16 | filePostName = K.undef(self.filePostName, 'imgFile'), 17 | uploadJson = K.undef(self.uploadJson, self.basePath + 'php/upload_json.php'); 18 | self.plugin.media = { 19 | edit : function() { 20 | var html = [ 21 | '
', 22 | //url 23 | '
', 24 | '', 25 | '  ', 26 | '  ', 27 | '', 28 | '', 29 | '', 30 | '
', 31 | //width 32 | '
', 33 | '', 34 | '', 35 | '
', 36 | //height 37 | '
', 38 | '', 39 | '', 40 | '
', 41 | //autostart 42 | '
', 43 | '', 44 | ' ', 45 | '
', 46 | '
' 47 | ].join(''); 48 | var dialog = self.createDialog({ 49 | name : name, 50 | width : 450, 51 | height : 230, 52 | title : self.lang(name), 53 | body : html, 54 | yesBtn : { 55 | name : self.lang('yes'), 56 | click : function(e) { 57 | var url = K.trim(urlBox.val()), 58 | width = widthBox.val(), 59 | height = heightBox.val(); 60 | if (url == 'http://' || K.invalidUrl(url)) { 61 | alert(self.lang('invalidUrl')); 62 | urlBox[0].focus(); 63 | return; 64 | } 65 | if (!/^\d*$/.test(width)) { 66 | alert(self.lang('invalidWidth')); 67 | widthBox[0].focus(); 68 | return; 69 | } 70 | if (!/^\d*$/.test(height)) { 71 | alert(self.lang('invalidHeight')); 72 | heightBox[0].focus(); 73 | return; 74 | } 75 | var html = K.mediaImg(self.themesPath + 'common/blank.gif', { 76 | src : url, 77 | type : K.mediaType(url), 78 | width : width, 79 | height : height, 80 | autostart : autostartBox[0].checked ? 'true' : 'false', 81 | loop : 'true' 82 | }); 83 | self.insertHtml(html).hideDialog().focus(); 84 | } 85 | } 86 | }), 87 | div = dialog.div, 88 | urlBox = K('[name="url"]', div), 89 | viewServerBtn = K('[name="viewServer"]', div), 90 | widthBox = K('[name="width"]', div), 91 | heightBox = K('[name="height"]', div), 92 | autostartBox = K('[name="autostart"]', div); 93 | urlBox.val('http://'); 94 | 95 | if (allowMediaUpload) { 96 | var uploadbutton = K.uploadbutton({ 97 | button : K('.ke-upload-button', div)[0], 98 | fieldName : filePostName, 99 | extraParams : extraParams, 100 | url : K.addParam(uploadJson, 'dir=media'), 101 | afterUpload : function(data) { 102 | dialog.hideLoading(); 103 | if (data.error === 0) { 104 | var url = data.url; 105 | if (formatUploadUrl) { 106 | url = K.formatUrl(url, 'absolute'); 107 | } 108 | urlBox.val(url); 109 | if (self.afterUpload) { 110 | self.afterUpload.call(self, url, data, name); 111 | } 112 | alert(self.lang('uploadSuccess')); 113 | } else { 114 | alert(data.message); 115 | } 116 | }, 117 | afterError : function(html) { 118 | dialog.hideLoading(); 119 | self.errorDialog(html); 120 | } 121 | }); 122 | uploadbutton.fileBox.change(function(e) { 123 | dialog.showLoading(self.lang('uploadLoading')); 124 | uploadbutton.submit(); 125 | }); 126 | } else { 127 | K('.ke-upload-button', div).hide(); 128 | } 129 | 130 | if (allowFileManager) { 131 | viewServerBtn.click(function(e) { 132 | self.loadPlugin('filemanager', function() { 133 | self.plugin.filemanagerDialog({ 134 | viewType : 'LIST', 135 | dirName : 'media', 136 | clickFn : function(url, title) { 137 | if (self.dialogs.length > 1) { 138 | K('[name="url"]', div).val(url); 139 | if (self.afterSelectFile) { 140 | self.afterSelectFile.call(self, url); 141 | } 142 | self.hideDialog(); 143 | } 144 | } 145 | }); 146 | }); 147 | }); 148 | } else { 149 | viewServerBtn.hide(); 150 | } 151 | 152 | var img = self.plugin.getSelectedMedia(); 153 | if (img) { 154 | var attrs = K.mediaAttrs(img.attr('data-ke-tag')); 155 | urlBox.val(attrs.src); 156 | widthBox.val(K.removeUnit(img.css('width')) || attrs.width || 0); 157 | heightBox.val(K.removeUnit(img.css('height')) || attrs.height || 0); 158 | autostartBox[0].checked = (attrs.autostart === 'true'); 159 | } 160 | urlBox[0].focus(); 161 | urlBox[0].select(); 162 | }, 163 | 'delete' : function() { 164 | self.plugin.getSelectedMedia().remove(); 165 | // [IE] 删除图片后立即点击图片按钮出错 166 | self.addBookmark(); 167 | } 168 | }; 169 | self.clickToolbar(name, self.plugin.media.edit); 170 | }); 171 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/multiimage/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/multiimage/images/image.png -------------------------------------------------------------------------------- /public/kindeditor/plugins/multiimage/images/select-files-en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/multiimage/images/select-files-en.png -------------------------------------------------------------------------------- /public/kindeditor/plugins/multiimage/images/select-files-zh_CN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/multiimage/images/select-files-zh_CN.png -------------------------------------------------------------------------------- /public/kindeditor/plugins/multiimage/images/swfupload.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/plugins/multiimage/images/swfupload.swf -------------------------------------------------------------------------------- /public/kindeditor/plugins/pagebreak/pagebreak.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('pagebreak', function(K) { 11 | var self = this; 12 | var name = 'pagebreak'; 13 | var pagebreakHtml = K.undef(self.pagebreakHtml, '
'); 14 | 15 | self.clickToolbar(name, function() { 16 | var cmd = self.cmd, range = cmd.range; 17 | self.focus(); 18 | range.enlarge(true); 19 | cmd.split(true); 20 | var tail = self.newlineTag == 'br' || K.WEBKIT ? '' : '

'; 21 | self.insertHtml(pagebreakHtml + tail); 22 | if (tail !== '') { 23 | var p = K('#__kindeditor_tail_tag__', self.edit.doc); 24 | range.selectNodeContents(p[0]); 25 | p.removeAttr('id'); 26 | cmd.select(); 27 | } 28 | }); 29 | }); 30 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/plainpaste/plainpaste.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('plainpaste', function(K) { 11 | var self = this, name = 'plainpaste'; 12 | self.clickToolbar(name, function() { 13 | var lang = self.lang(name + '.'), 14 | html = '
' + 15 | '
' + lang.comment + '
' + 16 | '' + 17 | '
', 18 | dialog = self.createDialog({ 19 | name : name, 20 | width : 450, 21 | title : self.lang(name), 22 | body : html, 23 | yesBtn : { 24 | name : self.lang('yes'), 25 | click : function(e) { 26 | var html = textarea.val(); 27 | html = K.escape(html); 28 | html = html.replace(/ {2}/g, '  '); 29 | if (self.newlineTag == 'p') { 30 | html = html.replace(/^/, '

').replace(/$/, '

').replace(/\n/g, '

'); 31 | } else { 32 | html = html.replace(/\n/g, '
$&'); 33 | } 34 | self.insertHtml(html).hideDialog().focus(); 35 | } 36 | } 37 | }), 38 | textarea = K('textarea', dialog.div); 39 | textarea[0].focus(); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/preview/preview.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('preview', function(K) { 11 | var self = this, name = 'preview', undefined; 12 | self.clickToolbar(name, function() { 13 | var lang = self.lang(name + '.'), 14 | html = '

' + 15 | '' + 16 | '
', 17 | dialog = self.createDialog({ 18 | name : name, 19 | width : 750, 20 | title : self.lang(name), 21 | body : html 22 | }), 23 | iframe = K('iframe', dialog.div), 24 | doc = K.iframeDoc(iframe); 25 | doc.open(); 26 | doc.write(self.fullHtml()); 27 | doc.close(); 28 | K(doc.body).css('background-color', '#FFF'); 29 | iframe[0].contentWindow.focus(); 30 | }); 31 | }); 32 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/quickformat/quickformat.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('quickformat', function(K) { 11 | var self = this, name = 'quickformat', 12 | blockMap = K.toMap('blockquote,center,div,h1,h2,h3,h4,h5,h6,p'); 13 | function getFirstChild(knode) { 14 | var child = knode.first(); 15 | while (child && child.first()) { 16 | child = child.first(); 17 | } 18 | return child; 19 | } 20 | self.clickToolbar(name, function() { 21 | self.focus(); 22 | var doc = self.edit.doc, 23 | range = self.cmd.range, 24 | child = K(doc.body).first(), next, 25 | nodeList = [], subList = [], 26 | bookmark = range.createBookmark(true); 27 | while(child) { 28 | next = child.next(); 29 | var firstChild = getFirstChild(child); 30 | if (!firstChild || firstChild.name != 'img') { 31 | if (blockMap[child.name]) { 32 | child.html(child.html().replace(/^(\s| | )+/ig, '')); 33 | child.css('text-indent', '2em'); 34 | } else { 35 | subList.push(child); 36 | } 37 | if (!next || (blockMap[next.name] || blockMap[child.name] && !blockMap[next.name])) { 38 | if (subList.length > 0) { 39 | nodeList.push(subList); 40 | } 41 | subList = []; 42 | } 43 | } 44 | child = next; 45 | } 46 | K.each(nodeList, function(i, subList) { 47 | var wrapper = K('

', doc); 48 | subList[0].before(wrapper); 49 | K.each(subList, function(i, knode) { 50 | wrapper.append(knode); 51 | }); 52 | }); 53 | range.moveToBookmark(bookmark); 54 | self.addBookmark(); 55 | }); 56 | }); 57 | 58 | /** 59 | -------------------------- 60 | abcd
61 | 1234
62 | 63 | to 64 | 65 |

66 | abcd
67 | 1234
68 |

69 | 70 | -------------------------- 71 | 72 |   abcd1233 73 |

1234

74 | 75 | to 76 | 77 |

abcd1233

78 |

1234

79 | 80 | -------------------------- 81 | */ -------------------------------------------------------------------------------- /public/kindeditor/plugins/template/html/1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

8 | 在此处输入标题 9 |

10 |

11 | 在此处输入内容 12 |

13 | 14 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/template/html/2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

8 | 标题 9 |

10 | 11 | 12 | 13 | 16 | 19 | 20 | 21 | 24 | 27 | 28 | 29 | 32 | 35 | 36 | 37 |
14 |

标题1

15 |
17 |

标题1

18 |
22 | 内容1 23 | 25 | 内容2 26 |
30 | 内容3 31 | 33 | 内容4 34 |
38 |

39 | 表格说明 40 |

41 | 42 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/template/html/3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |

8 | 在此处输入内容 9 |

10 |
    11 |
  1. 12 | 描述1 13 |
  2. 14 |
  3. 15 | 描述2 16 |
  4. 17 |
  5. 18 | 描述3 19 |
  6. 20 |
21 |

22 | 在此处输入内容 23 |

24 |
    25 |
  • 26 | 描述1 27 |
  • 28 |
  • 29 | 描述2 30 |
  • 31 |
  • 32 | 描述3 33 |
  • 34 |
35 | 36 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/template/template.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('template', function(K) { 11 | var self = this, name = 'template', lang = self.lang(name + '.'), 12 | htmlPath = self.pluginsPath + name + '/html/'; 13 | function getFilePath(fileName) { 14 | return htmlPath + fileName + '?ver=' + encodeURIComponent(K.DEBUG ? K.TIME : K.VERSION); 15 | } 16 | self.clickToolbar(name, function() { 17 | var lang = self.lang(name + '.'), 18 | arr = ['
', 19 | '
', 20 | // left start 21 | '
', 22 | lang. selectTemplate + '
', 28 | // right start 29 | '
', 30 | ' ', 31 | '
', 32 | '
', 33 | '
', 34 | '', 35 | '
'].join(''); 36 | var dialog = self.createDialog({ 37 | name : name, 38 | width : 500, 39 | title : self.lang(name), 40 | body : html, 41 | yesBtn : { 42 | name : self.lang('yes'), 43 | click : function(e) { 44 | var doc = K.iframeDoc(iframe); 45 | self[checkbox[0].checked ? 'html' : 'insertHtml'](doc.body.innerHTML).hideDialog().focus(); 46 | } 47 | } 48 | }); 49 | var selectBox = K('select', dialog.div), 50 | checkbox = K('[name="replaceFlag"]', dialog.div), 51 | iframe = K('iframe', dialog.div); 52 | checkbox[0].checked = true; 53 | iframe.attr('src', getFilePath(selectBox.val())); 54 | selectBox.change(function() { 55 | iframe.attr('src', getFilePath(this.value)); 56 | }); 57 | }); 58 | }); 59 | -------------------------------------------------------------------------------- /public/kindeditor/plugins/wordpaste/wordpaste.js: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * KindEditor - WYSIWYG HTML Editor for Internet 3 | * Copyright (C) 2006-2011 kindsoft.net 4 | * 5 | * @author Roddy 6 | * @site http://www.kindsoft.net/ 7 | * @licence http://www.kindsoft.net/license.php 8 | *******************************************************************************/ 9 | 10 | KindEditor.plugin('wordpaste', function(K) { 11 | var self = this, name = 'wordpaste'; 12 | self.clickToolbar(name, function() { 13 | var lang = self.lang(name + '.'), 14 | html = '
' + 15 | '
' + lang.comment + '
' + 16 | '' + 17 | '
', 18 | dialog = self.createDialog({ 19 | name : name, 20 | width : 450, 21 | title : self.lang(name), 22 | body : html, 23 | yesBtn : { 24 | name : self.lang('yes'), 25 | click : function(e) { 26 | var str = doc.body.innerHTML; 27 | str = K.clearMsWord(str, self.filterMode ? self.htmlTags : K.options.htmlTags); 28 | self.insertHtml(str).hideDialog().focus(); 29 | } 30 | } 31 | }), 32 | div = dialog.div, 33 | iframe = K('iframe', div), 34 | doc = K.iframeDoc(iframe); 35 | if (!K.IE) { 36 | doc.designMode = 'on'; 37 | } 38 | doc.open(); 39 | doc.write('WordPaste'); 40 | doc.write(''); 41 | if (!K.IE) { 42 | doc.write('
'); 43 | } 44 | doc.write(''); 45 | doc.close(); 46 | if (K.IE) { 47 | doc.body.contentEditable = 'true'; 48 | } 49 | iframe[0].contentWindow.focus(); 50 | }); 51 | }); 52 | -------------------------------------------------------------------------------- /public/kindeditor/themes/common/anchor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/themes/common/anchor.gif -------------------------------------------------------------------------------- /public/kindeditor/themes/common/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/themes/common/blank.gif -------------------------------------------------------------------------------- /public/kindeditor/themes/common/flash.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/themes/common/flash.gif -------------------------------------------------------------------------------- /public/kindeditor/themes/common/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/themes/common/loading.gif -------------------------------------------------------------------------------- /public/kindeditor/themes/common/media.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/themes/common/media.gif -------------------------------------------------------------------------------- /public/kindeditor/themes/common/rm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/themes/common/rm.gif -------------------------------------------------------------------------------- /public/kindeditor/themes/default/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/themes/default/background.png -------------------------------------------------------------------------------- /public/kindeditor/themes/default/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/themes/default/default.png -------------------------------------------------------------------------------- /public/kindeditor/themes/qq/editor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/seed-fe/blog/d1c513ceb979f5a1b57611a802d3e642c6731afa/public/kindeditor/themes/qq/editor.gif -------------------------------------------------------------------------------- /public/kindeditor/themes/qq/qq.css: -------------------------------------------------------------------------------- 1 | /* container */ 2 | .ke-container-qq { 3 | display: block; 4 | border: 1px solid #c3c3c3; 5 | background-color: #FFF; 6 | overflow: hidden; 7 | margin: 0; 8 | padding: 0; 9 | } 10 | /* toolbar */ 11 | .ke-container-qq .ke-toolbar { 12 | border-bottom: 1px solid #c3c3c3; 13 | background-color: #FFFFFF; 14 | padding: 2px 5px; 15 | text-align: left; 16 | overflow: hidden; 17 | zoom: 1; 18 | } 19 | .ke-toolbar-icon-url { 20 | background-image: url(editor.gif); 21 | width:18px; 22 | *xwidth:20px; 23 | height:18px; 24 | *xheight:20px; 25 | } 26 | .ke-icon-checked{ 27 | background-image: url(../default/default.png); 28 | width:16px; 29 | height:16px; 30 | } 31 | .ke-container-qq .ke-icon-bold{ 32 | background-position: 4px 1px; 33 | } 34 | .ke-container-qq .ke-icon-italic{ 35 | background-position: -27px 1px; 36 | } 37 | .ke-container-qq .ke-icon-italic{ 38 | background-position: -28px 1px; 39 | } 40 | .ke-container-qq .ke-icon-underline{ 41 | background-position: -60px 1px; 42 | } 43 | .ke-container-qq .ke-icon-fontname{ 44 | background-position: -95px 1px; 45 | } 46 | .ke-container-qq .ke-icon-fontsize{ 47 | background-position: -128px 1px; 48 | } 49 | .ke-container-qq .ke-icon-forecolor{ 50 | background-position: -159px 1px; 51 | } 52 | .ke-container-qq .ke-icon-hilitecolor{ 53 | background-position: -190px 1px; 54 | } 55 | .ke-container-qq .ke-icon-plug-align{ 56 | background-position: -223px 1px; 57 | } 58 | .plug-align-justifyleft{ 59 | background-position: -350px 1px; 60 | } 61 | .plug-align-justifycenter{ 62 | background-position: -382px 1px; 63 | } 64 | .plug-align-justifyright{ 65 | background-position: -414px 1px; 66 | } 67 | .plug-order-insertorderedlist{ 68 | background-position: -446px 1px; 69 | } 70 | .plug-order-insertunorderedlist{ 71 | background-position: -477px 1px; 72 | } 73 | .plug-indent-indent{ 74 | background-position: -513px 1px; 75 | } 76 | .plug-indent-outdent{ 77 | background-position: -545px 1px; 78 | } 79 | .ke-container-qq .ke-icon-plug-order{ 80 | background-position: -255px 1px; 81 | } 82 | .ke-container-qq .ke-icon-plug-indent{ 83 | background-position: -287px 1px; 84 | } 85 | .ke-container-qq .ke-icon-link{ 86 | background-position: -319px 1px; 87 | } 88 | 89 | .ke-container-qq .ke-toolbar .ke-outline { 90 | cursor: default; 91 | padding:0px; 92 | border:1px solid #fff; 93 | } 94 | .ke-container-qq .ke-toolbar .ke-on { 95 | border-left:1px solid white; 96 | border-top:1px solid white; 97 | border-right:1px solid gray; 98 | border-bottom:1px solid gray; 99 | background-color: #FFFFFF; 100 | } 101 | .ke-container-qq .ke-toolbar .ke-selected { 102 | border-left:1px solid gray; 103 | border-top:1px solid gray; 104 | border-right:1px solid white; 105 | border-bottom:1px solid white; 106 | background-color: #FFFFFF; 107 | } 108 | .ke-container-qq .ke-toolbar .ke-disabled { 109 | cursor: default; 110 | } 111 | 112 | .ke-colorpicker-qq{ 113 | background:#fff; 114 | } 115 | /* statusbar */ 116 | .ke-container-qq .ke-statusbar { 117 | display:none; 118 | } 119 | /* menu */ 120 | .ke-menu-qq { 121 | border:1px solid #a6a6a6; 122 | position:absolute; 123 | background:#fff; 124 | -moz-box-shadow:2px 2px 4px #DDDDDD; 125 | z-index:999; 126 | left:-400px; 127 | top:-386px; 128 | right:218px; 129 | width:130px; 130 | } 131 | .ke-menu-qq .ke-menu-item { 132 | padding:0px; 133 | background:#fff; 134 | } 135 | .ke-menu-qq .ke-menu-item-on { 136 | border:1px solid #000080;background:#FFEEC2;color:#036; 137 | } 138 | .ke-menu-qq .ke-toolbar .ke-selected { 139 | border:1px solid #9a9afb; 140 | } 141 | .ke-menu-qq .ke-menu-item-left{ 142 | width:auto; 143 | } 144 | -------------------------------------------------------------------------------- /public/kindeditor/themes/simple/simple.css: -------------------------------------------------------------------------------- 1 | /* container */ 2 | .ke-container-simple { 3 | display: block; 4 | border: 1px solid #CCC; 5 | background-color: #FFF; 6 | overflow: hidden; 7 | } 8 | /* toolbar */ 9 | .ke-container-simple .ke-toolbar { 10 | border-bottom: 1px solid #CCC; 11 | background-color: #FFF; 12 | padding: 2px 5px; 13 | overflow: hidden; 14 | } 15 | .ke-container-simple .ke-toolbar .ke-outline { 16 | border: 1px solid #FFF; 17 | background-color: transparent; 18 | margin: 1px; 19 | padding: 1px 2px; 20 | font-size: 0; 21 | line-height: 0; 22 | overflow: hidden; 23 | cursor: pointer; 24 | } 25 | .ke-container-simple .ke-toolbar .ke-on { 26 | border: 1px solid #5690D2; 27 | } 28 | .ke-container-simple .ke-toolbar .ke-selected { 29 | border: 1px solid #5690D2; 30 | background-color: #E9EFF6; 31 | } 32 | .ke-container-simple .ke-toolbar .ke-disabled { 33 | cursor: default; 34 | } 35 | /* statusbar */ 36 | .ke-container-simple .ke-statusbar { 37 | position: relative; 38 | background-color: #FFF; 39 | border-top: 1px solid #CCCCCC; 40 | font-size: 0; 41 | line-height: 0; 42 | *height: 12px; 43 | overflow: hidden; 44 | text-align: center; 45 | cursor: s-resize; 46 | } 47 | /* menu */ 48 | .ke-menu-simple { 49 | border: 1px solid #A0A0A0; 50 | background-color: #FFF; 51 | color: #222222; 52 | padding: 2px; 53 | font-family: "sans serif",tahoma,verdana,helvetica; 54 | font-size: 12px; 55 | text-align: left; 56 | overflow: hidden; 57 | } 58 | .ke-menu-simple .ke-menu-item { 59 | border: 1px solid #FFF; 60 | background-color: #FFF; 61 | color: #222222; 62 | height: 24px; 63 | overflow: hidden; 64 | cursor: pointer; 65 | } 66 | .ke-menu-simple .ke-menu-item-on { 67 | border: 1px solid #5690D2; 68 | background-color: #FFF; 69 | } 70 | /* colorpicker */ 71 | .ke-colorpicker-simple { 72 | border: 1px solid #A0A0A0; 73 | background-color: #FEFEFE; 74 | color: #222222; 75 | padding: 2px; 76 | } 77 | .ke-colorpicker-simple .ke-colorpicker-cell { 78 | font-size: 0; 79 | line-height: 0; 80 | border: 1px solid #FEFEFE; 81 | cursor: pointer; 82 | margin:3px; 83 | padding:0; 84 | } 85 | .ke-colorpicker-simple .ke-colorpicker-cell-top { 86 | font-family: "sans serif",tahoma,verdana,helvetica; 87 | font-size: 12px; 88 | line-height: 24px; 89 | border: 1px solid #FEFEFE; 90 | cursor: pointer; 91 | margin:0; 92 | padding:0; 93 | text-align: center; 94 | } 95 | .ke-colorpicker-simple .ke-colorpicker-cell-on { 96 | border: 1px solid #5690D2; 97 | } 98 | .ke-colorpicker-simple .ke-colorpicker-cell-selected { 99 | border: 1px solid #2446AB; 100 | } 101 | -------------------------------------------------------------------------------- /public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | /* html相对定位,让footer相对html绝对定位 */ 2 | html{min-height: 100%; position: relative;} 3 | body{ 4 | padding-top: 70px; 5 | padding-bottom: 40px; 6 | background-color: #f9f9f9; 7 | color: #555; 8 | } 9 | h1, .h1, 10 | h2, .h2, 11 | h3, .h3, 12 | h4, .h4, 13 | h5, .h5, 14 | h6, .h6 { 15 | margin-top: 0; 16 | font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; 17 | font-weight: normal; 18 | color: #333; 19 | } 20 | /* 21 | * Override Bootstrap's default container. 22 | */ 23 | 24 | @media (min-width: 1200px) { 25 | .container { 26 | width: 970px; 27 | } 28 | } 29 | .container{ 30 | margin-bottom: 132px; 31 | } 32 | /* 注册登录页部分样式 */ 33 | /* 让jumbotron部分的背景色和整体一致 */ 34 | .jumbotron{background-color: inherit;} 35 | 36 | /* 让注册页选项卡居中 */ 37 | .nav-tabs{width: 124px; margin:0 auto;} 38 | 39 | .form-signin { 40 | max-width: 330px; 41 | padding: 15px; 42 | margin: 0 auto; 43 | } 44 | .form-signin .form-control { 45 | position: relative; 46 | height: auto; 47 | -webkit-box-sizing: border-box; 48 | -moz-box-sizing: border-box; 49 | box-sizing: border-box; 50 | padding: 10px; 51 | font-size: 16px; 52 | } 53 | .form-signin .form-control:focus { 54 | z-index: 2; 55 | } 56 | /* 覆盖bootstrap.css默认的form-group类的15px margin-bottom */ 57 | .form-signin .form-group{ 58 | margin-bottom: 0px; 59 | } 60 | /* 用负的margin让注册/登录页表单贴在一起,去掉重叠部分的圆角 */ 61 | .form-signin input[type="text"]{ 62 | margin-bottom: -1px; 63 | border-bottom-right-radius: 0; 64 | border-bottom-left-radius: 0; 65 | } 66 | .form-signin input[type="email"] { 67 | margin-bottom: -1px; 68 | border-radius: 0; 69 | } 70 | /* id选择器作为关键选择器的时候不要增加标签名了,因为id是唯一的,增加标签只会减缓匹配过程,除非需要动态改变元素class,并且这个class还同时应用在其他一些元素上 */ 71 | #regpassword { 72 | margin-bottom: -1px; 73 | border-radius: 0; 74 | } 75 | #regpasswordagain { 76 | border-top-left-radius: 0; 77 | border-top-right-radius: 0; 78 | } 79 | #loginpassword{ 80 | border-top-left-radius: 0; 81 | border-top-right-radius: 0; 82 | } 83 | /* 表单整体大小高度固定 */ 84 | .tab-content{ 85 | height: 262px 86 | } 87 | /* .error label和.form-control-feedback的中心对齐 */ 88 | /* 错误信息label绝对定位,前提条件是加了has-feedback类的包裹div已经在bootstrap.css里相对定位了 */ 89 | .error{ 90 | position: absolute; 91 | right: 30px; 92 | top: 12px; 93 | color: #c33; 94 | } 95 | /* 这里用到了element1~element2这一CSS3选择器,选择前面有element1的每个element2元素,比直接选择.form-control-feedback的优先级要高 */ 96 | .has-feedback label.sr-only ~ .form-control-feedback{ 97 | top: 5px; 98 | } 99 | /* 导航条部分样式 */ 100 | /* 导航条背景色, rgba的a代表透明度,从0.0到1.0对应全透明到全不透明 */ 101 | .navbar{ 102 | background: rgba(0, 0, 0, 0) linear-gradient(to bottom, #086ed5, #055db5) repeat scroll 0 0; 103 | } 104 | /* 覆盖导航项a元素在hover和focus状态下的背景色和字体色 */ 105 | .navbar-brand:hover, 106 | .navbar-brand:focus, 107 | .nav > li > a:hover, 108 | .nav > li > a:focus{ 109 | /*继承.navbar的背景色,覆盖bootstrap的设置*/ 110 | background-color: inherit; 111 | /*白色相对灰色突出*/ 112 | color: #fff; 113 | } 114 | /* 导航条内字体颜色 */ 115 | .navbar-nav > li > a { 116 | /*更浅的灰色,在蓝色背景下相对深灰色更突出*/ 117 | color: #cdddeb; 118 | } 119 | .navbar-brand{color: #cdddeb;} 120 | /* active类的字体颜色为白色,背景色为更深的蓝色,以突出选中的导航项 */ 121 | .navbar-nav > .active > a, .navbar-nav > .active > a:hover, .navbar-nav > .active > a:focus { 122 | /*参考了知乎*/ 123 | background-color: #259; 124 | } 125 | /* 导航条上显示用户名的部分 */ 126 | #nav_username{font-style: italic; font-weight: bold;} 127 | /* 导航条按钮,由于去掉了导航条的navbar-default 类,这里要自己设置导航条按钮的样式,参照导航条部分其他链接的配色来设置 */ 128 | .navbar-toggle{border-color: #cdddeb;} 129 | .navbar-toggle .icon-bar{background-color: #cdddeb;} 130 | .navbar-toggle:hover, 131 | .navbar-toggle:focus{ 132 | background-color: #259; 133 | } 134 | 135 | /* 文章显示部分样式 */ 136 | /* 137 | * Main column and sidebar layout 138 | */ 139 | 140 | .blog-main { 141 | font-size: 15px; 142 | line-height: 1.5; 143 | } 144 | /* 145 | * Blog posts 146 | */ 147 | 148 | .blog-post { 149 | margin-bottom: 60px; 150 | } 151 | .blog-post-title { 152 | margin-bottom: 5px; 153 | font-size: 30px; 154 | } 155 | .blog-post-meta { 156 | margin-bottom: 20px; 157 | color: #999; 158 | font-size: 14px; 159 | } 160 | .blog-post .post-main{ 161 | /*height为line-height的整数倍,做到整行显示*/ 162 | height: 200px; 163 | line-height: 25px; 164 | /*超出高度部分隐藏*/ 165 | overflow-y: hidden; 166 | margin-bottom: 10px; 167 | } 168 | .comment{padding-left:4em;} 169 | /* 文章下的省略号 */ 170 | .blog-post .elli{font-size: 20px;} 171 | 172 | /* 发表、编辑和评论表单部分的样式 */ 173 | /* 让输入标签的控件内联 */ 174 | .label-tags{ 175 | /*设为块级元素显示,后面的浮动元素会换行,否则label是内联元素,后面的浮动元素会跑到同一行来*/ 176 | display: block; 177 | } 178 | .form-group .tags{ 179 | /*让三个输入框在同一行排列*/ 180 | float: left; 181 | width: 33.333%; 182 | margin-bottom: 5px; 183 | } 184 | /* 边栏部分样式 */ 185 | /* Sidebar modules for boxing content */ 186 | .sidebar-module { 187 | padding: 15px; 188 | margin: 0 -15px 15px; 189 | } 190 | .sidebar-module-inset { 191 | padding: 15px; 192 | background-color: #f5f5f5; 193 | border-radius: 4px; 194 | } 195 | .sidebar-module-inset p:last-child, 196 | .sidebar-module-inset ul:last-child, 197 | .sidebar-module-inset ol:last-child { 198 | margin-bottom: 0; 199 | } 200 | #sidebar-archive, #sidebar-tags{width: 83px; float: left;} 201 | 202 | /* Pagination */ 203 | .pager { 204 | margin-bottom: 60px; 205 | text-align: left; 206 | } 207 | .pager > li > a { 208 | width: 140px; 209 | padding: 10px 20px; 210 | text-align: center; 211 | border-radius: 30px; 212 | } 213 | /* 214 | * Footer 215 | */ 216 | 217 | .blog-footer { 218 | position: absolute; 219 | bottom: 0; 220 | width: 100%; 221 | padding: 40px 0; 222 | color: #999; 223 | text-align: center; 224 | background-color: #f9f9f9; 225 | border-top: 1px solid #e5e5e5; 226 | } 227 | .blog-footer p:last-child { 228 | margin-bottom: 0; 229 | } -------------------------------------------------------------------------------- /settings.js: -------------------------------------------------------------------------------- 1 | // settings.js保存该博客工程的配置信息,比如数据库的连接信息 2 | module.exports = { 3 | // 用于Cookie加密与数据库无关,留作后用 4 | cookieSecret: 'myblog', 5 | // 数据库名称、地址和端口号 6 | /*db: 'blog', 7 | host: 'localhost', 8 | port: 27017*/ 9 | // 用于部署的修改 10 | url: 'mongodb://seed-fe:qinfennuli123@ds135577.mlab.com:35577/bootstrap-blog' 11 | }; -------------------------------------------------------------------------------- /views/404.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Blog 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /views/archive.ejs: -------------------------------------------------------------------------------- 1 | <%- include header %> 2 | <%- include nav %> 3 |
4 | <%- include flash %> 5 |
6 | 10 |
11 |
12 |
13 |
    14 | <% var lastYear = 0 %> 15 | <% posts.forEach(function (post, index) { %> 16 | <%# 列出每篇文章,如果年份相同就不重复显示年份,即没有年份这个li,如果年份不同就显示年份这个li #%> 17 | <% if (lastYear != post.time.year) { %> 18 |
  • <%= post.time.year %>

  • 19 | <% lastYear=post.time.year } %> 20 |
  • 21 |
  • <%= post.title %>
  • 22 | <% }) %> 23 |
24 | 25 |
26 |
27 | <%- include sidebar_about%> 28 | <%- include sidebar_tags %> 29 |
30 | 31 |
32 | 33 |
34 | 35 | <%- include footer %> -------------------------------------------------------------------------------- /views/article.ejs: -------------------------------------------------------------------------------- 1 | <%- include header %> 2 | <%- include nav %> 3 |
4 |
5 | 10 |
11 | <%- include flash %> 12 |
13 |
14 |
15 |

<%= post.title %>

16 |

17 | <%#user存在代表用户登录,user.name == post.name代表登录的用户正是发布这篇文章的用户,两者同时满足时才能进行编辑和删除操作#%> 18 | <% if (user && (user.name == post.name)) { %> 19 | 编辑 20 | 删除 21 | <% } %> 22 |

23 | 35 |

<%- post.post %>

36 | 37 | <%- include comment%> 38 |
39 | 40 |
41 |
42 | <%- include sidebar_about %> 43 | <%- include sidebar_archive %> 44 | <%- include sidebar_tags %> 45 |
46 | 47 |
48 | 49 |
50 | <%- include footer %> -------------------------------------------------------------------------------- /views/comment.ejs: -------------------------------------------------------------------------------- 1 | <% if(post.comments){ %> 2 | <% post.comments.forEach(function (comment, index) { %> 3 |
4 |

<%= comment.name %> 5 |

6 |

<%- comment.content %>

7 |
8 | <% }) %> 9 | <% } %> 10 |
11 | <% if (user) { %> 12 |
13 | 14 | 15 |
16 |
17 | 18 | 19 | (不会公开) 20 |
21 |
22 | 23 | 24 |
25 | <% } else { %> 26 |
27 | 28 | 29 |
30 |
31 | 32 | 33 | (不会公开) 34 |
35 |
36 | 37 | 38 |
39 | <% } %> 40 |
41 | 42 | 43 | 44 |
45 | 46 |
-------------------------------------------------------------------------------- /views/edit.ejs: -------------------------------------------------------------------------------- 1 | <%- include header %> 2 | <%- include nav %> 3 |
4 | <%- include flash %> 5 |
6 | 11 |
12 |
13 |
14 |
15 |
16 |
17 | 18 | 19 |
20 |
21 | 22 | 23 |
24 |
25 | 26 | 27 |
28 | 29 |
30 |
31 | 32 |
33 |
34 | <%- include sidebar_about %> 35 | <%- include sidebar_archive %> 36 | <%- include sidebar_tags %> 37 |
38 | 39 |
40 | 41 |
42 | 43 | <%- include footer %> -------------------------------------------------------------------------------- /views/flash.ejs: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | <% if (success) { %> 5 | 9 | <% } %> 10 | <% if (error) { %> 11 | 15 | <% } %> 16 |
17 |
18 |
-------------------------------------------------------------------------------- /views/footer.ejs: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /views/header.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 13 | 14 | <%= title%> 15 | 16 | 17 | 18 | 20 | 21 | 36 | 37 | -------------------------------------------------------------------------------- /views/index.ejs: -------------------------------------------------------------------------------- 1 | <%- include header %> 2 | <%- include nav %> 3 |
4 | <%- include flash %> 5 |
6 | 9 |
10 |
11 |
12 |
13 | <% posts.forEach(function (post, index) { %> 14 |
15 |

<%= post.title %>

16 | 29 | 30 |
<%- post.post %>
31 |

...

32 | 阅读全文 33 | 34 |
35 | <% }) %> 36 |
37 | <%- include paging %> 38 | 39 |
40 |
41 | <%- include sidebar_about %> 42 | <%- include sidebar_archive %> 43 | <%- include sidebar_tags %> 44 |
45 | 46 |
47 | 48 |
49 | <%- include footer %> -------------------------------------------------------------------------------- /views/links.ejs: -------------------------------------------------------------------------------- 1 | <%- include header %> 2 | <% if (user) { %> 3 | <%- include nav %> 4 | <% } %> 5 |
6 |
7 | 11 |
12 |
13 |
14 | 18 | 19 |
20 |
21 | <%- include sidebar_about %> 22 | <% if (user) { %> 23 | <%- include sidebar_archive %> 24 | <%- include sidebar_tags %> 25 | <% } %> 26 |
27 | 28 |
29 | 30 |
31 | 32 | <%- include footer %> -------------------------------------------------------------------------------- /views/main.ejs: -------------------------------------------------------------------------------- 1 | <%- include header%> 2 |
3 |
4 |

N-blog

5 |

a blog system demo for learning node.js, express, mongodb, bootstrap, jquery, etc.

6 |
7 |
8 | 9 |
10 | 14 |
15 |
16 | 35 |
36 |
37 | 48 |
49 |
50 |
51 | <%- include footer %> 52 | -------------------------------------------------------------------------------- /views/nav.ejs: -------------------------------------------------------------------------------- 1 |
2 | 41 |
42 | -------------------------------------------------------------------------------- /views/paging.ejs: -------------------------------------------------------------------------------- 1 |
2 | -------------------------------------------------------------------------------- /views/post.ejs: -------------------------------------------------------------------------------- 1 | <%- include header %> 2 | <%- include nav %> 3 |
4 | <%- include flash %> 5 |
6 | 11 |
12 |
13 |
14 |
15 |
16 | 17 | 18 |
19 |
20 | 21 | 22 |
23 |
24 | 25 | 26 |
27 | 28 |
29 | 30 |
31 |
32 | <%- include sidebar_about %> 33 | <%- include sidebar_archive %> 34 | <%- include sidebar_tags %> 35 |
36 | 37 |
38 | 39 |
40 | <%- include footer %> -------------------------------------------------------------------------------- /views/search.ejs: -------------------------------------------------------------------------------- 1 | <%- include header %> 2 | <%- include nav %> 3 |
4 | <%- include flash %> 5 |
6 | 10 |
11 |
12 |
13 |
    14 | <% var lastYear = 0 %> 15 | <% posts.forEach(function (post, index) { %> 16 | <% if(lastYear != post.time.year) { %> 17 |
  • <%= post.time.year %>

  • 18 | <% lastYear = post.time.year } %> 19 |
  • 20 |
  • <%= post.title %>
  • 21 | <% }) %> 22 |
23 | 24 |
25 |
26 | <%- include sidebar_about%> 27 | <%- include sidebar_tags %> 28 |
29 | 30 |
31 | 32 |
33 | <%- include footer %> -------------------------------------------------------------------------------- /views/sidebar_about.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /views/sidebar_archive.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /views/sidebar_tags.ejs: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /views/tag.ejs: -------------------------------------------------------------------------------- 1 | <%- include header %> 2 | <%- include nav %> 3 |
4 | <%- include flash %> 5 |
6 | 11 |
12 |
13 |
14 |
    15 | <% var lastYear = 0 %> 16 | <% posts.forEach(function (post, index) { %> 17 | <% if (lastYear != post.time.year) { %> 18 |
  • <%= post.time.year %>

  • 19 | <% lastYear = post.time.year } %> 20 |
  • 21 |
  • <%= post.title %>
  • 22 | <% }) %> 23 |
24 | 25 |
26 |
27 | <%- include sidebar_about %> 28 | <%- include sidebar_archive %> 29 | <%- include sidebar_tags %> 30 |
31 | 32 |
33 | 34 |
35 | <%- include footer %> -------------------------------------------------------------------------------- /views/tags.ejs: -------------------------------------------------------------------------------- 1 | <%- include header %> 2 | <%- include nav %> 3 |
4 | <%- include flash %> 5 |
6 | 10 |
11 |
12 |
13 | <% posts.forEach(function (tag, index) { %> 14 | <%= tag %> 15 | <% }) %> 16 | 17 |
18 |
19 | <%- include sidebar_about%> 20 | <%- include sidebar_archive %> 21 |
22 | 23 |
24 | 25 |
26 | 27 | <%- include footer %> -------------------------------------------------------------------------------- /views/upload.ejs: -------------------------------------------------------------------------------- 1 | <%- include header %> 2 | <%- include nav %> 3 |
4 | <%- include flash %> 5 |
6 | 10 |
11 |
12 |
13 |
14 |
15 | 16 |
17 | 18 |
19 |
20 | <%- include sidebar_about %> 21 | <%- include sidebar_archive %> 22 | <%- include sidebar_tags %> 23 |
24 | 25 |
26 | 27 |
28 | 29 | <%- include footer %> -------------------------------------------------------------------------------- /views/user.ejs: -------------------------------------------------------------------------------- 1 | <%- include header %> 2 | <%- include nav %> 3 |
4 | <%- include flash %> 5 |
6 | 10 |
11 |
12 |
13 |
14 | <% posts.forEach(function (post, index) { %> 15 |
16 |

<%= post.title %>

17 | 29 |
<%- post.post %>
30 |

...

31 | 阅读全文 32 | 33 |
34 | <% }) %> 35 |
36 | <%- include paging %> 37 | 38 |
39 |
40 | <%- include sidebar_about %> 41 | <%- include sidebar_archive %> 42 | <%- include sidebar_tags %> 43 |
44 | 45 |
46 | 47 |
48 | <%- include footer %> --------------------------------------------------------------------------------