├── .gitignore ├── README.md ├── conf └── app.conf ├── controllers ├── admin │ ├── account.go │ ├── article.go │ ├── base.go │ ├── index.go │ ├── system.go │ ├── tag.go │ └── user.go └── blog │ ├── base.go │ └── main.go ├── goblog.sql ├── main.go ├── models ├── base.go ├── option.go ├── option │ └── option.go ├── post.go ├── tag.go ├── tagpost.go └── user.go ├── static ├── bootstrap │ ├── css │ │ ├── bootstrap-responsive.min.css │ │ └── bootstrap.min.css │ ├── img │ │ ├── glyphicons-halflings-white.png │ │ └── glyphicons-halflings.png │ └── js │ │ └── bootstrap.min.js ├── datepicker │ ├── WdatePicker.js │ ├── calendar.js │ ├── lang │ │ ├── en.js │ │ ├── zh-cn.js │ │ └── zh-tw.js │ └── skin │ │ ├── WdatePicker.css │ │ ├── datePicker.gif │ │ ├── default │ │ ├── datepicker.css │ │ └── img.gif │ │ └── whyGreen │ │ ├── bg.jpg │ │ ├── datepicker.css │ │ └── img.gif ├── js │ └── jquery.min.js ├── themes │ ├── admin │ │ ├── css │ │ │ ├── admin.css │ │ │ ├── google.css │ │ │ ├── index.css │ │ │ └── style.css │ │ ├── img │ │ │ ├── colorpicker.png │ │ │ ├── menu-bg.png │ │ │ └── top-bg.png │ │ └── js │ │ │ ├── admin.js │ │ │ └── jquery.colorpicker.js │ ├── conservation │ │ ├── css │ │ │ ├── conservation.css │ │ │ ├── font-awesome.min.css │ │ │ └── style.css │ │ ├── font │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.svgz │ │ │ ├── fontawesome-webfont.ttf │ │ │ └── fontawesome-webfont.woff │ │ ├── img │ │ │ ├── fancybox │ │ │ │ ├── blank.gif │ │ │ │ ├── fancybox_loading.gif │ │ │ │ └── fancybox_sprite.png │ │ │ ├── fork-me-on-github.png │ │ │ ├── loading_gray.gif │ │ │ ├── loading_pacman.gif │ │ │ ├── social │ │ │ │ ├── coderwall.png │ │ │ │ ├── delicious.png │ │ │ │ ├── douban.png │ │ │ │ ├── email.png │ │ │ │ ├── facebook.png │ │ │ │ ├── github.png │ │ │ │ ├── google.png │ │ │ │ ├── linkedin.png │ │ │ │ ├── pinboard.png │ │ │ │ ├── pinterest.png │ │ │ │ ├── rss.png │ │ │ │ ├── stackoverflow.png │ │ │ │ ├── twitter.png │ │ │ │ └── weibo.png │ │ │ ├── top1.png │ │ │ └── top2.png │ │ └── js │ │ │ ├── jquery.fancybox.pack.js │ │ │ ├── json2.js │ │ │ ├── md5.js │ │ │ ├── slash.js │ │ │ └── twitter.js │ └── default │ │ ├── css │ │ ├── font-awesome.min.css │ │ └── style.css │ │ ├── font │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.svgz │ │ ├── fontawesome-webfont.ttf │ │ └── fontawesome-webfont.woff │ │ ├── img │ │ ├── fancybox │ │ │ ├── blank.gif │ │ │ ├── fancybox_loading.gif │ │ │ └── fancybox_sprite.png │ │ ├── loading_gray.gif │ │ ├── loading_pacman.gif │ │ └── social │ │ │ ├── coderwall.png │ │ │ ├── delicious.png │ │ │ ├── douban.png │ │ │ ├── email.png │ │ │ ├── facebook.png │ │ │ ├── github.png │ │ │ ├── google.png │ │ │ ├── linkedin.png │ │ │ ├── pinboard.png │ │ │ ├── pinterest.png │ │ │ ├── rss.png │ │ │ ├── stackoverflow.png │ │ │ ├── twitter.png │ │ │ └── weibo.png │ │ └── js │ │ ├── jquery.fancybox.pack.js │ │ ├── json2.js │ │ ├── md5.js │ │ ├── slash.js │ │ └── twitter.js └── ueditor │ ├── dialogs │ ├── anchor │ │ └── anchor.html │ ├── attachment │ │ ├── attachment.css │ │ ├── attachment.html │ │ ├── callbacks.js │ │ ├── fileTypeImages │ │ │ ├── icon_chm.gif │ │ │ ├── icon_default.png │ │ │ ├── icon_doc.gif │ │ │ ├── icon_exe.gif │ │ │ ├── icon_mp3.gif │ │ │ ├── icon_mv.gif │ │ │ ├── icon_pdf.gif │ │ │ ├── icon_ppt.gif │ │ │ ├── icon_psd.gif │ │ │ ├── icon_rar.gif │ │ │ ├── icon_txt.gif │ │ │ └── icon_xls.gif │ │ └── fileTypeMaps.js │ ├── gmap │ │ └── gmap.html │ ├── image │ │ ├── image.css │ │ ├── image.html │ │ ├── image.js │ │ ├── imageUploader.swf │ │ └── images │ │ │ ├── center_focus.jpg │ │ │ ├── left_focus.jpg │ │ │ ├── none_focus.jpg │ │ │ └── right_focus.jpg │ ├── internal.js │ ├── link │ │ └── link.html │ ├── map │ │ └── map.html │ ├── spechars │ │ ├── spechars.html │ │ └── spechars.js │ ├── table │ │ ├── dragicon.png │ │ ├── edittable.css │ │ ├── edittable.html │ │ ├── edittable.js │ │ ├── edittd.html │ │ └── edittip.html │ ├── tangram.js │ ├── template │ │ ├── config.js │ │ ├── images │ │ │ ├── bg.gif │ │ │ ├── pre0.png │ │ │ ├── pre1.png │ │ │ ├── pre2.png │ │ │ ├── pre3.png │ │ │ └── pre4.png │ │ ├── template.css │ │ ├── template.html │ │ └── template.js │ └── video │ │ ├── images │ │ ├── center_focus.jpg │ │ ├── left_focus.jpg │ │ ├── none_focus.jpg │ │ └── right_focus.jpg │ │ ├── video.css │ │ ├── video.html │ │ └── video.js │ ├── lang │ └── zh-cn │ │ ├── images │ │ ├── copy.png │ │ ├── imglabel.png │ │ ├── localimage.png │ │ ├── music.png │ │ └── upload.png │ │ └── zh-cn.js │ ├── themes │ ├── default │ │ ├── css │ │ │ └── ueditor.css │ │ ├── dialogbase.css │ │ └── images │ │ │ ├── anchor.gif │ │ │ ├── arrow.png │ │ │ ├── arrow_down.png │ │ │ ├── arrow_up.png │ │ │ ├── button-bg.gif │ │ │ ├── cancelbutton.gif │ │ │ ├── cursor_h.gif │ │ │ ├── cursor_h.png │ │ │ ├── cursor_v.gif │ │ │ ├── cursor_v.png │ │ │ ├── dialog-title-bg.png │ │ │ ├── filescan.png │ │ │ ├── highlighted.gif │ │ │ ├── icons-all.gif │ │ │ ├── icons.gif │ │ │ ├── icons.png │ │ │ ├── lock.gif │ │ │ ├── neweditor-tab-bg.png │ │ │ ├── pagebreak.gif │ │ │ ├── scale.png │ │ │ ├── spacer.gif │ │ │ ├── sparator_v.png │ │ │ ├── table-cell-align.png │ │ │ ├── tangram-colorpicker.png │ │ │ ├── toolbar_bg.png │ │ │ ├── unhighlighted.gif │ │ │ ├── upload.png │ │ │ ├── videologo.gif │ │ │ ├── word.gif │ │ │ └── wordpaste.png │ └── iframe.css │ ├── third-party │ ├── SyntaxHighlighter │ │ ├── shCore.js │ │ └── shCoreDefault.css │ ├── codemirror │ │ ├── codemirror.css │ │ └── codemirror.js │ └── swfupload │ │ ├── fileprogress.js │ │ ├── swfupload.cookies.js │ │ ├── swfupload.js │ │ ├── swfupload.proxy.js │ │ ├── swfupload.queue.js │ │ ├── swfupload.speed.js │ │ ├── swfupload.swf │ │ └── swfupload_fp9.swf │ ├── ueditor.all.min.js │ ├── ueditor.config.js │ └── ueditor.parse.js ├── util ├── cache.go ├── factory.go ├── functions.go ├── pager.go └── singleton │ └── singleton.go └── views ├── admin ├── account │ ├── login.html │ └── profile.html ├── article │ ├── add.html │ ├── edit.html │ └── list.html ├── index │ ├── index.html │ └── main.html ├── layout.html ├── showmsg.html ├── system │ └── setting.html ├── tag │ └── list.html └── user │ ├── add.html │ ├── edit.html │ └── list.html └── default ├── archives.html ├── article.html ├── category.html ├── index.html └── layout.html /.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | *.exe~ 3 | goblog 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | #GoBlog 2 | 3 | 基于Go语言和beego框架的简易博客系统 4 | 5 | 开发中,数据表结构随时可能调整... 6 | 7 | 演示地址: 8 | 9 | [http://www.lisijie.org/](http://www.lisijie.org/) 10 | 11 | ##编译安装说明: 12 | 13 | 设置GOPATH(安装目录) 14 | 15 | $ export GOPATH=/path/to/goblog 16 | $ cd /path/to/goblog 17 | 18 | 获取源代码,下载完成后会自动编译为goblog可执行文件 19 | 20 | $ go get github.com/lisijie/goblog 21 | 22 | 修改数据库配置 23 | 24 | $ cd src 25 | $ vim github.com/lisijie/goblog/conf/app.conf 26 | 27 | appname = goblog 28 | httpport = 8080 29 | runmode = dev 30 | dbhost = localhost 31 | dbport = 3306 32 | dbuser = root 33 | dbpassword = 123456 34 | dbname = goblog 35 | dbprefix = tb_ 36 | 37 | 导入MySQL 38 | 39 | $ mysql -u username -p -D goblog < goblog.sql 40 | 41 | 运行 42 | 43 | $ ./goblog 44 | 或 45 | $ nohup ./goblog 2>&1 > goblog.log & 46 | 设为后台运行 47 | 48 | 访问: 49 | 50 | http://localhost:8080 51 | 52 | 后台地址: 53 | 54 | http://localhost:8080/admin 55 | 56 | 帐号:admin 57 | 密码:admin888 58 | 59 | -------------------------------------------------------------------------------- /conf/app.conf: -------------------------------------------------------------------------------- 1 | ###################### 应用配置 ############################ 2 | 3 | # 应用名称 4 | AppName = goblog 5 | 6 | # 版本号 7 | AppVer = "1.0.0" 8 | 9 | # 监听端口 10 | HttpPort = 8080 11 | 12 | # 应用的模式,默认是 dev,为开发模式 13 | RunMode = dev 14 | 15 | # 是否开启 gzip 支持 16 | EnableGzip = true 17 | 18 | # 输出服务器名称 19 | ServerName = "GoBlog" 20 | 21 | # 是否启用 fastcgi,默认是 false 22 | UseFcgi = false 23 | 24 | # 文件上传默认内存缓存大小,默认值是 1 << 26(64M) 25 | MaxMemory = 1 << 26 26 | 27 | # 模板视图路径 28 | ViewsPath = views 29 | 30 | # 静态文件路径 31 | StaticDir = static:static 32 | 33 | ###################### 数据库配置 ############################ 34 | 35 | # MYSQL地址 36 | dbhost = localhost 37 | 38 | # MYSQL端口 39 | dbport = 3306 40 | 41 | # MYSQL用户名 42 | dbuser = root 43 | 44 | # MYSQL密码 45 | dbpassword = 46 | 47 | # MYSQL数据库名称 48 | dbname = goblog 49 | 50 | # MYSQL表前缀 51 | dbprefix = t_ 52 | -------------------------------------------------------------------------------- /controllers/admin/account.go: -------------------------------------------------------------------------------- 1 | package admin 2 | 3 | import ( 4 | "github.com/lisijie/goblog/models" 5 | "github.com/lisijie/goblog/util" 6 | "strconv" 7 | "strings" 8 | ) 9 | 10 | type AccountController struct { 11 | baseController 12 | } 13 | 14 | //登录 15 | func (this *AccountController) Login() { 16 | 17 | if this.userid > 0 { 18 | this.Redirect("/admin", 302) 19 | } 20 | 21 | if this.GetString("dosubmit") == "yes" { 22 | account := strings.TrimSpace(this.GetString("account")) 23 | password := strings.TrimSpace(this.GetString("password")) 24 | remember := this.GetString("remember") 25 | if account != "" && password != "" { 26 | var user models.User 27 | user.UserName = account 28 | if user.Read("user_name") != nil || user.Password != util.Md5([]byte(password)) { 29 | this.Data["errmsg"] = "帐号或密码错误" 30 | } else if user.Active == 0 { 31 | this.Data["errmsg"] = "该帐号未激活" 32 | } else { 33 | user.LoginCount += 1 34 | user.LastIp = this.getClientIp() 35 | user.LastLogin = this.getTime() 36 | user.Update() 37 | authkey := util.Md5([]byte(this.getClientIp() + "|" + user.Password)) 38 | if remember == "yes" { 39 | this.Ctx.SetCookie("auth", strconv.Itoa(user.Id)+"|"+authkey, 7*86400) 40 | } else { 41 | this.Ctx.SetCookie("auth", strconv.Itoa(user.Id)+"|"+authkey) 42 | } 43 | 44 | this.Redirect("/admin", 302) 45 | } 46 | } 47 | } 48 | this.TplName = this.moduleName + "/account/login.html" 49 | } 50 | 51 | //退出登录 52 | func (this *AccountController) Logout() { 53 | this.Ctx.SetCookie("auth", "") 54 | this.Redirect("/admin/login", 302) 55 | } 56 | 57 | //资料修改 58 | func (this *AccountController) Profile() { 59 | user := models.User{Id: this.userid} 60 | if err := user.Read(); err != nil { 61 | this.showmsg(err.Error()) 62 | } 63 | if this.isPost() { 64 | errmsg := make(map[string]string) 65 | password := strings.TrimSpace(this.GetString("password")) 66 | newpassword := strings.TrimSpace(this.GetString("newpassword")) 67 | newpassword2 := strings.TrimSpace(this.GetString("newpassword2")) 68 | updated := false 69 | if newpassword != "" { 70 | if password == "" || util.Md5([]byte(password)) != user.Password { 71 | errmsg["password"] = "当前密码错误" 72 | } else if len(newpassword) < 6 { 73 | errmsg["newpassword"] = "密码长度不能少于6个字符" 74 | } else if newpassword != newpassword2 { 75 | errmsg["newpassword2"] = "两次输入的密码不一致" 76 | } 77 | if len(errmsg) == 0 { 78 | user.Password = util.Md5([]byte(newpassword)) 79 | user.Update("password") 80 | updated = true 81 | } 82 | } 83 | this.Data["updated"] = updated 84 | this.Data["errmsg"] = errmsg 85 | } 86 | this.Data["user"] = user 87 | this.display() 88 | } 89 | -------------------------------------------------------------------------------- /controllers/admin/base.go: -------------------------------------------------------------------------------- 1 | package admin 2 | 3 | import ( 4 | "github.com/astaxie/beego" 5 | "github.com/lisijie/goblog/models" 6 | "github.com/lisijie/goblog/models/option" 7 | "github.com/lisijie/goblog/util" 8 | "strconv" 9 | "strings" 10 | "time" 11 | ) 12 | 13 | type baseController struct { 14 | beego.Controller 15 | userid int 16 | username string 17 | moduleName string 18 | controllerName string 19 | actionName string 20 | cache *util.LruCache 21 | } 22 | 23 | func (this *baseController) Prepare() { 24 | controllerName, actionName := this.GetControllerAndAction() 25 | this.moduleName = "admin" 26 | this.controllerName = strings.ToLower(controllerName[0 : len(controllerName)-10]) 27 | this.actionName = strings.ToLower(actionName) 28 | this.auth() 29 | this.checkPermission() 30 | cache, _ := util.Factory.Get("cache") 31 | this.cache = cache.(*util.LruCache) 32 | } 33 | 34 | //登录状态验证 35 | func (this *baseController) auth() { 36 | arr := strings.Split(this.Ctx.GetCookie("auth"), "|") 37 | if len(arr) == 2 { 38 | idstr, password := arr[0], arr[1] 39 | userid, _ := strconv.Atoi(idstr) 40 | if userid > 0 { 41 | var user models.User 42 | user.Id = userid 43 | if user.Read() == nil && password == util.Md5([]byte(this.getClientIp()+"|"+user.Password)) { 44 | this.userid = user.Id 45 | this.username = user.UserName 46 | } 47 | } 48 | } 49 | 50 | if this.userid == 0 && (this.controllerName != "account" || 51 | (this.controllerName == "account" && this.actionName != "logout" && this.actionName != "login")) { 52 | this.Redirect("/admin/login", 302) 53 | } 54 | } 55 | 56 | //渲染模版 57 | func (this *baseController) display(tpl ...string) { 58 | var tplname string 59 | if len(tpl) == 1 { 60 | tplname = this.moduleName + "/" + tpl[0] + ".html" 61 | } else { 62 | tplname = this.moduleName + "/" + this.controllerName + "/" + this.actionName + ".html" 63 | } 64 | this.Data["version"] = beego.AppConfig.String("AppVer") 65 | this.Data["adminid"] = this.userid 66 | this.Data["adminname"] = this.username 67 | this.Layout = this.moduleName + "/layout.html" 68 | this.TplName = tplname 69 | } 70 | 71 | //显示错误提示 72 | func (this *baseController) showmsg(msg ...string) { 73 | if len(msg) == 1 { 74 | msg = append(msg, this.Ctx.Request.Referer()) 75 | } 76 | this.Data["adminid"] = this.userid 77 | this.Data["adminname"] = this.username 78 | this.Data["msg"] = msg[0] 79 | this.Data["redirect"] = msg[1] 80 | this.Layout = this.moduleName + "/layout.html" 81 | this.TplName = this.moduleName + "/" + "showmsg.html" 82 | this.Render() 83 | this.StopRun() 84 | } 85 | 86 | //是否post提交 87 | func (this *baseController) isPost() bool { 88 | return this.Ctx.Request.Method == "POST" 89 | } 90 | 91 | //获取用户IP地址 92 | func (this *baseController) getClientIp() string { 93 | s := strings.Split(this.Ctx.Request.RemoteAddr, ":") 94 | 95 | return s[0] 96 | } 97 | 98 | //权限验证 99 | func (this *baseController) checkPermission() { 100 | if this.userid != 1 && this.controllerName == "user" { 101 | this.showmsg("抱歉,只有超级管理员才能进行该操作!") 102 | } 103 | } 104 | 105 | func (this *baseController) getTime() time.Time { 106 | timezone, _ := strconv.ParseFloat(option.Get("timezone"), 64) 107 | add := timezone * float64(time.Hour) 108 | return time.Now().UTC().Add(time.Duration(add)) 109 | } 110 | -------------------------------------------------------------------------------- /controllers/admin/index.go: -------------------------------------------------------------------------------- 1 | package admin 2 | 3 | import ( 4 | "github.com/astaxie/beego" 5 | "github.com/lisijie/goblog/models" 6 | "os" 7 | "runtime" 8 | ) 9 | 10 | type IndexController struct { 11 | baseController 12 | } 13 | 14 | func (this *IndexController) Index() { 15 | 16 | this.Data["version"] = beego.AppConfig.String("AppVer") 17 | this.Data["adminid"] = this.userid 18 | this.Data["adminname"] = this.username 19 | 20 | this.TplName = this.moduleName + "/index/index.html" 21 | } 22 | 23 | func (this *IndexController) Main() { 24 | 25 | this.Data["hostname"], _ = os.Hostname() 26 | this.Data["version"] = beego.AppConfig.String("AppVer") 27 | this.Data["gover"] = runtime.Version() 28 | this.Data["os"] = runtime.GOOS 29 | this.Data["cpunum"] = runtime.NumCPU() 30 | this.Data["arch"] = runtime.GOARCH 31 | 32 | this.Data["postnum"], _ = new(models.Post).Query().Count() 33 | this.Data["tagnum"], _ = new(models.Tag).Query().Count() 34 | this.Data["usernum"], _ = new(models.User).Query().Count() 35 | 36 | this.display() 37 | } 38 | -------------------------------------------------------------------------------- /controllers/admin/system.go: -------------------------------------------------------------------------------- 1 | package admin 2 | 3 | import ( 4 | "github.com/lisijie/goblog/models" 5 | "github.com/lisijie/goblog/models/option" 6 | ) 7 | 8 | type SystemController struct { 9 | baseController 10 | } 11 | 12 | //系统设置 13 | func (this *SystemController) Setting() { 14 | var result []*models.Option 15 | new(models.Option).Query().All(&result) 16 | 17 | options := make(map[string]string) 18 | mp := make(map[string]*models.Option) 19 | for _, v := range result { 20 | options[v.Name] = v.Value 21 | mp[v.Name] = v 22 | } 23 | 24 | if this.isPost() { 25 | keys := []string{"sitename", "siteurl", "subtitle", "pagesize", "keywords", "description", "email", "theme", "timezone", "stat"} 26 | for _, key := range keys { 27 | val := this.GetString(key) 28 | if _, ok := mp[key]; !ok { 29 | opt := new(models.Option) 30 | opt.Name = key 31 | opt.Value = val 32 | options[key] = val 33 | opt.Insert() 34 | } else { 35 | opt := mp[key] 36 | opt.Value = val 37 | opt.Update("Value") 38 | } 39 | } 40 | option.FlushOptions() 41 | this.Redirect("/admin/system/setting", 302) 42 | } 43 | 44 | this.Data["now"] = this.getTime() 45 | this.Data["options"] = options 46 | this.display() 47 | } 48 | -------------------------------------------------------------------------------- /controllers/admin/tag.go: -------------------------------------------------------------------------------- 1 | package admin 2 | 3 | import ( 4 | "github.com/lisijie/goblog/models" 5 | "github.com/lisijie/goblog/util" 6 | "strconv" 7 | "strings" 8 | ) 9 | 10 | type TagController struct { 11 | baseController 12 | } 13 | 14 | func (this *TagController) Index() { 15 | act := this.GetString("act") 16 | switch act { 17 | case "batch": 18 | this.batch() 19 | default: 20 | this.list() 21 | } 22 | } 23 | 24 | //标签列表 25 | func (this *TagController) list() { 26 | var page int 27 | var pagesize int = 10 28 | var list []*models.Tag 29 | var tag models.Tag 30 | 31 | if page, _ = this.GetInt("page"); page < 1 { 32 | page = 1 33 | } 34 | offset := (page - 1) * pagesize 35 | 36 | count, _ := tag.Query().Count() 37 | if count > 0 { 38 | tag.Query().OrderBy("-count").Limit(pagesize, offset).All(&list) 39 | } 40 | 41 | this.Data["count"] = count 42 | this.Data["list"] = list 43 | this.Data["pagebar"] = util.NewPager(page, int(count), pagesize, "/admin/tag", true).ToString() 44 | this.display("tag/list") 45 | } 46 | 47 | //批量操作 48 | func (this *TagController) batch() { 49 | ids := this.GetStrings("ids[]") 50 | op := this.GetString("op") 51 | 52 | idarr := make([]int, 0) 53 | for _, v := range ids { 54 | if id, _ := strconv.Atoi(v); id > 0 { 55 | idarr = append(idarr, id) 56 | } 57 | } 58 | 59 | switch op { 60 | case "upcount": //更新统计 61 | for _, id := range idarr { 62 | obj := models.Tag{Id: id} 63 | if obj.Read() == nil { 64 | obj.UpCount() 65 | } 66 | } 67 | case "merge": //合并到 68 | toname := strings.TrimSpace(this.GetString("toname")) 69 | if toname != "" && len(idarr) > 0 { 70 | tag := new(models.Tag) 71 | tag.Name = toname 72 | if tag.Read("name") != nil { 73 | tag.Count = 0 74 | tag.Insert() 75 | } 76 | for _, id := range idarr { 77 | obj := models.Tag{Id: id} 78 | if obj.Read() == nil { 79 | obj.MergeTo(tag) 80 | obj.Delete() 81 | } 82 | } 83 | tag.UpCount() 84 | } 85 | case "delete": //批量删除 86 | for _, id := range idarr { 87 | obj := models.Tag{Id: id} 88 | if obj.Read() == nil { 89 | obj.Delete() 90 | } 91 | } 92 | } 93 | 94 | this.Redirect("/admin/tag", 302) 95 | } 96 | -------------------------------------------------------------------------------- /controllers/admin/user.go: -------------------------------------------------------------------------------- 1 | package admin 2 | 3 | import ( 4 | "github.com/astaxie/beego/validation" 5 | "github.com/lisijie/goblog/models" 6 | "github.com/lisijie/goblog/util" 7 | "strings" 8 | ) 9 | 10 | type UserController struct { 11 | baseController 12 | } 13 | 14 | //用户列表 15 | func (this *UserController) List() { 16 | var page int 17 | var pagesize int = 10 18 | var list []*models.User 19 | var user models.User 20 | 21 | if page, _ = this.GetInt("page"); page < 1 { 22 | page = 1 23 | } 24 | offset := (page - 1) * pagesize 25 | 26 | count, _ := user.Query().Count() 27 | if count > 0 { 28 | user.Query().OrderBy("-id").Limit(pagesize, offset).All(&list) 29 | } 30 | 31 | this.Data["count"] = count 32 | this.Data["list"] = list 33 | this.Data["pagebar"] = util.NewPager(page, int(count), pagesize, "/admin/user/list", true).ToString() 34 | this.display() 35 | } 36 | 37 | //添加用户 38 | func (this *UserController) Add() { 39 | input := make(map[string]string) 40 | errmsg := make(map[string]string) 41 | if this.Ctx.Request.Method == "POST" { 42 | username := strings.TrimSpace(this.GetString("username")) 43 | password := strings.TrimSpace(this.GetString("password")) 44 | password2 := strings.TrimSpace(this.GetString("password2")) 45 | email := strings.TrimSpace(this.GetString("email")) 46 | active, _ := this.GetInt("active") 47 | 48 | input["username"] = username 49 | input["password"] = password 50 | input["password2"] = password2 51 | input["email"] = email 52 | 53 | valid := validation.Validation{} 54 | 55 | if v := valid.Required(username, "username"); !v.Ok { 56 | errmsg["username"] = "请输入用户名" 57 | } else if v := valid.MaxSize(username, 15, "username"); !v.Ok { 58 | errmsg["username"] = "用户名长度不能大于15个字符" 59 | } 60 | 61 | if v := valid.Required(password, "password"); !v.Ok { 62 | errmsg["password"] = "请输入密码" 63 | } 64 | 65 | if v := valid.Required(password2, "password2"); !v.Ok { 66 | errmsg["password2"] = "请再次输入密码" 67 | } else if password != password2 { 68 | errmsg["password2"] = "两次输入的密码不一致" 69 | } 70 | 71 | if v := valid.Required(email, "email"); !v.Ok { 72 | errmsg["email"] = "请输入email地址" 73 | } else if v := valid.Email(email, "email"); !v.Ok { 74 | errmsg["email"] = "Email无效" 75 | } 76 | 77 | if active > 0 { 78 | active = 1 79 | } else { 80 | active = 0 81 | } 82 | 83 | if len(errmsg) == 0 { 84 | var user models.User 85 | user.UserName = username 86 | user.Password = util.Md5([]byte(password)) 87 | user.Email = email 88 | user.Active = int8(active) 89 | if err := user.Insert(); err != nil { 90 | this.showmsg(err.Error()) 91 | } 92 | this.Redirect("/admin/user/list", 302) 93 | } 94 | 95 | } 96 | 97 | this.Data["input"] = input 98 | this.Data["errmsg"] = errmsg 99 | this.display() 100 | } 101 | 102 | //编辑用户 103 | func (this *UserController) Edit() { 104 | id, _ := this.GetInt("id") 105 | user := models.User{Id: id} 106 | if err := user.Read(); err != nil { 107 | this.showmsg("用户不存在") 108 | } 109 | 110 | errmsg := make(map[string]string) 111 | 112 | if this.Ctx.Request.Method == "POST" { 113 | password := strings.TrimSpace(this.GetString("password")) 114 | password2 := strings.TrimSpace(this.GetString("password2")) 115 | email := strings.TrimSpace(this.GetString("email")) 116 | active, _ := this.GetInt("active") 117 | valid := validation.Validation{} 118 | 119 | if password != "" { 120 | if v := valid.Required(password2, "password2"); !v.Ok { 121 | errmsg["password2"] = "请再次输入密码" 122 | } else if password != password2 { 123 | errmsg["password2"] = "两次输入的密码不一致" 124 | } else { 125 | user.Password = util.Md5([]byte(password)) 126 | } 127 | } 128 | if v := valid.Required(email, "email"); !v.Ok { 129 | errmsg["email"] = "请输入email地址" 130 | } else if v := valid.Email(email, "email"); !v.Ok { 131 | errmsg["email"] = "Email无效" 132 | } else { 133 | user.Email = email 134 | } 135 | 136 | if active > 0 { 137 | user.Active = 1 138 | } else { 139 | user.Active = 0 140 | } 141 | 142 | if len(errmsg) == 0 { 143 | user.Update() 144 | this.Redirect("/admin/user/list", 302) 145 | } 146 | } 147 | this.Data["errmsg"] = errmsg 148 | this.Data["user"] = user 149 | this.display() 150 | } 151 | 152 | //删除用户 153 | func (this *UserController) Delete() { 154 | id, _ := this.GetInt("id") 155 | if id == 1 { 156 | this.showmsg("不能删除ID为1的用户") 157 | } 158 | user := models.User{Id: id} 159 | if user.Read() == nil { 160 | user.Delete() 161 | } 162 | 163 | this.Redirect("/admin/user/list", 302) 164 | } 165 | -------------------------------------------------------------------------------- /controllers/blog/base.go: -------------------------------------------------------------------------------- 1 | package blog 2 | 3 | import ( 4 | "github.com/astaxie/beego" 5 | "github.com/lisijie/goblog/models/option" 6 | "github.com/lisijie/goblog/util" 7 | "os" 8 | "strings" 9 | ) 10 | 11 | type baseController struct { 12 | beego.Controller 13 | moduleName string 14 | controllerName string 15 | actionName string 16 | options map[string]string 17 | cache *util.LruCache 18 | } 19 | 20 | func (this *baseController) Prepare() { 21 | controllerName, actionName := this.GetControllerAndAction() 22 | this.moduleName = "blog" 23 | this.controllerName = strings.ToLower(controllerName[0 : len(controllerName)-10]) 24 | this.actionName = strings.ToLower(actionName) 25 | this.options = option.GetOptions() 26 | this.Data["options"] = this.options 27 | cache, _ := util.Factory.Get("cache") 28 | this.cache = cache.(*util.LruCache) 29 | } 30 | 31 | func (this *baseController) display(tpl string) { 32 | var theme string 33 | if v, ok := this.options["theme"]; ok && v != "" { 34 | theme = v 35 | } else { 36 | theme = "default" 37 | } 38 | if _, err := os.Stat(beego.BConfig.WebConfig.ViewsPath + "/" + theme + "/layout.html"); err == nil { 39 | this.Layout = theme + "/layout.html" 40 | } 41 | this.TplName = theme + "/" + tpl + ".html" 42 | } 43 | 44 | func (this *baseController) getOption(name string) string { 45 | if v, ok := this.options[name]; ok { 46 | return v 47 | } else { 48 | return "" 49 | } 50 | } 51 | 52 | func (this *baseController) setHeadMetas(params ...string) { 53 | title_buf := make([]string, 0, 3) 54 | if len(params) == 0 && this.getOption("subtitle") != "" { 55 | title_buf = append(title_buf, this.getOption("subtitle")) 56 | } 57 | if len(params) > 0 { 58 | title_buf = append(title_buf, params[0]) 59 | } 60 | title_buf = append(title_buf, this.getOption("sitename")) 61 | this.Data["title"] = strings.Join(title_buf, " - ") 62 | 63 | if len(params) > 1 { 64 | this.Data["keywords"] = params[1] 65 | } else { 66 | this.Data["keywords"] = this.getOption("keywords") 67 | } 68 | 69 | if len(params) > 2 { 70 | this.Data["description"] = params[2] 71 | } else { 72 | this.Data["description"] = this.getOption("description") 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /controllers/blog/main.go: -------------------------------------------------------------------------------- 1 | package blog 2 | 3 | import ( 4 | "github.com/lisijie/goblog/models" 5 | "github.com/lisijie/goblog/util" 6 | "strconv" 7 | "strings" 8 | ) 9 | 10 | type MainController struct { 11 | baseController 12 | } 13 | 14 | //首页, 只显示前N条 15 | func (this *MainController) Index() { 16 | var ( 17 | list []*models.Post 18 | pagesize int 19 | err error 20 | page int 21 | ) 22 | 23 | if page, err = strconv.Atoi(this.Ctx.Input.Param(":page")); err != nil || page < 1 { 24 | page = 1 25 | } 26 | 27 | if pagesize, err = strconv.Atoi(this.getOption("pagesize")); err != nil || pagesize < 1 { 28 | pagesize = 10 29 | } 30 | 31 | query := new(models.Post).Query().Filter("status", 0).Filter("urltype", 0) 32 | count, _ := query.Count() 33 | if count > 0 { 34 | query.OrderBy("-istop", "-posttime").Limit(pagesize, (page-1)*pagesize).All(&list) 35 | } 36 | 37 | this.Data["count"] = count 38 | this.Data["list"] = list 39 | this.Data["pagebar"] = util.NewPager(page, int(count), pagesize, "").ToString() 40 | this.setHeadMetas() 41 | this.display("index") 42 | } 43 | 44 | //文章显示 45 | func (this *MainController) Show() { 46 | var ( 47 | post models.Post 48 | err error 49 | ) 50 | 51 | urlname := this.Ctx.Input.Param(":urlname") 52 | if urlname != "" { 53 | post.UrlName = urlname 54 | err = post.Read("urlname") 55 | } else { 56 | id, _ := strconv.Atoi(this.Ctx.Input.Param(":id")) 57 | post.Id = id 58 | err = post.Read() 59 | } 60 | if err != nil || post.Status != 0 { 61 | this.Abort("404") 62 | } 63 | 64 | post.Views++ 65 | post.Update("Views") 66 | 67 | post.Content = strings.Replace(post.Content, "_ueditor_page_break_tag_", "", -1) 68 | 69 | this.Data["post"] = post 70 | this.setHeadMetas(post.Title, strings.Trim(post.Tags, ","), post.Title) 71 | this.display("article") 72 | } 73 | 74 | //历史归档 75 | func (this *MainController) Archives() { 76 | var ( 77 | page int 78 | pagesize int 79 | err error 80 | count int64 81 | result map[string][]*models.Post 82 | ) 83 | 84 | if page, err = strconv.Atoi(this.Ctx.Input.Param(":page")); err != nil || page < 1 { 85 | page = 1 86 | } 87 | 88 | if pagesize, err = strconv.Atoi(this.getOption("pagesize")); err != nil || pagesize < 1 { 89 | pagesize = 20 90 | } else { 91 | pagesize *= 2 92 | } 93 | 94 | query := new(models.Post).Query().Filter("status", 0).Filter("urltype", 0) 95 | 96 | count, _ = query.Count() 97 | result = make(map[string][]*models.Post) 98 | if count > 0 { 99 | var list []*models.Post 100 | query.OrderBy("-post_time").Limit(pagesize, (page-1)*pagesize).All(&list) 101 | for _, v := range list { 102 | year := v.PostTime.Format("2006") 103 | if _, ok := result[year]; !ok { 104 | result[year] = make([]*models.Post, 0) 105 | } 106 | result[year] = append(result[year], v) 107 | } 108 | } 109 | 110 | this.Data["page"] = page 111 | this.Data["count"] = count 112 | this.Data["pagesize"] = pagesize 113 | this.Data["pagebar"] = util.NewPager(page, int(count), pagesize, "/archives").ToString() 114 | this.Data["result"] = result 115 | 116 | this.setHeadMetas("归档") 117 | this.display("archives") 118 | } 119 | 120 | //分类查看 121 | func (this *MainController) Category() { 122 | var ( 123 | page int 124 | pagesize int 125 | name string 126 | err error 127 | count int64 128 | result map[string][]*models.Post 129 | ) 130 | name = this.Ctx.Input.Param(":name") 131 | if page, err = strconv.Atoi(this.Ctx.Input.Param(":page")); err != nil || page < 1 { 132 | page = 1 133 | } 134 | if pagesize, err = strconv.Atoi(this.getOption("pagesize")); err != nil || pagesize < 1 { 135 | pagesize = 20 136 | } else { 137 | pagesize *= 2 138 | } 139 | 140 | tagpost := new(models.TagPost) 141 | tag := new(models.Tag) 142 | tag.Name = name 143 | 144 | if tag.Read("Name") != nil { 145 | this.Abort("404") 146 | } 147 | 148 | query := tagpost.Query().Filter("tag_id", tag.Id).Filter("post_status", 0) 149 | count, _ = query.Count() 150 | result = make(map[string][]*models.Post) 151 | if count > 0 { 152 | var tp []*models.TagPost 153 | var list []*models.Post 154 | var pids []int = make([]int, 0) 155 | 156 | query.OrderBy("-post_time").Limit(pagesize, (page-1)*pagesize).All(&tp) 157 | for _, v := range tp { 158 | pids = append(pids, v.PostId) 159 | } 160 | 161 | new(models.Post).Query().Filter("id__in", pids).All(&list) 162 | 163 | for _, v := range list { 164 | year := v.PostTime.Format("2006") 165 | if _, ok := result[year]; !ok { 166 | result[year] = make([]*models.Post, 0) 167 | } 168 | result[year] = append(result[year], v) 169 | } 170 | } 171 | 172 | this.Data["tag"] = tag 173 | this.Data["page"] = page 174 | this.Data["pagesize"] = pagesize 175 | this.Data["count"] = count 176 | this.Data["result"] = result 177 | this.Data["pagebar"] = util.NewPager(page, int(count), pagesize, tag.Link()).ToString() 178 | 179 | this.setHeadMetas(tag.Name, tag.Name, tag.Name) 180 | this.display("category") 181 | } 182 | -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/astaxie/beego" 5 | "github.com/astaxie/beego/orm" 6 | "github.com/lisijie/goblog/controllers/admin" 7 | "github.com/lisijie/goblog/controllers/blog" 8 | "github.com/lisijie/goblog/models" 9 | "github.com/lisijie/goblog/util" 10 | ) 11 | 12 | func init() { 13 | util.Factory.Set("cache", func() (interface{}, error) { 14 | mc := util.NewLruCache(1000) 15 | return mc, nil 16 | }) 17 | 18 | models.Init() 19 | } 20 | 21 | func main() { 22 | if beego.AppConfig.String("runmode") == "dev" { 23 | orm.Debug = true 24 | } 25 | 26 | //前台路由 27 | beego.Router("/", &blog.MainController{}, "*:Index") 28 | beego.Router("/page/:page:int", &blog.MainController{}, "*:Index") 29 | beego.Router("/article/:id:int", &blog.MainController{}, "*:Show") //ID访问 30 | beego.Router("/article/:urlname(.+)", &blog.MainController{}, "*:Show") //别名访问 31 | beego.Router("/archives", &blog.MainController{}, "*:Archives") 32 | beego.Router("/archives/page/:page:int", &blog.MainController{}, "*:Archives") 33 | beego.Router("/category/:name(.+?)", &blog.MainController{}, "*:Category") 34 | beego.Router("/category/:name(.+?)/page/:page:int", &blog.MainController{}, "*:Category") 35 | beego.Router("/:urlname(.+)", &blog.MainController{}, "*:Show") //别名访问 36 | 37 | //后台路由 38 | beego.Router("/admin", &admin.IndexController{}, "*:Index") 39 | beego.Router("/admin/main", &admin.IndexController{}, "*:Main") 40 | beego.Router("/admin/login", &admin.AccountController{}, "*:Login") 41 | beego.Router("/admin/logout", &admin.AccountController{}, "*:Logout") 42 | beego.Router("/admin/account/profile", &admin.AccountController{}, "*:Profile") 43 | //系统管理 44 | beego.Router("/admin/system/setting", &admin.SystemController{}, "*:Setting") 45 | //内容管理 46 | beego.Router("/admin/article/list", &admin.ArticleController{}, "*:List") 47 | beego.Router("/admin/article/add", &admin.ArticleController{}, "*:Add") 48 | beego.Router("/admin/article/edit", &admin.ArticleController{}, "*:Edit") 49 | beego.Router("/admin/article/save", &admin.ArticleController{}, "post:Save") 50 | beego.Router("/admin/article/delete", &admin.ArticleController{}, "*:Delete") 51 | beego.Router("/admin/article/batch", &admin.ArticleController{}, "*:Batch") 52 | beego.Router("/admin/article/upload", &admin.ArticleController{}, "*:Upload") 53 | beego.Router("/admin/tag", &admin.TagController{}, "*:Index") 54 | //用户管理 55 | beego.Router("/admin/user/list", &admin.UserController{}, "*:List") 56 | beego.Router("/admin/user/add", &admin.UserController{}, "*:Add") 57 | beego.Router("/admin/user/edit", &admin.UserController{}, "*:Edit") 58 | beego.Router("/admin/user/delete", &admin.UserController{}, "*:Delete") 59 | 60 | beego.Run() 61 | } 62 | -------------------------------------------------------------------------------- /models/base.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "github.com/astaxie/beego" 5 | "github.com/astaxie/beego/orm" 6 | _ "github.com/go-sql-driver/mysql" 7 | ) 8 | 9 | func Init() { 10 | dbhost := beego.AppConfig.String("dbhost") 11 | dbport := beego.AppConfig.String("dbport") 12 | dbuser := beego.AppConfig.String("dbuser") 13 | dbpassword := beego.AppConfig.String("dbpassword") 14 | dbname := beego.AppConfig.String("dbname") 15 | if dbport == "" { 16 | dbport = "3306" 17 | } 18 | dsn := dbuser + ":" + dbpassword + "@tcp(" + dbhost + ":" + dbport + ")/" + dbname + "?charset=utf8&loc=Asia%2FShanghai" 19 | orm.RegisterDataBase("default", "mysql", dsn) 20 | orm.RegisterModel(new(User), new(Post), new(Tag), new(TagPost), new(Option)) 21 | } 22 | 23 | //返回带前缀的表名 24 | func TableName(str string) string { 25 | return beego.AppConfig.String("dbprefix") + str 26 | } 27 | -------------------------------------------------------------------------------- /models/option.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "github.com/astaxie/beego/orm" 5 | ) 6 | 7 | //配置项表 8 | type Option struct { 9 | Id int 10 | Name string 11 | Value string 12 | } 13 | 14 | func (m *Option) TableName() string { 15 | return TableName("option") 16 | } 17 | 18 | func (m *Option) Insert() error { 19 | if _, err := orm.NewOrm().Insert(m); err != nil { 20 | return err 21 | } 22 | return nil 23 | } 24 | 25 | func (m *Option) Read(fields ...string) error { 26 | if err := orm.NewOrm().Read(m, fields...); err != nil { 27 | return err 28 | } 29 | return nil 30 | } 31 | 32 | func (m *Option) Update(fields ...string) error { 33 | if _, err := orm.NewOrm().Update(m, fields...); err != nil { 34 | return err 35 | } 36 | return nil 37 | } 38 | 39 | func (m *Option) Delete() error { 40 | if _, err := orm.NewOrm().Delete(m); err != nil { 41 | return err 42 | } 43 | return nil 44 | } 45 | 46 | func (m *Option) Query() orm.QuerySeter { 47 | return orm.NewOrm().QueryTable(m) 48 | } 49 | -------------------------------------------------------------------------------- /models/option/option.go: -------------------------------------------------------------------------------- 1 | package option 2 | 3 | import ( 4 | "strconv" 5 | "time" 6 | 7 | "github.com/lisijie/goblog/models" 8 | "github.com/lisijie/goblog/util" 9 | ) 10 | 11 | func GetOptions() map[string]string { 12 | rs, _ := util.Factory.Get("cache") 13 | cache := rs.(*util.LruCache) 14 | if !cache.IsExist("options") { 15 | var result []*models.Option 16 | new(models.Option).Query().All(&result) 17 | options := make(map[string]string) 18 | for _, v := range result { 19 | options[v.Name] = v.Value 20 | } 21 | cache.Put("options", options, int64(0*time.Second)) 22 | } 23 | v := cache.Get("options") 24 | return v.(map[string]string) 25 | } 26 | 27 | func FlushOptions() { 28 | rs, _ := util.Factory.Get("cache") 29 | cache := rs.(*util.LruCache) 30 | cache.Delete("options") 31 | } 32 | 33 | func Get(key string) string { 34 | options := GetOptions() 35 | if v, ok := options[key]; ok { 36 | return v 37 | } 38 | return "" 39 | } 40 | 41 | func GetInt(key string) int { 42 | v, _ := strconv.Atoi(Get(key)) 43 | return v 44 | } 45 | -------------------------------------------------------------------------------- /models/post.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | "github.com/astaxie/beego/orm" 7 | "github.com/lisijie/goblog/util" 8 | "strings" 9 | "time" 10 | ) 11 | 12 | type Post struct { 13 | Id int 14 | UserId int `orm:"index"` 15 | Author string `orm:"size(15)"` 16 | Title string `orm:"size(100)"` 17 | Color string `orm:"size(7)"` 18 | UrlName string `orm:"size(100);index"` 19 | UrlType int8 20 | Content string `orm:"type(text)"` 21 | Tags string `orm:"size(100)"` 22 | PostTime time.Time `orm:"type(datetime);index"` 23 | Views int 24 | Status int8 25 | UpdateTime time.Time `orm:"type(datetime)"` 26 | IsTop int8 27 | } 28 | 29 | func (m *Post) TableName() string { 30 | return TableName("post") 31 | } 32 | 33 | func (m *Post) Insert() error { 34 | if _, err := orm.NewOrm().Insert(m); err != nil { 35 | return err 36 | } 37 | return nil 38 | } 39 | 40 | func (m *Post) Read(fields ...string) error { 41 | if err := orm.NewOrm().Read(m, fields...); err != nil { 42 | return err 43 | } 44 | return nil 45 | } 46 | 47 | func (m *Post) Update(fields ...string) error { 48 | if _, err := orm.NewOrm().Update(m, fields...); err != nil { 49 | return err 50 | } 51 | return nil 52 | } 53 | 54 | func (m *Post) Delete() error { 55 | if m.Tags != "" { 56 | o := orm.NewOrm() 57 | oldtags := strings.Split(strings.Trim(m.Tags, ","), ",") 58 | //标签统计-1 59 | o.QueryTable(&Tag{}).Filter("name__in", oldtags).Update(orm.Params{"count": orm.ColValue(orm.ColMinus, 1)}) 60 | //删掉tag_post表的记录 61 | o.QueryTable(&TagPost{}).Filter("postid", m.Id).Delete() 62 | } 63 | if _, err := orm.NewOrm().Delete(m); err != nil { 64 | return err 65 | } 66 | return nil 67 | } 68 | 69 | func (m *Post) Query() orm.QuerySeter { 70 | return orm.NewOrm().QueryTable(m) 71 | } 72 | 73 | //带颜色的标题 74 | func (m *Post) ColorTitle() string { 75 | if m.Color != "" { 76 | return fmt.Sprintf("%s", m.Color, m.Title) 77 | } else { 78 | return m.Title 79 | } 80 | } 81 | 82 | //内容URL 83 | func (m *Post) Link() string { 84 | if m.UrlName != "" { 85 | if m.UrlType == 1 { 86 | return fmt.Sprintf("/%s", util.Rawurlencode(m.UrlName)) 87 | } 88 | return fmt.Sprintf("/article/%s", util.Rawurlencode(m.UrlName)) 89 | } 90 | return fmt.Sprintf("/article/%d", m.Id) 91 | } 92 | 93 | //带链接的标签 94 | func (m *Post) TagsLink() string { 95 | if m.Tags == "" { 96 | return "" 97 | } 98 | var buf bytes.Buffer 99 | arr := strings.Split(strings.Trim(m.Tags, ","), ",") 100 | for k, v := range arr { 101 | if k > 0 { 102 | buf.WriteString(", ") 103 | } 104 | tag := Tag{Name: v} 105 | buf.WriteString(tag.Link()) 106 | } 107 | return buf.String() 108 | } 109 | 110 | //摘要 111 | func (m *Post) Excerpt() string { 112 | if i := strings.Index(m.Content, "_ueditor_page_break_tag_"); i != -1 { 113 | return m.Content[:i] 114 | } 115 | return m.Content 116 | } 117 | -------------------------------------------------------------------------------- /models/tag.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "fmt" 5 | "github.com/astaxie/beego/orm" 6 | "github.com/lisijie/goblog/util" 7 | "strconv" 8 | "strings" 9 | ) 10 | 11 | //标签表 12 | type Tag struct { 13 | Id int 14 | Name string `orm:"size(20);index"` 15 | Count int 16 | } 17 | 18 | func (m *Tag) TableName() string { 19 | return TableName("tag") 20 | } 21 | 22 | func (m *Tag) Insert() error { 23 | if _, err := orm.NewOrm().Insert(m); err != nil { 24 | return err 25 | } 26 | return nil 27 | } 28 | 29 | func (m *Tag) Read(fields ...string) error { 30 | if err := orm.NewOrm().Read(m, fields...); err != nil { 31 | return err 32 | } 33 | return nil 34 | } 35 | 36 | func (m *Tag) Update(fields ...string) error { 37 | if _, err := orm.NewOrm().Update(m, fields...); err != nil { 38 | return err 39 | } 40 | return nil 41 | } 42 | 43 | //删除 44 | func (m *Tag) Delete() error { 45 | var list []*TagPost 46 | table := new(Post).TableName() 47 | new(TagPost).Query().Filter("tagid", m.Id).All(&list) 48 | if len(list) > 0 { 49 | ids := make([]string, 0, len(list)) 50 | for _, v := range list { 51 | ids = append(ids, strconv.Itoa(v.PostId)) 52 | } 53 | orm.NewOrm().Raw("UPDATE "+table+" SET tags = REPLACE(tags, ?,',') WHERE id IN ("+strings.Join(ids, ",")+")", ","+m.Name+",").Exec() 54 | new(TagPost).Query().Filter("tag_id", m.Id).Delete() 55 | } 56 | if _, err := orm.NewOrm().Delete(m); err != nil { 57 | return err 58 | } 59 | return nil 60 | } 61 | 62 | //表查询 63 | func (m *Tag) Query() orm.QuerySeter { 64 | return orm.NewOrm().QueryTable(m) 65 | } 66 | 67 | //标签连接 68 | func (m *Tag) Link() string { 69 | return fmt.Sprintf("%s", util.Rawurlencode(m.Name), m.Name) 70 | } 71 | 72 | //更新统计 73 | func (m *Tag) UpCount() { 74 | c, _ := new(TagPost).Query().Filter("tag_id", m.Id).Count() 75 | m.Count = int(c) 76 | m.Update("count") 77 | } 78 | 79 | //合并到另一个标签 80 | func (m *Tag) MergeTo(to *Tag) { 81 | var list []*TagPost 82 | var tp TagPost 83 | tp.Query().Filter("tag_id", m.Id).All(&list) 84 | if len(list) > 0 { 85 | ids := make([]string, 0, len(list)) 86 | for _, v := range list { 87 | ids = append(ids, strconv.Itoa(v.PostId)) 88 | } 89 | tp.Query().Filter("tag_id", m.Id).Update(orm.Params{"tag_id": to.Id}) 90 | orm.NewOrm().Raw("UPDATE "+new(Post).TableName()+" SET tags = REPLACE(tags, ?, ?) WHERE id IN ("+strings.Join(ids, ",")+")", ","+m.Name+",", ","+to.Name+",").Exec() 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /models/tagpost.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "github.com/astaxie/beego/orm" 5 | "time" 6 | ) 7 | 8 | //标签内容关系表 9 | type TagPost struct { 10 | Id int 11 | TagId int `orm:"index"` 12 | PostId int 13 | PostStatus int8 14 | PostTime time.Time 15 | } 16 | 17 | func (m *TagPost) TableName() string { 18 | return TableName("tag_post") 19 | } 20 | 21 | func (m *TagPost) Insert() error { 22 | if _, err := orm.NewOrm().Insert(m); err != nil { 23 | return err 24 | } 25 | return nil 26 | } 27 | 28 | func (m *TagPost) Read(fields ...string) error { 29 | if err := orm.NewOrm().Read(m, fields...); err != nil { 30 | return err 31 | } 32 | return nil 33 | } 34 | 35 | func (m *TagPost) Update(fields ...string) error { 36 | if _, err := orm.NewOrm().Update(m, fields...); err != nil { 37 | return err 38 | } 39 | return nil 40 | } 41 | 42 | func (m *TagPost) Delete() error { 43 | if _, err := orm.NewOrm().Delete(m); err != nil { 44 | return err 45 | } 46 | return nil 47 | } 48 | 49 | func (m *TagPost) Query() orm.QuerySeter { 50 | return orm.NewOrm().QueryTable(m) 51 | } 52 | -------------------------------------------------------------------------------- /models/user.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "github.com/astaxie/beego/orm" 5 | "time" 6 | ) 7 | 8 | //用户表模型 9 | type User struct { 10 | Id int 11 | UserName string `orm:"unique;size(15)"` 12 | Password string `orm:"size(32)"` 13 | Email string `orm:"size(50)"` 14 | LastLogin time.Time `orm:"auto_now_add;type(datetime)"` 15 | LoginCount int 16 | LastIp string `orm:"size(32)"` 17 | Authkey string `orm:"size(10)"` 18 | Active int8 19 | } 20 | 21 | func (m *User) TableName() string { 22 | return TableName("user") 23 | } 24 | 25 | func (m *User) Insert() error { 26 | if _, err := orm.NewOrm().Insert(m); err != nil { 27 | return err 28 | } 29 | return nil 30 | } 31 | 32 | func (m *User) Read(fields ...string) error { 33 | if err := orm.NewOrm().Read(m, fields...); err != nil { 34 | return err 35 | } 36 | return nil 37 | } 38 | 39 | func (m *User) Update(fields ...string) error { 40 | if _, err := orm.NewOrm().Update(m, fields...); err != nil { 41 | return err 42 | } 43 | return nil 44 | } 45 | 46 | func (m *User) Delete() error { 47 | if _, err := orm.NewOrm().Delete(m); err != nil { 48 | return err 49 | } 50 | return nil 51 | } 52 | 53 | func (m *User) Query() orm.QuerySeter { 54 | return orm.NewOrm().QueryTable(m) 55 | } 56 | -------------------------------------------------------------------------------- /static/bootstrap/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/bootstrap/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /static/bootstrap/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/bootstrap/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /static/datepicker/lang/en.js: -------------------------------------------------------------------------------- 1 | var $lang={ 2 | errAlertMsg: "Invalid date or the date out of range,redo or not?", 3 | aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], 4 | aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"], 5 | aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], 6 | aLongMonStr: ["January","February","March","April","May","June","July","August","September","October","November","December"], 7 | clearStr: "Clear", 8 | todayStr: "Today", 9 | okStr: "OK", 10 | updateStr: "OK", 11 | timeStr: "Time", 12 | quickStr: "Quick Selection", 13 | err_1: 'MinDate Cannot be bigger than MaxDate!' 14 | } -------------------------------------------------------------------------------- /static/datepicker/lang/zh-cn.js: -------------------------------------------------------------------------------- 1 | var $lang={ 2 | errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u8303\u56F4,\u9700\u8981\u64A4\u9500\u5417?", 3 | aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"], 4 | aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"], 5 | aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"], 6 | aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"], 7 | clearStr: "\u6E05\u7A7A", 8 | todayStr: "\u4ECA\u5929", 9 | okStr: "\u786E\u5B9A", 10 | updateStr: "\u786E\u5B9A", 11 | timeStr: "\u65F6\u95F4", 12 | quickStr: "\u5FEB\u901F\u9009\u62E9", 13 | err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u4E8E\u6700\u5927\u65E5\u671F!' 14 | } -------------------------------------------------------------------------------- /static/datepicker/lang/zh-tw.js: -------------------------------------------------------------------------------- 1 | var $lang={ 2 | errAlertMsg: "\u4E0D\u5408\u6CD5\u7684\u65E5\u671F\u683C\u5F0F\u6216\u8005\u65E5\u671F\u8D85\u51FA\u9650\u5B9A\u7BC4\u570D,\u9700\u8981\u64A4\u92B7\u55CE?", 3 | aWeekStr: ["\u5468","\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"], 4 | aLongWeekStr:["\u5468","\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"], 5 | aMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00","\u5341\u4E8C"], 6 | aLongMonStr: ["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"], 7 | clearStr: "\u6E05\u7A7A", 8 | todayStr: "\u4ECA\u5929", 9 | okStr: "\u78BA\u5B9A", 10 | updateStr: "\u78BA\u5B9A", 11 | timeStr: "\u6642\u9593", 12 | quickStr: "\u5FEB\u901F\u9078\u64C7", 13 | err_1: '\u6700\u5C0F\u65E5\u671F\u4E0D\u80FD\u5927\u65BC\u6700\u5927\u65E5\u671F!' 14 | } -------------------------------------------------------------------------------- /static/datepicker/skin/WdatePicker.css: -------------------------------------------------------------------------------- 1 | .Wdate{ 2 | border:#999 1px solid; 3 | height:20px; 4 | background:#fff url(datePicker.gif) no-repeat right; 5 | } 6 | .Wdate::-ms-clear{display:none;} 7 | 8 | .WdateFmtErr{ 9 | font-weight:bold; 10 | color:red; 11 | } -------------------------------------------------------------------------------- /static/datepicker/skin/datePicker.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/datepicker/skin/datePicker.gif -------------------------------------------------------------------------------- /static/datepicker/skin/default/datepicker.css: -------------------------------------------------------------------------------- 1 | /* 2 | * My97 DatePicker 4.8 3 | */ 4 | 5 | .WdateDiv{ 6 | width:180px; 7 | background-color:#FFFFFF; 8 | border:#bbb 1px solid; 9 | padding:2px; 10 | } 11 | 12 | .WdateDiv2{ 13 | width:360px; 14 | } 15 | .WdateDiv *{font-size:9pt;} 16 | 17 | .WdateDiv .NavImg a{ 18 | display:block; 19 | cursor:pointer; 20 | height:16px; 21 | width:16px; 22 | } 23 | 24 | .WdateDiv .NavImgll a{ 25 | float:left; 26 | background:transparent url(img.gif) no-repeat scroll 0 0; 27 | } 28 | .WdateDiv .NavImgl a{ 29 | float:left; 30 | background:transparent url(img.gif) no-repeat scroll -16px 0; 31 | } 32 | .WdateDiv .NavImgr a{ 33 | float:right; 34 | background:transparent url(img.gif) no-repeat scroll -32px 0; 35 | } 36 | .WdateDiv .NavImgrr a{ 37 | float:right; 38 | background:transparent url(img.gif) no-repeat scroll -48px 0; 39 | } 40 | 41 | .WdateDiv #dpTitle{ 42 | height:24px; 43 | margin-bottom:2px; 44 | padding:1px; 45 | } 46 | 47 | .WdateDiv .yminput{ 48 | margin-top:2px; 49 | text-align:center; 50 | height:20px; 51 | border:0px; 52 | width:50px; 53 | cursor:pointer; 54 | } 55 | 56 | .WdateDiv .yminputfocus{ 57 | margin-top:2px; 58 | text-align:center; 59 | font-weight:bold; 60 | height:20px; 61 | color:blue; 62 | border:#ccc 1px solid; 63 | width:50px; 64 | } 65 | 66 | .WdateDiv .menuSel{ 67 | z-index:1; 68 | position:absolute; 69 | background-color:#FFFFFF; 70 | border:#ccc 1px solid; 71 | display:none; 72 | } 73 | 74 | .WdateDiv .menu{ 75 | cursor:pointer; 76 | background-color:#fff; 77 | } 78 | 79 | .WdateDiv .menuOn{ 80 | cursor:pointer; 81 | background-color:#BEEBEE; 82 | } 83 | 84 | .WdateDiv .invalidMenu{ 85 | color:#aaa; 86 | } 87 | 88 | .WdateDiv .YMenu{ 89 | margin-top:20px; 90 | 91 | } 92 | 93 | .WdateDiv .MMenu{ 94 | margin-top:20px; 95 | *width:62px; 96 | } 97 | 98 | .WdateDiv .hhMenu{ 99 | margin-top:-90px; 100 | margin-left:26px; 101 | } 102 | 103 | .WdateDiv .mmMenu{ 104 | margin-top:-46px; 105 | margin-left:26px; 106 | } 107 | 108 | .WdateDiv .ssMenu{ 109 | margin-top:-24px; 110 | margin-left:26px; 111 | } 112 | 113 | .WdateDiv .Wweek { 114 | text-align:center; 115 | background:#DAF3F5; 116 | border-right:#BDEBEE 1px solid; 117 | } 118 | 119 | .WdateDiv .MTitle{ 120 | background-color:#BDEBEE; 121 | } 122 | .WdateDiv .WdayTable2{ 123 | border-collapse:collapse; 124 | border:#c5d9e8 1px solid; 125 | } 126 | .WdateDiv .WdayTable2 table{ 127 | border:0; 128 | } 129 | 130 | .WdateDiv .WdayTable{ 131 | line-height:20px; 132 | border:#c5d9e8 1px solid; 133 | } 134 | .WdateDiv .WdayTable td{ 135 | text-align:center; 136 | } 137 | 138 | .WdateDiv .Wday{ 139 | cursor:pointer; 140 | } 141 | 142 | .WdateDiv .WdayOn{ 143 | cursor:pointer; 144 | background-color:#C0EBEF; 145 | } 146 | 147 | .WdateDiv .Wwday{ 148 | cursor:pointer; 149 | color:#FF2F2F; 150 | } 151 | 152 | .WdateDiv .WwdayOn{ 153 | cursor:pointer; 154 | color:#000; 155 | background-color:#C0EBEF; 156 | } 157 | .WdateDiv .Wtoday{ 158 | cursor:pointer; 159 | color:blue; 160 | } 161 | .WdateDiv .Wselday{ 162 | background-color:#A9E4E9; 163 | } 164 | .WdateDiv .WspecialDay{ 165 | background-color:#66F4DF; 166 | } 167 | 168 | .WdateDiv .WotherDay{ 169 | cursor:pointer; 170 | color:#6A6AFF; 171 | } 172 | 173 | .WdateDiv .WotherDayOn{ 174 | cursor:pointer; 175 | background-color:#C0EBEF; 176 | } 177 | 178 | .WdateDiv .WinvalidDay{ 179 | color:#aaa; 180 | } 181 | 182 | .WdateDiv #dpTime{ 183 | float:left; 184 | margin-top:3px; 185 | margin-right:30px; 186 | } 187 | 188 | .WdateDiv #dpTime #dpTimeStr{ 189 | margin-left:1px; 190 | } 191 | 192 | .WdateDiv #dpTime input{ 193 | width:18px; 194 | height:20px; 195 | text-align:center; 196 | border:#ccc 1px solid; 197 | } 198 | 199 | .WdateDiv #dpTime .tB{ 200 | border-right:0px; 201 | } 202 | 203 | .WdateDiv #dpTime .tE{ 204 | border-left:0; 205 | border-right:0; 206 | } 207 | 208 | .WdateDiv #dpTime .tm{ 209 | width:7px; 210 | border-left:0; 211 | border-right:0; 212 | } 213 | 214 | .WdateDiv #dpTime #dpTimeUp{ 215 | height:10px; 216 | width:13px; 217 | border:0px; 218 | background:url(img.gif) no-repeat -32px -16px; 219 | } 220 | 221 | .WdateDiv #dpTime #dpTimeDown{ 222 | height:10px; 223 | width:13px; 224 | border:0px; 225 | background:url(img.gif) no-repeat -48px -16px; 226 | } 227 | 228 | .WdateDiv #dpQS { 229 | float:left; 230 | margin-right:3px; 231 | margin-top:3px; 232 | background:url(img.gif) no-repeat 0px -16px; 233 | width:20px; 234 | height:20px; 235 | cursor:pointer; 236 | } 237 | .WdateDiv #dpControl { 238 | text-align:right; 239 | } 240 | .WdateDiv .dpButton{ 241 | height:20px; 242 | width:45px; 243 | border:#ccc 1px solid; 244 | margin-top:2px; 245 | margin-right:1px; 246 | } -------------------------------------------------------------------------------- /static/datepicker/skin/default/img.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/datepicker/skin/default/img.gif -------------------------------------------------------------------------------- /static/datepicker/skin/whyGreen/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/datepicker/skin/whyGreen/bg.jpg -------------------------------------------------------------------------------- /static/datepicker/skin/whyGreen/datepicker.css: -------------------------------------------------------------------------------- 1 | /* 2 | * My97 DatePicker 4.8 Skin:whyGreen 3 | */ 4 | .WdateDiv{ 5 | width:180px; 6 | background-color:#fff; 7 | border:#C5E1E4 1px solid; 8 | padding:2px; 9 | } 10 | 11 | .WdateDiv2{ 12 | width:360px; 13 | } 14 | .WdateDiv *{font-size:9pt;} 15 | 16 | .WdateDiv .NavImg a{ 17 | cursor:pointer; 18 | display:block; 19 | width:16px; 20 | height:16px; 21 | margin-top:1px; 22 | } 23 | 24 | .WdateDiv .NavImgll a{ 25 | float:left; 26 | background:url(img.gif) no-repeat; 27 | } 28 | .WdateDiv .NavImgl a{ 29 | float:left; 30 | background:url(img.gif) no-repeat -16px 0px; 31 | } 32 | .WdateDiv .NavImgr a{ 33 | float:right; 34 | background:url(img.gif) no-repeat -32px 0px; 35 | } 36 | .WdateDiv .NavImgrr a{ 37 | float:right; 38 | background:url(img.gif) no-repeat -48px 0px; 39 | } 40 | 41 | .WdateDiv #dpTitle{ 42 | height:24px; 43 | padding:1px; 44 | border:#c5d9e8 1px solid; 45 | background:url(bg.jpg); 46 | margin-bottom:2px; 47 | } 48 | 49 | .WdateDiv .yminput{ 50 | margin-top:2px; 51 | text-align:center; 52 | border:0px; 53 | height:20px; 54 | width:50px; 55 | color:#034c50; 56 | background-color:transparent; 57 | cursor:pointer; 58 | } 59 | 60 | .WdateDiv .yminputfocus{ 61 | margin-top:2px; 62 | text-align:center; 63 | border:#939393 1px solid; 64 | font-weight:bold; 65 | color:#034c50; 66 | height:20px; 67 | width:50px; 68 | } 69 | 70 | .WdateDiv .menuSel{ 71 | z-index:1; 72 | position:absolute; 73 | background-color:#FFFFFF; 74 | border:#A3C6C8 1px solid; 75 | display:none; 76 | } 77 | 78 | .WdateDiv .menu{ 79 | cursor:pointer; 80 | background-color:#fff; 81 | color:#11777C; 82 | } 83 | 84 | .WdateDiv .menuOn{ 85 | cursor:pointer; 86 | background-color:#BEEBEE; 87 | } 88 | 89 | .WdateDiv .invalidMenu{ 90 | color:#aaa; 91 | } 92 | 93 | .WdateDiv .YMenu{ 94 | margin-top:20px; 95 | } 96 | 97 | .WdateDiv .MMenu{ 98 | margin-top:20px; 99 | *width:62px; 100 | } 101 | 102 | .WdateDiv .hhMenu{ 103 | margin-top:-90px; 104 | margin-left:26px; 105 | } 106 | 107 | .WdateDiv .mmMenu{ 108 | margin-top:-46px; 109 | margin-left:26px; 110 | } 111 | 112 | .WdateDiv .ssMenu{ 113 | margin-top:-24px; 114 | margin-left:26px; 115 | } 116 | 117 | .WdateDiv .Wweek { 118 | text-align:center; 119 | background:#DAF3F5; 120 | border-right:#BDEBEE 1px solid; 121 | } 122 | 123 | .WdateDiv .MTitle{ 124 | color:#13777e; 125 | background-color:#bdebee; 126 | } 127 | .WdateDiv .WdayTable2{ 128 | border-collapse:collapse; 129 | border:#BEE9F0 1px solid; 130 | } 131 | .WdateDiv .WdayTable2 table{ 132 | border:0; 133 | } 134 | 135 | .WdateDiv .WdayTable{ 136 | line-height:20px; 137 | color:#13777e; 138 | background-color:#edfbfb; 139 | border:#BEE9F0 1px solid; 140 | } 141 | .WdateDiv .WdayTable td{ 142 | text-align:center; 143 | } 144 | 145 | .WdateDiv .Wday{ 146 | cursor:pointer; 147 | } 148 | 149 | .WdateDiv .WdayOn{ 150 | cursor:pointer; 151 | background-color:#74d2d9 ; 152 | } 153 | 154 | .WdateDiv .Wwday{ 155 | cursor:pointer; 156 | color:#ab1e1e; 157 | } 158 | 159 | .WdateDiv .WwdayOn{ 160 | cursor:pointer; 161 | background-color:#74d2d9; 162 | } 163 | .WdateDiv .Wtoday{ 164 | cursor:pointer; 165 | color:blue; 166 | } 167 | .WdateDiv .Wselday{ 168 | background-color:#A7E2E7; 169 | } 170 | .WdateDiv .WspecialDay{ 171 | background-color:#66F4DF; 172 | } 173 | 174 | .WdateDiv .WotherDay{ 175 | cursor:pointer; 176 | color:#0099CC; 177 | } 178 | 179 | .WdateDiv .WotherDayOn{ 180 | cursor:pointer; 181 | background-color:#C0EBEF; 182 | } 183 | 184 | .WdateDiv .WinvalidDay{ 185 | color:#aaa; 186 | } 187 | 188 | .WdateDiv #dpTime{ 189 | float:left; 190 | margin-top:3px; 191 | margin-right:30px; 192 | } 193 | 194 | .WdateDiv #dpTime #dpTimeStr{ 195 | margin-left:1px; 196 | color:#497F7F; 197 | } 198 | 199 | .WdateDiv #dpTime input{ 200 | height:20px; 201 | width:18px; 202 | text-align:center; 203 | color:#333; 204 | border:#61CAD0 1px solid; 205 | } 206 | 207 | .WdateDiv #dpTime .tB{ 208 | border-right:0px; 209 | } 210 | 211 | .WdateDiv #dpTime .tE{ 212 | border-left:0; 213 | border-right:0; 214 | } 215 | 216 | .WdateDiv #dpTime .tm{ 217 | width:7px; 218 | border-left:0; 219 | border-right:0; 220 | } 221 | 222 | .WdateDiv #dpTime #dpTimeUp{ 223 | height:10px; 224 | width:13px; 225 | border:0px; 226 | background:url(img.gif) no-repeat -32px -16px; 227 | } 228 | 229 | .WdateDiv #dpTime #dpTimeDown{ 230 | height:10px; 231 | width:13px; 232 | border:0px; 233 | background:url(img.gif) no-repeat -48px -16px; 234 | } 235 | 236 | .WdateDiv #dpQS { 237 | float:left; 238 | margin-right:3px; 239 | margin-top:3px; 240 | background:url(img.gif) no-repeat 0px -16px; 241 | width:20px; 242 | height:20px; 243 | cursor:pointer; 244 | } 245 | .WdateDiv #dpControl { 246 | text-align:right; 247 | margin-top:3px; 248 | } 249 | .WdateDiv .dpButton{ 250 | height:20px; 251 | width:45px; 252 | margin-top:2px; 253 | border:#38B1B9 1px solid; 254 | background-color:#CFEBEE; 255 | color:#08575B; 256 | } -------------------------------------------------------------------------------- /static/datepicker/skin/whyGreen/img.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/datepicker/skin/whyGreen/img.gif -------------------------------------------------------------------------------- /static/themes/admin/css/admin.css: -------------------------------------------------------------------------------- 1 | @CHARSET "UTF-8"; 2 | 3 | body {background:#fff;} 4 | a {color:#2277AA;} 5 | a:hover {color:#DC6C31; text-decoration:none;} 6 | ul {list-style:none;} 7 | select {font-size: 12px; margin: 0;} 8 | 9 | .header { 10 | background:#464646 url('../img/top-bg.png') repeat-x; 11 | color:#fff; 12 | height:41px; 13 | margin-bottom:10px 14 | } 15 | .header h1 {margin:0; padding:0; font-size:24px;text-shadow:1px 1px 0 #000;} 16 | .header h1 span {color:#f0f0f0; font-size:12px; font-weight: normal;margin-left: 50px;line-height: 41px} 17 | .header a {color:#f0f0f0;} 18 | .header a:hover {color: yellow;} 19 | .header i {color: #666} 20 | 21 | .main {background:#fff} 22 | 23 | .footer {border-top:1px solid #eee; text-align:center; font-size:12px; padding:10px 0;} 24 | 25 | .page-content *, label {font-size:12px !important;} 26 | .page-content { 27 | margin-left: 150px; 28 | margin-top: 0px; 29 | padding: 0px; 30 | background-color: #fff; 31 | min-height:600px; 32 | } 33 | 34 | .table {font-size:12px} 35 | .table-list tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#FBFFE4} 36 | .table-list {border:1px solid #ddd; border-collapse:separate} 37 | .table-list td {padding:5px;} 38 | .table-list th { 39 | background:#EEF3F7 url('../img/menu-bg.png') 0 -3px repeat-x; 40 | font-weight:normal; 41 | font-size:13px; 42 | padding:0 5px; 43 | line-height:28px; 44 | } 45 | .table-list tfoot, .table-form tfoot {background:#f9f9f9} 46 | .table-form td, .table-form th {border:none; padding:5px; line-height:180%;} 47 | .table-form th {text-align:right; font-weight:normal; color:#333} 48 | .table-form td input {margin: 0} 49 | 50 | .pagination {margin:0;} 51 | 52 | .search-form {border:1px solid #FBEED5; background:#FCF8E3; padding:5px; margin:5px 0} 53 | .search-form form {margin:0} 54 | 55 | .toolbar {margin-bottom:10px;font-size:12px} 56 | .toolbar a {line-height:35px;} 57 | .toolbar a:hover {text-decoration:none;} 58 | .toolbar .active {background:#498CD0; color:#fff; padding:3px 10px; -moz-border-radius: 2px;-webkit-border-radius: 2px;-khtml-border-radius: 2px;border-radius: 2px; } 59 | .toolbar .divider {color:#ccc; margin:0 5px} 60 | -------------------------------------------------------------------------------- /static/themes/admin/css/index.css: -------------------------------------------------------------------------------- 1 | @CHARSET "UTF-8"; 2 | body {min-height:100%;min-width:960px;_width:expression((document.documentElement.clientWidth < 960) ? "960px":"auto");} 3 | body, ul, li, table {margin:0; padding:0;} 4 | a {text-decoration:none;} 5 | li {list-style:none} 6 | 7 | .header {background:#1F76BC; height:41px; font-size:13px; font-weight:normal; text-align:left; width:100%} 8 | .header .top-menu {color:#fff; line-height:40px; margin-left:180px; margin-left:200px} 9 | .header .top-menu span {color:#969696; margin:0px;} 10 | .header .top-menu a {color:#fff;} 11 | .header .top-menu a:hover {color:#ff8;} 12 | .header .logo {font-size:20px; color:#fff; line-height:40px; margin-left:20px; float:left;} 13 | 14 | .sidebar {width:150px; background:#F9FCFF; border-right:1px solid #A8C3F0;} 15 | .sidebar-menu li { 16 | display: block; 17 | margin: 0 0 1px 0; 18 | padding: 0; 19 | color:#0965B8; 20 | } 21 | .sidebar-menu .open, .sidebar-menu .close { 22 | font-size:14px; 23 | font-weight:bold; 24 | padding-left:20px; 25 | line-height:30px; 26 | display: block; 27 | color:#0965B8; 28 | background:#E2EDFB; 29 | } 30 | .sub-menu { 31 | width:100%; 32 | clear: both; 33 | } 34 | .sub-menu li { 35 | width:100%; 36 | margin:3px 0; 37 | } 38 | .sub-menu a { 39 | color:#333; 40 | text-decoration:none; 41 | display: block; 42 | padding: 5px 0px; 43 | font-weight: 300; 44 | font-size: 12px; 45 | padding-left:30px; 46 | } 47 | .sidebar-menu .sub-menu a:hover, ul.sidebar-menu > li > ul.sub-menu .active {background:#FEEBD0} 48 | 49 | .copyright {position:absolute; bottom:0; border-top:1px solid #ccc; width:150px; text-align:center; font-size:11px; line-height:2em; color:#666;} 50 | .copyright-inner {border-top:1px solid #fff;} 51 | 52 | .header .top-menu .badge { 53 | display:inline-block; 54 | padding:1px 5px; 55 | font-size:12px; 56 | font-weight:bold; 57 | line-height:14px; 58 | color:#fff; 59 | white-space:nowrap; 60 | vertical-align:baseline; 61 | background-color:#f60; 62 | -webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px 63 | } 64 | -------------------------------------------------------------------------------- /static/themes/admin/css/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | color: #000; 3 | padding: 0px !important; 4 | margin: 0px !important; 5 | font-size:13px; 6 | direction: ltr; 7 | } 8 | 9 | .page-content *, label {font-size:12px !important;} 10 | .page-content { 11 | margin-left: 150px; 12 | margin-top: 0px; 13 | padding: 0px; 14 | background-color: #fff; 15 | min-height:600px; 16 | } 17 | 18 | .table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#FBFFE4} 19 | .table-list {border:1px solid #ddd; border-collapse:separate} 20 | .table-list caption {font-size:14px; text-align:left; line-height:250%} 21 | .table-list td {padding:5px;} 22 | .table-list th { 23 | background:#EEF3F7 url('../img/menu-bg.png') 0 -3px repeat-x; 24 | font-weight:normal; 25 | font-size:13px; 26 | padding:0 5px; 27 | line-height:28px; 28 | } 29 | .table-list tfoot, .table-form tfoot {background:#f9f9f9} 30 | .table-form td, .table-form th {border:none; padding:5px; line-height:180%;} 31 | .table-form th {text-align:right; font-weight:normal; color:#333} 32 | 33 | .toolbar {border-bottom:1px solid #f0f0f0; margin-bottom:10px;} 34 | .toolbar a {line-height:35px;} 35 | .toolbar a:hover {text-decoration:none;} 36 | .toolbar .active {background:#498CD0; color:#fff; padding:3px 10px; -moz-border-radius: 2px;-webkit-border-radius: 2px;-khtml-border-radius: 2px;border-radius: 2px; } 37 | .toolbar .divider {color:#ccc; margin:0 5px} 38 | 39 | .pagination {margin:3px 0;} 40 | 41 | .search-form {border:1px solid #FBEED5; background:#FCF8E3; padding:5px; margin:5px 0} 42 | .search-form form {margin:0} 43 | 44 | .guestbook-reply {background:#FFFFEE; border:1px solid #ccc; padding:0 10px; color:#666;} 45 | 46 | .result {border:1px solid #85C5E5; background:#D9EDF7; padding:5px; margin:5px 0;overflow:hidden} 47 | 48 | .award-box {display:none; width:800px; height:500px; background:#fff; position:absolute; border:1px solid #e0e0e0;} 49 | .award-head {height:30px;text-align:right;background:#f0f0f0;padding-right:10px; line-height:30px; border-bottom:1px solid #e0e0e0} 50 | .award-body {width:100%; height:470px; overflow-y:scroll;} -------------------------------------------------------------------------------- /static/themes/admin/img/colorpicker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/admin/img/colorpicker.png -------------------------------------------------------------------------------- /static/themes/admin/img/menu-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/admin/img/menu-bg.png -------------------------------------------------------------------------------- /static/themes/admin/img/top-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/admin/img/top-bg.png -------------------------------------------------------------------------------- /static/themes/admin/js/admin.js: -------------------------------------------------------------------------------- 1 | 2 | function checkall(name, obj) { 3 | $(":checkbox[name='"+name+"']").each(function(o) { 4 | $(this).prop('checked', obj.checked); 5 | }); 6 | } 7 | 8 | function del_confirm() { 9 | return confirm('一旦删除将不可恢复,确定吗?'); 10 | } -------------------------------------------------------------------------------- /static/themes/conservation/css/conservation.css: -------------------------------------------------------------------------------- 1 | body { 2 | color: black; 3 | } 4 | .inner { 5 | margin:0 auto 6 | } 7 | .container { 8 | min-width: 1024px; 9 | } 10 | .container .wrapper { 11 | position: relative; 12 | min-height: 100%; 13 | margin: 0 auto; 14 | min-width: 1024px; 15 | width: 80%; 16 | } 17 | .container .mid-col { 18 | min-height:100%; 19 | min-width: 1024px; 20 | width: 100%; 21 | margin: 0 auto; 22 | background:whitesmoke; 23 | padding-top: 55px; 24 | } 25 | .container .left-col { 26 | width: 100%; 27 | opacity:.6; 28 | -webkit-transition:all .2s ease-in; 29 | -moz-transition:all .2s ease-in; 30 | -o-transition:all .2s ease-in; 31 | -ms-transition:all .2s ease-in; 32 | transition:all .2s ease-in; 33 | height: 55px; 34 | z-index: 1000; 35 | background-color: black; 36 | } 37 | .container .left-col .intrude-less { 38 | width: 100%; 39 | } 40 | .container .left-col #header { 41 | width:100%; 42 | padding: 0; 43 | line-height: 25px; 44 | } 45 | .container .left-col #header .header-element { 46 | float: left; 47 | } 48 | .container .left-col #header .sitename { 49 | padding-left: 60px; 50 | padding-right: 60px; 51 | margin-top: 6px; 52 | text-align: center; 53 | } 54 | .container .left-col #header #sub-nav { 55 | float: right; 56 | margin-right: 50px; 57 | } 58 | .container .left-col #header .github { 59 | position: fixed; 60 | top: 0px; 61 | right: 0px; 62 | z-index: 10; 63 | width: 149px; 64 | height: 149px; 65 | } 66 | .container .left-col #header #main-nav { 67 | float:none; 68 | margin-left:0px; 69 | margin-top: 20px; 70 | font-size: 2em; 71 | } 72 | .container .left-col #header #main-nav ul li { 73 | margin-left: 40px; 74 | display:block; 75 | float: left; 76 | } 77 | .container .mid-col .post .title { 78 | color: rgb(255, 0, 0); 79 | } 80 | .container .mid-col .mid-col-container { 81 | /*box-shadow: 10px 10px 5px #888888;*/ 82 | border: 2px solid #a1a1a1; 83 | border-radius: 10px; 84 | } 85 | article .entry-content { 86 | line-height: 1.6; 87 | } 88 | article .entry-content p { 89 | margin-top: 0px; 90 | } 91 | -------------------------------------------------------------------------------- /static/themes/conservation/font/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/font/fontawesome-webfont.eot -------------------------------------------------------------------------------- /static/themes/conservation/font/fontawesome-webfont.svgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/font/fontawesome-webfont.svgz -------------------------------------------------------------------------------- /static/themes/conservation/font/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/font/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /static/themes/conservation/font/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/font/fontawesome-webfont.woff -------------------------------------------------------------------------------- /static/themes/conservation/img/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/fancybox/blank.gif -------------------------------------------------------------------------------- /static/themes/conservation/img/fancybox/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/fancybox/fancybox_loading.gif -------------------------------------------------------------------------------- /static/themes/conservation/img/fancybox/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/fancybox/fancybox_sprite.png -------------------------------------------------------------------------------- /static/themes/conservation/img/fork-me-on-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/fork-me-on-github.png -------------------------------------------------------------------------------- /static/themes/conservation/img/loading_gray.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/loading_gray.gif -------------------------------------------------------------------------------- /static/themes/conservation/img/loading_pacman.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/loading_pacman.gif -------------------------------------------------------------------------------- /static/themes/conservation/img/social/coderwall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/social/coderwall.png -------------------------------------------------------------------------------- /static/themes/conservation/img/social/delicious.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/social/delicious.png -------------------------------------------------------------------------------- /static/themes/conservation/img/social/douban.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/social/douban.png -------------------------------------------------------------------------------- /static/themes/conservation/img/social/email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/social/email.png -------------------------------------------------------------------------------- /static/themes/conservation/img/social/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/social/facebook.png -------------------------------------------------------------------------------- /static/themes/conservation/img/social/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/social/github.png -------------------------------------------------------------------------------- /static/themes/conservation/img/social/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/social/google.png -------------------------------------------------------------------------------- /static/themes/conservation/img/social/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/social/linkedin.png -------------------------------------------------------------------------------- /static/themes/conservation/img/social/pinboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/social/pinboard.png -------------------------------------------------------------------------------- /static/themes/conservation/img/social/pinterest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/social/pinterest.png -------------------------------------------------------------------------------- /static/themes/conservation/img/social/rss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/social/rss.png -------------------------------------------------------------------------------- /static/themes/conservation/img/social/stackoverflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/social/stackoverflow.png -------------------------------------------------------------------------------- /static/themes/conservation/img/social/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/social/twitter.png -------------------------------------------------------------------------------- /static/themes/conservation/img/social/weibo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/social/weibo.png -------------------------------------------------------------------------------- /static/themes/conservation/img/top1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/top1.png -------------------------------------------------------------------------------- /static/themes/conservation/img/top2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/conservation/img/top2.png -------------------------------------------------------------------------------- /static/themes/conservation/js/md5.js: -------------------------------------------------------------------------------- 1 | var MD5=function(e){function t(e,t){return e<>>32-t}function n(e,t){var n,r,i,s,o;i=e&2147483648;s=t&2147483648;n=e&1073741824;r=t&1073741824;o=(e&1073741823)+(t&1073741823);if(n&r){return o^2147483648^i^s}if(n|r){if(o&1073741824){return o^3221225472^i^s}else{return o^1073741824^i^s}}else{return o^i^s}}function r(e,t,n){return e&t|~e&n}function i(e,t,n){return e&n|t&~n}function s(e,t,n){return e^t^n}function o(e,t,n){return t^(e|~n)}function u(e,i,s,o,u,a,f){e=n(e,n(n(r(i,s,o),u),f));return n(t(e,a),i)}function a(e,r,s,o,u,a,f){e=n(e,n(n(i(r,s,o),u),f));return n(t(e,a),r)}function f(e,r,i,o,u,a,f){e=n(e,n(n(s(r,i,o),u),f));return n(t(e,a),r)}function l(e,r,i,s,u,a,f){e=n(e,n(n(o(r,i,s),u),f));return n(t(e,a),r)}function c(e){var t;var n=e.length;var r=n+8;var i=(r-r%64)/64;var s=(i+1)*16;var o=Array(s-1);var u=0;var a=0;while(a>>29;return o}function h(e){var t="",n="",r,i;for(i=0;i<=3;i++){r=e>>>i*8&255;n="0"+r.toString(16);t=t+n.substr(n.length-2,2)}return t}function p(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t}var d=Array();var v,m,g,y,b,w,E,S,x;var T=7,N=12,C=17,k=22;var L=5,A=9,O=14,M=20;var _=4,D=11,P=16,H=23;var B=6,j=10,F=15,I=21;e=p(e);d=c(e);w=1732584193;E=4023233417;S=2562383102;x=271733878;for(v=0;v'+alt+''); 26 | } 27 | 28 | $(this).wrap(''); 29 | }); 30 | }); 31 | }; 32 | 33 | externalLinks(); // Delete or comment this line to disable opening external links in new window 34 | appendCaption(); // Delete or comment this line to disable caption 35 | 36 | var mobilenav = $('#mobile-nav'); 37 | 38 | $('html').click(function(){ 39 | mobilenav.find('.on').each(function(){ 40 | $(this).removeClass('on').next().hide(); 41 | }); 42 | }); 43 | 44 | mobilenav.on('click', '.menu .button', function(){ 45 | if (!$(this).hasClass('on')){ 46 | var width = $(this).width() + 42; 47 | $(this).addClass('on').next().show().css({width: width}); 48 | } else { 49 | $(this).removeClass('on').next().hide(); 50 | } 51 | }).on('click', '.search .button', function(){ 52 | if (!$(this).hasClass('on')){ 53 | var width = mobilenav.width() - 51; 54 | mobilenav.children('.menu').children().eq(0).removeClass('on').next().hide(); 55 | $(this).addClass('on').next().show().css({width: width}).children().children().eq(0).focus(); 56 | } else { 57 | $(this).removeClass('on').next().hide().children().children().eq(0).val(''); 58 | } 59 | }).click(function(e){ 60 | e.stopPropagation(); 61 | }); 62 | })(jQuery); -------------------------------------------------------------------------------- /static/themes/conservation/js/twitter.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | $.fn.getTwitterFeed = function(userid, count, reply){ 3 | var banner = $(this), 4 | feed = banner.find('.feed'), 5 | interval = 10000, 6 | speed = 500; 7 | 8 | var linkify = function(text){ 9 | text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '$2').replace(/(^|\W)@(\w+)/g, '$1@$2').replace(/(^|\W)#(\w+)/g, '$1#$2'); 10 | 11 | return text; 12 | } 13 | 14 | var relativeDate = function(date){ 15 | if (navigator.appName === 'Microsoft Internet Explorer') return ''; 16 | 17 | var unit = { 18 | now: 'Now', 19 | minute: '1 min', 20 | minutes: ' mins', 21 | hour: '1 hr', 22 | hours: ' hrs', 23 | day: 'Yesterday', 24 | days: ' days', 25 | week: '1 week', 26 | weeks: ' weeks' 27 | }; 28 | 29 | var current = new Date(), 30 | tweet = new Date(date), 31 | diff = (((current.getTime() + (1 * 60000)) - tweet.getTime()) / 1000), 32 | day_diff = Math.floor(diff / 86400); 33 | 34 | if (day_diff == 0){ 35 | if (diff < 60) return unit.now; 36 | else if (diff < 120) return unit.minute; 37 | else if (diff < 3600) return Math.floor(diff / 60) + unit.minutes; 38 | else if (diff < 7200) return unit.hour; 39 | else if (diff < 86400) return Math.floor(diff / 3600) + unit.hours; 40 | else return ''; 41 | } else if (day_diff == 1) { 42 | return unit.day; 43 | } else if (day_diff < 7) { 44 | return day_diff + unit.days; 45 | } else if (day_diff == 7) { 46 | return unit.week; 47 | } else if (day_diff > 7) { 48 | return Math.ceil(day_diff / 7) + unit.weeks; 49 | } else { 50 | return ''; 51 | } 52 | } 53 | 54 | if ($(window).width() > 600){ 55 | var url = 'https://api.twitter.com/1/statuses/user_timeline.json?screen_name='+userid+'&count='+count+'&include_rts=true&trim_user=true&exclude_repies='+(reply ? '0' : '1')+'&callback=?'; 56 | banner.show(); 57 | $.getJSON(url, function(json){ 58 | var length = json.length, 59 | fragment = document.createDocumentFragment(), 60 | counts = 0, 61 | timeout; 62 | 63 | for (var i=0; i'+relativeDate(json[i].created_at)+''; 66 | fragment.appendChild(item); 67 | } 68 | 69 | var play = function(){ 70 | timeout = setTimeout(function(){ 71 | feed.animate({top: -30}, speed, function(){ 72 | //move the first item and put it as last item 73 | $(this).children('li:last').after($(this).children('li:first')); 74 | //set the default item to correct position 75 | $(this).css({'top' : '0px'}); 76 | play(); 77 | }); 78 | }, interval); 79 | } 80 | 81 | var pause = function(){ 82 | clearTimeout(timeout); 83 | } 84 | 85 | banner.on('mouseenter', pause).on('mouseleave', play) 86 | .children('.loading').hide().end() 87 | .children('.container').show() 88 | .children('.feed').append(fragment); 89 | 90 | play(); 91 | }); 92 | } 93 | }; 94 | })(jQuery); -------------------------------------------------------------------------------- /static/themes/default/font/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/font/fontawesome-webfont.eot -------------------------------------------------------------------------------- /static/themes/default/font/fontawesome-webfont.svgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/font/fontawesome-webfont.svgz -------------------------------------------------------------------------------- /static/themes/default/font/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/font/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /static/themes/default/font/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/font/fontawesome-webfont.woff -------------------------------------------------------------------------------- /static/themes/default/img/fancybox/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/fancybox/blank.gif -------------------------------------------------------------------------------- /static/themes/default/img/fancybox/fancybox_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/fancybox/fancybox_loading.gif -------------------------------------------------------------------------------- /static/themes/default/img/fancybox/fancybox_sprite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/fancybox/fancybox_sprite.png -------------------------------------------------------------------------------- /static/themes/default/img/loading_gray.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/loading_gray.gif -------------------------------------------------------------------------------- /static/themes/default/img/loading_pacman.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/loading_pacman.gif -------------------------------------------------------------------------------- /static/themes/default/img/social/coderwall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/social/coderwall.png -------------------------------------------------------------------------------- /static/themes/default/img/social/delicious.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/social/delicious.png -------------------------------------------------------------------------------- /static/themes/default/img/social/douban.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/social/douban.png -------------------------------------------------------------------------------- /static/themes/default/img/social/email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/social/email.png -------------------------------------------------------------------------------- /static/themes/default/img/social/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/social/facebook.png -------------------------------------------------------------------------------- /static/themes/default/img/social/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/social/github.png -------------------------------------------------------------------------------- /static/themes/default/img/social/google.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/social/google.png -------------------------------------------------------------------------------- /static/themes/default/img/social/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/social/linkedin.png -------------------------------------------------------------------------------- /static/themes/default/img/social/pinboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/social/pinboard.png -------------------------------------------------------------------------------- /static/themes/default/img/social/pinterest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/social/pinterest.png -------------------------------------------------------------------------------- /static/themes/default/img/social/rss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/social/rss.png -------------------------------------------------------------------------------- /static/themes/default/img/social/stackoverflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/social/stackoverflow.png -------------------------------------------------------------------------------- /static/themes/default/img/social/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/social/twitter.png -------------------------------------------------------------------------------- /static/themes/default/img/social/weibo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/themes/default/img/social/weibo.png -------------------------------------------------------------------------------- /static/themes/default/js/md5.js: -------------------------------------------------------------------------------- 1 | var MD5=function(e){function t(e,t){return e<>>32-t}function n(e,t){var n,r,i,s,o;i=e&2147483648;s=t&2147483648;n=e&1073741824;r=t&1073741824;o=(e&1073741823)+(t&1073741823);if(n&r){return o^2147483648^i^s}if(n|r){if(o&1073741824){return o^3221225472^i^s}else{return o^1073741824^i^s}}else{return o^i^s}}function r(e,t,n){return e&t|~e&n}function i(e,t,n){return e&n|t&~n}function s(e,t,n){return e^t^n}function o(e,t,n){return t^(e|~n)}function u(e,i,s,o,u,a,f){e=n(e,n(n(r(i,s,o),u),f));return n(t(e,a),i)}function a(e,r,s,o,u,a,f){e=n(e,n(n(i(r,s,o),u),f));return n(t(e,a),r)}function f(e,r,i,o,u,a,f){e=n(e,n(n(s(r,i,o),u),f));return n(t(e,a),r)}function l(e,r,i,s,u,a,f){e=n(e,n(n(o(r,i,s),u),f));return n(t(e,a),r)}function c(e){var t;var n=e.length;var r=n+8;var i=(r-r%64)/64;var s=(i+1)*16;var o=Array(s-1);var u=0;var a=0;while(a>>29;return o}function h(e){var t="",n="",r,i;for(i=0;i<=3;i++){r=e>>>i*8&255;n="0"+r.toString(16);t=t+n.substr(n.length-2,2)}return t}function p(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n127&&r<2048){t+=String.fromCharCode(r>>6|192);t+=String.fromCharCode(r&63|128)}else{t+=String.fromCharCode(r>>12|224);t+=String.fromCharCode(r>>6&63|128);t+=String.fromCharCode(r&63|128)}}return t}var d=Array();var v,m,g,y,b,w,E,S,x;var T=7,N=12,C=17,k=22;var L=5,A=9,O=14,M=20;var _=4,D=11,P=16,H=23;var B=6,j=10,F=15,I=21;e=p(e);d=c(e);w=1732584193;E=4023233417;S=2562383102;x=271733878;for(v=0;v'+alt+''); 26 | } 27 | 28 | $(this).wrap(''); 29 | }); 30 | }); 31 | }; 32 | 33 | externalLinks(); // Delete or comment this line to disable opening external links in new window 34 | appendCaption(); // Delete or comment this line to disable caption 35 | 36 | var mobilenav = $('#mobile-nav'); 37 | 38 | $('html').click(function(){ 39 | mobilenav.find('.on').each(function(){ 40 | $(this).removeClass('on').next().hide(); 41 | }); 42 | }); 43 | 44 | mobilenav.on('click', '.menu .button', function(){ 45 | if (!$(this).hasClass('on')){ 46 | var width = $(this).width() + 42; 47 | $(this).addClass('on').next().show().css({width: width}); 48 | } else { 49 | $(this).removeClass('on').next().hide(); 50 | } 51 | }).on('click', '.search .button', function(){ 52 | if (!$(this).hasClass('on')){ 53 | var width = mobilenav.width() - 51; 54 | mobilenav.children('.menu').children().eq(0).removeClass('on').next().hide(); 55 | $(this).addClass('on').next().show().css({width: width}).children().children().eq(0).focus(); 56 | } else { 57 | $(this).removeClass('on').next().hide().children().children().eq(0).val(''); 58 | } 59 | }).click(function(e){ 60 | e.stopPropagation(); 61 | }); 62 | })(jQuery); -------------------------------------------------------------------------------- /static/themes/default/js/twitter.js: -------------------------------------------------------------------------------- 1 | (function($){ 2 | $.fn.getTwitterFeed = function(userid, count, reply){ 3 | var banner = $(this), 4 | feed = banner.find('.feed'), 5 | interval = 10000, 6 | speed = 500; 7 | 8 | var linkify = function(text){ 9 | text = text.replace(/(https?:\/\/)([\w\-:;?&=+.%#\/]+)/gi, '$2').replace(/(^|\W)@(\w+)/g, '$1@$2').replace(/(^|\W)#(\w+)/g, '$1#$2'); 10 | 11 | return text; 12 | } 13 | 14 | var relativeDate = function(date){ 15 | if (navigator.appName === 'Microsoft Internet Explorer') return ''; 16 | 17 | var unit = { 18 | now: 'Now', 19 | minute: '1 min', 20 | minutes: ' mins', 21 | hour: '1 hr', 22 | hours: ' hrs', 23 | day: 'Yesterday', 24 | days: ' days', 25 | week: '1 week', 26 | weeks: ' weeks' 27 | }; 28 | 29 | var current = new Date(), 30 | tweet = new Date(date), 31 | diff = (((current.getTime() + (1 * 60000)) - tweet.getTime()) / 1000), 32 | day_diff = Math.floor(diff / 86400); 33 | 34 | if (day_diff == 0){ 35 | if (diff < 60) return unit.now; 36 | else if (diff < 120) return unit.minute; 37 | else if (diff < 3600) return Math.floor(diff / 60) + unit.minutes; 38 | else if (diff < 7200) return unit.hour; 39 | else if (diff < 86400) return Math.floor(diff / 3600) + unit.hours; 40 | else return ''; 41 | } else if (day_diff == 1) { 42 | return unit.day; 43 | } else if (day_diff < 7) { 44 | return day_diff + unit.days; 45 | } else if (day_diff == 7) { 46 | return unit.week; 47 | } else if (day_diff > 7) { 48 | return Math.ceil(day_diff / 7) + unit.weeks; 49 | } else { 50 | return ''; 51 | } 52 | } 53 | 54 | if ($(window).width() > 600){ 55 | var url = 'https://api.twitter.com/1/statuses/user_timeline.json?screen_name='+userid+'&count='+count+'&include_rts=true&trim_user=true&exclude_repies='+(reply ? '0' : '1')+'&callback=?'; 56 | banner.show(); 57 | $.getJSON(url, function(json){ 58 | var length = json.length, 59 | fragment = document.createDocumentFragment(), 60 | counts = 0, 61 | timeout; 62 | 63 | for (var i=0; i'+relativeDate(json[i].created_at)+''; 66 | fragment.appendChild(item); 67 | } 68 | 69 | var play = function(){ 70 | timeout = setTimeout(function(){ 71 | feed.animate({top: -30}, speed, function(){ 72 | //move the first item and put it as last item 73 | $(this).children('li:last').after($(this).children('li:first')); 74 | //set the default item to correct position 75 | $(this).css({'top' : '0px'}); 76 | play(); 77 | }); 78 | }, interval); 79 | } 80 | 81 | var pause = function(){ 82 | clearTimeout(timeout); 83 | } 84 | 85 | banner.on('mouseenter', pause).on('mouseleave', play) 86 | .children('.loading').hide().end() 87 | .children('.container').show() 88 | .children('.feed').append(fragment); 89 | 90 | play(); 91 | }); 92 | } 93 | }; 94 | })(jQuery); -------------------------------------------------------------------------------- /static/ueditor/dialogs/anchor/anchor.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 13 | 14 | 15 |
16 | 17 |
18 | 19 | 39 | 40 | -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/attachment.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | * {margin: 0;padding: 0;} 4 | .wrapper { width: 460px;height: 340px; border: 1px solid #ddd;margin: 8px;overflow-y: hidden;} 5 | .controller { 6 | height: 30px; 7 | padding-top: 10px; 8 | padding-left: 6px; 9 | } 10 | #divStatus {display:inline-block; width:336px;color: #aaa;font-size: 12px; } 11 | #startUpload{cursor: pointer;margin-right: 10px; float: right; display: inline-block; width: 100px;height: 30px} 12 | div.fieldset { 13 | border: 1px solid #afe14c; 14 | padding: 10px 10px; 15 | } 16 | div.fieldset span.legend{position: relative;top:-20px;} 17 | div.flash { 18 | width: 420px; 19 | height: 236px; 20 | margin: 2px 5px 8px 9px; 21 | border-color: #D9E4FF; 22 | overflow-y: auto; 23 | -moz-border-radius-topleft : 5px; 24 | -webkit-border-top-left-radius : 5px; 25 | -moz-border-radius-topright : 5px; 26 | -webkit-border-top-right-radius : 5px; 27 | -moz-border-radius-bottomleft : 5px; 28 | -webkit-border-bottom-left-radius : 5px; 29 | -moz-border-radius-bottomright : 5px; 30 | -webkit-border-bottom-right-radius : 5px; 31 | 32 | } 33 | 34 | .progressWrapper { 35 | width: 412px; 36 | overflow: hidden; 37 | } 38 | 39 | .progressContainer { 40 | margin: 0 0px 5px 0; 41 | /*padding: 3px 0 3px 4px;*/ 42 | border: solid 1px #E8E8E8; 43 | background-color: #F7F7F7; 44 | overflow: hidden; 45 | } 46 | /* Message */ 47 | .message { 48 | margin: 1em 0; 49 | padding: 10px 20px; 50 | border: solid 1px #FFDD99; 51 | background-color: #FFFFCC; 52 | overflow: hidden; 53 | } 54 | /* Error */ 55 | .red { 56 | border: solid 1px #B50000; 57 | background-color: #FFEBEB; 58 | } 59 | 60 | /* Current */ 61 | .green { 62 | border: solid 1px #DDF0DD; 63 | background-color: #EBFFEB; 64 | } 65 | 66 | /* Complete */ 67 | .blue { 68 | border: solid 1px #CEE2F2; 69 | background-color: #F0F5FF; 70 | } 71 | 72 | .progressName { 73 | font-size: 10px; 74 | color: #555; 75 | width: 360px; 76 | height: 14px; 77 | text-align: left; 78 | white-space: nowrap; 79 | overflow: hidden; 80 | } 81 | 82 | .progressBarInProgress, 83 | .progressBarComplete, 84 | .progressBarError { 85 | font-size: 0; 86 | width: 0%; 87 | height: 2px; 88 | background-color: blue; 89 | margin-top: 2px; 90 | } 91 | 92 | .progressBarComplete { 93 | width: 100%; 94 | background-color: green; 95 | visibility: hidden; 96 | } 97 | 98 | .progressBarError { 99 | width: 100%; 100 | background-color: red; 101 | visibility: hidden; 102 | } 103 | a.progressCancel { 104 | font-size: 0; 105 | display: block; 106 | height: 14px; 107 | width: 14px; 108 | background: url(../../themes/default/images/cancelbutton.gif) -14px 0 no-repeat ; 109 | float: right; 110 | } 111 | 112 | a.progressCancel:hover { 113 | background-position: 0 0; 114 | } 115 | 116 | 117 | .progressBarStatus { 118 | margin-top: 2px; 119 | width: 337px; 120 | font-size: 7pt; 121 | text-align: left; 122 | white-space: nowrap; 123 | } 124 | 125 | /* -- SWFUpload Object Styles ------------------------------- */ 126 | .swfupload { 127 | vertical-align: top; 128 | } 129 | 130 | 131 | -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/attachment/fileTypeImages/icon_default.png -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeMaps.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by JetBrains PhpStorm. 3 | * User: taoqili 4 | * Date: 12-2-10 5 | * Time: 下午3:50 6 | * To change this template use File | Settings | File Templates. 7 | */ 8 | //文件类型图标索引 9 | var fileTypeMaps = { 10 | ".rar":"icon_rar.gif", 11 | ".zip":"icon_rar.gif", 12 | ".doc":"icon_doc.gif", 13 | ".docx":"icon_doc.gif", 14 | ".pdf":"icon_pdf.gif", 15 | ".mp3":"icon_mp3.gif", 16 | ".xls":"icon_xls.gif", 17 | ".chm":"icon_chm.gif", 18 | ".ppt":"icon_ppt.gif", 19 | ".pptx":"icon_ppt.gif", 20 | ".avi":"icon_mv.gif", 21 | ".rmvb":"icon_mv.gif", 22 | ".wmv":"icon_mv.gif", 23 | ".flv":"icon_mv.gif", 24 | ".swf":"icon_mv.gif", 25 | ".rm":"icon_mv.gif", 26 | ".exe":"icon_exe.gif", 27 | ".psd":"icon_psd.gif", 28 | ".txt":"icon_txt.gif" 29 | }; -------------------------------------------------------------------------------- /static/ueditor/dialogs/gmap/gmap.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 |
26 |
27 | 88 | 89 | -------------------------------------------------------------------------------- /static/ueditor/dialogs/image/image.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | .wrapper{ width: 623px;margin: 10px auto;zoom:1;position: relative;} 3 | .tabbody{ height:325px;_height:330px;}/*tab样式框大小*/ 4 | .panel { position: absolute;width:100%; height:100%;background: #fff;} 5 | 6 | #remote{ z-index: 200;} 7 | #remote table{border-collapse: collapse;width: 620px; height: 300px; margin-top: 5px;} 8 | #remote td.label{text-align: center;width: 80px; } 9 | #remote td{height: 40px;} 10 | td input { 11 | width: 150px; 12 | height: 21px; 13 | line-height: 21px; 14 | background: #FFF; 15 | border: 1px solid #d7d7d7; 16 | } 17 | #url {width: 520px;margin-bottom: 2px;} 18 | #preview{width: 260px; height: 260px; position: absolute;top:50px; left: 341px; z-index: 9999;background-color: #eee} 19 | .lock{ 20 | position: absolute; 21 | width: 45px; 22 | height: 40px; 23 | top: 68px; 24 | left: 260px; 25 | background: url("../../themes/default/images/lock.gif") 3px -4px no-repeat; 26 | line-height: 40px; 27 | padding-top:10px; 28 | } 29 | .saveDir{ 30 | /*width: 132px;*/ 31 | /*text-align: right;*/ 32 | height: 40px; 33 | line-height: 40px; 34 | margin-left: 30px; 35 | float: left; 36 | } 37 | .saveDir select{ 38 | height: 30px; 39 | } 40 | #duiqi{ width: 62px; height: 38px;float: left} 41 | #remoteFloat div,#localFloat div{cursor:pointer;opacity: 0.5;filter: alpha(opacity = 50);margin-left:1px;width:38px;height:36px;float:left;} 42 | #remoteFloat .focus,#localFloat .focus{opacity: 1;filter: alpha(opacity = 100)} 43 | #maskIframe{ width: 620px; height: 325px; position: absolute;z-index: 100; } 44 | #flashContainer { margin: 6px;position: relative;} 45 | #upload{width: 100px;height: 30px;float: right; margin:3px 6px 0 0;cursor: pointer;} 46 | #imageList{width: 620px;height: 315px; margin-top: 10px;overflow:hidden;overflow-y: auto;} 47 | #imageList img{cursor: pointer ;border: 2px solid #fff} 48 | #imgManager #imageList div{float: left;width: 100px;height: 100px;margin: 5px 10px;} 49 | #imgSearchTxt{padding-left:2px;margin-left:15px;background: #FFF;width:200px;height:21px;line-height:21px;border: 1px solid #d7d7d7;} 50 | #searchList{width: 620px;overflow: auto;zoom:1;height: 270px;} 51 | #searchList div{float: left;width: 116px;height: 135px;margin: 5px 15px;_margin:5px 10px;} 52 | #searchList img{margin: 2px 8px;cursor: pointer;border: 2px solid #fff} /*不用缩略图*/ 53 | #searchList p{margin-left: 10px;_margin-left:8px;} 54 | #imgType{ 55 | width: 65px; 56 | height: 23px; 57 | line-height: 22px; 58 | border: 1px solid #d7d7d7; 59 | } 60 | #imgSearchBtn,#imgSearchReset{ 61 | width: 100%; 62 | height: 25px; 63 | margin: 0 3px; 64 | line-height: 25px; 65 | background: #eee; 66 | border: 1px solid #d7d7d7; 67 | cursor: pointer 68 | } 69 | .msg{margin-left: 5px;} -------------------------------------------------------------------------------- /static/ueditor/dialogs/image/imageUploader.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/image/imageUploader.swf -------------------------------------------------------------------------------- /static/ueditor/dialogs/image/images/center_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/image/images/center_focus.jpg -------------------------------------------------------------------------------- /static/ueditor/dialogs/image/images/left_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/image/images/left_focus.jpg -------------------------------------------------------------------------------- /static/ueditor/dialogs/image/images/none_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/image/images/none_focus.jpg -------------------------------------------------------------------------------- /static/ueditor/dialogs/image/images/right_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/image/images/right_focus.jpg -------------------------------------------------------------------------------- /static/ueditor/dialogs/internal.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | var parent = window.parent; 3 | //dialog对象 4 | dialog = parent.$EDITORUI[window.frameElement.id.replace( /_iframe$/, '' )]; 5 | //当前打开dialog的编辑器实例 6 | editor = dialog.editor; 7 | 8 | UE = parent.UE; 9 | 10 | domUtils = UE.dom.domUtils; 11 | 12 | utils = UE.utils; 13 | 14 | browser = UE.browser; 15 | 16 | ajax = UE.ajax; 17 | 18 | $G = function ( id ) { 19 | return document.getElementById( id ) 20 | }; 21 | //focus元素 22 | $focus = function ( node ) { 23 | setTimeout( function () { 24 | if ( browser.ie ) { 25 | var r = node.createTextRange(); 26 | r.collapse( false ); 27 | r.select(); 28 | } else { 29 | node.focus() 30 | } 31 | }, 0 ) 32 | }; 33 | utils.loadFile(document,{ 34 | href:editor.options.themePath + editor.options.theme + "/dialogbase.css?cache="+Math.random(), 35 | tag:"link", 36 | type:"text/css", 37 | rel:"stylesheet" 38 | }); 39 | lang = editor.getLang(dialog.className.split( "-" )[2]); 40 | 41 | domUtils.on(window,'load',function () { 42 | 43 | var langImgPath = editor.options.langPath + editor.options.lang + "/images/"; 44 | //针对静态资源 45 | for ( var i in lang["static"] ) { 46 | var dom = $G( i ); 47 | if(!dom) continue; 48 | var tagName = dom.tagName, 49 | content = lang["static"][i]; 50 | if(content.src){ 51 | //clone 52 | content = utils.extend({},content,false); 53 | content.src = langImgPath + content.src; 54 | } 55 | if(content.style){ 56 | content = utils.extend({},content,false); 57 | content.style = content.style.replace(/url\s*\(/g,"url(" + langImgPath) 58 | } 59 | switch ( tagName.toLowerCase() ) { 60 | case "var": 61 | dom.parentNode.replaceChild( document.createTextNode( content ), dom ); 62 | break; 63 | case "select": 64 | var ops = dom.options; 65 | for ( var j = 0, oj; oj = ops[j]; ) { 66 | oj.innerHTML = content.options[j++]; 67 | } 68 | for ( var p in content ) { 69 | p != "options" && dom.setAttribute( p, content[p] ); 70 | } 71 | break; 72 | default : 73 | domUtils.setAttributes( dom, content); 74 | } 75 | } 76 | } ); 77 | 78 | })(); 79 | 80 | -------------------------------------------------------------------------------- /static/ueditor/dialogs/link/link.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 33 | 34 | 35 | 36 | 37 |
30 | 31 | 32 |
38 | 125 | 126 | 127 | -------------------------------------------------------------------------------- /static/ueditor/dialogs/map/map.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 |
::
28 |
29 | 30 |
31 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /static/ueditor/dialogs/spechars/spechars.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 14 | 15 | 16 |
17 |
18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /static/ueditor/dialogs/spechars/spechars.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created with JetBrains PhpStorm. 3 | * User: xuheng 4 | * Date: 12-9-26 5 | * Time: 下午1:09 6 | * To change this template use File | Settings | File Templates. 7 | */ 8 | var charsContent = [ 9 | { name:"tsfh", title:lang.tsfh, content:toArray("、,。,·,ˉ,ˇ,¨,〃,々,—,~,‖,…,‘,’,“,”,〔,〕,〈,〉,《,》,「,」,『,』,〖,〗,【,】,±,×,÷,∶,∧,∨,∑,∏,∪,∩,∈,∷,√,⊥,∥,∠,⌒,⊙,∫,∮,≡,≌,≈,∽,∝,≠,≮,≯,≤,≥,∞,∵,∴,♂,♀,°,′,″,℃,$,¤,¢,£,‰,§,№,☆,★,○,●,◎,◇,◆,□,■,△,▲,※,→,←,↑,↓,〓,〡,〢,〣,〤,〥,〦,〧,〨,〩,㊣,㎎,㎏,㎜,㎝,㎞,㎡,㏄,㏎,㏑,㏒,㏕,︰,¬,¦,℡,ˊ,ˋ,˙,–,―,‥,‵,℅,℉,↖,↗,↘,↙,∕,∟,∣,≒,≦,≧,⊿,═,║,╒,╓,╔,╕,╖,╗,╘,╙,╚,╛,╜,╝,╞,╟,╠,╡,╢,╣,╤,╥,╦,╧,╨,╩,╪,╫,╬,╭,╮,╯,╰,╱,╲,╳,▁,▂,▃,▄,▅,▆,▇,�,█,▉,▊,▋,▌,▍,▎,▏,▓,▔,▕,▼,▽,◢,◣,◤,◥,☉,⊕,〒,〝,〞")}, 10 | { name:"lmsz", title:lang.lmsz, content:toArray("ⅰ,ⅱ,ⅲ,ⅳ,ⅴ,ⅵ,ⅶ,ⅷ,ⅸ,ⅹ,Ⅰ,Ⅱ,Ⅲ,Ⅳ,Ⅴ,Ⅵ,Ⅶ,Ⅷ,Ⅸ,Ⅹ,Ⅺ,Ⅻ")}, 11 | { name:"szfh", title:lang.szfh, content:toArray("⒈,⒉,⒊,⒋,⒌,⒍,⒎,⒏,⒐,⒑,⒒,⒓,⒔,⒕,⒖,⒗,⒘,⒙,⒚,⒛,⑴,⑵,⑶,⑷,⑸,⑹,⑺,⑻,⑼,⑽,⑾,⑿,⒀,⒁,⒂,⒃,⒄,⒅,⒆,⒇,①,②,③,④,⑤,⑥,⑦,⑧,⑨,⑩,㈠,㈡,㈢,㈣,㈤,㈥,㈦,㈧,㈨,㈩")}, 12 | { name:"rwfh", title:lang.rwfh, content:toArray("ぁ,あ,ぃ,い,ぅ,う,ぇ,え,ぉ,お,か,が,き,ぎ,く,ぐ,け,げ,こ,ご,さ,ざ,し,じ,す,ず,せ,ぜ,そ,ぞ,た,だ,ち,ぢ,っ,つ,づ,て,で,と,ど,な,に,ぬ,ね,の,は,ば,ぱ,ひ,び,ぴ,ふ,ぶ,ぷ,へ,べ,ぺ,ほ,ぼ,ぽ,ま,み,む,め,も,ゃ,や,ゅ,ゆ,ょ,よ,ら,り,る,れ,ろ,ゎ,わ,ゐ,ゑ,を,ん,ァ,ア,ィ,イ,ゥ,ウ,ェ,エ,ォ,オ,カ,ガ,キ,ギ,ク,グ,ケ,ゲ,コ,ゴ,サ,ザ,シ,ジ,ス,ズ,セ,ゼ,ソ,ゾ,タ,ダ,チ,ヂ,ッ,ツ,ヅ,テ,デ,ト,ド,ナ,ニ,ヌ,ネ,ノ,ハ,バ,パ,ヒ,ビ,ピ,フ,ブ,プ,ヘ,ベ,ペ,ホ,ボ,ポ,マ,ミ,ム,メ,モ,ャ,ヤ,ュ,ユ,ョ,ヨ,ラ,リ,ル,レ,ロ,ヮ,ワ,ヰ,ヱ,ヲ,ン,ヴ,ヵ,ヶ")}, 13 | { name:"xlzm", title:lang.xlzm, content:toArray("Α,Β,Γ,Δ,Ε,Ζ,Η,Θ,Ι,Κ,Λ,Μ,Ν,Ξ,Ο,Π,Ρ,Σ,Τ,Υ,Φ,Χ,Ψ,Ω,α,β,γ,δ,ε,ζ,η,θ,ι,κ,λ,μ,ν,ξ,ο,π,ρ,σ,τ,υ,φ,χ,ψ,ω")}, 14 | { name:"ewzm", title:lang.ewzm, content:toArray("А,Б,В,Г,Д,Е,Ё,Ж,З,И,Й,К,Л,М,Н,О,П,Р,С,Т,У,Ф,Х,Ц,Ч,Ш,Щ,Ъ,Ы,Ь,Э,Ю,Я,а,б,в,г,д,е,ё,ж,з,и,й,к,л,м,н,о,п,р,с,т,у,ф,х,ц,ч,ш,щ,ъ,ы,ь,э,ю,я")}, 15 | { name:"pyzm", title:lang.pyzm, content:toArray("ā,á,ǎ,à,ē,é,ě,è,ī,í,ǐ,ì,ō,ó,ǒ,ò,ū,ú,ǔ,ù,ǖ,ǘ,ǚ,ǜ,ü")}, 16 | { name:"zyzf", title:lang.zyzf, content:toArray("ㄅ,ㄆ,ㄇ,ㄈ,ㄉ,ㄊ,ㄋ,ㄌ,ㄍ,ㄎ,ㄏ,ㄐ,ㄑ,ㄒ,ㄓ,ㄔ,ㄕ,ㄖ,ㄗ,ㄘ,ㄙ,ㄚ,ㄛ,ㄜ,ㄝ,ㄞ,ㄟ,ㄠ,ㄡ,ㄢ,ㄣ,ㄤ,ㄥ,ㄦ,ㄧ,ㄨ")} 17 | ]; 18 | (function createTab(content) { 19 | for (var i = 0, ci; ci = content[i++];) { 20 | var span = document.createElement("span"); 21 | span.setAttribute("tabSrc", ci.name); 22 | span.innerHTML = ci.title; 23 | if (i == 1)span.className = "focus"; 24 | domUtils.on(span, "click", function () { 25 | var tmps = $G("tabHeads").children; 26 | for (var k = 0, sk; sk = tmps[k++];) { 27 | sk.className = ""; 28 | } 29 | tmps = $G("tabBodys").children; 30 | for (var k = 0, sk; sk = tmps[k++];) { 31 | sk.style.display = "none"; 32 | } 33 | this.className = "focus"; 34 | $G(this.getAttribute("tabSrc")).style.display = ""; 35 | }); 36 | $G("tabHeads").appendChild(span); 37 | domUtils.insertAfter(span, document.createTextNode("\n")); 38 | var div = document.createElement("div"); 39 | div.id = ci.name; 40 | div.style.display = (i == 1) ? "" : "none"; 41 | var cons = ci.content; 42 | for (var j = 0, con; con = cons[j++];) { 43 | var charSpan = document.createElement("span"); 44 | charSpan.innerHTML = con; 45 | domUtils.on(charSpan, "click", function () { 46 | editor.execCommand("insertHTML", this.innerHTML); 47 | dialog.close(); 48 | }); 49 | div.appendChild(charSpan); 50 | } 51 | $G("tabBodys").appendChild(div); 52 | } 53 | })(charsContent); 54 | function toArray(str) { 55 | return str.split(","); 56 | } 57 | -------------------------------------------------------------------------------- /static/ueditor/dialogs/table/dragicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/table/dragicon.png -------------------------------------------------------------------------------- /static/ueditor/dialogs/table/edittable.css: -------------------------------------------------------------------------------- 1 | .wrapper { 2 | margin: 10px auto 0; 3 | font-size: 12px; 4 | overflow: hidden; 5 | } 6 | 7 | .clear { 8 | clear: both; 9 | } 10 | 11 | .wrapper .left { 12 | float: left; 13 | margin-left: 10px;; 14 | } 15 | 16 | .wrapper .right { 17 | float: right; 18 | margin-right: 10px; 19 | border-left: 2px dotted #EDEDED; 20 | padding-left: 15px; 21 | } 22 | 23 | .section { 24 | margin-bottom: 20px; 25 | overflow: hidden; 26 | } 27 | 28 | .section h3 { 29 | font-weight: bold; 30 | padding: 5px 0; 31 | margin-bottom: 10px; 32 | border-bottom: 1px solid #EDEDED; 33 | font-size: 12px; 34 | } 35 | 36 | .section ul { 37 | list-style: none; 38 | overflow: hidden; 39 | } 40 | 41 | .section li { 42 | float: left; 43 | } 44 | 45 | .section .tone { 46 | width: 80px;; 47 | } 48 | 49 | .section .preview { 50 | width: 220px; 51 | } 52 | 53 | .section .preview table { 54 | text-align: center; 55 | vertical-align: middle; 56 | color: #666; 57 | } 58 | 59 | .section .preview caption { 60 | font-weight: bold; 61 | } 62 | 63 | .section .preview td { 64 | border-width: 1px; 65 | border-style: solid; 66 | height: 22px; 67 | } 68 | 69 | .section .preview th { 70 | border-style: solid; 71 | border-color: #DDD; 72 | border-width: 2px 1px 1px 1px; 73 | height: 22px; 74 | background-color: #F7F7F7; 75 | } -------------------------------------------------------------------------------- /static/ueditor/dialogs/table/edittable.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 |
11 |
12 |

13 |
    14 |
  • 15 | 16 |
  • 17 |
  • 18 | 19 |
  • 20 |
21 | 22 |
23 |
24 |
25 |

26 |
    27 |
  • 28 | 29 |
  • 30 |
  • 31 | 32 |
  • 33 |
34 |
35 |
36 |
37 |

38 |
    39 |
  • 40 | 41 | 42 |
  • 43 |
44 |
45 |
46 |
47 |
48 |
49 |

50 |
51 |
52 |
53 |
54 |
55 | 56 | 57 | -------------------------------------------------------------------------------- /static/ueditor/dialogs/table/edittd.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 16 | 17 | 18 |
19 | 20 | 21 |
22 | 60 | 61 | -------------------------------------------------------------------------------- /static/ueditor/dialogs/table/edittip.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 表格删除提示 5 | 6 | 17 | 18 | 19 |
20 |
21 | 22 |
23 |
24 | 25 |
26 |
27 | 32 | 33 | -------------------------------------------------------------------------------- /static/ueditor/dialogs/template/images/bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/template/images/bg.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/template/images/pre0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/template/images/pre0.png -------------------------------------------------------------------------------- /static/ueditor/dialogs/template/images/pre1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/template/images/pre1.png -------------------------------------------------------------------------------- /static/ueditor/dialogs/template/images/pre2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/template/images/pre2.png -------------------------------------------------------------------------------- /static/ueditor/dialogs/template/images/pre3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/template/images/pre3.png -------------------------------------------------------------------------------- /static/ueditor/dialogs/template/images/pre4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/template/images/pre4.png -------------------------------------------------------------------------------- /static/ueditor/dialogs/template/template.css: -------------------------------------------------------------------------------- 1 | .wrap{ padding: 5px;font-size: 14px;} 2 | .left{width:425px;float: left;} 3 | .right{width:160px;border: 1px solid #ccc;float: right;padding: 5px;margin-right: 5px;} 4 | .right .pre{height: 332px;overflow-y: auto;} 5 | .right .preitem{border: white 1px solid;margin: 5px 0;padding: 2px 0;} 6 | .right .preitem:hover{background-color: lemonChiffon;cursor: pointer;border: #ccc 1px solid;} 7 | .right .preitem img{display: block;margin: 0 auto;width:100px;} 8 | .clear{clear: both;} 9 | .top{height:26px;line-height: 26px;padding: 5px;} 10 | .bottom{height:320px;width:100%;margin: 0 auto;} 11 | .transparent{ background: url("images/bg.gif") repeat;} 12 | .bottom table tr td{border:1px dashed #ccc;} 13 | #colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;border-radius: 3px;box-shadow: 2px 2px 5px #D3D6DA;} 14 | .border_style1{padding:2px;border: 1px solid #ccc;border-radius: 5px;box-shadow:2px 2px 5px #d3d6da;} 15 | p{margin: 5px 0} 16 | table{clear:both;margin-bottom:10px;border-collapse:collapse;word-break:break-all;} 17 | li{clear:both} 18 | ol{padding-left:40px; } -------------------------------------------------------------------------------- /static/ueditor/dialogs/template/template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 |
13 | 14 |
15 |
16 |
17 |
18 | 19 |
20 |
21 |
22 |
23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /static/ueditor/dialogs/template/template.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created with JetBrains PhpStorm. 3 | * User: xuheng 4 | * Date: 12-8-8 5 | * Time: 下午2:09 6 | * To change this template use File | Settings | File Templates. 7 | */ 8 | (function () { 9 | var me = editor, 10 | preview = $G( "preview" ), 11 | preitem = $G( "preitem" ), 12 | tmps = templates, 13 | currentTmp; 14 | var initPre = function () { 15 | var str = ""; 16 | for ( var i = 0, tmp; tmp = tmps[i++]; ) { 17 | str += '
'; 18 | } 19 | preitem.innerHTML = str; 20 | }; 21 | var pre = function ( n ) { 22 | var tmp = tmps[n - 1]; 23 | currentTmp = tmp; 24 | clearItem(); 25 | domUtils.setStyles( preitem.childNodes[n - 1], { 26 | "background-color":"lemonChiffon", 27 | "border":"#ccc 1px solid" 28 | } ); 29 | preview.innerHTML = tmp.preHtml ? tmp.preHtml : ""; 30 | }; 31 | var clearItem = function () { 32 | var items = preitem.children; 33 | for ( var i = 0, item; item = items[i++]; ) { 34 | domUtils.setStyles( item, { 35 | "background-color":"", 36 | "border":"white 1px solid" 37 | } ); 38 | } 39 | }; 40 | dialog.onok = function () { 41 | if ( !$G( "issave" ).checked ){ 42 | me.execCommand( "cleardoc" ); 43 | } 44 | var obj = { 45 | html:currentTmp && currentTmp.html 46 | }; 47 | me.execCommand( "template", obj ); 48 | }; 49 | initPre(); 50 | window.pre = pre; 51 | pre(2) 52 | 53 | })(); -------------------------------------------------------------------------------- /static/ueditor/dialogs/video/images/center_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/video/images/center_focus.jpg -------------------------------------------------------------------------------- /static/ueditor/dialogs/video/images/left_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/video/images/left_focus.jpg -------------------------------------------------------------------------------- /static/ueditor/dialogs/video/images/none_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/video/images/none_focus.jpg -------------------------------------------------------------------------------- /static/ueditor/dialogs/video/images/right_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/dialogs/video/images/right_focus.jpg -------------------------------------------------------------------------------- /static/ueditor/dialogs/video/video.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | .wrapper{ width: 570px;_width:575px;margin: 10px auto; zoom:1;position: relative} 3 | .tabbody{height:335px;} 4 | .panel { position: absolute;width:100%; height:100%;background: #fff;} 5 | .panel table td{vertical-align: middle;} 6 | #videoUrl { 7 | width: 490px; 8 | height: 21px; 9 | line-height: 21px; 10 | margin: 8px 5px; 11 | background: #FFF; 12 | border: 1px solid #d7d7d7; 13 | } 14 | #videoSearchTxt{margin-left:15px;background: #FFF;width:200px;height:21px;line-height:21px;border: 1px solid #d7d7d7;} 15 | #searchList{width: 570px;overflow: auto;zoom:1;height: 270px;} 16 | #searchList div{float: left;width: 120px;height: 135px;margin: 5px 15px;} 17 | #searchList img{margin: 2px 8px;cursor: pointer;border: 2px solid #fff} /*不用缩略图*/ 18 | #searchList p{margin-left: 10px;} 19 | #videoType{ 20 | width: 65px; 21 | height: 23px; 22 | line-height: 22px; 23 | border: 1px solid #d7d7d7; 24 | } 25 | #videoSearchBtn,#videoSearchReset{ 26 | /*width: 80px;*/ 27 | height: 25px; 28 | line-height: 25px; 29 | background: #eee; 30 | border: 1px solid #d7d7d7; 31 | cursor: pointer; 32 | padding: 0 5px; 33 | } 34 | 35 | 36 | 37 | #preview{width: 420px; margin-left: 10px; _margin-left:5px; height: 280px;background-color: #ddd;float: left} 38 | #videoInfo {width: 120px;float: left;margin-left: 10px;_margin-left:7px;} 39 | fieldset{ 40 | border: 1px solid #ddd; 41 | padding-left: 5px; 42 | margin-bottom: 20px; 43 | padding-bottom: 5px; 44 | width: 115px; 45 | } 46 | fieldset legend{font-weight: bold;} 47 | fieldset p{line-height: 30px;} 48 | fieldset input.txt{ 49 | width: 65px; 50 | height: 21px; 51 | line-height: 21px; 52 | margin: 8px 5px; 53 | background: #FFF; 54 | border: 1px solid #d7d7d7; 55 | } 56 | label.url{font-weight: bold;margin-left: 5px;color: #06c;} 57 | #videoFloat div{cursor:pointer;opacity: 0.5;filter: alpha(opacity = 50);margin:9px;_margin:5px;width:38px;height:36px;float:left;} 58 | #videoFloat .focus{opacity: 1;filter: alpha(opacity = 100)} 59 | span.view{display: inline-block;width: 30px;float: right;cursor: pointer;color: blue} -------------------------------------------------------------------------------- /static/ueditor/dialogs/video/video.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |
14 | 15 | 16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | 24 | 25 | 26 | 27 |
28 |
29 |
30 | 31 |
32 |
33 |
34 |
35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 |
57 |
58 |
59 | 60 | 66 | 67 | -------------------------------------------------------------------------------- /static/ueditor/lang/zh-cn/images/copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/lang/zh-cn/images/copy.png -------------------------------------------------------------------------------- /static/ueditor/lang/zh-cn/images/imglabel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/lang/zh-cn/images/imglabel.png -------------------------------------------------------------------------------- /static/ueditor/lang/zh-cn/images/localimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/lang/zh-cn/images/localimage.png -------------------------------------------------------------------------------- /static/ueditor/lang/zh-cn/images/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/lang/zh-cn/images/music.png -------------------------------------------------------------------------------- /static/ueditor/lang/zh-cn/images/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/lang/zh-cn/images/upload.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/dialogbase.css: -------------------------------------------------------------------------------- 1 | /*弹出对话框页面样式组件 2 | */ 3 | 4 | /*reset 5 | */ 6 | html, body, div, span, applet, object, iframe, 7 | h1, h2, h3, h4, h5, h6, p, blockquote, pre, 8 | a, abbr, acronym, address, big, cite, code, 9 | del, dfn, em, font, img, ins, kbd, q, s, samp, 10 | small, strike, strong, sub, sup, tt, var, 11 | b, u, i, center, 12 | dl, dt, dd, ol, ul, li, 13 | fieldset, form, label, legend, 14 | table, caption, tbody, tfoot, thead, tr, th, td { 15 | margin: 0; 16 | padding: 0; 17 | outline: 0; 18 | font-size: 100%; 19 | } 20 | 21 | body { 22 | line-height: 1; 23 | } 24 | 25 | ol, ul { 26 | list-style: none; 27 | } 28 | 29 | blockquote, q { 30 | quotes: none; 31 | } 32 | 33 | ins { 34 | text-decoration: none; 35 | } 36 | 37 | del { 38 | text-decoration: line-through; 39 | } 40 | 41 | table { 42 | border-collapse: collapse; 43 | border-spacing: 0; 44 | } 45 | 46 | /*module 47 | */ 48 | body { 49 | background-color: #fff; 50 | font: 12px/1.5 "宋体", "Arial Narrow", HELVETICA; 51 | color: #646464; 52 | } 53 | 54 | /*tab*/ 55 | .tabhead { 56 | position: relative; 57 | z-index: 10; 58 | } 59 | 60 | .tabhead span { 61 | display: inline-block; 62 | padding: 0 5px; 63 | height: 30px; 64 | border: 1px solid #ccc; 65 | background: url("images/dialog-title-bg.png") repeat-x; 66 | text-align: center; 67 | line-height: 30px; 68 | cursor: pointer; 69 | *margin-right: 5px; 70 | } 71 | 72 | .tabhead span.focus { 73 | height: 31px; 74 | border-bottom: none; 75 | background: #fff; 76 | } 77 | 78 | .tabbody { 79 | position: relative; 80 | top: -1px; 81 | margin: 0 auto; 82 | border: 1px solid #ccc; 83 | } 84 | 85 | /*button*/ 86 | a.button { 87 | display: block; 88 | text-align: center; 89 | line-height: 24px; 90 | text-decoration: none; 91 | height: 24px; 92 | width: 95px; 93 | border: 0; 94 | color: #838383; 95 | background: url(../../themes/default/images/icons-all.gif) no-repeat; 96 | } 97 | 98 | a.button:hover { 99 | background-position: 0 -30px; 100 | } -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/anchor.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/anchor.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/arrow.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/arrow_down.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/arrow_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/arrow_up.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/button-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/button-bg.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/cancelbutton.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/cancelbutton.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/cursor_h.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/cursor_h.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/cursor_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/cursor_h.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/cursor_v.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/cursor_v.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/cursor_v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/cursor_v.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/dialog-title-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/dialog-title-bg.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/filescan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/filescan.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/highlighted.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/highlighted.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/icons-all.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/icons-all.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/icons.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/icons.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/lock.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/lock.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/neweditor-tab-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/neweditor-tab-bg.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/pagebreak.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/pagebreak.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/scale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/scale.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/spacer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/spacer.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/sparator_v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/sparator_v.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/table-cell-align.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/table-cell-align.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/tangram-colorpicker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/tangram-colorpicker.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/toolbar_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/toolbar_bg.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/unhighlighted.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/unhighlighted.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/upload.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/videologo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/videologo.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/word.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/word.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/wordpaste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/themes/default/images/wordpaste.png -------------------------------------------------------------------------------- /static/ueditor/themes/iframe.css: -------------------------------------------------------------------------------- 1 | /*可以在这里添加你自己的css*/ 2 | pre{font-size:14px} -------------------------------------------------------------------------------- /static/ueditor/third-party/codemirror/codemirror.css: -------------------------------------------------------------------------------- 1 | .CodeMirror { 2 | line-height: 1em; 3 | font-family: monospace; 4 | } 5 | 6 | .CodeMirror-scroll { 7 | overflow: auto; 8 | height: 300px; 9 | /* This is needed to prevent an IE[67] bug where the scrolled content 10 | is visible outside of the scrolling box. */ 11 | position: relative; 12 | } 13 | 14 | .CodeMirror-gutter { 15 | position: absolute; left: 0; top: 0; 16 | z-index: 10; 17 | background-color: #f7f7f7; 18 | border-right: 1px solid #eee; 19 | min-width: 2em; 20 | height: 100%; 21 | } 22 | .CodeMirror-gutter-text { 23 | color: #aaa; 24 | text-align: right; 25 | padding: .4em .2em .4em .4em; 26 | white-space: pre !important; 27 | } 28 | .CodeMirror-lines { 29 | padding: .4em; 30 | } 31 | 32 | .CodeMirror pre { 33 | -moz-border-radius: 0; 34 | -webkit-border-radius: 0; 35 | -o-border-radius: 0; 36 | border-radius: 0; 37 | border-width: 0; margin: 0; padding: 0; background: transparent; 38 | font-family: inherit; 39 | font-size: inherit; 40 | padding: 0; margin: 0; 41 | white-space: pre; 42 | word-wrap: normal; 43 | } 44 | 45 | .CodeMirror-wrap pre { 46 | word-wrap: break-word; 47 | white-space: pre-wrap; 48 | } 49 | .CodeMirror-wrap .CodeMirror-scroll { 50 | overflow-x: hidden; 51 | } 52 | 53 | .CodeMirror textarea { 54 | outline: none !important; 55 | } 56 | 57 | .CodeMirror pre.CodeMirror-cursor { 58 | z-index: 10; 59 | position: absolute; 60 | visibility: hidden; 61 | border-left: 1px solid black; 62 | } 63 | .CodeMirror-focused pre.CodeMirror-cursor { 64 | visibility: visible; 65 | } 66 | 67 | span.CodeMirror-selected { background: #d9d9d9; } 68 | .CodeMirror-focused span.CodeMirror-selected { background: #d2dcf8; } 69 | 70 | .CodeMirror-searching {background: #ffa;} 71 | 72 | /* Default theme */ 73 | 74 | .cm-s-default span.cm-keyword {color: #708;} 75 | .cm-s-default span.cm-atom {color: #219;} 76 | .cm-s-default span.cm-number {color: #164;} 77 | .cm-s-default span.cm-def {color: #00f;} 78 | .cm-s-default span.cm-variable {color: black;} 79 | .cm-s-default span.cm-variable-2 {color: #05a;} 80 | .cm-s-default span.cm-variable-3 {color: #085;} 81 | .cm-s-default span.cm-property {color: black;} 82 | .cm-s-default span.cm-operator {color: black;} 83 | .cm-s-default span.cm-comment {color: #a50;} 84 | .cm-s-default span.cm-string {color: #a11;} 85 | .cm-s-default span.cm-string-2 {color: #f50;} 86 | .cm-s-default span.cm-meta {color: #555;} 87 | .cm-s-default span.cm-error {color: #f00;} 88 | .cm-s-default span.cm-qualifier {color: #555;} 89 | .cm-s-default span.cm-builtin {color: #30a;} 90 | .cm-s-default span.cm-bracket {color: #cc7;} 91 | .cm-s-default span.cm-tag {color: #170;} 92 | .cm-s-default span.cm-attribute {color: #00c;} 93 | .cm-s-default span.cm-header {color: #a0a;} 94 | .cm-s-default span.cm-quote {color: #090;} 95 | .cm-s-default span.cm-hr {color: #999;} 96 | .cm-s-default span.cm-link {color: #00c;} 97 | 98 | span.cm-header, span.cm-strong {font-weight: bold;} 99 | span.cm-em {font-style: italic;} 100 | span.cm-emstrong {font-style: italic; font-weight: bold;} 101 | span.cm-link {text-decoration: underline;} 102 | 103 | div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} 104 | div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} 105 | -------------------------------------------------------------------------------- /static/ueditor/third-party/swfupload/swfupload.cookies.js: -------------------------------------------------------------------------------- 1 | /* 2 | Cookie Plug-in 3 | 4 | This plug in automatically gets all the cookies for this site and adds them to the post_params. 5 | Cookies are loaded only on initialization. The refreshCookies function can be called to update the post_params. 6 | The cookies will override any other post params with the same name. 7 | */ 8 | 9 | var SWFUpload; 10 | if (typeof(SWFUpload) === "function") { 11 | SWFUpload.prototype.initSettings = function (oldInitSettings) { 12 | return function (userSettings) { 13 | if (typeof(oldInitSettings) === "function") { 14 | oldInitSettings.call(this, userSettings); 15 | } 16 | 17 | this.refreshCookies(false); // The false parameter must be sent since SWFUpload has not initialzed at this point 18 | }; 19 | }(SWFUpload.prototype.initSettings); 20 | 21 | // refreshes the post_params and updates SWFUpload. The sendToFlash parameters is optional and defaults to True 22 | SWFUpload.prototype.refreshCookies = function (sendToFlash) { 23 | if (sendToFlash === undefined) { 24 | sendToFlash = true; 25 | } 26 | sendToFlash = !!sendToFlash; 27 | 28 | // Get the post_params object 29 | var postParams = this.settings.post_params; 30 | 31 | // Get the cookies 32 | var i, cookieArray = document.cookie.split(';'), caLength = cookieArray.length, c, eqIndex, name, value; 33 | for (i = 0; i < caLength; i++) { 34 | c = cookieArray[i]; 35 | 36 | // Left Trim spaces 37 | while (c.charAt(0) === " ") { 38 | c = c.substring(1, c.length); 39 | } 40 | eqIndex = c.indexOf("="); 41 | if (eqIndex > 0) { 42 | name = c.substring(0, eqIndex); 43 | value = c.substring(eqIndex + 1); 44 | postParams[name] = value; 45 | } 46 | } 47 | 48 | if (sendToFlash) { 49 | this.setPostParams(postParams); 50 | } 51 | }; 52 | 53 | } 54 | -------------------------------------------------------------------------------- /static/ueditor/third-party/swfupload/swfupload.proxy.js: -------------------------------------------------------------------------------- 1 | /* 2 | Proxy Plug-in 3 | 4 | Features: 5 | Times an upload to see if it appear suspiciously fast which might indicate a proxy server or anti-virus suite intercepting the upload. 6 | If the upload seems too fast an uploadError event is fired with PROXY error code after the final uploadProgress event. 7 | 8 | Adds a SWFUpload setting allowing you to tweak the bytes/s for triggering the error: 9 | proxy_detect_threshold : 256000 10 | 11 | Adds an UPLOAD_ERROR entry called PROXY: 12 | function uploadError(file, errorCode, message) { 13 | if (errorCode === SWFUpload.UPLOAD_ERROR.PROXY) { 14 | alert("You might have a proxy!"); 15 | } 16 | } 17 | */ 18 | 19 | var SWFUpload; 20 | if (typeof(SWFUpload) === "function") { 21 | SWFUpload.proxyDetect = {}; 22 | SWFUpload.UPLOAD_ERROR.PROXY = -30300; 23 | 24 | SWFUpload.prototype.initSettings = (function (oldInitSettings) { 25 | return function (userSettings) { 26 | if (typeof(oldInitSettings) === "function") { 27 | oldInitSettings.call(this, userSettings); 28 | } 29 | 30 | this.ensureDefault = function (settingName, defaultValue) { 31 | this.settings[settingName] = (userSettings[settingName] == undefined) ? defaultValue : userSettings[settingName]; 32 | }; 33 | 34 | // List used to keep the speed stats for the files we are tracking 35 | this.proxyDetectFileStartTimes = {}; 36 | this.proxyDetectSettings = {}; 37 | 38 | this.ensureDefault("proxy_detect_threshold", 256000); // Default is 250 KB per second 39 | 40 | this.proxyDetectSettings.user_upload_progress_handler = this.settings.upload_progress_handler; 41 | this.proxyDetectSettings.user_upload_complete_handler = this.settings.upload_complete_handler; 42 | 43 | this.settings.upload_progress_handler = SWFUpload.proxyDetect.uploadProgressHandler; 44 | this.settings.upload_complete_handler = SWFUpload.proxyDetect.uploadCompleteHandler; 45 | 46 | 47 | delete this.ensureDefault; 48 | }; 49 | }(SWFUpload.prototype.initSettings)); 50 | 51 | SWFUpload.proxyDetect.uploadProgressHandler = function (file, bytesComplete, bytesTotal) { 52 | var ex1 = null, time, differenceMS, bps; 53 | try { 54 | if (typeof this.proxyDetectSettings.user_upload_progress_handler === "function") { 55 | this.proxyDetectSettings.user_upload_progress_handler.call(this, file, bytesComplete, bytesTotal); 56 | } 57 | } catch (ex1) { } 58 | 59 | 60 | if (bytesComplete === 0) { 61 | this.proxyDetectFileStartTimes[file.ID] = new Date(); 62 | 63 | } else if (bytesComplete === bytesTotal) { 64 | try { 65 | // Calculate the Bps and decide if we should trigger the error 66 | time = new Date(); 67 | differenceMS = time.getTime() - this.proxyDetectFileStartTimes[file.ID].getTime(); 68 | 69 | if (differenceMS === 0) { 70 | differenceMS = 1; 71 | } 72 | 73 | bps = bytesTotal / (differenceMS * 1000); 74 | if (bps > parseInt(this.settings.proxy_detect_threshold, 10)) { 75 | this.queueEvent("upload_error_handler", [file, SWFUpload.UPLOAD_ERROR.PROXY, bps]); 76 | } 77 | } catch (ex) { 78 | } 79 | } 80 | 81 | if (ex1 !== null) { 82 | throw(ex1); 83 | } 84 | }; 85 | 86 | SWFUpload.proxyDetect.uploadCompleteHandler = function (file) { 87 | try { 88 | delete this.proxyDetectFileStartTimes[file.ID]; 89 | } catch (ex) { 90 | } 91 | 92 | if (typeof this.proxyDetectSettings.user_upload_progress_handler === "function") { 93 | return this.proxyDetectSettings.user_upload_progress_handler.call(this, file); 94 | } 95 | }; 96 | } -------------------------------------------------------------------------------- /static/ueditor/third-party/swfupload/swfupload.queue.js: -------------------------------------------------------------------------------- 1 | /* 2 | Queue Plug-in 3 | 4 | Features: 5 | *Adds a cancelQueue() method for cancelling the entire queue. 6 | *All queued files are uploaded when startUpload() is called. 7 | *If false is returned from uploadComplete then the queue upload is stopped. 8 | If false is not returned (strict comparison) then the queue upload is continued. 9 | *Adds a QueueComplete event that is fired when all the queued files have finished uploading. 10 | Set the event handler with the queue_complete_handler setting. 11 | 12 | */ 13 | 14 | var SWFUpload; 15 | if (typeof(SWFUpload) === "function") { 16 | SWFUpload.queue = {}; 17 | 18 | SWFUpload.prototype.initSettings = (function (oldInitSettings) { 19 | return function (userSettings) { 20 | if (typeof(oldInitSettings) === "function") { 21 | oldInitSettings.call(this, userSettings); 22 | } 23 | 24 | this.queueSettings = {}; 25 | 26 | this.queueSettings.queue_cancelled_flag = false; 27 | this.queueSettings.queue_upload_count = 0; 28 | 29 | this.queueSettings.user_upload_complete_handler = this.settings.upload_complete_handler; 30 | this.queueSettings.user_upload_start_handler = this.settings.upload_start_handler; 31 | this.settings.upload_complete_handler = SWFUpload.queue.uploadCompleteHandler; 32 | this.settings.upload_start_handler = SWFUpload.queue.uploadStartHandler; 33 | 34 | this.settings.queue_complete_handler = userSettings.queue_complete_handler || null; 35 | }; 36 | })(SWFUpload.prototype.initSettings); 37 | 38 | SWFUpload.prototype.startUpload = function (fileID) { 39 | this.queueSettings.queue_cancelled_flag = false; 40 | this.callFlash("StartUpload", [fileID]); 41 | }; 42 | 43 | SWFUpload.prototype.cancelQueue = function () { 44 | this.queueSettings.queue_cancelled_flag = true; 45 | this.stopUpload(); 46 | 47 | var stats = this.getStats(); 48 | while (stats.files_queued > 0) { 49 | this.cancelUpload(); 50 | stats = this.getStats(); 51 | } 52 | }; 53 | 54 | SWFUpload.queue.uploadStartHandler = function (file) { 55 | var returnValue; 56 | if (typeof(this.queueSettings.user_upload_start_handler) === "function") { 57 | returnValue = this.queueSettings.user_upload_start_handler.call(this, file); 58 | } 59 | 60 | // To prevent upload a real "FALSE" value must be returned, otherwise default to a real "TRUE" value. 61 | returnValue = (returnValue === false) ? false : true; 62 | 63 | this.queueSettings.queue_cancelled_flag = !returnValue; 64 | 65 | return returnValue; 66 | }; 67 | 68 | SWFUpload.queue.uploadCompleteHandler = function (file) { 69 | var user_upload_complete_handler = this.queueSettings.user_upload_complete_handler; 70 | var continueUpload; 71 | 72 | if (file.filestatus === SWFUpload.FILE_STATUS.COMPLETE) { 73 | this.queueSettings.queue_upload_count++; 74 | } 75 | 76 | if (typeof(user_upload_complete_handler) === "function") { 77 | continueUpload = (user_upload_complete_handler.call(this, file) === false) ? false : true; 78 | } else if (file.filestatus === SWFUpload.FILE_STATUS.QUEUED) { 79 | // If the file was stopped and re-queued don't restart the upload 80 | continueUpload = false; 81 | } else { 82 | continueUpload = true; 83 | } 84 | 85 | if (continueUpload) { 86 | var stats = this.getStats(); 87 | if (stats.files_queued > 0 && this.queueSettings.queue_cancelled_flag === false) { 88 | this.startUpload(); 89 | } else if (this.queueSettings.queue_cancelled_flag === false) { 90 | this.queueEvent("queue_complete_handler", [this.queueSettings.queue_upload_count]); 91 | this.queueSettings.queue_upload_count = 0; 92 | } else { 93 | this.queueSettings.queue_cancelled_flag = false; 94 | this.queueSettings.queue_upload_count = 0; 95 | } 96 | } 97 | }; 98 | } -------------------------------------------------------------------------------- /static/ueditor/third-party/swfupload/swfupload.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/third-party/swfupload/swfupload.swf -------------------------------------------------------------------------------- /static/ueditor/third-party/swfupload/swfupload_fp9.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lisijie/goblog/3f00ab7783d4e91e1d8a82f514b1b20f4b46b24b/static/ueditor/third-party/swfupload/swfupload_fp9.swf -------------------------------------------------------------------------------- /util/cache.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "container/list" 5 | "sync" 6 | ) 7 | 8 | type keyValue struct { 9 | key string 10 | value interface{} 11 | } 12 | 13 | type LruCache struct { 14 | itemList *list.List 15 | itemMap map[string]*list.Element 16 | maxSize int 17 | lock sync.Mutex 18 | } 19 | 20 | func (cache *LruCache) Get(key string) interface{} { 21 | elem, ok := cache.itemMap[key] 22 | if !ok { 23 | return nil 24 | } 25 | cache.itemList.MoveToFront(elem) 26 | kv := elem.Value.(*keyValue) 27 | return kv.value 28 | } 29 | 30 | func (cache *LruCache) Put(key string, val interface{}, timeout int64) error { 31 | cache.lock.Lock() 32 | defer cache.lock.Unlock() 33 | 34 | elem, ok := cache.itemMap[key] 35 | 36 | if ok { 37 | cache.itemList.MoveToFront(elem) 38 | kv := elem.Value.(*keyValue) 39 | kv.value = val 40 | } else { 41 | elem := cache.itemList.PushFront(&keyValue{key: key, value: val}) 42 | cache.itemMap[key] = elem 43 | 44 | if cache.itemList.Len() > cache.maxSize { 45 | delElem := cache.itemList.Back() 46 | kv := delElem.Value.(*keyValue) 47 | cache.itemList.Remove(delElem) 48 | delete(cache.itemMap, kv.key) 49 | } 50 | } 51 | 52 | return nil 53 | } 54 | 55 | func (cache *LruCache) Delete(key string) error { 56 | cache.lock.Lock() 57 | defer cache.lock.Unlock() 58 | 59 | elem, ok := cache.itemMap[key] 60 | if ok { 61 | cache.itemList.Remove(elem) 62 | delete(cache.itemMap, key) 63 | } 64 | 65 | return nil 66 | } 67 | 68 | func (cache *LruCache) IsExist(key string) bool { 69 | if _, ok := cache.itemMap[key]; ok { 70 | return true 71 | } 72 | return false 73 | } 74 | 75 | func (cache *LruCache) ClearAll() error { 76 | cache.lock.Lock() 77 | defer cache.lock.Unlock() 78 | 79 | for k, e := range cache.itemMap { 80 | cache.itemList.Remove(e) 81 | delete(cache.itemMap, k) 82 | } 83 | 84 | return nil 85 | } 86 | 87 | func (cache *LruCache) Len() int { 88 | return cache.itemList.Len() 89 | } 90 | 91 | func NewLruCache(maxSize int) *LruCache { 92 | return &LruCache{ 93 | itemList: list.New(), 94 | itemMap: make(map[string]*list.Element), 95 | maxSize: maxSize, 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /util/factory.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "errors" 5 | "github.com/lisijie/goblog/util/singleton" 6 | "sync" 7 | ) 8 | 9 | var Factory factory 10 | 11 | func init() { 12 | Factory.instances = make(map[string]singleton.Singleton) 13 | } 14 | 15 | type factory struct { 16 | instances map[string]singleton.Singleton 17 | lock sync.Mutex 18 | } 19 | 20 | func (f *factory) Set(name string, init singleton.SingletonInitFunc) bool { 21 | f.lock.Lock() 22 | defer f.lock.Unlock() 23 | if _, ok := f.instances[name]; !ok { 24 | f.instances[name] = singleton.NewSingleton(init) 25 | return true 26 | } 27 | return false 28 | } 29 | 30 | func (f *factory) Get(name string) (interface{}, error) { 31 | if _, ok := f.instances[name]; ok { 32 | return f.instances[name].Get() 33 | } 34 | return nil, errors.New("factory get error : " + name + " not exists.") 35 | } 36 | -------------------------------------------------------------------------------- /util/functions.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "crypto/md5" 5 | "fmt" 6 | "strings" 7 | "net/url" 8 | ) 9 | 10 | func Md5(buf []byte) string { 11 | hash := md5.New() 12 | hash.Write(buf) 13 | return fmt.Sprintf("%x", hash.Sum(nil)) 14 | } 15 | 16 | func Rawurlencode(str string) string { 17 | return strings.Replace(url.QueryEscape(str), "+", "%20", -1) 18 | } 19 | -------------------------------------------------------------------------------- /util/pager.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "bytes" 5 | "fmt" 6 | "math" 7 | "strings" 8 | ) 9 | 10 | type Pager struct { 11 | Page int 12 | Totalnum int 13 | Pagesize int 14 | urlpath string 15 | urlquery string 16 | nopath bool 17 | } 18 | 19 | func NewPager(page, totalnum, pagesize int, url string, nopath ...bool) *Pager { 20 | p := new(Pager) 21 | p.Page = page 22 | p.Totalnum = totalnum 23 | p.Pagesize = pagesize 24 | 25 | arr := strings.Split(url, "?") 26 | p.urlpath = arr[0] 27 | if len(arr) > 1 { 28 | p.urlquery = "?" + arr[1] 29 | } else { 30 | p.urlquery = "" 31 | } 32 | 33 | if len(nopath) > 0 { 34 | p.nopath = nopath[0] 35 | } else { 36 | p.nopath = false 37 | } 38 | 39 | return p 40 | } 41 | 42 | func (this *Pager) url(page int) string { 43 | if this.nopath { //不使用目录形式 44 | if this.urlquery != "" { 45 | return fmt.Sprintf("%s%s&page=%d", this.urlpath, this.urlquery, page) 46 | } else { 47 | return fmt.Sprintf("%s?page=%d", this.urlpath, page) 48 | } 49 | } else { 50 | return fmt.Sprintf("%s/page/%d%s", this.urlpath, page, this.urlquery) 51 | } 52 | } 53 | 54 | func (this *Pager) ToString() string { 55 | if this.Totalnum <= this.Pagesize { 56 | return "" 57 | } 58 | 59 | var buf bytes.Buffer 60 | var from, to, linknum, offset, totalpage int 61 | 62 | offset = 5 63 | linknum = 10 64 | 65 | totalpage = int(math.Ceil(float64(this.Totalnum) / float64(this.Pagesize))) 66 | 67 | if totalpage < linknum { 68 | from = 1 69 | to = totalpage 70 | } else { 71 | from = this.Page - offset 72 | to = from + linknum 73 | if from < 1 { 74 | from = 1 75 | to = from + linknum - 1 76 | } else if to > totalpage { 77 | to = totalpage 78 | from = totalpage - linknum + 1 79 | } 80 | } 81 | 82 | buf.WriteString("
    ") 83 | if this.Page > 1 { 84 | buf.WriteString(fmt.Sprintf("
  • «
  • ", this.url(this.Page-1))) 85 | } else { 86 | buf.WriteString("
  • «
  • ") 87 | } 88 | 89 | if this.Page > linknum { 90 | buf.WriteString(fmt.Sprintf("
  • 1...
  • ", this.url(1))) 91 | } 92 | 93 | for i := from; i <= to; i++ { 94 | if i == this.Page { 95 | buf.WriteString(fmt.Sprintf("
  • %d
  • ", i)) 96 | } else { 97 | buf.WriteString(fmt.Sprintf("
  • %d
  • ", this.url(i), i)) 98 | } 99 | } 100 | 101 | if totalpage > to { 102 | buf.WriteString(fmt.Sprintf("
  • ...%d
  • ", this.url(totalpage), totalpage)) 103 | } 104 | 105 | if this.Page < totalpage { 106 | buf.WriteString(fmt.Sprintf("
  • »
  • ", this.url(this.Page+1))) 107 | } else { 108 | buf.WriteString(fmt.Sprintf("
  • »
  • ")) 109 | } 110 | buf.WriteString("
") 111 | 112 | return buf.String() 113 | } 114 | -------------------------------------------------------------------------------- /util/singleton/singleton.go: -------------------------------------------------------------------------------- 1 | package singleton 2 | 3 | import ( 4 | "sync" 5 | ) 6 | 7 | type SingletonInitFunc func() (interface{}, error) 8 | 9 | // Interface for accessing singleton objects. 10 | // 11 | // Example use: 12 | // var configSelectorSingleton = NewSingleton(init) 13 | // func configSelector() (configSelector, error) { 14 | // s, err := configSelectorSingleton.Get() 15 | // if err != nil { 16 | // return nil, err 17 | // } 18 | // return s.(configSelector), nil 19 | // } 20 | type Singleton interface { 21 | // Return the encapsulated singleton 22 | Get() (interface{}, error) 23 | } 24 | 25 | // Call to create a new singleton that is instantiated with the given init function. 26 | // init is not called until the first invocation of Get(). If init errors, it will be called again 27 | // on the next invocation of Get(). 28 | func NewSingleton(init SingletonInitFunc) Singleton { 29 | return &singletonImpl{init: init} 30 | } 31 | 32 | type singletonImpl struct { 33 | sync.Mutex 34 | 35 | // The actual singleton object 36 | data interface{} 37 | // Constructor for the singleton object 38 | init SingletonInitFunc 39 | // True if init was run without error 40 | initialized bool 41 | } 42 | 43 | func (s *singletonImpl) Get() (interface{}, error) { 44 | // Don't lock in the common case 45 | if s.initialized { 46 | return s.data, nil 47 | } 48 | 49 | s.Lock() 50 | defer s.Unlock() 51 | 52 | if s.initialized { 53 | return s.data, nil 54 | } 55 | 56 | var err error 57 | s.data, err = s.init() 58 | if err != nil { 59 | return nil, err 60 | } 61 | 62 | s.initialized = true 63 | return s.data, nil 64 | } 65 | -------------------------------------------------------------------------------- /views/admin/account/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 登录 5 | 6 | 13 | 14 | 15 |
16 |
17 | 18 |
19 | 20 |
21 | 后台登录 22 | 23 | {{if .errmsg}} 24 |
25 | 26 | {{.errmsg}} 27 |
28 | {{end}} 29 | 30 | 31 | 32 | 33 | 34 | 37 |

38 |
39 |
40 |
41 |
42 |
43 | 44 | 45 | -------------------------------------------------------------------------------- /views/admin/account/profile.html: -------------------------------------------------------------------------------- 1 |
2 | 个人资料 3 | {{if .updated}} 4 |
修改成功!
5 | {{end}} 6 |
7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 47 | 48 | 49 |
帐号 12 | {{.user.UserName}} 13 |
登录次数 18 | {{.user.LoginCount}} 19 |
最后登录 24 | {{date .user.LastLogin "Y-m-d H:i:s"}} ({{.user.LastIp}}) 25 |
当前密码: {{.errmsg.password}}
新密码: {{.errmsg.newpassword}}
确认密码: {{.errmsg.newpassword2}}
44 | 45 | 46 |
50 |
51 |
-------------------------------------------------------------------------------- /views/admin/article/add.html: -------------------------------------------------------------------------------- 1 |
2 | 发布文章 3 |
4 | 5 | 6 | 7 | 8 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 29 | 30 | 33 | 34 | 35 | 36 | 43 | 44 | 45 | 46 | 58 | 59 | 60 | 61 | 62 | 63 | 65 | 66 | 67 |
标题 9 | 10 | 11 | 12 | 13 |
分类标签 多个用英文逗号","分隔
URL名称 22 | 23 | 24 | 25 | 26 |
发布时间 31 | 32 |
保存到 37 | 42 |
内容 47 | 50 | 51 | 52 | 53 | 57 |
64 |
68 |
69 | 70 |
71 | 72 | 73 | -------------------------------------------------------------------------------- /views/admin/article/edit.html: -------------------------------------------------------------------------------- 1 |
2 | 编辑文章 3 |
4 | 5 | 6 | 7 | 8 | 9 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 28 | 29 | 30 | 31 | 34 | 35 | 36 | 37 | 44 | 45 | 46 | 47 | 59 | 60 | 61 | 62 | 63 | 64 | 66 | 67 | 68 |
标题 10 | 11 | 12 | 13 | 14 |
分类标签 多个用英文逗号","分隔
URL名称 23 | 24 | 25 | 26 | 27 |
发布时间 32 | 33 |
保存到 38 | 43 |
内容 48 | 51 | 52 | 53 | 54 | 58 |
65 |
69 |
70 | 71 |
72 | 73 | 74 | 89 | -------------------------------------------------------------------------------- /views/admin/article/list.html: -------------------------------------------------------------------------------- 1 |
2 | 文章列表 3 | 4 | 11 | 12 |
13 |
14 | 19 | 20 | 21 |
22 |
23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | {{range $k, $v := .list}} 40 | 41 | 42 | 43 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | {{end}} 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 76 | 77 | 78 |
ID标题类别点击量发布人发布时间操作
{{$v.Id}} 44 | {{if $v.IsTop}} 45 | 46 | {{end}} 47 | {{str2html $v.ColorTitle}} 48 | {{if $v.UrlType}} 49 | 页面 50 | {{end}} 51 | {{str2html $v.TagsLink}}{{$v.Views}}{{$v.Author}}{{date $v.PostTime "m月d日 H:i:s"}}编辑 | 删除
{{str2html .pagebar}}
67 | 74 | 75 |
79 |
80 | 81 |
82 | 83 | -------------------------------------------------------------------------------- /views/admin/index/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 后台管理 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 22 | 23 | 24 | 61 | 62 |
14 | 15 |
16 | 您好!{{.adminname}} | 17 | 退出登录 | 18 | 个人信息 | 19 | 站点首页 20 |
21 |
25 | 26 | 27 | 55 | 58 | 59 |
56 | 57 |
60 |
63 | 78 | 79 | -------------------------------------------------------------------------------- /views/admin/index/main.html: -------------------------------------------------------------------------------- 1 |
2 | 系统信息 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
系统环境
程序版本:{{.version}}
主机名称:{{.hostname}}
Go版本:{{.gover}}
编译环境:操作系统:{{.os}} ({{.arch}}),CPU数量:{{.cpunum}}
数据统计
文章数量:{{.postnum}}
分类数量:{{.tagnum}}
用户数量:{{.usernum}}
44 | 45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /views/admin/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | GoBlog后台管理 v{{.version}} 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 |
18 |
19 | {{.LayoutContent}} 20 |
21 |
22 |
23 | 24 | -------------------------------------------------------------------------------- /views/admin/showmsg.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 后台管理 v1.0.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 36 | 37 | 38 |
提示信息

{{.msg}}

31 | 如果您的浏览器没自动跳转,请点击这里 32 | 35 |
39 | 40 |
41 |
42 |
43 | 44 | -------------------------------------------------------------------------------- /views/admin/tag/list.html: -------------------------------------------------------------------------------- 1 |
2 | 标签管理 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | {{range $k, $v := .list}} 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | {{end}} 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 44 | 45 | 46 |
ID标签名称内容数 
{{$v.Id}}{{$v.Name}}{{$v.Count}} 
{{str2html .pagebar}}
33 | 39 | 42 | 43 |
47 |
48 | 49 |
50 | 51 | -------------------------------------------------------------------------------- /views/admin/user/add.html: -------------------------------------------------------------------------------- 1 |
2 | 添加用户 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 31 | 32 | 33 | 34 | 35 | 36 | 40 | 41 | 42 |
用户名: {{.errmsg.username}}
密码: {{.errmsg.password}}
确认密码: {{.errmsg.password2}}
邮箱: {{.errmsg.email}}
激活状态: 27 | 28 |    29 | 30 |   
37 | 38 | 39 |
43 |
44 | 45 |
-------------------------------------------------------------------------------- /views/admin/user/edit.html: -------------------------------------------------------------------------------- 1 |
2 | 编辑用户 3 | 4 |
5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 32 | 33 | 34 | 35 | 36 | 37 | 41 | 42 | 43 |
用户名:
密码: {{.errmsg.password}}
确认密码: {{.errmsg.password2}}
邮箱: {{.errmsg.email}}
激活状态: 28 | 29 |    30 | 31 |   
38 | 39 | 40 |
44 |
45 | 46 |
-------------------------------------------------------------------------------- /views/admin/user/list.html: -------------------------------------------------------------------------------- 1 |
2 | 用户列表 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {{range $k, $v := .list}} 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 33 | 37 | 38 | {{end}} 39 | 40 | 41 | 42 | 43 | 44 | 45 |
ID用户名邮箱最后登录登录IP登录次数激活状态操作
{{$v.Id}}{{$v.UserName}}{{$v.Email}}{{date $v.LastLogin "Y-m-d H:i:s"}}{{$v.LastIp}}{{$v.LoginCount}} 27 | {{if eq $v.Active 1}} 28 | 已激活 29 | {{else}} 30 | 未激活 31 | {{end}} 32 | 34 | 编辑 | 35 | 删除 36 |
{{str2html .pagebar}}
46 | 47 |
-------------------------------------------------------------------------------- /views/default/archives.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | {{range $year, $list := .result}} 4 |

{{$year}}

5 | 6 | {{range $k, $v := $list}} 7 | 18 | {{end}} 19 | 20 | {{end}} 21 | 22 |
23 | 24 | -------------------------------------------------------------------------------- /views/default/article.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

{{.post.Title}}

4 |
5 | {{str2html .post.Content}} 6 |
7 |
8 |
9 | 10 |
11 | 12 |
13 | 27 |
-------------------------------------------------------------------------------- /views/default/category.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | {{range $year, $list := .result}} 4 |

{{$year}}

5 | 6 | {{range $k, $v := $list}} 7 | 18 | {{end}} 19 | 20 | {{end}} 21 | 22 |
23 | 24 | -------------------------------------------------------------------------------- /views/default/index.html: -------------------------------------------------------------------------------- 1 |
2 | {{range $k, $v := .list}} 3 |
4 |
5 |
6 | 7 |
8 |
{{str2html $v.TagsLink}}
9 |
10 |

11 | 12 |

13 |
14 | {{str2html $v.Excerpt}} 15 |
16 |
17 | {{end}} 18 |
19 | 20 | -------------------------------------------------------------------------------- /views/default/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{.title}} 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 |
21 | 22 |
23 | 50 |
51 | 52 |
53 | 54 | 55 | 56 |
57 | 58 |
59 |
60 | {{.LayoutContent}} 61 |
62 |
63 | 64 | 65 | 69 | 70 |
71 | 72 |
73 | 74 |
75 | {{str2html .options.stat}} 76 |
77 | 78 | --------------------------------------------------------------------------------