From fc21a40401782658f67af5f759e9568763950a3c Mon Sep 17 00:00:00 2001 From: "mail_yanpeng@163.com" Date: Thu, 27 Aug 2020 13:11:04 +0800 Subject: [PATCH] markdown --- controllers/BlogController.go | 2 + static/css/common.css | 16 ++ static/css/common.min.css | 3 +- views/editblog.html | 70 +++----- views/iframe/blog.html | 102 ------------ views/iframe/note.html | 77 --------- views/newblog.html | 298 ++++++++++++++++++++++++---------- 7 files changed, 257 insertions(+), 311 deletions(-) delete mode 100644 views/iframe/blog.html delete mode 100644 views/iframe/note.html diff --git a/controllers/BlogController.go b/controllers/BlogController.go index d9b3d2b..269a2c9 100644 --- a/controllers/BlogController.go +++ b/controllers/BlogController.go @@ -75,6 +75,7 @@ func (this *BlogController) Edit() { id, _ := this.GetInt64("id") title := this.GetString("title") blogHtml := this.GetString("blogHtml") + blogValue := this.GetString("blogValue") blogDesc := this.GetString("blogDesc") catory := this.GetString("catory") catoryId, _ := strconv.ParseInt(catory, 10, 64) @@ -89,6 +90,7 @@ func (this *BlogController) Edit() { blog.BlogHtml = blogHtml blog.BlogDesc = blogDesc blog.CategoryId = catoryId + blog.BlogValue = blogValue blog.Utime = time.Now() err = blogService.EditBlog(blog, labels) if err == nil { diff --git a/static/css/common.css b/static/css/common.css index 69bf867..5721ffe 100644 --- a/static/css/common.css +++ b/static/css/common.css @@ -710,4 +710,20 @@ img { } .search-content{ font-size: 12px; +} + +.v-note-wrapper { + height: 100%; + z-index: 99 !important; +} + +.modal_form{ + display: flex; + margin-bottom: 10px; +} +.modal_form .span-lable{ + display: inline-block; + width: 100px; + height: 30px; + line-height: 30px; } \ No newline at end of file diff --git a/static/css/common.min.css b/static/css/common.min.css index 4bd87a0..166a540 100644 --- a/static/css/common.min.css +++ b/static/css/common.min.css @@ -1,2 +1 @@ -html,body{font-size:14px!important;background:#fff;color:#353535;height:100%;width:100%}#cnzz_stat_icon_1277992374{text-align:center;display:block}#cnzz_stat_icon_1277992374 a{color:rgba(255,255,255,.7)!important}a{text-decoration:none}.layui-nav{text-align:right}.navbar-default{border-color:#f8d9ea!important}.img-circle-large{width:110px;height:110px}.root-container{height:100%;width:100%;max-width:100%}.nav-container{max-height:50px;position:fixed;width:100%;z-index:1000;left:0;top:0}.nav-container li a:hover{transform:rotate(5deg) scale(1.1)}.nav-container p{display:inline-block;float:left;line-height:48px;font-size:20px}::-webkit-scrollbar{width:1px}::-webkit-scrollbar-track-piece{background-color:rgba(0,0,0,0);-webkit-border-radius:6px}.cursor{cursor:pointer}.footer-root{color:rgba(255,255,255,.7);position:relative;width:100%;height:105px;display:flex}.footer-friend{text-align:center;height:25px;line-height:25px}.footer-friend a{color:rgba(255,255,255,.7);text-decoration:none}.img-circle{width:31px;height:31px;border-radius:50%}.login-footer .wxcode{margin-right:20px}.layui-nav .layui-nav-item{line-height:49px!important}.layui-nav .layui-nav-item a{height:49px!important;line-height:49px}.layui-nav .layui-this:after,.layui-nav-bar,.layui-nav-tree .layui-nav-itemed:after{height:1px}.footer-container{background-color:#393d49;padding:30px 5% 0 5%}.pagination{margin:18px 0}.pagination ul li{line-height:20px;width:20px;height:20px;display:inline-block;border-color:#28a3ef;font-size:16px}.pagination ul li .next .prev{font-size:20px!important}.pagination ul .active{background-color:#28a3ef}.pagination ul .active a{color:#fff}.breadcrumb-container{padding:20px}.blog-root{width:68%;margin:40px auto}.blog-root a{color:#28a3ef!important}.blog-root .blog-title{display:block;margin:60px 0 20px 0;text-align:center}.blog-root .blog-detaile{color:#2f2f2f}.blog-root .blog-detaile pre{border:1px #d2e8b9 solid;box-shadow:1px 1px 2px 2px #d2e8b9;margin:5px 0}.blog-root .blog-detaile h4{font-size:20px;font-weight:500}.blog-user{position:fixed;top:60px;left:5px;width:100px;height:100%;background-color:#f9f9f9}.blog-info{padding:15px}.blog-info .blog-author{display:flex}.blog-info .blog-author .author-headimg{display:inline-block;width:48px;height:48px}.blog-info .blog-author .blog-label{flex:1;height:22px;line-height:22px;text-align:right;padding-top:26px}.blog-info .blog-author .blog-label label{color:#888;border:1px dotted #aaa;padding:5px;border-radius:5px;font-size:10px}.blog-info .blog-author .author-headimg .img-circle{width:48px!important;height:48px!important;margin-top:0!important}.blog-info .blog-author .author-info{display:inline-block;height:48px!important;vertical-align:bottom;text-align:left;margin-left:5px}.blog-info .blog-author .author-info a{display:inline-block;height:28px;line-height:28px;font-size:16px}.blog-info .blog-author .author-info span{display:inline-block;height:20px;line-height:20px;font-size:12px;color:#888;padding-right:8px}.blog-info em{padding:0 8px!important}.comms-root{width:68%;margin:0 auto}.comms-root a{text-decoration:none}img{max-width:100%!important}.blog-referral{width:100%;margin:40px auto}.blog-referral p{padding:3px 0}.layui-code-view .layui-code-ol li{margin-left:0!important}.home-container{height:100%;margin:50px 5% 60px 5%}.home-container hr{margin:0}.home-hearder{margin:10px 0;display:flex;height:30px;line-height:30px}.home-hearder .m-select{color:#353535;width:150px;display:inline-block;height:32px;border-radius:3px;padding:4px 14px}.home-hearder .layui-btn-group .active a{color:#fff}.home-hearder .layui-btn-group a{color:#353535;text-decoration:none}.nelson-btn{color:#ec6149!important;border-radius:15px;border:1px solid #bbb!important}.nelson-btn:hover{background:#fff!important;color:#ec6149!important;border-radius:15px;border:1px solid #ec6149!important}.home-content{display:flex;min-height:36px;line-height:36px}.home-content-title{display:inline-block;flex:1}.home-content-desc{display:flex}.home-content-desc span{display:inline-block;text-align:center}.blog-root h5{color:#888;font-size:14px;margin:9px 0;font-family:inherit;font-weight:700;line-height:1.5}.blog-root a{text-decoration:none}.blog-root p{margin:1px 0 9px}.login-root{background:#f0e7db url("/static/img/login.png") no-repeat;position:absolute;min-height:100%;width:100%;overflow:hidden}.login-root .input-container{position:fixed;left:65%;top:33px;background:url("/static/img/loginbg.png") no-repeat center top}.login-root .input-container .input-root{width:370px;height:500px}.login-root .input-container .input-root .inputs-class{margin-top:220px;padding:10px 50px 10px 50px}.login-root .input-container .input-root .regist{margin-top:200px}.login-root .input-container .input-root .inputs-class .login-bottom{margin-top:10px;text-align:right}.login-root .input-container .input-root .input-group{display:table;border-collapse:separate}.login-root .input-container .input-root .inputs-class .input-class{height:32px;margin:18px 0;display:flex} -.login-root .input-container .input-root .inputs-class .input-class input{flex:1;height:26px!important;padding:2px 14px;font-size:12px;line-height:1.5;border-radius:3px;border-top-left-radius:0;border-bottom-left-radius:0;display:table-cell;border:1px solid #ccc}.login-root .input-container .input-root .inputs-class .input-class .input-group-addon{color:#555;line-height:26px!important;font-size:12px;padding:2px 14px;line-height:1.5;border-radius:3px;display:table-cell;border:1px solid #ccc;border-right:0}.login-footer{position:absolute;bottom:0;left:0;width:100%;height:110px}.login-root{background:#f0e7db url("/static/img/login.png") no-repeat;position:absolute;min-height:100%;width:100%;overflow:hidden}.login-root .input-container{position:fixed;left:65%;top:33px;background:url("/static/img/loginbg.png") no-repeat center top}.login-root .input-container .input-root{width:370px;height:500px}.login-root .input-container .input-root p{font-size:21px;text-align:center;padding-top:195px}.login-root .input-container .input-root .inputs-class{padding:0 50px}.login-root .input-container .input-root .input-group{display:table;border-collapse:separate}.login-root .input-container .input-root .inputs-class .input-class{height:32px;margin:18px 0;display:flex}.login-root .input-container .input-root .inputs-class .input-class input{flex:1;height:26px!important;padding:2px 14px;font-size:12px;line-height:1.5;border-radius:3px;border-top-left-radius:0;border-bottom-left-radius:0;display:table-cell;border:1px solid #ccc}.login-root .input-container .input-root .inputs-class .input-class .input-group-addon{color:#555;line-height:26px!important;font-size:12px;padding:2px 14px;line-height:1.5;border-radius:3px;display:table-cell;border:1px solid #ccc;border-right:0}.login-footer{position:absolute;bottom:0;left:0;width:100%;height:110px}.me-menu{position:fixed;top:60px;left:20px;width:260px;height:100%;background-color:#f9f9f9}.me-menu p{cursor:pointer;font-size:15px;color:#555;margin:0;height:32px;line-height:32px}.me-menu .active{color:#3cbef8!important}.me-menu p a{margin-left:5px;color:#555;text-decoration:none}.me-menu .active span{display:inline-block;height:100%;width:2px;background-color:#3cbef8}.me-menu .active a{color:#3cbef8;vertical-align:top;height:32px;line-height:32px;display:inline-block}.me-blog-root{height:100%;margin:50px 4% 0 0}.me-blog-list{margin-left:300px}.me-blog-list p{height:30px;line-height:30px;margin:0;font-size:15px}.me-footer{position:absolute;bottom:0;left:0;width:100%;height:110px;padding:0 4%}.me-blog-footer{height:110px;padding:0 4%;margin-left:290px}.info-header{flex:1}.info-header span{margin-right:6px}.uinfo{color:#515a6e;margin:5px}.udesc span{margin-right:8px}.blog-list{display:flex;font-size:16px;min-height:35px;line-height:35px}.us-root{margin-top:50px;display:flex;margin-left:5%;font-size:16px;min-height:720px;height:100%}.us-root p{padding:5px 0;color:#323232}.us-root a{color:#28a3ef!important}.blog-title{display:flex;height:50px;line-height:50px}.blog-title input{padding-left:12px;flex:1;height:44px;border:0}.blog-title button{height:32px;color:#fff;margin-top:9px}.w-e-toolbar{height:40px;line-height:30px}.map-root{position:absolute;width:100%;height:100%;left:0;top:0}.map-root .map-container{width:100%;height:100%}.amap-logo,.amap-copyright{display:none!important;visibility:hidden!important}.blog-detaile p code{color:red;padding:2px 5px}.search-root{margin-top:50px}.search-root .input-class{display:table;border-collapse:separate}.search-root .input-class{width:50%;height:32px;margin:18px auto;display:flex}.search-root .input-class input{flex:1;height:36px!important;padding:2px 14px;font-size:12px;line-height:1.5;border-radius:3px;border-top-right-radius:0;border-bottom-right-radius:0;display:table-cell;border:1px solid #3385ff}.search-root .input-class .input-group-addon{color:#555;height:36px;line-height:36px!important;font-size:17px!important;font-size:12px;padding:2px 14px;line-height:36px;border-radius:3px;display:table-cell;background-color:#3385ff;border-top-left-radius:0;border-bottom-left-radius:0;color:#fff;border:1px solid #3385ff;border-left:none;cursor:pointer}.search-result{margin:35px 15%}.search-item{padding:7px 15px}.search-result a{display:block;cursor:pointer;height:25px;line-height:25px;font-size:16px;text-decoration:#00c6ff;flex:1}.search-result .search-title{display:flex}.search-result span{cursor:pointer;font-size:12px;height:25px;line-height:25px}.search-content{font-size:12px} \ No newline at end of file +html,body{font-size:14px !important;background:#fff;color:#353535;height:100%;width:100%;}#cnzz_stat_icon_1277992374{text-align:center;display:block;}#cnzz_stat_icon_1277992374 a{color:rgba(255,255,255,.7) !important;}a{text-decoration:none;}.layui-nav{text-align:right;}.navbar-default{border-color:#f8d9ea !important;}.img-circle-large{width:110px;height:110px;}.root-container{height:100%;width:100%;max-width:100%;}.nav-container{max-height:50px;position:fixed;width:100%;z-index:1000;left:0;top:0;}.nav-container li a:hover{transform:rotate(5deg) scale(1.1);}.nav-container p{display:inline-block;float:left;line-height:48px;font-size:20px;}::-webkit-scrollbar{width:1px;}::-webkit-scrollbar-track-piece{background-color:rgba(0,0,0,0);-webkit-border-radius:6px;}.cursor{cursor:pointer}.footer-root{color:rgba(255,255,255,.7);position:relative;width:100%;height:105px;display:flex;}.footer-friend{text-align:center;height:25px;line-height:25px;}.footer-friend a{color:rgba(255,255,255,.7);text-decoration:none;}.img-circle{width:31px;height:31px;border-radius:50%;}.login-footer .wxcode{margin-right:20px;}.layui-nav .layui-nav-item{line-height:49px !important;}.layui-nav .layui-nav-item a{height:49px !important;line-height:49px;}.layui-nav .layui-this:after,.layui-nav-bar,.layui-nav-tree .layui-nav-itemed:after{height:1px;}.footer-container{background-color:#393D49;padding:30px 5% 0 5%;}.pagination{margin:18px 0;}.pagination ul li{line-height:20px;width:20px;height:20px;display:inline-block;border-color:#28a3ef;font-size:16px;}.pagination ul li .next .prev{font-size:20px !important;}.pagination ul .active{background-color:#28a3ef;}.pagination ul .active a{color:#fff;}.breadcrumb-container{padding:20px;}.blog-root{width:68%;margin:40px auto;}.blog-root a{color:#28a3ef !important;}.blog-root .blog-title{display:block;margin:60px 0 20px 0;text-align:center}.blog-root .blog-detaile{color:#2f2f2f;}.blog-root .blog-detaile pre{border:1px #d2e8b9 solid;box-shadow:1px 1px 2px 2px #d2e8b9;margin:5px 0;}.blog-root .blog-detaile h4{font-size:20px;font-weight:500;}.blog-user{position:fixed;top:60px;left:5px;width:100px;height:100%;background-color:#f9f9f9;}.blog-info{padding:15px;}.blog-info .blog-author{display:flex;}.blog-info .blog-author .author-headimg{display:inline-block;width:48px;height:48px;}.blog-info .blog-author .blog-label{flex:1;height:22px;line-height:22px;text-align:right;padding-top:26px;}.blog-info .blog-author .blog-label label{color:#888;border:1px dotted #aaa;padding:5px;border-radius:5px;font-size:10px;}.blog-info .blog-author .author-headimg .img-circle{width:48px !important;height:48px !important;margin-top:0px !important;}.blog-info .blog-author .author-info{display:inline-block;height:48px !important;vertical-align:bottom;text-align:left;margin-left:5px;}.blog-info .blog-author .author-info a{display:inline-block;height:28px;line-height:28px;font-size:16px;}.blog-info .blog-author .author-info span{display:inline-block;height:20px;line-height:20px;font-size:12px;color:#888;padding-right:8px;}.blog-info em{padding:0 8px !important;}.comms-root{width:68%;margin:0 auto;}.comms-root a{text-decoration:none;}img{max-width:100% !important;}.blog-referral{width:100%;margin:40px auto;}.blog-referral p{padding:3px 0;}.layui-code-view .layui-code-ol li{margin-left:0px !important;}.home-container{height:100%;margin:50px 5% 60px 5%;}.home-container hr{margin:0;}.home-hearder{margin:10px 0;display:flex;height:30px;line-height:30px;}.home-hearder .m-select{color:#353535;width:150px;display:inline-block;height:32px;border-radius:3px;padding:4px 14px;}.home-hearder .layui-btn-group .active a{color:#fff;}.home-hearder .layui-btn-group a{color:#353535;text-decoration:none;}.nelson-btn{color:#ec6149 !important;border-radius:15px;border:1px solid #bbb !important;}.nelson-btn:hover{background:#fff !important;color:#ec6149 !important;border-radius:15px;border:1px solid #ec6149 !important;}.home-content{display:flex;min-height:36px;line-height:36px;}.home-content-title{display:inline-block;flex:1;}.home-content-desc{display:flex}.home-content-desc span{display:inline-block;text-align:center}.blog-root h5{color:#888;font-size:14px;margin:9px 0;font-family:inherit;font-weight:700;line-height:1.5;}.blog-root a{text-decoration:none;}.blog-root p{margin:1px 0 9px;}.login-root{background:#f0e7db url("/static/img/login.png") no-repeat;position:absolute;min-height:100%;width:100%;overflow:hidden;}.login-root .input-container{position:fixed;left:65%;top:33px;background:url("/static/img/loginbg.png") no-repeat center top;}.login-root .input-container .input-root{width:370px;height:500px;}.login-root .input-container .input-root .inputs-class{margin-top:220px;padding:10px 50px 10px 50px;}.login-root .input-container .input-root .regist{margin-top:200px;}.login-root .input-container .input-root .inputs-class .login-bottom{margin-top:10px;text-align:right;}.login-root .input-container .input-root .input-group{display:table;border-collapse:separate;}.login-root .input-container .input-root .inputs-class .input-class{height:32px;margin:18px 0;display:flex;}.login-root .input-container .input-root .inputs-class .input-class input{flex:1;height:26px !important;padding:2px 14px;font-size:12px;line-height:1.5;border-radius:3px;border-top-left-radius:0;border-bottom-left-radius:0;display:table-cell;border:1px solid #ccc;}.login-root .input-container .input-root .inputs-class .input-class .input-group-addon{color:#555;line-height:26px !important;font-size:12px;padding:2px 14px;line-height:1.5;border-radius:3px;display:table-cell;border:1px solid #ccc;border-right:none;}.login-footer{position:absolute;bottom:0;left:0;width:100%;height:110px;}.login-root{background:#f0e7db url("/static/img/login.png") no-repeat;position:absolute;min-height:100%;width:100%;overflow:hidden;}.login-root .input-container{position:fixed;left:65%;top:33px;background:url("/static/img/loginbg.png") no-repeat center top;}.login-root .input-container .input-root{width:370px;height:500px;}.login-root .input-container .input-root p{font-size:21px;text-align:center;padding-top:195px;}.login-root .input-container .input-root .inputs-class{padding:0 50px;}.login-root .input-container .input-root .input-group{display:table;border-collapse:separate;}.login-root .input-container .input-root .inputs-class .input-class{height:32px;margin:18px 0;display:flex;}.login-root .input-container .input-root .inputs-class .input-class input{flex:1;height:26px !important;padding:2px 14px;font-size:12px;line-height:1.5;border-radius:3px;border-top-left-radius:0;border-bottom-left-radius:0;display:table-cell;border:1px solid #ccc;}.login-root .input-container .input-root .inputs-class .input-class .input-group-addon{color:#555;line-height:26px !important;font-size:12px;padding:2px 14px;line-height:1.5;border-radius:3px;display:table-cell;border:1px solid #ccc;border-right:none;}.login-footer{position:absolute;bottom:0;left:0;width:100%;height:110px;}.me-menu{position:fixed;top:60px;left:20px;width:260px;height:100%;background-color:#f9f9f9;}.me-menu p{cursor:pointer;font-size:15px;color:#555;margin:0;height:32px;line-height:32px;}.me-menu .active{color:#3CBEF8 !important}.me-menu p a{margin-left:5px;color:#555;text-decoration:none;}.me-menu .active span{display:inline-block;height:100%;width:2px;background-color:#3CBEF8;}.me-menu .active a{color:#3CBEF8;vertical-align:top;height:32px;line-height:32px;display:inline-block;}.me-blog-root{height:100%;margin:50px 4% 0 0;}.me-blog-list{margin-left:300px;}.me-blog-list p{height:30px;line-height:30px;margin:0;font-size:15px;}.me-footer{position:absolute;bottom:0;left:0;width:100%;height:110px;padding:0 4%;}.me-blog-footer{height:110px;padding:0 4%;margin-left:290px;}.info-header{flex:1;}.info-header span{margin-right:6px;}.uinfo{color:#515a6e;margin:5px;}.udesc span{margin-right:8px;}.blog-list{display:flex;font-size:16px;min-height:35px;line-height:35px;}.us-root{margin-top:50px;display:flex;margin-left:5%;font-size:16px;min-height:720px;height:100%;}.us-root p{padding:5px 0;color:#323232;}.us-root a{color:#28a3ef !important;}.blog-title{display:flex;height:50px;line-height:50px;}.blog-title input{padding-left:12px;flex:1;height:44px;border:0;}.blog-title button{height:32px;color:#fff;margin-top:9px;}.w-e-toolbar{height:40px;line-height:30px;}.map-root{position:absolute;width:100%;height:100%;left:0;top:0;}.map-root .map-container{width:100%;height:100%;}.amap-logo,.amap-copyright{display:none !important;visibility:hidden !important;}.blog-detaile p code{color:red;padding:2px 5px;}.search-root{margin-top:50px;}.search-root .input-class{display:table;border-collapse:separate;}.search-root .input-class{width:50%;height:32px;margin:18px auto;display:flex;}.search-root .input-class input{flex:1;height:36px !important;padding:2px 14px;font-size:12px;line-height:1.5;border-radius:3px;border-top-right-radius:0;border-bottom-right-radius:0;display:table-cell;border:1px solid #3385ff;}.search-root .input-class .input-group-addon{color:#555;height:36px;line-height:36px !important;font-size:17px !important;font-size:12px;padding:2px 14px;line-height:36px;border-radius:3px;display:table-cell;background-color:#3385ff;border-top-left-radius:0;border-bottom-left-radius:0;color:#fff;border:1px solid #3385ff;border-left:none;cursor:pointer;}.search-result{margin:35px 15%;}.search-item{padding:7px 15px;}.search-result a{display:block;cursor:pointer;height:25px;line-height:25px;font-size:16px;text-decoration:#00c6ff;flex:1;}.search-result .search-title{display:flex;}.search-result span{cursor:pointer;font-size:12px;height:25px;line-height:25px;}.search-content{font-size:12px;}.v-note-wrapper{height:100%;z-index:99 !important;}.modal_form{display:flex;margin-bottom:10px;}.modal_form .span-lable{display:inline-block;width:100px;height:30px;line-height:30px;} \ No newline at end of file diff --git a/views/editblog.html b/views/editblog.html index 386dee2..c0aaf04 100644 --- a/views/editblog.html +++ b/views/editblog.html @@ -5,27 +5,10 @@ -
- -
@@ -35,7 +18,7 @@ title="发布文章" :mask-closable="false"> - \ No newline at end of file diff --git a/views/iframe/blog.html b/views/iframe/blog.html deleted file mode 100644 index 0a00b72..0000000 --- a/views/iframe/blog.html +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - 发布博客 - 码农随笔 - - - -
-
- 开发语言: - - - -
-
- 文章标签: -
- -
-
-
- 添加标签: - - -
-
- - -
-
- - - \ No newline at end of file diff --git a/views/iframe/note.html b/views/iframe/note.html deleted file mode 100644 index 245180b..0000000 --- a/views/iframe/note.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - - - 发布笔记 - 码农随笔 - - - -
-
- 所属文件夹: - - - -
-
- 新笔记名称: - -
-
- -
-
- - - \ No newline at end of file diff --git a/views/newblog.html b/views/newblog.html index 5ec6668..911f810 100644 --- a/views/newblog.html +++ b/views/newblog.html @@ -1,101 +1,227 @@ {{template "header" .}} 发布博客 - 码农随笔 - + + + -
+
- - +
-
+ -
+ + + + +
+ 保存 +
+
\ No newline at end of file