├── .gitattributes ├── README.md ├── conf └── app.conf ├── controllers ├── admin.go └── base.go ├── db_beego.sql ├── file.png ├── main.go ├── models ├── base.go └── user.go ├── routers └── router.go ├── static ├── css │ ├── about.css │ ├── animate.min.css │ ├── article.css │ ├── detail.css │ ├── global.css │ ├── home.css │ ├── prettify.css │ ├── resource.css │ └── timeline.css ├── images │ ├── cover │ │ ├── 201703051349045432.jpg │ │ ├── 201703051847567306.jpg │ │ ├── 201703142313157316.jpg │ │ ├── 201703152314519971.jpg │ │ ├── 201703162101115908.jpg │ │ ├── 201703181708141811.jpg │ │ ├── 201703181740098218.jpg │ │ ├── 201703181909057125.jpg │ │ ├── cover.jpg │ │ └── cover_default.jpg │ ├── es.png │ ├── f.ico │ ├── handshake.png │ ├── qq_32.png │ ├── qzone_32.png │ ├── wechat_32.png │ └── weibo_32.png ├── js │ ├── cms.js │ ├── detail.js │ ├── fortree.js │ ├── global.js │ ├── home.js │ ├── jquery.min.js │ └── prettify.js ├── plug │ ├── font-awesome │ │ ├── HELP-US-OUT.txt │ │ ├── css │ │ │ ├── font-awesome.css │ │ │ └── font-awesome.min.css │ │ ├── fonts │ │ │ ├── FontAwesome.otf │ │ │ ├── fontawesome-webfont.eot │ │ │ ├── fontawesome-webfont.svg │ │ │ ├── fontawesome-webfont.ttf │ │ │ ├── fontawesome-webfont.woff │ │ │ └── fontawesome-webfont.woff2 │ │ ├── less │ │ │ ├── animated.less │ │ │ ├── bordered-pulled.less │ │ │ ├── core.less │ │ │ ├── fixed-width.less │ │ │ ├── font-awesome.less │ │ │ ├── icons.less │ │ │ ├── larger.less │ │ │ ├── list.less │ │ │ ├── mixins.less │ │ │ ├── path.less │ │ │ ├── rotated-flipped.less │ │ │ ├── screen-reader.less │ │ │ ├── stacked.less │ │ │ └── variables.less │ │ └── scss │ │ │ ├── _animated.scss │ │ │ ├── _bordered-pulled.scss │ │ │ ├── _core.scss │ │ │ ├── _fixed-width.scss │ │ │ ├── _icons.scss │ │ │ ├── _larger.scss │ │ │ ├── _list.scss │ │ │ ├── _mixins.scss │ │ │ ├── _path.scss │ │ │ ├── _rotated-flipped.scss │ │ │ ├── _screen-reader.scss │ │ │ ├── _stacked.scss │ │ │ ├── _variables.scss │ │ │ └── font-awesome.scss │ └── layui │ │ ├── css │ │ ├── layui.css │ │ ├── layui.mobile.css │ │ └── modules │ │ │ ├── code.css │ │ │ ├── laydate │ │ │ ├── icon.png │ │ │ └── laydate.css │ │ │ └── layer │ │ │ └── default │ │ │ ├── icon-ext.png │ │ │ ├── icon.png │ │ │ ├── layer.css │ │ │ ├── loading-0.gif │ │ │ ├── loading-1.gif │ │ │ └── loading-2.gif │ │ ├── font │ │ ├── iconfont.eot │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ └── iconfont.woff │ │ ├── images │ │ └── face │ │ │ ├── 0.gif │ │ │ ├── 1.gif │ │ │ ├── 10.gif │ │ │ ├── 11.gif │ │ │ ├── 12.gif │ │ │ ├── 13.gif │ │ │ ├── 14.gif │ │ │ ├── 15.gif │ │ │ ├── 16.gif │ │ │ ├── 17.gif │ │ │ ├── 18.gif │ │ │ ├── 19.gif │ │ │ ├── 2.gif │ │ │ ├── 20.gif │ │ │ ├── 21.gif │ │ │ ├── 22.gif │ │ │ ├── 23.gif │ │ │ ├── 24.gif │ │ │ ├── 25.gif │ │ │ ├── 26.gif │ │ │ ├── 27.gif │ │ │ ├── 28.gif │ │ │ ├── 29.gif │ │ │ ├── 3.gif │ │ │ ├── 30.gif │ │ │ ├── 31.gif │ │ │ ├── 32.gif │ │ │ ├── 33.gif │ │ │ ├── 34.gif │ │ │ ├── 35.gif │ │ │ ├── 36.gif │ │ │ ├── 37.gif │ │ │ ├── 38.gif │ │ │ ├── 39.gif │ │ │ ├── 4.gif │ │ │ ├── 40.gif │ │ │ ├── 41.gif │ │ │ ├── 42.gif │ │ │ ├── 43.gif │ │ │ ├── 44.gif │ │ │ ├── 45.gif │ │ │ ├── 46.gif │ │ │ ├── 47.gif │ │ │ ├── 48.gif │ │ │ ├── 49.gif │ │ │ ├── 5.gif │ │ │ ├── 50.gif │ │ │ ├── 51.gif │ │ │ ├── 52.gif │ │ │ ├── 53.gif │ │ │ ├── 54.gif │ │ │ ├── 55.gif │ │ │ ├── 56.gif │ │ │ ├── 57.gif │ │ │ ├── 58.gif │ │ │ ├── 59.gif │ │ │ ├── 6.gif │ │ │ ├── 60.gif │ │ │ ├── 61.gif │ │ │ ├── 62.gif │ │ │ ├── 63.gif │ │ │ ├── 64.gif │ │ │ ├── 65.gif │ │ │ ├── 66.gif │ │ │ ├── 67.gif │ │ │ ├── 68.gif │ │ │ ├── 69.gif │ │ │ ├── 7.gif │ │ │ ├── 70.gif │ │ │ ├── 71.gif │ │ │ ├── 8.gif │ │ │ └── 9.gif │ │ ├── lay │ │ ├── dest │ │ │ └── layui.all.js │ │ ├── lib │ │ │ └── jquery.js │ │ └── modules │ │ │ ├── code.js │ │ │ ├── element.js │ │ │ ├── flow.js │ │ │ ├── form.js │ │ │ ├── jquery.js │ │ │ ├── laydate.js │ │ │ ├── layedit.js │ │ │ ├── layer.js │ │ │ ├── laypage.js │ │ │ ├── laytpl.js │ │ │ ├── mobile.js │ │ │ ├── pagesize.js │ │ │ ├── tree.js │ │ │ ├── upload.js │ │ │ └── util.js │ │ └── layui.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 ├── tests └── default_test.go ├── util └── functions.go └── views └── admin ├── login.html └── main.tpl /.gitattributes: -------------------------------------------------------------------------------- 1 | *.css linguist-vendored 2 | *.scss linguist-vendored 3 | *.js linguist-vendored 4 | *.html linguist-vendored 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # beego-blog 2 | 基于beego一步一步搭建blog 3 | 4 | 博客讲解:https://blog.csdn.net/sureSand/article/details/79685464 5 | 6 | #github.com/liwd/blog/models 无法获取的问题? 7 | 8 | 首先本项目有三个分支,blog-dev1、blog-dev2、master,其中blog-dev2是完整版代码,其次我的路径是这样; 9 | 10 | ![image](https://github.com/lightTrace/beego-blog/blob/master/file.png) 11 | 12 | F:\goproject代表的是GOPATH,然后这个项目我是放在F:\goproject\src\github.com\liwd\blog下,你们对照这个项目是否路径有需要修改的地方,如果你取的不是liwd换成你对应的目录就好 13 | -------------------------------------------------------------------------------- /conf/app.conf: -------------------------------------------------------------------------------- 1 | appname = blog 2 | httpport = 8088 3 | runmode = dev 4 | 5 | # MYSQL地址 6 | dbhost = localhost 7 | 8 | # MYSQL端口 9 | dbport = 3306 10 | 11 | # MYSQL用户名 12 | dbuser = root 13 | 14 | # MYSQL密码 15 | dbpassword = 5201314 16 | 17 | # MYSQL数据库名称 18 | dbname = db_beego 19 | 20 | # MYSQL表前缀 21 | dbprefix = tb_ -------------------------------------------------------------------------------- /controllers/admin.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "github.com/liwd/blog/models" 5 | 6 | "github.com/liwd/blog/util" 7 | 8 | "strings" 9 | 10 | ) 11 | 12 | type AdminController struct { 13 | baseController 14 | } 15 | 16 | //后台用户登录 17 | func (c *AdminController) Login() { 18 | if c.Ctx.Request.Method == "POST" { 19 | username := c.GetString("username") 20 | password := c.GetString("password") 21 | user := models.User{Username:username} 22 | c.o.Read(&user,"username") 23 | 24 | if user.Password == "" { 25 | c.History("账号不存在","") 26 | } 27 | 28 | if util.Md5(password) != strings.Trim(user.Password, " ") { 29 | c.History("密码错误", "") 30 | } 31 | user.LastIp = c.getClientIp() 32 | user.LoginCount = user.LoginCount +1 33 | if _, err := c.o.Update(&user); err != nil { 34 | c.History("登录异常", "") 35 | } else { 36 | c.History("登录成功", "/admin/main.html") 37 | } 38 | c.SetSession("user", user) 39 | } 40 | c.TplName = c.controllerName+"/login.html" 41 | } 42 | 43 | //主页 44 | func (c *AdminController) Main() { 45 | c.TplName = c.controllerName + "/main.tpl" 46 | } 47 | -------------------------------------------------------------------------------- /controllers/base.go: -------------------------------------------------------------------------------- 1 | package controllers 2 | 3 | import ( 4 | "github.com/Echosong/beego_blog/models" 5 | "github.com/astaxie/beego" 6 | "github.com/astaxie/beego/orm" 7 | "strings" 8 | ) 9 | 10 | type baseController struct { 11 | beego.Controller 12 | o orm.Ormer 13 | controllerName string 14 | actionName string 15 | } 16 | 17 | func (p *baseController) Prepare() { 18 | controllerName, actionName := p.GetControllerAndAction() 19 | p.controllerName = strings.ToLower(controllerName[0 : len(controllerName)-10]) 20 | p.actionName = strings.ToLower(actionName) 21 | p.o = orm.NewOrm() 22 | if strings.ToLower(p.controllerName) == "admin" && strings.ToLower(p.actionName) != "login" { 23 | if p.GetSession("user") == nil { 24 | p.History("未登录", "/admin/login") 25 | //p.Ctx.WriteString(p.controllerName +"==="+ p.actionName) 26 | } 27 | } 28 | 29 | //初始化前台页面相关元素 30 | if strings.ToLower(p.controllerName) == "blog" { 31 | 32 | p.Data["actionName"] = strings.ToLower(actionName) 33 | var result []*models.Config 34 | p.o.QueryTable(new(models.Config).TableName()).All(&result) 35 | configs := make(map[string]string) 36 | for _, v := range result { 37 | configs[v.Name] = v.Value 38 | } 39 | p.Data["config"] = configs 40 | } 41 | 42 | } 43 | 44 | func (p *baseController) History(msg string, url string) { 45 | if url == "" { 46 | p.Ctx.WriteString("") 47 | p.StopRun() 48 | } else { 49 | p.Redirect(url, 302) 50 | } 51 | } 52 | 53 | //获取用户IP地址 54 | func (p *baseController) getClientIp() string { 55 | s := strings.Split(p.Ctx.Request.RemoteAddr, ":") 56 | return s[0] 57 | } 58 | -------------------------------------------------------------------------------- /file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/file.png -------------------------------------------------------------------------------- /main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | _ "github.com/liwd/blog/routers" 5 | "github.com/astaxie/beego" 6 | _ "github.com/go-sql-driver/mysql" 7 | "github.com/liwd/blog/models" 8 | ) 9 | 10 | 11 | func init() { 12 | models.Init() 13 | beego.BConfig.WebConfig.Session.SessionOn = true 14 | } 15 | 16 | 17 | func main() { 18 | beego.Run() 19 | } 20 | 21 | -------------------------------------------------------------------------------- /models/base.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "github.com/astaxie/beego" 5 | "github.com/astaxie/beego/orm" 6 | ) 7 | 8 | func Init() { 9 | dbhost := beego.AppConfig.String("dbhost") 10 | dbport := beego.AppConfig.String("dbport") 11 | dbuser := beego.AppConfig.String("dbuser") 12 | dbpassword := beego.AppConfig.String("dbpassword") 13 | dbname := beego.AppConfig.String("dbname") 14 | if dbport == "" { 15 | dbport = "3306" 16 | } 17 | dsn := dbuser + ":" + dbpassword + "@tcp(" + dbhost + ":" + dbport + ")/" + dbname + "?charset=utf8&loc=Asia%2FShanghai" 18 | orm.RegisterDataBase("default", "mysql", dsn) 19 | orm.RegisterModel(new(User)) 20 | } 21 | 22 | //返回带前缀的表名 23 | func TableName(str string) string { 24 | return beego.AppConfig.String("dbprefix") + str 25 | } 26 | -------------------------------------------------------------------------------- /models/user.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import "time" 4 | 5 | type User struct { 6 | Id int 7 | Username string 8 | Password string 9 | Email string 10 | LoginCount int 11 | LastTime time.Time 12 | LastIp string 13 | State int8 14 | Created time.Time 15 | Updated time.Time 16 | } 17 | 18 | func (m *User) TableName() string { 19 | return TableName("user") 20 | } 21 | -------------------------------------------------------------------------------- /routers/router.go: -------------------------------------------------------------------------------- 1 | package routers 2 | 3 | import ( 4 | "github.com/liwd/blog/controllers" 5 | "github.com/astaxie/beego" 6 | ) 7 | 8 | func init() { 9 | beego.AutoRouter(&controllers.AdminController{}) 10 | } 11 | -------------------------------------------------------------------------------- /static/css/about.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | @Name:不落阁整站模板源码 4 | @Author:Absolutely 5 | @Site:http://www.lyblogs.cn 6 | 7 | */ 8 | .layui-tab-brief { 9 | background: #fff; 10 | min-height: 100vh; 11 | } 12 | 13 | .layui-tab-brief .layui-tab-title { 14 | text-align: center; 15 | border-bottom: 1px solid #5FB878; 16 | } 17 | 18 | .layui-tab-brief .layui-tab-title li { 19 | font-size: 12px; 20 | } 21 | 22 | .layui-tab-brief .layui-tab-content { 23 | padding: 0; 24 | } 25 | 26 | .aboutinfo { 27 | text-align: center; 28 | padding: 0 15px; 29 | } 30 | 31 | .aboutinfo-figure { 32 | display: inline-block; 33 | margin: 20px auto; 34 | } 35 | 36 | .aboutinfo-figure img { 37 | border-radius: 50px; 38 | } 39 | 40 | .aboutinfo-nickname { 41 | font-size: 32px; 42 | font-weight: bold; 43 | margin: 0 0 15px 0; 44 | } 45 | 46 | .aboutinfo-introduce { 47 | margin: 20px auto; 48 | font-size: 18px; 49 | width: 90%; 50 | } 51 | 52 | .aboutinfo-location { 53 | color: #808080; 54 | margin: 15px; 55 | } 56 | 57 | .aboutinfo-contact { 58 | margin: 15px; 59 | } 60 | 61 | .aboutinfo-contact > a { 62 | padding: 0 10px; 63 | } 64 | 65 | .aboutinfo-abstract { 66 | width: 90%; 67 | margin: 0 auto; 68 | } 69 | 70 | .aboutinfo-abstract > h1 { 71 | font-weight: bold; 72 | font-size: 16px; 73 | text-align: left; 74 | margin-top: 25px; 75 | } 76 | 77 | .aboutinfo-abstract > p { 78 | margin: 5px 0; 79 | font-size: 14px; 80 | text-align: left; 81 | text-indent: 2em; 82 | } 83 | 84 | #frinedlink { 85 | display: none; /*手机端不显示友情链接,样式没写好,会乱*/ 86 | } 87 | 88 | .friendlink { 89 | padding: 0 15px; 90 | } 91 | 92 | .friendlink li { 93 | width: 30%; 94 | margin: 0 1%; 95 | margin-top: 10px; 96 | float: left; 97 | } 98 | 99 | .friendlink-item { 100 | box-shadow: inset 0 0 2px #5FB878; 101 | width: 100%; 102 | display: block; 103 | padding: 10px 0; 104 | text-align: left; 105 | min-height: 45px; 106 | position: relative; 107 | } 108 | 109 | .friendlink-item:hover { 110 | box-shadow: 0 0 2px #5FB878; 111 | } 112 | 113 | .friendlink-item-pic { 114 | display: inline-block; 115 | position: absolute; 116 | left: 10%; 117 | margin: 0 10px; 118 | } 119 | 120 | .friendlink-item-pic img { 121 | width: 45px; 122 | height: 45px; 123 | position: relative; 124 | left: 0px; 125 | border-radius: 50px; 126 | } 127 | 128 | .friendlink-item-title { 129 | font-size: 17px; 130 | margin-left: 65px; 131 | text-align: center; 132 | line-height: 20px; 133 | } 134 | 135 | .friendlink-item-domain { 136 | font-size: 13px; 137 | margin-left: 65px; 138 | text-align: center; 139 | line-height: 20px; 140 | margin-top: 5px; 141 | } 142 | 143 | .leavemessage .blog-comment li:first-child { 144 | border-top: 1px dotted #01AAED; 145 | } 146 | 147 | /* 小屏幕(平板,大于等于 768px) */ 148 | @media (min-width: 768px) { 149 | .layui-tab-brief .layui-tab-title li { 150 | font-size: 14px; 151 | } 152 | 153 | #frinedlink { 154 | display: inline-block; 155 | } 156 | } 157 | 158 | /* 中等屏幕(桌面显示器,大于等于 992px) */ 159 | @media (min-width: 992px) { 160 | .blog-container { 161 | width: 962px; 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /static/css/article.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | @Name:不落阁整站模板源码 4 | @Author:Absolutely 5 | @Site:http://www.lyblogs.cn 6 | 7 | */ 8 | 9 | /*搜索(移动端不提供此功能)*/ 10 | .search-keywords, 11 | .search-submit { 12 | display: none; 13 | } 14 | 15 | @media (min-width: 992px) { 16 | .blog-search { 17 | margin-bottom: 15px; 18 | } 19 | 20 | .search-keywords, 21 | .search-submit { 22 | display: inline-block; 23 | } 24 | 25 | .search-keywords { 26 | width: 85%; 27 | float: left; 28 | } 29 | 30 | .search-keywords > input { 31 | border-radius: 0; 32 | } 33 | 34 | .search-submit { 35 | width: 14%; 36 | float: right; 37 | } 38 | 39 | .search-submit > .search-btn { 40 | display: block; 41 | width: 100%; 42 | height: 36px; 43 | background: #fff; 44 | cursor: pointer; 45 | float: right; 46 | border-radius: 1px; 47 | border: 1px solid #e2e2e2; 48 | } 49 | 50 | .search-submit > .search-btn:hover { 51 | border: 1px solid #d2d2d2; 52 | } 53 | 54 | .search-submit > .search-btn i { 55 | width: 13px; 56 | line-height: 38px; 57 | display: block; 58 | margin: 0 auto; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /static/css/detail.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | @Name:不落阁整站模板源码 4 | @Author:Absolutely 5 | @Site:http://www.lyblogs.cn 6 | 7 | */ 8 | 9 | .article-detail { 10 | background: #fff; 11 | padding: 15px; 12 | box-shadow: 0 1px 8px #a6a6a6; 13 | margin-bottom: 15px; 14 | } 15 | 16 | .article-detail-title { 17 | text-align: center; 18 | margin: 20px 0px; 19 | color: white; 20 | font-weight: 700; 21 | text-shadow: 0 0 8px #000000; 22 | font-size: 24px; 23 | } 24 | 25 | .article-detail-info { 26 | border: 1px dashed #808080; 27 | font-size: 13px; 28 | color: #808080; 29 | padding: 5px 0; 30 | font-family: SimSun; 31 | text-align: center; 32 | margin: 0 0 10px; 33 | } 34 | 35 | .article-detail-info span { 36 | margin: 0 5px; 37 | } 38 | 39 | .article-detail-content { 40 | padding: 10px 5px; 41 | } 42 | 43 | 44 | 45 | /*代码区域*/ 46 | pre { 47 | background-color: #f5f5f5 !important; 48 | border-radius: 0px !important; 49 | border: 1px solid #ccc !important; 50 | font-size: 13px !important; 51 | } 52 | -------------------------------------------------------------------------------- /static/css/home.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | @Name:不落阁整站模板源码 4 | @Author:Absolutely 5 | @Site:http://www.lyblogs.cn 6 | 7 | */ 8 | 9 | /*博主信息*/ 10 | .blogerinfo { 11 | text-align: center; 12 | padding: 0 15px; 13 | background: #fff; 14 | margin-bottom: 15px; 15 | } 16 | 17 | .blogerinfo-figure { 18 | display: inline-block; 19 | margin: 20px auto; 20 | } 21 | 22 | .blogerinfo-figure img { 23 | border-radius: 50px; 24 | } 25 | 26 | .blogerinfo-nickname { 27 | font-size: 32px; 28 | font-weight: bold; 29 | margin: 0 0 15px 0; 30 | } 31 | 32 | .blogerinfo-introduce { 33 | margin: 15px auto; 34 | font-size: 18px; 35 | width: 90%; 36 | } 37 | 38 | .blogerinfo-location { 39 | color: #808080; 40 | margin: 15px; 41 | } 42 | 43 | .blogerinfo-contact { 44 | padding: 15px; 45 | padding-top: 5px; 46 | } 47 | 48 | .blogerinfo-contact > a { 49 | padding: 0 10px; 50 | } 51 | /*博主信息END*/ 52 | 53 | /*友情链接*/ 54 | .blogroll > li { 55 | display: inline-block; 56 | vertical-align: middle; 57 | padding: 2px 5px; 58 | } 59 | /*友情链接END*/ 60 | 61 | /*一路走来和后台记录*/ 62 | .footprint > dt { 63 | color: #01AAED; 64 | } 65 | 66 | .footprint > dd { 67 | text-indent: 1.3em; 68 | padding: 2px 0; 69 | } 70 | /*一路走来和后台记录END*/ -------------------------------------------------------------------------------- /static/css/prettify.css: -------------------------------------------------------------------------------- 1 | .pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} 2 | 3 | pre.prettyprint { 4 | border: 1px solid #f2f2f2; 5 | border-radius:5px; 6 | margin-left: 2em; 7 | padding: 0.5em; 8 | font-size: 110%; 9 | display: block; 10 | font-family: "Consolas", "Monaco", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; 11 | margin: 1em 0px; 12 | /*white-space: pre;*/ 13 | background:#f7f7f7; 14 | } 15 | 16 | /*li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:decimal !important;}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee} 17 | 18 | .prettyprint.linenums { 19 | -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 20 | -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 21 | box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; 22 | } 23 | 24 | ol.linenums { 25 | padding: 0 0 0 33px; 26 | } 27 | ol.linenums li { 28 | padding-left: 12px; 29 | color: #bebec5; 30 | line-height: 18px; 31 | text-shadow: 0 1px 0 #fff; 32 | }*/ -------------------------------------------------------------------------------- /static/css/resource.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | @Name:不落阁整站模板源码 4 | @Author:Absolutely 5 | @Site:http://www.lyblogs.cn 6 | 7 | */ 8 | 9 | .resource { 10 | width: 49%; 11 | margin: 0 1%; 12 | margin-bottom: 10px; 13 | background: #fff; 14 | height: 270px; 15 | float: left; 16 | padding: 8px 8px; 17 | -moz-box-sizing: border-box; 18 | -webkit-box-sizing: border-box; 19 | box-sizing: border-box; 20 | position: relative; 21 | } 22 | 23 | .resource-main .resource:nth-child(odd) { 24 | margin-left: 0; 25 | } 26 | 27 | .resource-main .resource:nth-child(even) { 28 | margin-right: 0; 29 | } 30 | 31 | .resource-cover { 32 | width: 100%; 33 | height: 92px; 34 | text-align: center; 35 | } 36 | 37 | .resource-cover a { 38 | display: inline-block; 39 | width: 100%; 40 | height: 100%; 41 | border: 1px solid #ddd; 42 | -moz-transition: all 1s; 43 | -o-transition: all 1s; 44 | -webkit-transition: all 1s; 45 | transition: all 1s; 46 | -moz-box-sizing: border-box; 47 | -webkit-box-sizing: border-box; 48 | box-sizing: border-box; 49 | } 50 | 51 | .resource-cover a:hover { 52 | opacity: .7; 53 | border: 1px solid #5FB878; 54 | } 55 | 56 | .resource-cover img { 57 | width: 100%; 58 | height: 100%; 59 | } 60 | 61 | .resource-title { 62 | text-align: center; 63 | padding: 5px 0; 64 | margin-top: 7px; 65 | margin-bottom: 5px; 66 | } 67 | 68 | .resource-title > a { 69 | font-size: 16px; 70 | font-weight: bold; 71 | line-height: 18px; 72 | color: #01AAED; 73 | } 74 | 75 | .resource-title > a:hover { 76 | color: #1E9FFF; 77 | } 78 | 79 | .resource-abstract { 80 | padding: 3px; 81 | text-align: center; 82 | font-size: smaller; 83 | color: #838383; 84 | height: 50px; 85 | overflow: hidden; 86 | } 87 | 88 | .resource-info { 89 | font-size: smaller; 90 | position: absolute; 91 | bottom: 50px; 92 | left: 0; 93 | right: 0; 94 | padding: 2px 10px; 95 | } 96 | 97 | .resource-info .category { 98 | float: left; 99 | } 100 | 101 | .resource-info .author { 102 | float: right; 103 | } 104 | 105 | .resource-footer { 106 | font-size: small; 107 | border-top: 1px solid #e7e7e7; 108 | box-shadow: 0 1px 0 0 #fff inset; 109 | color: #8B8B8C; 110 | height: 50px; 111 | position: absolute; 112 | bottom: 0; 113 | left: 0; 114 | right: 0; 115 | padding: 0 10px; 116 | line-height: 50px; 117 | text-align: center; 118 | } 119 | 120 | .resource-footer a:nth-child(2) { 121 | display: none; 122 | } 123 | 124 | .resource-footer i { 125 | font-size: 12px !important; 126 | } 127 | 128 | 129 | /* 小屏幕(平板,大于等于 768px) */ 130 | @media (min-width: 768px) { 131 | .resource { 132 | width: 32%; 133 | margin: 0 1%; 134 | margin-bottom: 10px; 135 | height: 320px; 136 | } 137 | 138 | .resource-main .resource:nth-child(odd) { 139 | margin-left: 1%; 140 | } 141 | 142 | .resource-main .resource:nth-child(even) { 143 | margin-right: 1%; 144 | } 145 | 146 | .resource-main .resource:nth-child(3n+1) { 147 | margin-left: 0; 148 | } 149 | 150 | .resource-main .resource:nth-child(3n+3) { 151 | margin-right: 0; 152 | } 153 | 154 | .resource-cover { 155 | width: 100%; 156 | height: 150px; 157 | text-align: center; 158 | } 159 | 160 | .resource-footer a:nth-child(2) { 161 | display: inline-block; 162 | } 163 | } 164 | 165 | /* 中等屏幕(桌面显示器,大于等于 992px) */ 166 | @media (min-width: 992px) { 167 | .resource { 168 | width: 23.5%; 169 | margin: 0 1%; 170 | margin-bottom: 10px; 171 | } 172 | 173 | .resource-main .resource:nth-child(odd) { 174 | margin-left: 1%; 175 | } 176 | 177 | .resource-main .resource:nth-child(even) { 178 | margin-right: 1%; 179 | } 180 | 181 | .resource-main .resource:nth-child(3n+1) { 182 | margin-left: 1%; 183 | } 184 | 185 | .resource-main .resource:nth-child(3n+3) { 186 | margin-right: 1%; 187 | } 188 | 189 | .resource-main .resource:nth-child(4n+1) { 190 | margin-left: 0; 191 | } 192 | 193 | .resource-main .resource:nth-child(4n) { 194 | margin-right: 0; 195 | } 196 | } -------------------------------------------------------------------------------- /static/css/timeline.css: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | @Name:不落阁整站模板源码 4 | @Author:Absolutely 5 | @Site:http://www.lyblogs.cn 6 | 7 | */ 8 | 9 | .timeline-box { 10 | background: #fff; 11 | padding: 8px; 12 | position: relative; 13 | min-height: 90vh; 14 | } 15 | 16 | .timeline-main { 17 | position: relative; 18 | min-height: 85vh; 19 | } 20 | 21 | .timeline-main > h1 { 22 | font-size: 18px; 23 | background: #fff; 24 | z-index: 1; 25 | position: relative; 26 | color: #009688; 27 | margin-left: 33%; /*写给不支持calc()的浏览器*/ 28 | margin-left: -moz-calc(35% - 7px); 29 | margin-left: -webkit-calc(35% - 7px); 30 | margin-left: calc(35% - 7px); 31 | } 32 | 33 | .timeline-main > h1 > i { 34 | padding-right: 10px; 35 | font-size: 20px; 36 | } 37 | 38 | .timeline-main > h1 > span { 39 | display: none; 40 | } 41 | 42 | .timeline-main h2, 43 | .timeline-main h3 { 44 | width: 31%; 45 | text-align: right; 46 | } 47 | 48 | .timeline-main h2, 49 | .timeline-main h2 > a { 50 | font-size: 16px; 51 | margin: 5px 0; 52 | color: #1E9FFF; 53 | } 54 | 55 | .timeline-main h3, 56 | .timeline-main h3 > a { 57 | font-size: 14px; 58 | margin: 2px 0; 59 | color: #FF5722; 60 | } 61 | 62 | .timeline-month > ul > li { 63 | padding: 10px 0; 64 | } 65 | 66 | .timeline-month > ul > li .h4 { 67 | display: inline-block; 68 | width: 31%; 69 | text-align: right; 70 | float: left; 71 | } 72 | 73 | .date { 74 | display: inline-block; 75 | padding: 2px 5px; 76 | color: #009688; 77 | } 78 | 79 | .dot-circle { 80 | color: #009688; 81 | width: 8%; 82 | text-align: center; 83 | font-size: 22px; 84 | z-index: 1; 85 | position: relative; 86 | background: #fff; 87 | float: left; 88 | } 89 | 90 | .content { 91 | max-width: 50%; 92 | float: left; 93 | padding: 10px; 94 | margin-left: 10px; 95 | position: relative; 96 | z-index: 1; 97 | background: #009688; 98 | color: #fff; 99 | } 100 | 101 | .content::before { 102 | position: absolute; 103 | left: -20px; 104 | top: 6px; 105 | height: 0; 106 | width: 0; 107 | content: ''; 108 | border: 10px solid rgba(255, 255, 255, 0.00); 109 | border-top: 6px solid rgba(255, 255, 255, 0.00); 110 | border-bottom: 6px solid rgba(255, 255, 255, 0.00); 111 | border-right-color: #009688; 112 | } 113 | 114 | .timeline-line { 115 | position: absolute; 116 | left: 35%; 117 | top: 0; 118 | height: 100%; 119 | width: 2px; 120 | background: #009688; 121 | z-index: 0; 122 | } 123 | 124 | .timeline-year { 125 | margin: 10px 0; 126 | } 127 | 128 | 129 | 130 | /* 小屏幕(平板,大于等于 768px) */ 131 | @media (min-width: 768px) { 132 | .timeline-box { 133 | background: #fff; 134 | padding: 15px; 135 | position: relative; 136 | min-height: 90vh; 137 | } 138 | 139 | .timeline-main > h1 { 140 | font-size: 26px; 141 | margin-left: 16%; /*写给不支持calc()的浏览器*/ 142 | margin-left: -moz-calc(18% - 13px); 143 | margin-left: -webkit-calc(18% - 13px); 144 | margin-left: calc(18% -13px); 145 | } 146 | 147 | .timeline-main > h1 > i { 148 | font-size: 30px; 149 | } 150 | 151 | .timeline-main > h1 > span { 152 | display: inline; 153 | } 154 | 155 | .timeline-main h2, 156 | .timeline-main h3 { 157 | width: 16%; 158 | } 159 | 160 | .timeline-main h2, 161 | .timeline-main h2 > a { 162 | font-size: 24px; 163 | } 164 | 165 | .timeline-main h3, 166 | .timeline-main h3 > a { 167 | font-size: 20px; 168 | } 169 | 170 | .timeline-month > ul > li .h4 { 171 | width: 16%; 172 | } 173 | 174 | .dot-circle { 175 | width: 4%; 176 | font-size: 22px; 177 | } 178 | 179 | .content { 180 | max-width: 70%; 181 | } 182 | 183 | .timeline-line { 184 | left: 18%; 185 | } 186 | } 187 | 188 | /* 中等屏幕(桌面显示器,大于等于 992px) */ 189 | @media (min-width: 992px) { 190 | .blog-container { 191 | /*width: 962px;*/ 192 | /*width:1050px;*/ 193 | } 194 | 195 | .timeline-main > h1 { 196 | font-size: 34px; 197 | background: #fff; 198 | z-index: 1; 199 | position: relative; 200 | color: #009688; 201 | margin-left: 17%; /*写给不支持calc()的浏览器*/ 202 | margin-left: -moz-calc(18% - 16px); 203 | margin-left: -webkit-calc(18% - 16px); 204 | margin-left: calc(18% - 16px); 205 | } 206 | 207 | .timeline-main > h1 > i { 208 | font-size: 36px; 209 | } 210 | 211 | .timeline-main h2, 212 | .timeline-main h2 > a { 213 | font-size: 30px; 214 | } 215 | 216 | .timeline-main h3, 217 | .timeline-main h3 > a { 218 | font-size: 24px; 219 | } 220 | } -------------------------------------------------------------------------------- /static/images/cover/201703051349045432.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/cover/201703051349045432.jpg -------------------------------------------------------------------------------- /static/images/cover/201703051847567306.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/cover/201703051847567306.jpg -------------------------------------------------------------------------------- /static/images/cover/201703142313157316.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/cover/201703142313157316.jpg -------------------------------------------------------------------------------- /static/images/cover/201703152314519971.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/cover/201703152314519971.jpg -------------------------------------------------------------------------------- /static/images/cover/201703162101115908.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/cover/201703162101115908.jpg -------------------------------------------------------------------------------- /static/images/cover/201703181708141811.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/cover/201703181708141811.jpg -------------------------------------------------------------------------------- /static/images/cover/201703181740098218.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/cover/201703181740098218.jpg -------------------------------------------------------------------------------- /static/images/cover/201703181909057125.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/cover/201703181909057125.jpg -------------------------------------------------------------------------------- /static/images/cover/cover.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/cover/cover.jpg -------------------------------------------------------------------------------- /static/images/cover/cover_default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/cover/cover_default.jpg -------------------------------------------------------------------------------- /static/images/es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/es.png -------------------------------------------------------------------------------- /static/images/f.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/f.ico -------------------------------------------------------------------------------- /static/images/handshake.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/handshake.png -------------------------------------------------------------------------------- /static/images/qq_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/qq_32.png -------------------------------------------------------------------------------- /static/images/qzone_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/qzone_32.png -------------------------------------------------------------------------------- /static/images/wechat_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/wechat_32.png -------------------------------------------------------------------------------- /static/images/weibo_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/images/weibo_32.png -------------------------------------------------------------------------------- /static/js/cms.js: -------------------------------------------------------------------------------- 1 | layui.define(['layer', 'element', 'fortree'], function(exports) { 2 | var layer = layui.layer; 3 | var element = layui.element(); 4 | var fortree = layui.fortree; 5 | var $ = layui.jquery; 6 | 7 | var nav = null; 8 | var tab = null; 9 | var tabcontent = null; 10 | var tabtitle = null; 11 | var navfilter = null; 12 | var tabfilter = null; 13 | 14 | /** 15 | * 添加导航 16 | */ 17 | function addNav(data, topid, idname, pidname, nodename, urlname) { 18 | topid = topid || 0; 19 | idname = idname || 'id'; 20 | pidname = pidname || 'pid'; 21 | nodename = nodename || 'node'; 22 | urlname = urlname || 'url'; 23 | 24 | var mytree = new fortree(data, idname, pidname, topid); 25 | var html = ''; 26 | 27 | mytree.forBefore = function(v, k, hasChildren) { 28 | html += '
  • '; 29 | }; 30 | 31 | mytree.forcurr = function(v, k, hasChildren) { 32 | html += ''; 33 | html += v[nodename]; 34 | html += ''; 35 | }; 36 | 37 | mytree.callBefore = function(v, k) { 38 | html += '
    '; 39 | }; 40 | 41 | mytree.callAfter = function(v, k) { 42 | html += '
    '; 43 | }; 44 | 45 | mytree.forAfter = function(v, k, hasChildren) { 46 | html += '
  • '; 47 | }; 48 | mytree.each(); 49 | 50 | nav.append(html); 51 | 52 | element.init('nav(' + navfilter + ')'); 53 | } 54 | 55 | function closeTab(id,refreshId){ 56 | var iframe = tabcontent.find('iframe[data-id=' + id + ']').eq(0); 57 | if(iframe.length) { //存在 iframe 58 | //获取iframe身上的tab index 59 | tabindex = iframe.attr('data-tabindex'); 60 | $("[lay-id='index-" + tabindex + "']").remove(); 61 | $("[data-tabindex='" + tabindex + "']").parent().remove(); 62 | } 63 | 64 | if(refreshId){ 65 | var iframe2 = tabcontent.find('iframe[data-id=' + refreshId + ']').eq(0); 66 | if(iframe2.length){ 67 | tabindex2 = iframe2.attr('data-tabindex'); 68 | var tt=$("[lay-id='index-"+tabindex2+"']").text(); 69 | tt=tt.substring(0,tt.length-1); 70 | 71 | addTab(tt,iframe2.attr("src"),refreshId); 72 | } 73 | } 74 | } 75 | 76 | function addTab(title, src, id) { 77 | var iframe = tabcontent.find('iframe[data-id=' + id + ']').eq(0); 78 | var tabindex = (new Date()).getTime(); 79 | 80 | if(src != undefined && src != null && id != undefined && id != null) { 81 | if(iframe.length) { //存在 iframe 82 | //获取iframe身上的tab index 83 | tabindex = iframe.attr('data-tabindex'); 84 | $("[lay-id='index-" + tabindex + "']").remove(); 85 | $("[data-tabindex='" + tabindex + "']").parent().remove(); 86 | } 87 | //显示加载层 88 | var tmpIndex = layer.load(); 89 | //设置1秒后再次关闭loading 90 | setTimeout(function() { 91 | layer.close(tmpIndex); 92 | }, 1000); 93 | //拼接iframe 94 | var iframe = '');return a("#"+n)[0]||r.append(u),s.each(function(r,s){s=a(s);var u='
    ',l=s.attr("lay-type")||t.type;t.unwrap||(u='
    '+u+''+(s.attr("lay-title")||t.title||"上传"+(o[l]||"图片"))+"
    "),u=a(u),t.unwrap||u.on("dragover",function(e){e.preventDefault(),a(this).addClass(i)}).on("dragleave",function(){a(this).removeClass(i)}).on("drop",function(){a(this).removeClass(i)}),s.parent("form").attr("target")===n&&(t.unwrap?s.unwrap():(s.parent().next().remove(),s.unwrap().unwrap())),s.wrap(u),s.off("change").on("change",function(){e.action(this,l)})})},s.prototype.action=function(e,i){var o=this,s=o.options,u=e.value,l=a(e),p=l.attr("lay-ext")||s.ext||"";if(u){switch(i){case"file":if(p&&!RegExp("\\w\\.("+p+")$","i").test(escape(u)))return t.msg("不支持该文件格式",r),e.value="";break;case"video":if(!RegExp("\\w\\.("+(p||"avi|mp4|wma|rmvb|rm|flash|3gp|flv")+")$","i").test(escape(u)))return t.msg("不支持该视频格式",r),e.value="";break;case"audio":if(!RegExp("\\w\\.("+(p||"mp3|wav|mid")+")$","i").test(escape(u)))return t.msg("不支持该音频格式",r),e.value="";break;default:if(!RegExp("\\w\\.("+(p||"jpg|png|gif|bmp|jpeg")+")$","i").test(escape(u)))return t.msg("不支持该图片格式",r),e.value=""}s.before&&s.before(e),l.parent().submit();var c=a("#"+n),f=setInterval(function(){var a;try{a=c.contents().find("body").text()}catch(i){t.msg("上传接口存在跨域",r),clearInterval(f)}if(a){clearInterval(f),c.contents().find("body").html("");try{a=JSON.parse(a)}catch(i){return a={},t.msg("请对上传接口返回JSON字符",r)}"function"==typeof s.success&&s.success(a,e)}},30);e.value=""}},e("upload",function(e){var a=new s(e=e||{});a.init()})}); -------------------------------------------------------------------------------- /static/plug/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.9_rls MIT License By http://www.layui.com */ 2 | ;layui.define("jquery",function(l){"use strict";var o=layui.jquery,i={fixbar:function(l){l=l||{},l.bgcolor=l.bgcolor?"background-color:"+l.bgcolor:"";var i,a,c="layui-fixbar-top",t=[l.bar1===!0?"":l.bar1,l.bar2===!0?"":l.bar2,""],r=o(['"].join("")),e=r.find("."+c),s=function(){var i=o(document).scrollTop();i>=(l.showHeight||200)?a||(e.show(),a=1):a&&(e.hide(),a=0)};o(".layui-fixbar")[0]||("object"==typeof l.css&&r.css(l.css),o("body").append(r),s(),r.find("li").on("click",function(){var i=o(this),a=i.attr("lay-type");"top"===a&&o("html,body").animate({scrollTop:0},200),l.click&&l.click.call(this,a)}),o(document).on("scroll",function(){i&&clearTimeout(i),i=setTimeout(function(){s()},100)}))}};l("util",i)}); -------------------------------------------------------------------------------- /static/plug/layui/layui.js: -------------------------------------------------------------------------------- 1 | /** layui-v1.0.9_rls MIT License By http://www.layui.com */ 2 | ;!function(e){"use strict";var t=function(){this.v="1.0.9_rls"};t.fn=t.prototype;var n=document,o=t.fn.cache={},i=function(){var e=n.scripts,t=e[e.length-1].src;return t.substring(0,t.lastIndexOf("/")+1)}(),r=function(t){e.console&&console.error&&console.error("Layui hint: "+t)},l="undefined"!=typeof opera&&"[object Opera]"===opera.toString(),a={layer:"modules/layer",laydate:"modules/laydate",laypage:"modules/laypage",laytpl:"modules/laytpl",layim:"modules/layim",layedit:"modules/layedit",form:"modules/form",upload:"modules/upload",tree:"modules/tree",table:"modules/table",element:"modules/element",util:"modules/util",flow:"modules/flow",carousel:"modules/carousel",code:"modules/code",jquery:"modules/jquery",mobile:"modules/mobile","layui.all":"dest/layui.all"};o.modules={},o.status={},o.timeout=10,o.event={},t.fn.define=function(e,t){var n=this,i="function"==typeof e,r=function(){return"function"==typeof t&&t(function(e,t){layui[e]=t,o.status[e]=!0}),this};return i&&(t=e,e=[]),layui["layui.all"]||!layui["layui.all"]&&layui["layui.mobile"]?r.call(n):(n.use(e,r),n)},t.fn.use=function(e,t,u){function s(e,t){var n="PLaySTATION 3"===navigator.platform?/^complete$/:/^(complete|loaded)$/;("load"===e.type||n.test((e.currentTarget||e.srcElement).readyState))&&(o.modules[m]=t,y.removeChild(p),function i(){return++v>1e3*o.timeout/4?r(m+" is not a valid module"):void(o.status[m]?c():setTimeout(i,4))}())}function c(){u.push(layui[m]),e.length>1?f.use(e.slice(1),t,u):"function"==typeof t&&t.apply(layui,u)}var f=this,d=o.dir=o.dir?o.dir:i,y=n.getElementsByTagName("head")[0];e="string"==typeof e?[e]:e,window.jQuery&&jQuery.fn.on&&(f.each(e,function(t,n){"jquery"===n&&e.splice(t,1)}),layui.jquery=jQuery);var m=e[0],v=0;if(u=u||[],o.host=o.host||(d.match(/\/\/([\s\S]+?)\//)||["//"+location.host+"/"])[0],0===e.length||layui["layui.all"]&&a[m]||!layui["layui.all"]&&layui["layui.mobile"]&&a[m])return c(),f;var p=n.createElement("script"),h=(a[m]?d+"lay/":o.base||"")+(f.modules[m]||m)+".js";return p.async=!0,p.charset="utf-8",p.src=h+function(){var e=o.version===!0?o.v||(new Date).getTime():o.version||"";return e?"?v="+e:""}(),o.modules[m]?!function g(){return++v>1e3*o.timeout/4?r(m+" is not a valid module"):void("string"==typeof o.modules[m]&&o.status[m]?c():setTimeout(g,4))}():(y.appendChild(p),!p.attachEvent||p.attachEvent.toString&&p.attachEvent.toString().indexOf("[native code")<0||l?p.addEventListener("load",function(e){s(e,h)},!1):p.attachEvent("onreadystatechange",function(e){s(e,h)})),o.modules[m]=h,f},t.fn.getStyle=function(t,n){var o=t.currentStyle?t.currentStyle:e.getComputedStyle(t,null);return o[o.getPropertyValue?"getPropertyValue":"getAttribute"](n)},t.fn.link=function(e,t,i){var l=this,a=n.createElement("link"),u=n.getElementsByTagName("head")[0];"string"==typeof t&&(i=t);var s=(i||e).replace(/\.|\//g,""),c=a.id="layuicss-"+s,f=0;a.rel="stylesheet",a.href=e+(o.debug?"?v="+(new Date).getTime():""),a.media="all",n.getElementById(c)||u.appendChild(a),"function"==typeof t&&!function d(){return++f>1e3*o.timeout/100?r(e+" timeout"):void(1989===parseInt(l.getStyle(n.getElementById(c),"width"))?function(){t()}():setTimeout(d,100))}()},t.fn.addcss=function(e,t,n){layui.link(o.dir+"css/"+e,t,n)},t.fn.img=function(e,t,n){var o=new Image;return o.src=e,o.complete?t(o):(o.onload=function(){o.onload=null,t(o)},void(o.onerror=function(e){o.onerror=null,n(e)}))},t.fn.config=function(e){e=e||{};for(var t in e)o[t]=e[t];return this},t.fn.modules=function(){var e={};for(var t in a)e[t]=a[t];return e}(),t.fn.extend=function(e){var t=this;e=e||{};for(var n in e)t[n]||t.modules[n]?r("模块名 "+n+" 已被占用"):t.modules[n]=e[n];return t},t.fn.router=function(e){for(var t,n=(e||location.hash).replace(/^#/,"").split("/")||[],o={dir:[]},i=0;i 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/attachment.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 | 126 | 127 | 128 | 129 | -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/attachment/fileTypeImages/icon_chm.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/attachment/fileTypeImages/icon_default.png -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/attachment/fileTypeImages/icon_doc.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/attachment/fileTypeImages/icon_exe.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/attachment/fileTypeImages/icon_mp3.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/attachment/fileTypeImages/icon_mv.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/attachment/fileTypeImages/icon_pdf.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/attachment/fileTypeImages/icon_ppt.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/attachment/fileTypeImages/icon_psd.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/attachment/fileTypeImages/icon_rar.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/attachment/fileTypeImages/icon_txt.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/attachment/fileTypeImages/icon_xls.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/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/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/image/imageUploader.swf -------------------------------------------------------------------------------- /static/ueditor/dialogs/image/images/center_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/image/images/center_focus.jpg -------------------------------------------------------------------------------- /static/ueditor/dialogs/image/images/left_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/image/images/left_focus.jpg -------------------------------------------------------------------------------- /static/ueditor/dialogs/image/images/none_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/image/images/none_focus.jpg -------------------------------------------------------------------------------- /static/ueditor/dialogs/image/images/right_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/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/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/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/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/template/images/bg.gif -------------------------------------------------------------------------------- /static/ueditor/dialogs/template/images/pre0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/template/images/pre0.png -------------------------------------------------------------------------------- /static/ueditor/dialogs/template/images/pre1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/template/images/pre1.png -------------------------------------------------------------------------------- /static/ueditor/dialogs/template/images/pre2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/template/images/pre2.png -------------------------------------------------------------------------------- /static/ueditor/dialogs/template/images/pre3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/template/images/pre3.png -------------------------------------------------------------------------------- /static/ueditor/dialogs/template/images/pre4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/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/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/video/images/center_focus.jpg -------------------------------------------------------------------------------- /static/ueditor/dialogs/video/images/left_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/video/images/left_focus.jpg -------------------------------------------------------------------------------- /static/ueditor/dialogs/video/images/none_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/dialogs/video/images/none_focus.jpg -------------------------------------------------------------------------------- /static/ueditor/dialogs/video/images/right_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/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/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/lang/zh-cn/images/copy.png -------------------------------------------------------------------------------- /static/ueditor/lang/zh-cn/images/imglabel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/lang/zh-cn/images/imglabel.png -------------------------------------------------------------------------------- /static/ueditor/lang/zh-cn/images/localimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/lang/zh-cn/images/localimage.png -------------------------------------------------------------------------------- /static/ueditor/lang/zh-cn/images/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/lang/zh-cn/images/music.png -------------------------------------------------------------------------------- /static/ueditor/lang/zh-cn/images/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/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/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/anchor.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/arrow.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/arrow_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/arrow_down.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/arrow_up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/arrow_up.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/button-bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/button-bg.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/cancelbutton.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/cancelbutton.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/cursor_h.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/cursor_h.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/cursor_h.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/cursor_h.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/cursor_v.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/cursor_v.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/cursor_v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/cursor_v.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/dialog-title-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/dialog-title-bg.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/filescan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/filescan.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/highlighted.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/highlighted.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/icons-all.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/icons-all.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/icons.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/icons.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/lock.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/lock.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/neweditor-tab-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/neweditor-tab-bg.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/pagebreak.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/pagebreak.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/scale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/scale.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/spacer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/spacer.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/sparator_v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/sparator_v.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/table-cell-align.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/table-cell-align.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/tangram-colorpicker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/tangram-colorpicker.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/toolbar_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/toolbar_bg.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/unhighlighted.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/unhighlighted.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/upload.png -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/videologo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/videologo.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/word.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/themes/default/images/word.gif -------------------------------------------------------------------------------- /static/ueditor/themes/default/images/wordpaste.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/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/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/third-party/swfupload/swfupload.swf -------------------------------------------------------------------------------- /static/ueditor/third-party/swfupload/swfupload_fp9.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lightTrace/beego-blog/dbcbfb34200c16dc62d922669617393e8b95c329/static/ueditor/third-party/swfupload/swfupload_fp9.swf -------------------------------------------------------------------------------- /tests/default_test.go: -------------------------------------------------------------------------------- 1 | package test 2 | 3 | import ( 4 | "net/http" 5 | "net/http/httptest" 6 | "testing" 7 | "runtime" 8 | "path/filepath" 9 | _ "github.com/liwd/blog/routers" 10 | 11 | "github.com/astaxie/beego" 12 | . "github.com/smartystreets/goconvey/convey" 13 | ) 14 | 15 | func init() { 16 | _, file, _, _ := runtime.Caller(1) 17 | apppath, _ := filepath.Abs(filepath.Dir(filepath.Join(file, ".." + string(filepath.Separator)))) 18 | beego.TestBeegoInit(apppath) 19 | } 20 | 21 | 22 | // TestBeego is a sample to run an endpoint test 23 | func TestBeego(t *testing.T) { 24 | r, _ := http.NewRequest("GET", "/", nil) 25 | w := httptest.NewRecorder() 26 | beego.BeeApp.Handlers.ServeHTTP(w, r) 27 | 28 | beego.Trace("testing", "TestBeego", "Code[%d]\n%s", w.Code, w.Body.String()) 29 | 30 | Convey("Subject: Test Station Endpoint\n", t, func() { 31 | Convey("Status Code Should Be 200", func() { 32 | So(w.Code, ShouldEqual, 200) 33 | }) 34 | Convey("The Result Should Not Be Empty", func() { 35 | So(w.Body.Len(), ShouldBeGreaterThan, 0) 36 | }) 37 | }) 38 | } 39 | 40 | -------------------------------------------------------------------------------- /util/functions.go: -------------------------------------------------------------------------------- 1 | package util 2 | 3 | import ( 4 | "crypto/md5" 5 | "crypto/rand" 6 | "encoding/base64" 7 | "fmt" 8 | "io" 9 | "net/url" 10 | "strings" 11 | ) 12 | 13 | func Md5(str string) string { 14 | hash := md5.New() 15 | hash.Write([]byte(str)) 16 | return fmt.Sprintf("%x", hash.Sum(nil)) 17 | } 18 | 19 | func Rawurlencode(str string) string { 20 | return strings.Replace(url.QueryEscape(str), "+", "%20", -1) 21 | } 22 | 23 | //生成Guid字串 24 | func UniqueId() string { 25 | b := make([]byte, 48) 26 | 27 | if _, err := io.ReadFull(rand.Reader, b); err != nil { 28 | return "" 29 | } 30 | return Md5(base64.URLEncoding.EncodeToString(b)) 31 | } 32 | -------------------------------------------------------------------------------- /views/admin/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 后台登录 8 | 9 | 20 | 21 | 22 | 23 | 24 |
    25 |
    26 |
    27 |
    28 |
      29 |
    • 欢迎登录后台系统
    • 30 |
    31 |
    32 | 33 |
    34 | 35 |
    36 | 37 |
    38 | 40 |
    41 |
    42 |
    43 | 44 |
    45 | 47 |
    48 |
    49 | 50 |
    51 | 52 | 54 | 55 |
    56 | 57 |
    58 | 62 |
    63 |
    64 |
    65 |
    66 |
    67 |
    68 |
    69 | 70 | 71 | 76 | -------------------------------------------------------------------------------- /views/admin/main.tpl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 后台管理系统 10 | 11 | 12 | 13 | 14 | 15 | 16 |
    17 | 18 |
    19 |
    20 | 21 | 后台管理系统 22 | 23 | 42 |
    43 |
    44 | 45 | 46 |
    47 |
    48 |
      49 |
    50 |
    51 |
    52 | 53 | 54 |
    55 | 56 |
    57 |
      58 |
      59 |
      60 |
      61 | 62 | 63 | 66 |
      67 | 68 | 69 | 70 | 120 | 121 | 122 | --------------------------------------------------------------------------------