Merge pull request #4 from phoenixzqy/master
add multi-lang support, and translate the whole site
This commit is contained in:
11
app.js
11
app.js
@@ -10,9 +10,11 @@ var blog = require('./routes/blog');
|
||||
var misc = require('./routes/misc');
|
||||
var auth = require('./routes/auth');
|
||||
var admin = require('./routes/admin');
|
||||
var locale = require('./routes/locale');
|
||||
var ue = require('./routes/ue');
|
||||
var logger = require('./utility/logger');
|
||||
var passport = require('passport');
|
||||
var i18n = require('./models/i18n');
|
||||
|
||||
var app = express();
|
||||
|
||||
@@ -26,6 +28,9 @@ app.use(morgan('dev'));
|
||||
app.use(bodyParser.json());
|
||||
app.use(bodyParser.urlencoded({extended: false}));
|
||||
app.use(cookieParser());
|
||||
// i18n init parses req for language headers, cookies, etc.
|
||||
app.use(i18n.init);
|
||||
|
||||
app.use(session({
|
||||
secret: 'iblog-exp-session',
|
||||
cookie: {
|
||||
@@ -40,12 +45,14 @@ app.use(passport.initialize());
|
||||
app.use(passport.session());
|
||||
|
||||
app.use('/', route);
|
||||
app.use('/blog', blog);
|
||||
app.use('/', locale);
|
||||
app.use('/', misc);
|
||||
app.use('/', auth);
|
||||
app.use('/blog', blog);
|
||||
app.use('/admin', require('connect-ensure-login').ensureLoggedIn('/login'), admin);
|
||||
app.use('/ue/controller', ue);
|
||||
|
||||
|
||||
// catch 404 and forward to error handler
|
||||
app.use(function (req, res, next) {
|
||||
var err = new Error();
|
||||
@@ -56,7 +63,7 @@ app.use(function (req, res, next) {
|
||||
// error handlers
|
||||
app.use(function (err, req, res, next) {
|
||||
var code = err.status || 500,
|
||||
message = code === 404 ? '请求的页面已失联~系统已自动记录该错误。' : '服务器出错了~系统已自动记录该错误。';
|
||||
message = code === 404 ? res.__('error.404_1') : res.__('error.404_2');
|
||||
res.status(code);
|
||||
logger.errLogger(req, err);
|
||||
res.render('./shared/error', {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
"tests"
|
||||
],
|
||||
"dependencies": {
|
||||
"jquery": "2.2.1",
|
||||
"jquery": "2.2.1",
|
||||
"bootstrap": "~3.3.6",
|
||||
"font-awesome": "~4.5.0",
|
||||
"fuelux": "~3.14.1",
|
||||
@@ -41,5 +41,8 @@
|
||||
"codemirror": "^5.11.0",
|
||||
"switchery": "^0.8.1",
|
||||
"supersized": "*"
|
||||
},
|
||||
"resolutions": {
|
||||
"jquery": "2.2.1"
|
||||
}
|
||||
}
|
||||
|
||||
210
language/en-US.json
Normal file
210
language/en-US.json
Normal file
@@ -0,0 +1,210 @@
|
||||
{
|
||||
"lang-code": "zh-CN",
|
||||
"language": "中文",
|
||||
"error": {
|
||||
"404_1": "Cannot get your page, our server has record this error",
|
||||
"404_2": "Server error, our server has record this error",
|
||||
"db_1": "MongoDB connection error",
|
||||
"back_to_home": "Back To Home"
|
||||
},
|
||||
"Category": {
|
||||
"all": "All Category",
|
||||
"uncate": "Uncategorized"
|
||||
},
|
||||
"layoutAdmin": {
|
||||
"title": "Dashboard",
|
||||
"blog_management": "Blogs",
|
||||
"web_statistic": "Analysis",
|
||||
"classified_management": "Category",
|
||||
"article_management": "Posts",
|
||||
"new_article": "New Post",
|
||||
"edit_article": "Edit Post",
|
||||
"comment_management": "Comments",
|
||||
"msg_management": "Message",
|
||||
"about_management": "About",
|
||||
"cache_management": "Cache",
|
||||
"exception_management": "Site Log",
|
||||
"settings": "Settings",
|
||||
"btn_logout": "Logout"
|
||||
},
|
||||
"auth": {
|
||||
"title": "Admin Login",
|
||||
"login_failed": "Admin login failed",
|
||||
"wrong_info": "Wrong username or password",
|
||||
"login": "Login",
|
||||
"username": "Username",
|
||||
"password": "Password"
|
||||
},
|
||||
"misc": {
|
||||
"msg": "Message",
|
||||
"about": "About"
|
||||
},
|
||||
"layout": {
|
||||
"blog": "Blog",
|
||||
"message": "Message",
|
||||
"about": "About"
|
||||
},
|
||||
"footer": {
|
||||
"admin_system": "Admin System"
|
||||
},
|
||||
"top": {
|
||||
"share": "Share",
|
||||
"qr_code": "QR Code",
|
||||
"back_to_top": "Back To Top",
|
||||
"small_screen": "Small Screen Mode"
|
||||
},
|
||||
"about": {
|
||||
"wechat": "WeChat",
|
||||
"qr_code": "QR Code",
|
||||
"email": "Email"
|
||||
},
|
||||
"blog": {
|
||||
"index": {
|
||||
"category": "Category",
|
||||
"date": "Date",
|
||||
"sort_title": "Sort By Title",
|
||||
"sort_date": "Sort By Date",
|
||||
"title": "Title",
|
||||
"full": "Full Article",
|
||||
"tag": "Tag",
|
||||
"keyword": "Keyword",
|
||||
"search": "Search",
|
||||
"reach_end": "Reach the end",
|
||||
"close": "Close",
|
||||
"full_mode": "Full Mode"
|
||||
},
|
||||
"article": {
|
||||
"table_of_content": "Table Of Content",
|
||||
"category": "Category",
|
||||
"post_date": "Post Date",
|
||||
"brief": "Brief",
|
||||
"hide": "Hide"
|
||||
}
|
||||
},
|
||||
"admin": {
|
||||
"aboutmanage": {
|
||||
"about": "About",
|
||||
"line_1": "Line 1",
|
||||
"line_2": "Line 2",
|
||||
"line_3": "Line 3, use '|' to change line. Using Jade Engine",
|
||||
"self_intro": "Self Intro",
|
||||
"wechat": "WeChat",
|
||||
"email": "Email",
|
||||
"save": "Save"
|
||||
},
|
||||
"articlemanage": {
|
||||
"post": "Posts",
|
||||
"new_article": "New Post"
|
||||
},
|
||||
"cachemanage": {
|
||||
"cache": "Cache Manage",
|
||||
"cache_key": "Cache Key",
|
||||
"li_1": "categories",
|
||||
"li_2": "categories_all",
|
||||
"li_3": "category_alias",
|
||||
"li_4": "posts_cateid_id_pageindex_pagesize_sortby_keyword_filtertype",
|
||||
"li_5": "posts_count_cateid_id_pageindex_pagesize_sortby_keyword_filtertype",
|
||||
"li_6": "article_alias",
|
||||
"search_cache": "Search Cache",
|
||||
"clear_cache": "Clear Cache"
|
||||
},
|
||||
"categorymanage": {
|
||||
"category": "Category",
|
||||
"new_category": "New Category",
|
||||
"save": "Save"
|
||||
},
|
||||
"comments": {
|
||||
"comments": "Comments"
|
||||
},
|
||||
"editarticle": {
|
||||
"edit": "Edit",
|
||||
"title": "Title",
|
||||
"enter_title": "Enter Title",
|
||||
"category": "Category",
|
||||
"enter_alias": "Enter Alias",
|
||||
"auto_generate": "Auto Generate Summary",
|
||||
"summary": "Summary",
|
||||
"enter_summary": "Enter Summary",
|
||||
"source": "Source",
|
||||
"local": "Local",
|
||||
"url": "Url",
|
||||
"tag": "Tags",
|
||||
"enter_to_add": "Enter To Add",
|
||||
"article": "Article",
|
||||
"enter_url": "Enter Url",
|
||||
"update": "Update",
|
||||
"back": "Back",
|
||||
"publish": "Publish",
|
||||
"save_draft": "Save Draft"
|
||||
},
|
||||
"exception": {
|
||||
"exception_manage": "Exception Manage"
|
||||
},
|
||||
"guestbook": {
|
||||
"message_manage": "Message Manage"
|
||||
},
|
||||
"index": {
|
||||
"analysis": "Analysis"
|
||||
},
|
||||
"newarticle": {
|
||||
"new": "New Post",
|
||||
"title": "Title",
|
||||
"enter_title": "Enter Title",
|
||||
"category": "Category",
|
||||
"enter_alias": "Enter Alias",
|
||||
"auto_generate": "Auto Generate Summary",
|
||||
"summary": "Summary",
|
||||
"enter_summary": "Enter Summary",
|
||||
"source": "Source",
|
||||
"local": "Local",
|
||||
"url": "Url",
|
||||
"tag": "Tags",
|
||||
"enter_to_add": "Enter To Add",
|
||||
"article": "Article",
|
||||
"enter_url": "Enter Url",
|
||||
"update": "Update",
|
||||
"back": "Back",
|
||||
"publish": "Publish",
|
||||
"save_draft": "Save Draft"
|
||||
},
|
||||
"settings": {
|
||||
"setting": "Settings",
|
||||
"site": "Site ",
|
||||
"site_name": "Site Name",
|
||||
"site_name_placeholder": "Site Name",
|
||||
"domain_name": "Site Domain Name",
|
||||
"domain_name_placeholder": "Site Domain Name",
|
||||
"ICP": "ICP(shows on footer)",
|
||||
"ICP_placeholder": "ICP Code",
|
||||
"logo": "Site Logo",
|
||||
"posts_per_page": "Posts Per Page",
|
||||
"posts_per_page_placeholder": "Posts Per Page",
|
||||
"show_summary": "Show Detailed Summary",
|
||||
"cache_expire_time": "Cache Expire Time(s)",
|
||||
"cache_expire_time_placeholder": "Cache Expire Time",
|
||||
"utility": "Utility",
|
||||
"trans": "Baidu Translate",
|
||||
"key": "Key(shows on posts url)",
|
||||
"key_placeholder": "Apply Translate Key",
|
||||
"analysis": "Site Analysis",
|
||||
"analysis_service": "Baidu Analysis",
|
||||
"analysis_id": "Baidu Analysis ID",
|
||||
"analysis_id_placeholder": "Apply Baidu Analysis ID",
|
||||
"share": "Use Share Fucntions",
|
||||
"share_service": "JisThis",
|
||||
"share_id": "JiaThis id",
|
||||
"share_id_placeholder": "Apply JiaThis ID",
|
||||
"comments": "Show Comments To All",
|
||||
"comments_service": "畅言",
|
||||
"comments_id": "畅言appid",
|
||||
"comments_id_placeholder": "申请的appid",
|
||||
"comments_conf": "畅言conf",
|
||||
"comments_conf_placeholder": "申请的conf",
|
||||
"message": "Show Message",
|
||||
"message_service": "友言",
|
||||
"message_id": "友言uid",
|
||||
"message_id_placeholder": "apply uid",
|
||||
"save": "Save"
|
||||
}
|
||||
}
|
||||
}
|
||||
210
language/zh-CN.json
Normal file
210
language/zh-CN.json
Normal file
@@ -0,0 +1,210 @@
|
||||
{
|
||||
"language": "English",
|
||||
"lang-code": "en-US",
|
||||
"error": {
|
||||
"404_1": "请求的页面已失联~系统已自动记录该错误。",
|
||||
"404_2": "服务器出错了~系统已自动记录该错误。",
|
||||
"db_1": "MongoDB连接错误: ",
|
||||
"back_to_home": "跳转首页"
|
||||
},
|
||||
"Category": {
|
||||
"all": "全部分类",
|
||||
"uncate": "未分类"
|
||||
},
|
||||
"layoutAdmin": {
|
||||
"title": "后台管理",
|
||||
"blog_management": "博客管理",
|
||||
"web_statistic": "网站统计",
|
||||
"classified_management": "分类管理",
|
||||
"article_management": "文章管理",
|
||||
"new_article": "新的文章",
|
||||
"edit_article": "编辑文章",
|
||||
"comment_management": "评论管理",
|
||||
"msg_management": "留言管理",
|
||||
"about_management": "关于管理",
|
||||
"cache_management": "缓存管理",
|
||||
"exception_management": "异常管理",
|
||||
"settings": "系统设置",
|
||||
"btn_logout": "退出登录"
|
||||
},
|
||||
"auth": {
|
||||
"title": "后台登录",
|
||||
"login_failed": "管理员登录失败。",
|
||||
"wrong_info": "用户名或密码错误!",
|
||||
"login": "登 录",
|
||||
"username": "用户名",
|
||||
"password": "密码"
|
||||
},
|
||||
"misc": {
|
||||
"msg": "留言",
|
||||
"about": "关于"
|
||||
},
|
||||
"layout": {
|
||||
"blog": "博客",
|
||||
"message": "留言",
|
||||
"about": "关于"
|
||||
},
|
||||
"footer": {
|
||||
"admin_system": "后台管理"
|
||||
},
|
||||
"top":{
|
||||
"share": "分享到",
|
||||
"qr_code": "二维码",
|
||||
"back_to_top": "回顶部",
|
||||
"small_screen": "手机访问该页面"
|
||||
},
|
||||
"about": {
|
||||
"wechat": "微信",
|
||||
"qr_code": "二维码",
|
||||
"email": "邮箱"
|
||||
},
|
||||
"blog": {
|
||||
"index": {
|
||||
"category": "文章分类",
|
||||
"date": "日期",
|
||||
"sort_title": "按标题排序",
|
||||
"sort_date": "按日期排序",
|
||||
"title": "标题",
|
||||
"full": "全文",
|
||||
"tag": "标签",
|
||||
"keyword": "关键字",
|
||||
"search": "搜索",
|
||||
"reach_end": "没有更多数据",
|
||||
"close": "关闭",
|
||||
"full_mode": "完整模式"
|
||||
},
|
||||
"article": {
|
||||
"table_of_content": "显示目录",
|
||||
"category": "文章分类",
|
||||
"post_date": "发布时间",
|
||||
"brief": "摘要",
|
||||
"hide": "隐藏目录"
|
||||
}
|
||||
},
|
||||
"admin": {
|
||||
"aboutmanage": {
|
||||
"about": "关于管理",
|
||||
"line_1": "第一行文本",
|
||||
"line_2": "第二行文本",
|
||||
"line_3": "第三行文本,支持用 | 分割切换显示",
|
||||
"self_intro": "个人简介",
|
||||
"wechat": "微信号",
|
||||
"email": "Email地址",
|
||||
"save": "保存修改"
|
||||
},
|
||||
"articlemanage": {
|
||||
"post": "文章管理",
|
||||
"new_article": "新的文章"
|
||||
},
|
||||
"cachemanage": {
|
||||
"cache": "缓存管理",
|
||||
"cache_key": "缓存key",
|
||||
"li_1": "【文章分类】",
|
||||
"li_2": "【文章分类(含全部分类和未分类)】",
|
||||
"li_3": "【由alias获取分类】",
|
||||
"li_4": "【文章列表数据】_分类id_页码_每页条数_排序类型_关键字_查询类型",
|
||||
"li_5": "【文章列表条数】_分类_页码_每页条数_排序类型_关键字_查询类型",
|
||||
"li_6": "【由alias获取文章】",
|
||||
"search_cache": "检索缓存",
|
||||
"clear_cache": "清除缓存"
|
||||
},
|
||||
"categorymanage": {
|
||||
"category": "分类管理",
|
||||
"new_category": "新的分类",
|
||||
"save": "保存修改"
|
||||
},
|
||||
"comments": {
|
||||
"comments": "评论管理"
|
||||
},
|
||||
"editarticle": {
|
||||
"edit": "编辑文章",
|
||||
"title": "标题",
|
||||
"enter_title": "请输入标题",
|
||||
"category": "分类",
|
||||
"enter_alias": "请输入Alias",
|
||||
"auto_generate": "根据标题自动生成",
|
||||
"summary": "摘要",
|
||||
"enter_summary": "请输入摘要",
|
||||
"source": "来源",
|
||||
"local": "本地",
|
||||
"url": "外链",
|
||||
"tag": "标签",
|
||||
"enter_to_add": "回车新增",
|
||||
"article": "正文",
|
||||
"enter_url": "请输入链接地址",
|
||||
"update": "更新",
|
||||
"back": "返回",
|
||||
"publish": "发布",
|
||||
"save_draft": "保存草稿"
|
||||
},
|
||||
"exception": {
|
||||
"exception_manage": "异常管理"
|
||||
},
|
||||
"guestbook": {
|
||||
"message_manage": "留言管理"
|
||||
},
|
||||
"index": {
|
||||
"analysis": "网站统计"
|
||||
},
|
||||
"newarticle": {
|
||||
"new": "新的文章",
|
||||
"title": "标题",
|
||||
"enter_title": "请输入标题",
|
||||
"category": "分类",
|
||||
"enter_alias": "请输入Alias",
|
||||
"auto_generate": "根据标题自动生成",
|
||||
"summary": "摘要",
|
||||
"enter_summary": "请输入摘要",
|
||||
"source": "来源",
|
||||
"local": "本地",
|
||||
"url": "外链",
|
||||
"tag": "标签",
|
||||
"enter_to_add": "回车新增",
|
||||
"article": "正文",
|
||||
"enter_url": "请输入链接地址",
|
||||
"update": "更新",
|
||||
"back": "返回",
|
||||
"publish": "发布",
|
||||
"save_draft": "保存草稿"
|
||||
},
|
||||
"settings": {
|
||||
"setting": "系统设置",
|
||||
"site": "站点设置",
|
||||
"site_name": "网站名称",
|
||||
"site_name_placeholder": "该网站的名称",
|
||||
"domain_name": "网站域名",
|
||||
"domain_name_placeholder": "该网站的域名",
|
||||
"ICP": "备案号(用于底部显示)",
|
||||
"ICP_placeholder": "网站域名的备案号",
|
||||
"logo": "网站logo",
|
||||
"posts_per_page": "每页显示文章数",
|
||||
"posts_per_page_placeholder": "每页的条数",
|
||||
"show_summary": "默认展开文章目录",
|
||||
"cache_expire_time": "缓存过期时间(秒)",
|
||||
"cache_expire_time_placeholder": "缓存过期时间",
|
||||
"utility": "组件设置",
|
||||
"trans": "百度翻译",
|
||||
"key": "key(用于文章Url显示)",
|
||||
"key_placeholder": "申请的翻译key",
|
||||
"analysis": "启用统计功能",
|
||||
"analysis_service": "百度统计",
|
||||
"analysis_id": "百度统计id",
|
||||
"analysis_id_placeholder": "申请的统计id",
|
||||
"share": "启用分享功能",
|
||||
"share_service": "JisThis",
|
||||
"share_id": "JiaThis分享id",
|
||||
"share_id_placeholder": "申请的分享id",
|
||||
"comments": "显示文章评论",
|
||||
"comments_service": "畅言",
|
||||
"comments_id": "畅言appid",
|
||||
"comments_id_placeholder": "申请的appid",
|
||||
"comments_conf": "畅言conf",
|
||||
"comments_conf_placeholder": "申请的conf",
|
||||
"message": "显示留言",
|
||||
"message_service": "友言",
|
||||
"message_id": "友言uid",
|
||||
"message_id_placeholder": "申请的uid",
|
||||
"save": "保存修改"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,13 @@
|
||||
var dbPath = require('../config').DbPath;
|
||||
// var dbPath = process.env.MONGOLAB_URI;
|
||||
var mongoose = require('mongoose');
|
||||
var extend = require('mongoose-schema-extend');
|
||||
mongoose.connect(dbPath);
|
||||
var i18n = require('./i18n');
|
||||
// use custom mongodb url or localhost
|
||||
mongoose.connect(dbPath || "mongodb://localhost/blogrift");
|
||||
var db = mongoose.connection;
|
||||
db.on('error', function (err) {
|
||||
console.error('MongoDB连接错误: ' + err);
|
||||
console.error(i18n.__('error.db_1') + err);
|
||||
process.exit(1);
|
||||
});
|
||||
exports.mongoose = mongoose;
|
||||
@@ -18,4 +21,4 @@ var base = new mongoose.Schema({
|
||||
//修改时间
|
||||
ModifyTime: {type: Date}
|
||||
});
|
||||
exports.base = base;
|
||||
exports.base = base;
|
||||
|
||||
23
models/i18n.js
Normal file
23
models/i18n.js
Normal file
@@ -0,0 +1,23 @@
|
||||
var i18n = require('i18n');
|
||||
|
||||
// multi language support
|
||||
i18n.configure({
|
||||
// setup some locales - other locales default to en silently
|
||||
locales: ['zh-CN', 'en-US'],
|
||||
|
||||
// sets a custom cookie name to parse locale settings from
|
||||
cookie: 'locale',
|
||||
// query parameter to switch locale (ie. /home?locale=en) - defaults to NULL
|
||||
queryParameter: 'locale',
|
||||
// you may alter a site wide default locale
|
||||
defaultLocale: 'en-US',
|
||||
// enable object notation in order to use nested translation
|
||||
objectNotation: true,
|
||||
// sync locale information accros all files - defaults to false
|
||||
syncFiles: false,
|
||||
|
||||
// where to store json files - defaults to './locales'
|
||||
directory: __dirname + '/../language'
|
||||
});
|
||||
|
||||
module.exports = i18n;
|
||||
@@ -3,16 +3,19 @@
|
||||
"version": "1.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"start": "node --harmony-proxies ./bin/www"
|
||||
"start": "node --harmony-proxies ./bin/www",
|
||||
"postinstall": "bower install"
|
||||
},
|
||||
"dependencies": {
|
||||
"async": "^1.5.2",
|
||||
"body-parser": "~1.13.2",
|
||||
"bower": "^1.7.9",
|
||||
"connect-ensure-login": "^0.1.1",
|
||||
"cookie-parser": "~1.3.5",
|
||||
"debug": "~2.2.0",
|
||||
"express": "~4.13.1",
|
||||
"express-session": "^1.13.0",
|
||||
"i18n": "0.8.2",
|
||||
"jade": "~1.11.0",
|
||||
"jquery-file-upload-middleware": "^0.1.7",
|
||||
"moment": "^2.11.1",
|
||||
|
||||
@@ -3,19 +3,20 @@ var post = require('../models/post').PostModel;
|
||||
var shortid = require('shortid');
|
||||
var tool = require('../utility/tool');
|
||||
var redisClient = require('../utility/redisClient');
|
||||
var i18n = require('../models/i18n')
|
||||
|
||||
//全部分类
|
||||
var cateAll = {
|
||||
"_id": "",
|
||||
"Alias": "",
|
||||
"CateName": "全部分类",
|
||||
"CateName": i18n.__("Category.all"),
|
||||
"Img": "/images/全部分类.svg"
|
||||
};
|
||||
//未分类
|
||||
var cateOther = {
|
||||
"_id": "other",
|
||||
"Alias": "other",
|
||||
"CateName": "未分类",
|
||||
"CateName": i18n.__("Category.uncate"),
|
||||
"Img": "/images/未分类.svg"
|
||||
};
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ router.get('/', function (req, res, next) {
|
||||
} else {
|
||||
res.render('admin/index', {
|
||||
settings: settings,
|
||||
title: settings['SiteName'] + ' - 网站统计'
|
||||
title: settings['SiteName'] + ' - ' + res.__("layoutAdmin.web_statistic")
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -40,7 +40,7 @@ router.get('/categorymanage', function (req, res, next) {
|
||||
} else {
|
||||
res.render('admin/categorymanage', {
|
||||
settings: settings,
|
||||
title: settings['SiteName'] + ' - 分类管理'
|
||||
title: settings['SiteName'] + ' - ' + res.__("layoutAdmin.classified_management")
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -77,7 +77,7 @@ router.get('/articlemanage', function (req, res, next) {
|
||||
} else {
|
||||
res.render('admin/articlemanage', {
|
||||
settings: settings,
|
||||
title: settings['SiteName'] + ' - 文章管理'
|
||||
title: settings['SiteName'] + ' - ' + res.__("layoutAdmin.article_management")
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -194,7 +194,7 @@ router.get('/newArticle', function (req, res, next) {
|
||||
res.render('admin/newarticle', {
|
||||
uniqueId: shortid.generate(),
|
||||
settings: settings,
|
||||
title: settings['SiteName'] + ' - 新的文章'
|
||||
title: settings['SiteName'] + ' - ' + res.__("layoutAdmin.new_article")
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -276,7 +276,7 @@ router.get('/editArticle/:id', function (req, res, next) {
|
||||
res.render('admin/editarticle', {
|
||||
settings: settings,
|
||||
post: article,
|
||||
title: settings['SiteName'] + ' - 编辑文章'
|
||||
title: settings['SiteName'] + ' - ' + res.__("layoutAdmin.edit_article")
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -312,7 +312,7 @@ router.get('/comments', function (req, res, next) {
|
||||
} else {
|
||||
res.render('admin/comments', {
|
||||
settings: settings,
|
||||
title: settings['SiteName'] + ' - 评论管理'
|
||||
title: settings['SiteName'] + ' - ' + res.__("layoutAdmin.comment_management")
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -326,7 +326,7 @@ router.get('/guestbook', function (req, res, next) {
|
||||
} else {
|
||||
res.render('admin/guestbook', {
|
||||
settings: settings,
|
||||
title: settings['SiteName'] + ' - 留言管理'
|
||||
title: settings['SiteName'] + ' - ' + res.__("layoutAdmin.msg_management")
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -364,7 +364,7 @@ router.get('/aboutmanage', function (req, res, next) {
|
||||
settings = results[0];
|
||||
about = results[1];
|
||||
res.render('admin/aboutmanage', {
|
||||
title: settings['SiteName'] + ' - 关于管理',
|
||||
title: settings['SiteName'] + ' - ' + res.__("layoutAdmin.about_management"),
|
||||
about: about,
|
||||
settings: settings
|
||||
});
|
||||
@@ -400,7 +400,7 @@ router.get('/cachemanage', function (req, res, next) {
|
||||
} else {
|
||||
res.render('admin/cachemanage', {
|
||||
settings: settings,
|
||||
title: settings['SiteName'] + ' - 缓存管理'
|
||||
title: settings['SiteName'] + ' - ' + res.__("layoutAdmin.cache_management")
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -440,7 +440,7 @@ router.get('/exception', require('connect-ensure-login').ensureLoggedIn(), funct
|
||||
} else {
|
||||
res.render('admin/exception', {
|
||||
settings: settings,
|
||||
title: settings['SiteName'] + ' - 异常管理'
|
||||
title: settings['SiteName'] + ' - ' + res.__("layoutAdmin.exception_management")
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -508,7 +508,7 @@ router.get('/settings', function (req, res, next) {
|
||||
} else {
|
||||
res.render('admin/settings', {
|
||||
settings: settings,
|
||||
title: settings['SiteName'] + ' - 系统设置'
|
||||
title: settings['SiteName'] + ' - ' + res.__("layoutAdmin.settings")
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -538,4 +538,4 @@ router.post('/saveSettings', function (req, res, next) {
|
||||
res.end();
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
module.exports = router;
|
||||
|
||||
@@ -44,7 +44,7 @@ router.get('/login', function (req, res, next) {
|
||||
} else {
|
||||
res.render('auth/login', {
|
||||
settings: settings,
|
||||
title: settings['SiteName'] + ' - 后台登录'
|
||||
title: settings['SiteName'] + ' - ' + res.__("auth.title")
|
||||
});
|
||||
}
|
||||
});
|
||||
@@ -56,10 +56,9 @@ router.post('/login', function (req, res, next) {
|
||||
if (err) {
|
||||
next(err);
|
||||
} else if (!user) {
|
||||
logger.errLogger(req, new Error('管理员登录失败。'));
|
||||
logger.errLogger(req, new Error(res.__("auth.wrong_info")));
|
||||
res.json({
|
||||
valid: false,
|
||||
message: '用户名或密码错误!'
|
||||
valid: false
|
||||
});
|
||||
} else {
|
||||
//登录操作
|
||||
@@ -89,4 +88,4 @@ router.post('/logout',
|
||||
res.redirect('/login');
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
module.exports = router;
|
||||
|
||||
14
routes/locale.js
Normal file
14
routes/locale.js
Normal file
@@ -0,0 +1,14 @@
|
||||
var express = require('express');
|
||||
var router = express.Router();
|
||||
var path = require('path');
|
||||
|
||||
// Change website language
|
||||
router.get('/locale/:lang', function(req, res, next){
|
||||
if(req.params.lang){
|
||||
// Set-Cookie for language/locale
|
||||
res.cookie('locale', req.params.lang, { maxAge: 900000, httpOnly: true });
|
||||
}
|
||||
res.redirect('/');
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
@@ -11,7 +11,7 @@ router.get('/guestbook', function (req, res, next) {
|
||||
next(err);
|
||||
} else {
|
||||
res.render('misc/guestbook', {
|
||||
title: settings['SiteName'] + ' - 留言',
|
||||
title: settings['SiteName'] + ' - ' + res.__("misc.msg"),
|
||||
settings: settings
|
||||
});
|
||||
}
|
||||
@@ -50,7 +50,7 @@ router.get('/about', function (req, res, next) {
|
||||
about = results[0];
|
||||
settings = results[1];
|
||||
res.render('misc/about', {
|
||||
title: settings['SiteName'] + ' - 关于',
|
||||
title: settings['SiteName'] + ' - ' + res.__('misc.about'),
|
||||
about: about,
|
||||
settings: settings
|
||||
});
|
||||
@@ -58,4 +58,4 @@ router.get('/about', function (req, res, next) {
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = router;
|
||||
module.exports = router;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
var winston = require('winston');
|
||||
var dbPath = require('../config').DbPath;
|
||||
// var dbPath = process.env.MONGOLAB_URI;
|
||||
var os = require('os');
|
||||
require('winston-mongodb').MongoDB;
|
||||
var logger = new (winston.Logger)({
|
||||
@@ -60,4 +61,4 @@ exports.errLogger = function (req, err) {
|
||||
message = 'not fount "' + req.originalUrl + '"';
|
||||
}
|
||||
logger.error(message, obj);
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
var redis = require('redis');
|
||||
var config = require('../config');
|
||||
var client = redis.createClient(config.RedisPort, config.RedisHost);
|
||||
// use custom redis url or localhost
|
||||
var client = redis.createClient(config.RedisHost + ":" + config.RedisPort || "localhost:6379");
|
||||
client.on('error', function (err) {
|
||||
console.error('Redis连接错误: ' + err);
|
||||
process.exit(1);
|
||||
@@ -56,4 +57,4 @@ exports.removeItem = function (key, callback) {
|
||||
/**
|
||||
* 获取默认过期时间,单位秒
|
||||
*/
|
||||
exports.defaultExpired = parseInt(require('../config/settings').CacheExpired);
|
||||
exports.defaultExpired = parseInt(require('../config/settings').CacheExpired);
|
||||
|
||||
@@ -4,7 +4,7 @@ block content
|
||||
link(href='/libs/blueimp-file-upload/css/jquery.fileupload.css', rel='stylesheet')
|
||||
.row.wrapper.border-bottom.white-bg.page-heading
|
||||
.col-lg-8
|
||||
h2 关于管理
|
||||
h2 #{__("admin.aboutmanage.about")}
|
||||
.wrapper.wrapper-content.animated.fadeIn
|
||||
.row
|
||||
.col-lg-12
|
||||
@@ -16,8 +16,8 @@ block content
|
||||
form#formAbout(action='/admin/saveAbout', method='Post')
|
||||
.widget-head-color-box.navy-bg.p-lg.text-center
|
||||
.m-b-md
|
||||
input#FirstLine.form-group.form-control.text-center(type='text', name='FirstLine', placeholder='第一行文本', value=about.FirstLine)
|
||||
input#SecondLine.form-control.text-center(type='text', name='SecondLine', placeholder='第一行文本', value=about.SecondLine)
|
||||
input#FirstLine.form-group.form-control.text-center(type='text', name='FirstLine', placeholder='#{__("admin.aboutmanage.line_1")}', value=about.FirstLine)
|
||||
input#SecondLine.form-control.text-center(type='text', name='SecondLine', placeholder='#{__("admin.aboutmanage.line_2")}', value=about.SecondLine)
|
||||
span.fileinput-button
|
||||
img.img-circle.profile-img.m-b-md(alt='profile', src=about.PhotoPath)
|
||||
input.fileupload(type='file', name='file')
|
||||
@@ -28,25 +28,25 @@ block content
|
||||
input#QrcodePath(type='hidden', name='QrcodePath',value=about.QrcodePath)
|
||||
h4
|
||||
span#job-title
|
||||
textarea#ThirdLine.form-control(name='ThirdLine', placeholder='第三行文本,支持用 | 分割切换显示')
|
||||
textarea#ThirdLine.form-control(name='ThirdLine', placeholder='#{__("admin.aboutmanage.line_3")}')
|
||||
!=about.ThirdLine
|
||||
.widget-text-box
|
||||
p
|
||||
textarea#Profile.form-control(name='Profile', cols='3', placeholder='个人简介')
|
||||
textarea#Profile.form-control(name='Profile', cols='3', placeholder='#{__("admin.aboutmanage.self_intro")}')
|
||||
!=about.Profile
|
||||
.row.form-inline
|
||||
.col-md-6
|
||||
i.fa.fa-wechat
|
||||
=' '
|
||||
input#Wechat.form-control(type='text', name='Wechat', placeholder='微信号', value=about.Wechat)
|
||||
input#Wechat.form-control(type='text', name='Wechat', placeholder='#{__("admin.aboutmanage.wechat")}', value=about.Wechat)
|
||||
=' '
|
||||
.col-md-6
|
||||
i.fa.fa-envelope
|
||||
=' '
|
||||
input#Email.form-control(type='text', name='Email', placeholder='Email地址', value=about.Email)
|
||||
input#Email.form-control(type='text', name='Email', placeholder='#{__("admin.aboutmanage.email")}', value=about.Email)
|
||||
button#btnSave.btn.btn-primary.pull-right.m-t-sm(type='button')
|
||||
i.fa.fa-cloud-upload
|
||||
| 保存修改
|
||||
| #{__("admin.aboutmanage.save")}
|
||||
script(type='text/javascript', src='/libs/jquery/dist/jquery.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/bootstrap/dist/js/bootstrap.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/metisMenu/dist/metisMenu.min.js', charset='utf-8')
|
||||
@@ -55,4 +55,3 @@ block content
|
||||
script(type='text/javascript', src='/libs/blueimp-file-upload/js/jquery.fileupload.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/sweetalert/dist/sweetalert.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/aboutmanage.js', charset='utf-8')
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ block content
|
||||
link(href='/libs/sweetalert/dist/sweetalert.css', rel='stylesheet')
|
||||
.row.wrapper.border-bottom.white-bg.page-heading
|
||||
.col-lg-8
|
||||
h2 文章管理
|
||||
h2 #{__("admin.articlemanage.post")}
|
||||
.wrapper.wrapper-content.animated.fadeIn
|
||||
.row
|
||||
.col-lg-12
|
||||
@@ -18,7 +18,7 @@ block content
|
||||
=' '
|
||||
a.btn.btn-white(href='/admin/newarticle')
|
||||
i.fa.fa-plus
|
||||
| 新的文章
|
||||
| #{__("admin.articlemanage.new_article")}
|
||||
table#articles
|
||||
script(type='text/javascript', src='/libs/jquery/dist/jquery.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/bootstrap/dist/js/bootstrap.min.js', charset='utf-8')
|
||||
@@ -29,4 +29,4 @@ block content
|
||||
script(type='text/javascript', src='/libs/bootstrap-table/dist/locale/bootstrap-table-zh-CN.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/lodash/dist/lodash.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/sweetalert/dist/sweetalert.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/articlemanage.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/articlemanage.js', charset='utf-8')
|
||||
|
||||
@@ -4,7 +4,7 @@ block content
|
||||
link(href='/libs/sweetalert/dist/sweetalert.css', rel='stylesheet')
|
||||
.row.wrapper.border-bottom.white-bg.page-heading
|
||||
.col-lg-8
|
||||
h2 缓存管理
|
||||
h2 #{__("admin.cachemanage.cache")}
|
||||
.wrapper.wrapper-content.animated.fadeIn
|
||||
.row
|
||||
.col-md-6.col-md-offset-3
|
||||
@@ -12,27 +12,27 @@ block content
|
||||
.row
|
||||
.col-md-10
|
||||
#keyinput.input-group.input-append.dropdown.combobox(data-initialize='combobox')
|
||||
input#cacheKey.form-control(type='text', placeholder='缓存key')
|
||||
input#cacheKey.form-control(type='text', placeholder='#{__("admin.cachemanage.cache_key")}')
|
||||
.input-group-btn
|
||||
button.btn.btn-white.dropdown-toggle(type='button', data-toggle='dropdown')
|
||||
span.caret
|
||||
ul.dropdown-menu.dropdown-menu-right(style='left:auto;')
|
||||
li(data-value='categories')
|
||||
a(href='#') 【文章分类】categories
|
||||
a(href='#') #{__("admin.cachemanage.li_1")}
|
||||
li(data-value='categories_all')
|
||||
a(href='#') 【文章分类(含全部分类和未分类)】categories_all
|
||||
a(href='#') #{__("admin.cachemanage.li_2")}
|
||||
li(data-value='category_分类alias')
|
||||
a(href='#') 【由alias获取分类】category_分类alias
|
||||
a(href='#') #{__("admin.cachemanage.li_3")}
|
||||
li(data-value='posts_cateid_分类id_pageindex_页码_pagesize_每页条数_sortby_排序类型_keyword_关键字_filtertype_查询类型')
|
||||
a(href='#') 【文章列表数据】posts_cateid_分类id_pageindex_页码_pagesize_每页条数_sortby_排序类型_keyword_关键字_filtertype_查询类型
|
||||
a(href='#') #{__("admin.cachemanage.li_4")}
|
||||
li(data-value='posts_count_cateid_分类id_pageindex_页码_pagesize_每页条数_sortby_排序类型_keyword_关键字_filtertype_查询类型')
|
||||
a(href='#') 【文章列表条数】posts_count_cateid_分类id_pageindex_页码_pagesize_每页条数_sortby_排序类型_keyword_关键字_filtertype_查询类型
|
||||
a(href='#') #{__("admin.cachemanage.li_5")}
|
||||
li(data-value='article_文章alias')
|
||||
a(href='#') 【由alias获取文章】article_文章alias
|
||||
a(href='#') #{__("admin.cachemanage.li_6")}
|
||||
.col-md-2.text-right
|
||||
button#btnQuery.btn.btn-white(type='button')
|
||||
i.fa.fa-search
|
||||
| 检索缓存
|
||||
| #{__("admin.cachemanage.search_cache")}
|
||||
.row
|
||||
.col-md-12
|
||||
textarea#cacheContent.form-control.m-t-sm(rows='20', style='max-width:100%;min-width:100%;')
|
||||
@@ -40,11 +40,11 @@ block content
|
||||
.col-md-12.text-right
|
||||
button#btnClear.btn.btn-primary.m-t-sm(type='button')
|
||||
i.fa.fa-times
|
||||
| 清除缓存
|
||||
| #{__("admin.cachemanage.clear_cache")}
|
||||
script(type='text/javascript', src='/libs/jquery/dist/jquery.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/bootstrap/dist/js/bootstrap.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/metisMenu/dist/metisMenu.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/admin.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/fuelux/dist/js/fuelux.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/sweetalert/dist/sweetalert.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/cachemanage.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/cachemanage.js', charset='utf-8')
|
||||
|
||||
@@ -5,7 +5,7 @@ block content
|
||||
link(href='/libs/blueimp-file-upload/css/jquery.fileupload.css', rel='stylesheet')
|
||||
.row.wrapper.border-bottom.white-bg.page-heading
|
||||
.col-lg-8
|
||||
h2 分类管理
|
||||
h2 #{__("admin.categorymanage.category")}
|
||||
.wrapper.wrapper-content.animated.fadeIn
|
||||
.row
|
||||
.col-md-10.col-md-offset-1
|
||||
@@ -14,10 +14,10 @@ block content
|
||||
ul#cate-list.list-group.list-unstyled
|
||||
button#btnNew.btn.btn-white
|
||||
i.fa.fa-plus
|
||||
| 新的分类
|
||||
| #{__("admin.categorymanage.new_category")}
|
||||
button#btnSave.btn.btn-primary.pull-right
|
||||
i.fa.fa-cloud-upload
|
||||
| 保存修改
|
||||
| #{__("admin.categorymanage.save")}
|
||||
script(type='text/javascript', src='/libs/jquery/dist/jquery.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/bootstrap/dist/js/bootstrap.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/metisMenu/dist/metisMenu.min.js', charset='utf-8')
|
||||
@@ -27,4 +27,4 @@ block content
|
||||
script(type='text/javascript', src='/libs/blueimp-file-upload/js/vendor/jquery.ui.widget.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/blueimp-file-upload/js/jquery.fileupload.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/sweetalert/dist/sweetalert.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/categorymanage.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/categorymanage.js', charset='utf-8')
|
||||
|
||||
@@ -2,7 +2,7 @@ extends ../shared/layoutAdmin
|
||||
block content
|
||||
.row.wrapper.border-bottom.white-bg.page-heading
|
||||
.col-lg-8
|
||||
h2 评论管理
|
||||
h2 #{__("admin.comments.comments")}
|
||||
.wrapper.wrapper-content.animated.fadeIn
|
||||
.row
|
||||
.col-lg-12
|
||||
@@ -12,4 +12,4 @@ block content
|
||||
script(type='text/javascript', src='/libs/jquery/dist/jquery.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/bootstrap/dist/js/bootstrap.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/metisMenu/dist/metisMenu.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/admin.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/admin.js', charset='utf-8')
|
||||
|
||||
@@ -5,7 +5,7 @@ block content
|
||||
link(href='/libs/form.validation/dist/css/formValidation.min.css', rel='stylesheet')
|
||||
.row.wrapper.border-bottom.white-bg.page-heading
|
||||
.col-lg-8
|
||||
h2 编辑文章
|
||||
h2 #{__("admin.editarticle.edit")}
|
||||
.wrapper.wrapper-content.animated.fadeIn
|
||||
.row
|
||||
.col-lg-12
|
||||
@@ -15,11 +15,11 @@ block content
|
||||
.row
|
||||
.col-md-9
|
||||
.form-group
|
||||
label(for='Title') 标题
|
||||
input#Title.form-control(type='text', name='Title', placeholder='请输入标题',value=post.Title)
|
||||
label(for='Title') #{__("admin.editarticle.title")}
|
||||
input#Title.form-control(type='text', name='Title', placeholder='#{__("admin.editarticle.enter_title")}',value=post.Title)
|
||||
.col-md-3
|
||||
.form-group
|
||||
label(for='CategoryId', style='display:block;') 分类
|
||||
label(for='CategoryId', style='display:block;') #{__("admin.editarticle.category")}
|
||||
#Categorylist.btn-group.selectlist(data-resize='auto', data-initialize='selectlist')
|
||||
button.btn.btn-white.dropdown-toggle(data-toggle='dropdown', type='button')
|
||||
span.selected-label
|
||||
@@ -31,27 +31,27 @@ block content
|
||||
.col-md-9
|
||||
.form-group
|
||||
label(for='Alias') Alias
|
||||
input#Alias.form-control(type='text', name='Alias', placeholder='请输入Alias',value=post.Alias)
|
||||
input#Alias.form-control(type='text', name='Alias', placeholder='#{__("admin.editarticle.enter_alias")}',value=post.Alias)
|
||||
.col-md-3
|
||||
.form-group
|
||||
button.btn.btn-sm.btn-white.btn-alias(type='button')
|
||||
i.fa.fa-flash
|
||||
| 根据标题自动生成
|
||||
| #{__("admin.editarticle.auto_generate")}
|
||||
.form-group
|
||||
label(for='Summary') 摘要
|
||||
textarea#Summary.form-control(name='Summary', style='min-width: 100%;max-width: 100%;', placeholder='请输入摘要')
|
||||
label(for='Summary') #{__("admin.editarticle.summary")}
|
||||
textarea#Summary.form-control(name='Summary', style='min-width: 100%;max-width: 100%;', placeholder='#{__("admin.editarticle.enter_summary")}')
|
||||
!=post.Summary
|
||||
.form-group
|
||||
label(style='display:block;') 来源
|
||||
label(style='display:block;') #{__("admin.editarticle.source")}
|
||||
label#soruceLocal.radio-custom.radio-inline(data-initialize='radio')
|
||||
input.sr-only(data-toggle='#block-local', name='Source', type='radio', value='0', checked='checked')
|
||||
| 本地
|
||||
| #{__("admin.editarticle.local")}
|
||||
label#soruceLink.radio-custom.radio-inline(data-initialize='radio')
|
||||
input.sr-only(data-toggle='#block-link', name='Source', type='radio', value='1')
|
||||
| 外链
|
||||
| #{__("admin.editarticle.url")}
|
||||
#block-local
|
||||
.form-group
|
||||
label(for='pillbox-input') 标签
|
||||
label(for='pillbox-input') #{__("admin.editarticle.tag")}
|
||||
#myPillbox.pillbox(data-initialize='pillbox')
|
||||
ul.clearfix.pill-group
|
||||
li.pillbox-input-wrap.btn-group
|
||||
@@ -59,41 +59,41 @@ block content
|
||||
| and
|
||||
span.pillbox-more-count
|
||||
| more...
|
||||
input#pillbox-input.form-control.dropdown-toggle.pillbox-add-item(type='text', placeholder='回车新增')
|
||||
input#pillbox-input.form-control.dropdown-toggle.pillbox-add-item(type='text', placeholder='#{__("admin.editarticle.enter_to_add")}')
|
||||
button.dropdown-toggle.sr-only(type='button')
|
||||
span.caret
|
||||
span.sr-only Toggle Dropdown
|
||||
ul.suggest.dropdown-menu(role='menu', data-toggle='dropdown', data-flip='auto')
|
||||
input#Labels(type='hidden', name='Labels',value=post.Labels)
|
||||
.form-group
|
||||
label 正文
|
||||
label #{__("admin.editarticle.article")}
|
||||
script#editor(type='text/plain')
|
||||
!=post.Content
|
||||
#block-link
|
||||
.form-group
|
||||
label(for='Url') Url
|
||||
input#Url.form-control(type='text', name='Url', placeholder='请输入链接地址',value=post.Url)
|
||||
input#Url.form-control(type='text', name='Url', placeholder='#{__("admin.editarticle.enter_url")}',value=post.Url)
|
||||
div
|
||||
if(!post.IsDraft)
|
||||
button#btnUpdate.btn.btn-primary(type='submit')
|
||||
i.fa.fa-cloud-upload
|
||||
| 更新
|
||||
| #{__("admin.editarticle.update")}
|
||||
=' '
|
||||
a.btn.btn-white(href='/admin/articlemanage')
|
||||
i.fa.fa-reply
|
||||
| 返回
|
||||
| #{__("admin.editarticle.back")}
|
||||
else
|
||||
button#btnPublish.btn.btn-danger(type='submit')
|
||||
i.fa.fa-send
|
||||
| 发布
|
||||
| #{__("admin.editarticle.publish")}
|
||||
=' '
|
||||
button#btnSave.btn.btn-primary(type='button')
|
||||
i.fa.fa-save
|
||||
| 保存草稿
|
||||
| #{__("admin.editarticle.save_draft")}
|
||||
=' '
|
||||
a.btn.btn-white(href='/admin/articlemanage')
|
||||
i.fa.fa-reply
|
||||
| 返回
|
||||
| #{__("admin.editarticle.back")}
|
||||
input#UniqueId(type='hidden',name='UniqueId',value=post._id)
|
||||
input#IsDraft(type='hidden',name='IsDraft',value='#{post.IsDraft ? "True" : "False"}')
|
||||
script(type='text/javascript', src='/libs/jquery/dist/jquery.min.js', charset='utf-8')
|
||||
@@ -115,4 +115,4 @@ block content
|
||||
var categoryId = '#{post.CategoryId}';
|
||||
var source = '#{post.Source}';
|
||||
var translateKey = '#{settings.TranslateKey}';
|
||||
script(type='text/javascript', src='/javascripts/editarticle.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/editarticle.js', charset='utf-8')
|
||||
|
||||
@@ -3,7 +3,7 @@ block content
|
||||
link(href='/libs/bootstrap-table/dist/bootstrap-table.min.css', rel='stylesheet')
|
||||
.row.wrapper.border-bottom.white-bg.page-heading
|
||||
.col-lg-8
|
||||
h2 异常管理
|
||||
h2 #{__("admin.exception.exception_manage")}
|
||||
.wrapper.wrapper-content.animated.fadeIn
|
||||
.row
|
||||
.col-lg-12
|
||||
@@ -17,4 +17,4 @@ block content
|
||||
script(type='text/javascript', src='/libs/bootstrap-table/dist/bootstrap-table.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/bootstrap-table/dist/locale/bootstrap-table-zh-CN.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/lodash/dist/lodash.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/exception.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/exception.js', charset='utf-8')
|
||||
|
||||
@@ -2,7 +2,7 @@ extends ../shared/layoutAdmin
|
||||
block content
|
||||
.row.wrapper.border-bottom.white-bg.page-heading
|
||||
.col-lg-8
|
||||
h2 留言管理
|
||||
h2 #{__("admin.guestbook.message_manage")}
|
||||
.wrapper.wrapper-content.animated.fadeIn
|
||||
.row
|
||||
.col-lg-12
|
||||
@@ -12,4 +12,4 @@ block content
|
||||
script(type='text/javascript', src='/libs/jquery/dist/jquery.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/bootstrap/dist/js/bootstrap.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/metisMenu/dist/metisMenu.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/admin.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/admin.js', charset='utf-8')
|
||||
|
||||
@@ -2,7 +2,7 @@ extends ../shared/layoutAdmin
|
||||
block content
|
||||
.row.wrapper.border-bottom.white-bg.page-heading
|
||||
.col-lg-8
|
||||
h2 网站统计
|
||||
h2 #{__("admin.index.analysis")}
|
||||
.wrapper.wrapper-content.animated.fadeIn
|
||||
.row
|
||||
.col-lg-12
|
||||
@@ -12,4 +12,4 @@ block content
|
||||
script(type='text/javascript', src='/libs/jquery/dist/jquery.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/bootstrap/dist/js/bootstrap.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/metisMenu/dist/metisMenu.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/admin.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/admin.js', charset='utf-8')
|
||||
|
||||
@@ -5,7 +5,7 @@ block content
|
||||
link(href='/libs/form.validation/dist/css/formValidation.min.css', rel='stylesheet')
|
||||
.row.wrapper.border-bottom.white-bg.page-heading
|
||||
.col-lg-8
|
||||
h2 新的文章
|
||||
h2 #{__("admin.newarticle.new")}
|
||||
.wrapper.wrapper-content.animated.fadeIn
|
||||
.row
|
||||
.col-lg-12
|
||||
@@ -15,11 +15,11 @@ block content
|
||||
.row
|
||||
.col-md-9
|
||||
.form-group
|
||||
label(for='Title') 标题
|
||||
input#Title.form-control(type='text', name='Title', placeholder='请输入标题')
|
||||
label(for='Title') #{__("admin.newarticle.title")}
|
||||
input#Title.form-control(type='text', name='Title', placeholder='#{__("admin.newarticle.enter_title")}')
|
||||
.col-md-3
|
||||
.form-group
|
||||
label(for='CategoryId', style='display:block;') 分类
|
||||
label(for='CategoryId', style='display:block;') #{__("admin.newarticle.category")}
|
||||
#Categorylist.btn-group.selectlist(data-resize='auto', data-initialize='selectlist')
|
||||
button.btn.btn-white.dropdown-toggle(data-toggle='dropdown', type='button')
|
||||
span.selected-label
|
||||
@@ -31,26 +31,26 @@ block content
|
||||
.col-md-9
|
||||
.form-group
|
||||
label(for='Alias') Alias
|
||||
input#Alias.form-control(type='text', name='Alias', placeholder='请输入Alias')
|
||||
input#Alias.form-control(type='text', name='Alias', placeholder='#{__("admin.newarticle.enter_alias")}')
|
||||
.col-md-3
|
||||
.form-group
|
||||
button.btn.btn-sm.btn-white.btn-alias(type='button')
|
||||
i.fa.fa-flash
|
||||
| 根据标题自动生成
|
||||
| #{__("admin.newarticle.auto_generate")}
|
||||
.form-group
|
||||
label(for='Summary') 摘要
|
||||
textarea#Summary.form-control(name='Summary', style='min-width: 100%;max-width: 100%;', placeholder='请输入摘要')
|
||||
label(for='Summary') #{__("admin.newarticle.summary")}
|
||||
textarea#Summary.form-control(name='Summary', style='min-width: 100%;max-width: 100%;', placeholder='#{__("admin.newarticle.enter")}')
|
||||
.form-group
|
||||
label(style='display:block;') 来源
|
||||
label(style='display:block;') #{__("admin.newarticle.source")}
|
||||
label#soruceLocal.radio-custom.radio-inline(data-initialize='radio')
|
||||
input.sr-only(data-toggle='#block-local', name='Source', type='radio', value='0', checked='checked')
|
||||
| 本地
|
||||
| #{__("admin.newarticle.local")}
|
||||
label#soruceLink.radio-custom.radio-inline(data-initialize='radio')
|
||||
input.sr-only(data-toggle='#block-link', name='Source', type='radio', value='1')
|
||||
| 外链
|
||||
| #{__("admin.newarticle.url")}
|
||||
#block-local
|
||||
.form-group
|
||||
label(for='pillbox-input') 标签
|
||||
label(for='pillbox-input') #{__("admin.newarticle.tag")}
|
||||
#myPillbox.pillbox(data-initialize='pillbox')
|
||||
ul.clearfix.pill-group
|
||||
li.pillbox-input-wrap.btn-group
|
||||
@@ -58,27 +58,27 @@ block content
|
||||
| and
|
||||
span.pillbox-more-count
|
||||
| more...
|
||||
input#pillbox-input.form-control.dropdown-toggle.pillbox-add-item(type='text', placeholder='回车新增')
|
||||
input#pillbox-input.form-control.dropdown-toggle.pillbox-add-item(type='text', placeholder='#{__("admin.newarticle.enter_to_add")}')
|
||||
button.dropdown-toggle.sr-only(type='button')
|
||||
span.caret
|
||||
span.sr-only Toggle Dropdown
|
||||
ul.suggest.dropdown-menu(role='menu', data-toggle='dropdown', data-flip='auto')
|
||||
input#Labels(type='hidden', name='Labels')
|
||||
.form-group
|
||||
label 正文
|
||||
label #{__("admin.newarticle.article")}
|
||||
script#editor(type='text/plain')
|
||||
#block-link
|
||||
.form-group
|
||||
label(for='Url') Url
|
||||
input#Url.form-control(type='text', name='Url', placeholder='请输入链接地址')
|
||||
input#Url.form-control(type='text', name='Url', placeholder='#{__("admin.newarticle.enter_url")}')
|
||||
div
|
||||
button#btnPublish.btn.btn-danger(type='submit')
|
||||
i.fa.fa-send
|
||||
| 发布
|
||||
| #{__("admin.newarticle.publish")}
|
||||
=' '
|
||||
button#btnSave.btn.btn-primary(type='button')
|
||||
i.fa.fa-save
|
||||
| 存为草稿
|
||||
| #{__("admin.newarticle.save_draft")}
|
||||
input#UniqueId(type='hidden',name='UniqueId',value=uniqueId)
|
||||
input#IsDraft(type='hidden',name='IsDraft')
|
||||
script(type='text/javascript', src='/libs/jquery/dist/jquery.min.js', charset='utf-8')
|
||||
@@ -98,4 +98,4 @@ block content
|
||||
script(type='text/javascript', src='/libs/js-md5/js/md5.min.js', charset='utf-8')
|
||||
script.
|
||||
var translateKey = '#{settings.TranslateKey}';
|
||||
script(type='text/javascript', src='/javascripts/newarticle.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/newarticle.js', charset='utf-8')
|
||||
|
||||
@@ -6,7 +6,7 @@ block content
|
||||
link(href='/libs/sweetalert/dist/sweetalert.css', rel='stylesheet')
|
||||
.row.wrapper.border-bottom.white-bg.page-heading
|
||||
.col-lg-8
|
||||
h2 系统设置
|
||||
h2 #{__("admin.settings.setting")}
|
||||
.wrapper.wrapper-content.animated.fadeIn
|
||||
.row
|
||||
.col-lg-12
|
||||
@@ -20,27 +20,27 @@ block content
|
||||
#headingSite.panel-heading(role='tab')
|
||||
h4.panel-title
|
||||
a(role='button', data-toggle='collapse', href='#tabSite', aria-expanded='true', aria-controls='tabSite')
|
||||
| 站点设置
|
||||
| #{__("admin.settings.site")}
|
||||
#tabSite.panel-collapse.collapse.in(role='tabpanel', aria-labelledby='headingSite')
|
||||
ul.list-group
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
| 网站名称
|
||||
| #{__("admin.settings.site_name")}
|
||||
.pull-right
|
||||
input#SiteName.form-control(type='text', name='SiteName', placeholder='该网站的名称', value=settings.SiteName)
|
||||
input#SiteName.form-control(type='text', name='SiteName', placeholder='#{__("admin.settings.site_name_placeholder")}', value=settings.SiteName)
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
| 网站域名
|
||||
| #{__("admin.settings.domain_name")}
|
||||
.pull-right
|
||||
input#SiteDomain.form-control(type='text', name='SiteDomain', placeholder='该网站的域名', value=settings.SiteDomain)
|
||||
input#SiteDomain.form-control(type='text', name='SiteDomain', placeholder='#{__("admin.settings.domain_name_placeholder")}', value=settings.SiteDomain)
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
| 备案号(用于底部显示)
|
||||
| #{__("admin.settings.ICP")}
|
||||
.pull-right
|
||||
input#RecordNo.form-control(type='text', name='RecordNo', placeholder='网站域名的备案号', value=settings.RecordNo)
|
||||
input#RecordNo.form-control(type='text', name='RecordNo', placeholder='#{__("admin.settings.ICP_placeholder")}', value=settings.RecordNo)
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
| 网站logo
|
||||
| #{__("admin.settings.logo")}
|
||||
.pull-right
|
||||
span.fileinput-button
|
||||
img.img-circle.profile-img(alt='profile', src=settings.LogoPath, style='width:146px;height:146px;')
|
||||
@@ -48,10 +48,10 @@ block content
|
||||
input#LogoPath(type='hidden', name='LogoPath',value=settings.LogoPath)
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
| 每页显示文章数
|
||||
| #{__("admin.settings.posts_per_page")}
|
||||
.pull-right
|
||||
.spinbox(data-initialize='spinbox', data-step='5')
|
||||
input#PageSize.form-control.input-mini.spinbox-input(type='text', name='PageSize', placeholder='每页的条数', value=settings.PageSize)
|
||||
input#PageSize.form-control.input-mini.spinbox-input(type='text', name='PageSize', placeholder='#{__("admin.settings.posts_per_page_placeholder")}', value=settings.PageSize)
|
||||
.spinbox-buttons.btn-group.btn-group-vertical
|
||||
button.btn.btn-white.spinbox-up.btn-xs(type='button')
|
||||
span.fa.fa-chevron-up
|
||||
@@ -61,16 +61,16 @@ block content
|
||||
span.sr-only Decrease
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
| 默认展开文章目录
|
||||
| #{__("admin.settings.show_summary")}
|
||||
.pull-right
|
||||
input#ExpandMenu(type='hidden', name='ExpandMenu', value=settings.ExpandMenu)
|
||||
input.js-switch(type='checkbox', checked=settings.ExpandMenu === 'true')
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
| 缓存过期时间(秒)
|
||||
| #{__("admin.settings.cache_expire_time")}
|
||||
.pull-right
|
||||
.spinbox(data-initialize='spinbox',data-max='9999999')
|
||||
input#CacheExpired.form-control.input-mini.spinbox-input(type='text', name='CacheExpired', placeholder='缓存过期时间', value=settings.CacheExpired)
|
||||
input#CacheExpired.form-control.input-mini.spinbox-input(type='text', name='CacheExpired', placeholder='#{__("admin.settings.cache_expire_time_placeholder")}', value=settings.CacheExpired)
|
||||
.spinbox-buttons.btn-group.btn-group-vertical
|
||||
button.btn.btn-white.spinbox-up.btn-xs(type='button')
|
||||
span.fa.fa-chevron-up
|
||||
@@ -83,78 +83,78 @@ block content
|
||||
#headingComponent.panel-heading(role='tab')
|
||||
h4.panel-title
|
||||
a(role='button', data-toggle='collapse', href='#tabComponent', aria-expanded='true', aria-controls='tabComponent')
|
||||
| 组件设置
|
||||
| #{__("admin.settings.utility")}
|
||||
#tabComponent.panel-collapse.collapse.in(role='tabpanel', aria-labelledby='headingComponent')
|
||||
ul.list-group
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
a(href='http://api.fanyi.baidu.com', target='_blank') 百度翻译
|
||||
| key(用于文章Url显示)
|
||||
a(href='http://api.fanyi.baidu.com', target='_blank') #{__("admin.settings.trans")}
|
||||
| #{__("admin.settings.key")}
|
||||
.pull-right
|
||||
input#TranslateKey.form-control(type='text', name='TranslateKey', placeholder='申请的翻译key', value=settings.TranslateKey)
|
||||
input#TranslateKey.form-control(type='text', name='TranslateKey', placeholder='#{__("admin.settings.key_placeholder")}', value=settings.TranslateKey)
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
| 启用统计功能(
|
||||
a(href='http://tongji.baidu.com', target='_blank') 百度统计
|
||||
| )
|
||||
| #{__("admin.settings.analysis")}(
|
||||
a(href='http://tongji.baidu.com', target='_blank') #{__("admin.settings.analysis_service")}
|
||||
| )
|
||||
.pull-right
|
||||
input#EnableStatistics(type='hidden', name='EnableStatistics', value=settings.EnableStatistics)
|
||||
input.js-switch(type='checkbox', checked=settings.EnableStatistics === 'true')
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
| 百度统计id
|
||||
| #{__("admin.settings.analysis_id")}
|
||||
.pull-right
|
||||
input#StatisticsId.form-control(type='text', name='StatisticsId', placeholder='申请的统计id', value=settings.StatisticsId)
|
||||
input#StatisticsId.form-control(type='text', name='StatisticsId', placeholder='#{__("admin.settings.analysis_id_placeholder")}', value=settings.StatisticsId)
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
| 启用分享功能(
|
||||
a(href='http://www.jiathis.com/', target='_blank') JisThis
|
||||
| )
|
||||
| #{__("admin.settings.share")}(
|
||||
a(href='http://www.jiathis.com/', target='_blank') #{__("admin.settings.share_service")}
|
||||
| )
|
||||
.pull-right
|
||||
input#EnableShare(type='hidden', name='EnableShare', value=settings.EnableShare)
|
||||
input.js-switch(type='checkbox', checked=settings.EnableShare === 'true')
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
| JiaThis分享id
|
||||
| #{__("admin.settings.share_id")}
|
||||
.pull-right
|
||||
input#JiaThisId.form-control(type='text', name='JiaThisId', placeholder='申请的分享id', value=settings.JiaThisId)
|
||||
input#JiaThisId.form-control(type='text', name='JiaThisId', placeholder='#{__("admin.settings.share_id_placeholder")}', value=settings.JiaThisId)
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
| 显示文章评论(
|
||||
a(href='http://changyan.kuaizhan.com', target='_blank') 畅言
|
||||
| )
|
||||
| #{__("admin.settings.comments")} (
|
||||
a(href='http://changyan.kuaizhan.com', target='_blank') #{__("admin.settings.comments_service")}
|
||||
| )
|
||||
.pull-right
|
||||
input#ShowComments(type='hidden', name='ShowComments', value=settings.ShowComments)
|
||||
input.js-switch(type='checkbox', checked=settings.ShowComments === 'true')
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
| 畅言appid
|
||||
| #{__("admin.settings.comments_id")}
|
||||
.pull-right
|
||||
input#ChangyanId.form-control(type='text', name='ChangyanId', placeholder='申请的appid', value=settings.ChangyanId)
|
||||
input#ChangyanId.form-control(type='text', name='ChangyanId', placeholder='#{__("admin.settings.comments_id_placeholder")}', value=settings.ChangyanId)
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
| 畅言conf
|
||||
| #{__("admin.settings.comments_conf")}
|
||||
.pull-right
|
||||
input#ChangyanConf.form-control(type='text', name='ChangyanConf', placeholder='申请的conf', value=settings.ChangyanConf)
|
||||
input#ChangyanConf.form-control(type='text', name='ChangyanConf', placeholder='#{__("admin.settings.comments_conf_placeholder")}', value=settings.ChangyanConf)
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
| 显示留言(
|
||||
a(href='http://www.uyan.cc/', target='_blank') 友言
|
||||
| )
|
||||
| #{__("admin.settings.message")} (
|
||||
a(href='http://www.uyan.cc/', target='_blank') #{__("admin.settings.message_service")}
|
||||
| )
|
||||
.pull-right
|
||||
input#ShowGuestbook(type='hidden', name='ShowGuestbook', value=settings.ShowGuestbook)
|
||||
input.js-switch(type='checkbox', checked=settings.ShowGuestbook === 'true')
|
||||
li.list-group-item.clearfix
|
||||
.pull-left
|
||||
| 友言uid
|
||||
| #{__("admin.settings.message_id")}
|
||||
.pull-right
|
||||
input#YouyanId.form-control(type='text', name='YouyanId', placeholder='申请的uid', value=settings.YouyanId)
|
||||
input#YouyanId.form-control(type='text', name='YouyanId', placeholder='#{__("admin.settings.message_id_placeholder")}', value=settings.YouyanId)
|
||||
|
||||
.row
|
||||
.col-lg-12
|
||||
button#btnSave(type='button', class='btn btn-primary', role='button')
|
||||
i.fa.fa-cloud-upload
|
||||
| 保存修改
|
||||
| #{__("admin.settings.save")}
|
||||
script(type='text/javascript', src='/libs/jquery/dist/jquery.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/bootstrap/dist/js/bootstrap.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/metisMenu/dist/metisMenu.min.js', charset='utf-8')
|
||||
@@ -165,4 +165,3 @@ block content
|
||||
script(type='text/javascript', src='/libs/sweetalert/dist/sweetalert.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/switchery/dist/switchery.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/settings.js', charset='utf-8')
|
||||
|
||||
|
||||
@@ -7,15 +7,15 @@ block content
|
||||
link(href='/stylesheets/account.css', rel='stylesheet')
|
||||
.container.animated.fadeInDownSmall
|
||||
.row.login-block
|
||||
h3.col-md-4.col-md-offset-4.login-title.text-center 后台登录
|
||||
h3.col-md-4.col-md-offset-4.login-title.text-center #{__("auth.title")}
|
||||
.col-md-4.col-md-offset-4.login-wrap
|
||||
.form-group.form-group-lg
|
||||
input#txtUserName.form-control(type='text', placeholder='用户名')
|
||||
input#txtUserName.form-control(type='text', placeholder='#{__("auth.username")}')
|
||||
.form-group.form-group-lg
|
||||
input#txtPwd.form-control(type='password', placeholder='密码')
|
||||
input#txtPwd.form-control(type='password', placeholder='#{__("auth.password")}')
|
||||
button#btnLogin.btn.btn-green.btn-lg.btn-block(type='button', autocomplete='off')
|
||||
i.fa.fa-sign-in.fa-fw
|
||||
| 登 录
|
||||
| #{__("auth.login")}
|
||||
// Time Bar
|
||||
#progress-back.load-item
|
||||
#progress-bar
|
||||
@@ -25,4 +25,4 @@ block content
|
||||
script(type='text/javascript', src='/libs/supersized/slideshow/js/supersized.3.2.7.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/supersized/slideshow/theme/supersized.shutter.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/js-md5/js/md5.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/account.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/account.js', charset='utf-8')
|
||||
|
||||
@@ -7,11 +7,11 @@ block content
|
||||
.container
|
||||
.row
|
||||
article.col-sm-12.col-xs-12.detail-wrap.post-content.animated.fadeIn(class='#{settings.ExpandMenu === "true" ? "col-md-9" : "col-md-12"}')
|
||||
button.btn.btn-white.btn-menu(title='显示目录')
|
||||
button.btn.btn-white.btn-menu(title='#{__("blog.article.table_of_content")}')
|
||||
i.fa.fa-align-justify
|
||||
.hidden-sm.hidden-xs
|
||||
.text-muted.pull-left
|
||||
span(title='文章分类')
|
||||
span(title='#{__("blog.article.category")}')
|
||||
i.fa.fa-map-signs
|
||||
=' '
|
||||
a.black-link(href='/blog/' + post.CategoryAlias,target='_blank')=post.CateName
|
||||
@@ -21,13 +21,13 @@ block content
|
||||
=' '
|
||||
.clearfix
|
||||
header.text-center.post-title
|
||||
span.text-muted(title='发布时间')
|
||||
span.text-muted(title='#{__("blog.article.post_date")}')
|
||||
i.fa.fa-clock-o
|
||||
=' ' + post.CreateTimeStr
|
||||
h1=post.Title
|
||||
#main-context
|
||||
blockquote
|
||||
h2 摘要
|
||||
h2 #{__("blog.article.brief")}
|
||||
span=':' + post.Summary
|
||||
!=post.Content
|
||||
if(settings.ShowComments === 'true')
|
||||
@@ -70,7 +70,7 @@ block content
|
||||
}
|
||||
})();
|
||||
#control-wrap.col-md-3.hidden-sm.hidden-xs(style='#{settings.ExpandMenu === "true" ? "display: block;" : "display: none;"}')
|
||||
a.close-menu(title='隐藏目录')
|
||||
a.close-menu(title='#{__("blog.article.hide")}')
|
||||
i.fa.fa-times
|
||||
include ../shared/footer
|
||||
include ../shared/top
|
||||
|
||||
@@ -7,7 +7,7 @@ block content
|
||||
.row
|
||||
.col-md-2.category-block.hidden-sm.hidden-xs
|
||||
.category-top
|
||||
| 文章分类
|
||||
| #{__("blog.index.category")}
|
||||
.category-split
|
||||
.category-list
|
||||
ul.nav.nav-pills.nav-stacked
|
||||
@@ -28,9 +28,9 @@ block content
|
||||
.row.top-bar
|
||||
form#filterForm(action='/blog/getPosts', method='Post')
|
||||
.col-md-7.col-sm-4.hidden-xs.list-top-left
|
||||
a.current(title='按日期排序',sort='date') 日期
|
||||
a.current(title='#{__("blog.index.sort_date")}',sort='date') #{__("blog.index.date")}
|
||||
= ' '
|
||||
a(title='按标题排序',sort='title') 标题
|
||||
a(title='#{__("blog.index.sort_title")}',sort='title') #{__("blog.index.title")}
|
||||
input#CateAlias.hidden(type='text', value=currentCate, name='CateAlias')
|
||||
input#SortBy.hidden(type='text', value=0, name='SortBy')
|
||||
input#PageIndex.hidden(type='text', value=1, name='PageIndex')
|
||||
@@ -45,27 +45,27 @@ block content
|
||||
span.sr-only Toggle Dropdown
|
||||
ul.dropdown-menu.animated-quick.fadeInDown(role='menu')
|
||||
li.active(data-value='0', data-selected='true')
|
||||
a(href='#') 全文
|
||||
a(href='#') #{__("blog.index.full")}
|
||||
li(data-value='1')
|
||||
a(href='#') 标题
|
||||
a(href='#') #{__("blog.index.title")}
|
||||
li(data-value='2')
|
||||
a(href='#') 标签
|
||||
a(href='#') #{__("blog.index.tag")}
|
||||
li(data-value='3')
|
||||
a(href='#') 日期
|
||||
a(href='#') #{__("blog.index.date")}
|
||||
input#FilterType.hidden.hidden-field(type='text',readonly = "readonly", aria_hidden = "true",name='FilterType')
|
||||
input#Keyword.form-control(type='text',placeholder = "关键字",name='Keyword')
|
||||
input#Keyword.form-control(type='text',placeholder = '#{__("blog.index.category")}',name='Keyword')
|
||||
.input-group-btn
|
||||
button#btnFilter.btn.btn-white(type='button')
|
||||
i.fa.fa-search
|
||||
=' '
|
||||
span.hidden-sm.hidden-xs 搜索
|
||||
span.hidden-sm.hidden-xs #{__("blog.index.search")}
|
||||
ol.list-unstyled
|
||||
#load-list.spinner(style='display: none;')
|
||||
.bounce1
|
||||
.bounce2
|
||||
.bounce3
|
||||
#no-more.text-muted.text-center(style='display: none;')
|
||||
| 没有更多数据
|
||||
| #{__("blog.index.reach_end")}
|
||||
#scrollSpy.col-md-1
|
||||
ul#page-nav.list-unstyled.hidden-sm.hidden-xs.affix-top
|
||||
include ../shared/footer
|
||||
@@ -90,10 +90,10 @@ block content
|
||||
.modal-footer
|
||||
#label-foot.col-md-7.text-left.hidden-sm.hidden-xs(style='margin-top: 3px;')
|
||||
.col-md-5.text-right
|
||||
button#btnCloseModal.btn.btn-white(type='button') 关闭
|
||||
button#btnCloseModal.btn.btn-white(type='button') #{__("blog.index.close")}
|
||||
a#btnFullMode.btn.btn-green(href='', target='_blank')
|
||||
i.fa.fa-external-link
|
||||
| 完整模式
|
||||
| #{__("blog.index.full_mode")}
|
||||
include ../shared/top
|
||||
script(type='text/javascript', src='/libs/jquery/dist/jquery.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/bootstrap/dist/js/bootstrap.min.js', charset='utf-8')
|
||||
@@ -111,4 +111,4 @@ block content
|
||||
};
|
||||
script(type='text/javascript', src='http://v3.jiathis.com/code/jia.js?uid=#{settings.JiaThisId}', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/jquery-qrcode/dist/jquery.qrcode.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/top.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/top.js', charset='utf-8')
|
||||
|
||||
@@ -16,13 +16,13 @@ block content
|
||||
p!=about.Profile
|
||||
.row
|
||||
.col-md-6
|
||||
i.fa.fa-wechat(title='微信')
|
||||
i.fa.fa-wechat(title='#{__("about.wechat")}')
|
||||
= ' '
|
||||
!=about.Wechat
|
||||
= ' '
|
||||
i.fa.fa-lg.fa-qrcode(title='二维码')
|
||||
i.fa.fa-lg.fa-qrcode(title='#{__("about.qr_code")}')
|
||||
.col-md-6
|
||||
i.fa.fa-envelope(title='邮箱')
|
||||
i.fa.fa-envelope(title='#{__("about.email")}')
|
||||
= ' '
|
||||
!=about.Email
|
||||
include ../shared/footer
|
||||
@@ -41,4 +41,4 @@ block content
|
||||
};
|
||||
script(type='text/javascript', src='http://v3.jiathis.com/code/jia.js?uid=#{settings.JiaThisId}', charset='utf-8')
|
||||
script(type='text/javascript', src='/libs/jquery-qrcode/dist/jquery.qrcode.min.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/top.js', charset='utf-8')
|
||||
script(type='text/javascript', src='/javascripts/top.js', charset='utf-8')
|
||||
|
||||
@@ -19,4 +19,4 @@ html(lang='zh-CN')
|
||||
div=error
|
||||
a.btn.btn-green.btn-lg(href='/')
|
||||
i.fa.fa-home
|
||||
| 跳转首页
|
||||
| #{__("error.back_to_home")}
|
||||
|
||||
@@ -5,4 +5,4 @@
|
||||
| #{new Date().getFullYear()} © All Rights Reserved#{settings.RecordNo ? ' | ' + settings.RecordNo : ''}
|
||||
span.hidden-xs
|
||||
=' | '
|
||||
a(href='/admin', target='_blank') 后台管理
|
||||
a(href='/admin', target='_blank') #{__("footer.admin_system")}
|
||||
|
||||
@@ -43,16 +43,20 @@ html(lang='zh-CN')
|
||||
li
|
||||
a(href='/blog')
|
||||
i.fa.fa-file-text-o.fa-fw
|
||||
| 博客
|
||||
| #{__("layout.blog")}
|
||||
if(settings.ShowGuestbook === 'true')
|
||||
li
|
||||
a(href='/guestbook')
|
||||
i.fa.fa-edit.fa-fw
|
||||
| 留言
|
||||
| #{__("layout.message")}
|
||||
li
|
||||
a(href='/about')
|
||||
i.fa.fa-user.fa-fw
|
||||
| 关于
|
||||
| #{__("layout.about")}
|
||||
li
|
||||
a(href='/locale/#{__("lang-code")}')
|
||||
i.fa.fa-language.fa-fw
|
||||
| #{__("language")}
|
||||
block content
|
||||
if(settings.EnableStatistics === 'true')
|
||||
//百度统计代码
|
||||
@@ -63,4 +67,4 @@ html(lang='zh-CN')
|
||||
hm.src = "//hm.baidu.com/hm.js?#{settings.StatisticsId}";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
})();
|
||||
|
||||
@@ -1,81 +1,81 @@
|
||||
doctype html
|
||||
html(lang='zh-CN')
|
||||
head
|
||||
meta(http-equiv='Content-Type', content='text/html; charset=utf-8')
|
||||
meta(charset='utf-8')
|
||||
meta(name='viewport', content='width=device-width, initial-scale=1.0')
|
||||
title=title
|
||||
link(href='/libs/bootstrap/dist/css/bootstrap.min.css', rel='stylesheet')
|
||||
link(href='/stylesheets/admin.css', rel='stylesheet')
|
||||
link(href='/libs/font-awesome/css/font-awesome.min.css', rel='stylesheet')
|
||||
link(href='/libs/animate.css/animate.min.css', rel='stylesheet')
|
||||
body.fuelux
|
||||
#wrapper
|
||||
nav.navbar-default.navbar-static-side(role='navigation')
|
||||
.sidebar-collapse
|
||||
ul#side-menu.nav.metismenu
|
||||
li.nav-header
|
||||
.dropdown.profile-element
|
||||
span
|
||||
a(href='/', target='_blank')
|
||||
img.img-circle.img-lg(alt='image', src=settings.LogoPath)
|
||||
a(href='/admin')
|
||||
h4 后台管理
|
||||
.logo-element
|
||||
img.img-circle.img-sm(alt='image', src=settings.LogoPath)
|
||||
li
|
||||
a(href='/admin')
|
||||
i.fa.fa-bar-chart-o
|
||||
span.nav-label 网站统计
|
||||
li
|
||||
a(href='#')
|
||||
i.fa.fa-file-text-o
|
||||
span.nav-label 博客管理
|
||||
span.fa.arrow
|
||||
ul.nav.nav-second-level.collapse
|
||||
li
|
||||
a(href='/admin/newarticle') 新的文章
|
||||
li
|
||||
a(href='/admin/categorymanage') 分类管理
|
||||
li
|
||||
a(href='/admin/articlemanage') 文章管理
|
||||
li
|
||||
a(href='/admin/comments')
|
||||
i.fa.fa-comments-o
|
||||
span.nav-label 评论管理
|
||||
li
|
||||
a(href='/admin/guestbook')
|
||||
i.fa.fa-edit
|
||||
span.nav-label 留言管理
|
||||
li
|
||||
a(href='/admin/aboutmanage')
|
||||
i.fa.fa-user
|
||||
span.nav-label 关于管理
|
||||
li
|
||||
a(href='/admin/cachemanage')
|
||||
i.fa.fa-database
|
||||
span.nav-label 缓存管理
|
||||
li
|
||||
a(href='/admin/exception')
|
||||
i.fa.fa-bug
|
||||
span.nav-label 异常管理
|
||||
li
|
||||
a(href='/admin/settings')
|
||||
i.fa.fa-gears
|
||||
span.nav-label 系统设置
|
||||
#page-wrapper.gray-bg
|
||||
.row.border-bottom
|
||||
nav.navbar.navbar-static-top(role='navigation', style='margin-bottom: 0')
|
||||
.navbar-header
|
||||
a.navbar-minimalize.minimalize-styl-2.btn.btn-primary(href='#')
|
||||
i.fa.fa-bars
|
||||
form#logoutForm(action='/logout', method='Post')
|
||||
ul.nav.navbar-top-links.navbar-right
|
||||
li
|
||||
a(href="javascript:$('#logoutForm').submit()", title='退出登录')
|
||||
i.fa.fa-power-off
|
||||
| 退出登录
|
||||
block content
|
||||
.footer
|
||||
.text-center
|
||||
| #{new Date().getFullYear()} © All Rights Reserved#{settings.RecordNo ? ' | ' + settings.RecordNo : ''}
|
||||
head
|
||||
meta(http-equiv='Content-Type', content='text/html; charset=utf-8')
|
||||
meta(charset='utf-8')
|
||||
meta(name='viewport', content='width=device-width, initial-scale=1.0')
|
||||
title=title
|
||||
link(href='/libs/bootstrap/dist/css/bootstrap.min.css', rel='stylesheet')
|
||||
link(href='/stylesheets/admin.css', rel='stylesheet')
|
||||
link(href='/libs/font-awesome/css/font-awesome.min.css', rel='stylesheet')
|
||||
link(href='/libs/animate.css/animate.min.css', rel='stylesheet')
|
||||
body.fuelux
|
||||
#wrapper
|
||||
nav.navbar-default.navbar-static-side(role='navigation')
|
||||
.sidebar-collapse
|
||||
ul#side-menu.nav.metismenu
|
||||
li.nav-header
|
||||
.dropdown.profile-element
|
||||
span
|
||||
a(href='/', target='_blank')
|
||||
img.img-circle.img-lg(alt='image', src=settings.LogoPath)
|
||||
a(href='/admin')
|
||||
h4 #{__("layoutAdmin.title")}
|
||||
.logo-element
|
||||
img.img-circle.img-sm(alt='image', src=settings.LogoPath)
|
||||
li
|
||||
a(href='/admin')
|
||||
i.fa.fa-bar-chart-o
|
||||
span.nav-label #{__("layoutAdmin.web_statistic")}
|
||||
li
|
||||
a(href='#')
|
||||
i.fa.fa-file-text-o
|
||||
span.nav-label #{__("layoutAdmin.classified_management")}
|
||||
span.fa.arrow
|
||||
ul.nav.nav-second-level.collapse
|
||||
li
|
||||
a(href='/admin/newarticle') #{__("layoutAdmin.new_article")}
|
||||
li
|
||||
a(href='/admin/categorymanage') #{__("layoutAdmin.classified_management")}
|
||||
li
|
||||
a(href='/admin/articlemanage') #{__("layoutAdmin.article_management")}
|
||||
li
|
||||
a(href='/admin/comments')
|
||||
i.fa.fa-comments-o
|
||||
span.nav-label #{__("layoutAdmin.comment_management")}
|
||||
li
|
||||
a(href='/admin/guestbook')
|
||||
i.fa.fa-edit
|
||||
span.nav-label #{__("layoutAdmin.comment_management")}
|
||||
li
|
||||
a(href='/admin/aboutmanage')
|
||||
i.fa.fa-user
|
||||
span.nav-label #{__("layoutAdmin.about_management")}
|
||||
li
|
||||
a(href='/admin/cachemanage')
|
||||
i.fa.fa-database
|
||||
span.nav-label #{__("layoutAdmin.cache_management")}
|
||||
li
|
||||
a(href='/admin/exception')
|
||||
i.fa.fa-bug
|
||||
span.nav-label #{__("layoutAdmin.exception_management")}
|
||||
li
|
||||
a(href='/admin/settings')
|
||||
i.fa.fa-gears
|
||||
span.nav-label #{__("layoutAdmin.settings")}
|
||||
#page-wrapper.gray-bg
|
||||
.row.border-bottom
|
||||
nav.navbar.navbar-static-top(role='navigation', style='margin-bottom: 0')
|
||||
.navbar-header
|
||||
a.navbar-minimalize.minimalize-styl-2.btn.btn-primary(href='#')
|
||||
i.fa.fa-bars
|
||||
form#logoutForm(action='/logout', method='Post')
|
||||
ul.nav.navbar-top-links.navbar-right
|
||||
li
|
||||
a(href="javascript:$('#logoutForm').submit()", title='#{__("layoutAdmin.btn_logout")}')
|
||||
i.fa.fa-power-off
|
||||
| #{__("layoutAdmin.btn_logout")}
|
||||
block content
|
||||
.footer
|
||||
.text-center
|
||||
| #{new Date().getFullYear()} © All Rights Reserved#{settings.RecordNo ? ' | ' + settings.RecordNo : ''}
|
||||
|
||||
@@ -10,18 +10,18 @@ ul.fixed-tool.list-unstyled
|
||||
i.fa.fa-weibo
|
||||
a.jiathis_button_renren
|
||||
i.fa.fa-renren
|
||||
a.menu(title='分享到')
|
||||
a.menu(title='#{__("top.share")}')
|
||||
#ss_toggle.share(data-rot='180')
|
||||
.circle
|
||||
.bar
|
||||
li.qr-li.hidden-sm.hidden-xs(style='display: none;')
|
||||
a#qrBtn(title='二维码')
|
||||
a#qrBtn(title='#{__("top.qr_code")}')
|
||||
i.fa.fa-qrcode
|
||||
.qrcontain.popover.left.animated.fadeInLeft
|
||||
.arrow
|
||||
.popover-content.text-center
|
||||
#qrcode
|
||||
span 手机访问该页面
|
||||
span #{__("top.small_screen")}
|
||||
li#scrollTop.top-li(style='display: none;')
|
||||
a(title='回顶部')
|
||||
i.fa.fa-arrow-up
|
||||
a(title='#{__("top.back_to_top")}')
|
||||
i.fa.fa-arrow-up
|
||||
|
||||
Reference in New Issue
Block a user