From 3ac22bf6ce5f0c7be414b257480b8da886faa9c4 Mon Sep 17 00:00:00 2001 From: RayLee <146833774+tymnxye@users.noreply.github.com> Date: Wed, 10 Jul 2024 10:54:27 +0800 Subject: [PATCH] Add files via upload --- css/about.css | 75 + css/article.css | 541 ++++ css/base.css | 541 ++++ css/baseArticle.css | 246 ++ css/detail.css | 1027 ++++++++ css/detail.css.bak | 1028 ++++++++ css/friendsLink.css | 189 ++ css/index.css | 427 ++++ css/label.css | 38 + css/prettify.css | 152 ++ css/publish.css | 335 +++ css/test.css | 3041 ++++++++++++++++++++++ html/about.html | 79 + html/article.html | 67 + html/detail.html | 136 + html/friendLink.html | 79 + html/index.html | 115 + html/label.html | 47 + html/publish.html | 90 + js/article.js | 419 ++++ js/base.js | 135 + js/detail.js | 671 +++++ js/editor.js | 4731 +++++++++++++++++++++++++++++++++++ js/friendLink.js | 92 + js/index.js | 100 + js/label.js | 112 + js/publish.js | 139 + js/tagCloud/tagCloud.js | 181 ++ js/template.js | 87 + js/template/art-template.js | 3 + js/test.js | 1988 +++++++++++++++ 31 files changed, 16911 insertions(+) create mode 100644 css/about.css create mode 100644 css/article.css create mode 100644 css/base.css create mode 100644 css/baseArticle.css create mode 100644 css/detail.css create mode 100644 css/detail.css.bak create mode 100644 css/friendsLink.css create mode 100644 css/index.css create mode 100644 css/label.css create mode 100644 css/prettify.css create mode 100644 css/publish.css create mode 100644 css/test.css create mode 100644 html/about.html create mode 100644 html/article.html create mode 100644 html/detail.html create mode 100644 html/friendLink.html create mode 100644 html/index.html create mode 100644 html/label.html create mode 100644 html/publish.html create mode 100644 js/article.js create mode 100644 js/base.js create mode 100644 js/detail.js create mode 100644 js/editor.js create mode 100644 js/friendLink.js create mode 100644 js/index.js create mode 100644 js/label.js create mode 100644 js/publish.js create mode 100644 js/tagCloud/tagCloud.js create mode 100644 js/template.js create mode 100644 js/template/art-template.js create mode 100644 js/test.js diff --git a/css/about.css b/css/about.css new file mode 100644 index 0000000..99fea2c --- /dev/null +++ b/css/about.css @@ -0,0 +1,75 @@ +.about_left{ + float: left; + width: 68%; +} + +.about_right{ + float: right; + width: 28%; +} + +.about_left h3{ + margin-bottom: 20px; + padding-left: 20px; + margin-top: 20px; + border-left: 3px solid #EE2C2C; + font-size: 18px; + line-height: 22px; +} + +.about_left p{ + line-height: 36px; + margin-left: 20px; + color: #232328; + font-size: 12px; +} + +.about_left>div{ + background-color: rgba(255,255,255,0.9); + border-radius: 10px; + padding: 20px; + margin-bottom: 30px; +} + +.about_left i{ + margin-right: 10px; +} + +.about_left a{ + color: #EE2C2C; + margin:0 5px; +} + +.about_left a:hover{ + text-decoration: underline; +} + +.zzw{ + cursor: none; +} + +/*关于我页面手机适配*/ +@media screen and (max-width: 500px){ + + .about_left{ + float: none; + width: 100%; + } + + .about_right{ + float: none; + width: 100%; + } + + .about_left>div{ + border-radius: 5px; + } + + .about_me{ + border-radius: 5px; + } + + .weChat{ + border-radius: 5px; + } +} diff --git a/css/article.css b/css/article.css new file mode 100644 index 0000000..d9d24f4 --- /dev/null +++ b/css/article.css @@ -0,0 +1,541 @@ +.blog_content{ + width: 68%; + float: left; +} + +.blog_classify{ + width: 28%; + float: right; +} + +.blog_classify>ul>li{ + margin: 0 0 40px 0; +} + +.blog_content ul li{ + display: block; + position: relative; + background: rgba(255,255,255,.9); + margin: 0 0 30px 0; + padding: 20px; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04); + cursor: pointer; + border-radius: 10px; + overflow: hidden; +} + +.blog_content ul li:hover .line{ + height: 25px; +} + +.blog_image{ + position: relative; + float: left; + width: 220px; + height: 130px; + overflow: hidden; + margin: 0 20px 0 0; +} + +.blog_image:before{ + content: "Loading"; + position: absolute; + left: 0; + width: 100%; + height: 100%; + line-height: 130px; + text-align: center; + font-size: 25px; + background-color: rgba(0,0,0,0.01); + color: #b7b6b6; + z-index: -1; +} + +.blog_image>img{ + width: 100%; + height: 100%; + -webkit-transition: all .5s; + -moz-transition: all .5s; + -ms-transition: all .5s; + -o-transition: all .5s; + transition: all .5s; +} + +.blog_image>img:hover{ + -webkit-transform: scale(1.05); + -moz-transform: scale(1.05); + -ms-transform: scale(1.05); + -o-transform: scale(1.05); + transform: scale(1.05); +} + +.blog_content ul li:before:hover{ + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); +} + + +.blog_content ul li h3{ + font-family: inherit; + font-style: inherit; + color: #444; + font-size: 14px; + line-height: 20px; + padding: 0 0 7px 0; +} + +.blog_content ul li h3>span{ + color: #2D93CA; +} + +.article_content{ + font-size: 13px; + color: #777; + height: 78px; + overflow: hidden; + line-height: 26px; + display: -webkit-box; + -ms-text-overflow: ellipsis; + text-overflow: ellipsis; + -webkit-box-orient:vertical; + -webkit-line-clamp:3; +} + +.article_content img{ + height: 50px; + width: 50px; +} + +.blog_content ul li>span{ + position: relative; + top: 22px; + color: rgba(0,0,0,.5); +} + +.read_more{ + position: absolute; + right: -1px; + bottom: 10px; + display: block; + background: #3690cf; + color: #fff; + line-height: 30px; + padding: 0 12px; + border-right: none; + border-radius: 2px 0 0 2px; + cursor: pointer; +} + +.article{ + display: block; + overflow: hidden; + position: relative; +} + +.article_classify{ + display: block; + padding: 5px 6px; + background-color: rgba(0,0,0,.6); + position: absolute; + color: #FFFFFF; + top: 30px; + left: 30px; + text-align: center; + font-size: 12px; +} + +.article_classify:hover{ + background-color: #EE2C2C; +} + +.blog_content ul li span i{ + margin: 0 5px 0 2px; +} + +.blog_date{ + float: right; + margin-right: 80px; +} + +.blog_comment{ + margin-left: 15px; +} + +.line{ + position: absolute; + background: #EE2C2C; + top: 20px; + left: -1px; + width: 5px; + height: 0; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1); + -webkit-transition: height .5s; + -moz-transition: height .5s; + -ms-transition: height .5s; + -o-transition: height .5s; + transition: height .5s; +} + +.blog_heart{ + margin-left: 15px; +} + +.top{ + width: 80px; + height: 20px; + background-color: red; + line-height: 20px; + position: absolute; + text-align: center; + font-size: 13px; + transform: rotate(45deg); + right: -20px; + top: 9px; + color: #fff; + cursor: default; +} + +.article_info{ + position: relative; + top: 10px; + color: #666; + font-size: 13px; +} + +.classify{ + display: block; + background-color: rgba(255,255,255,.9);; +} + +.classify li{ + display: block; + position: relative; + background-color: rgba(255,255,255,.9);; + height: 40px; + line-height: 40px; + border-bottom: 1px solid #eeeeee; + counter-increment:nums; + cursor: pointer; +} + +.classify li:hover{ + background-color: #f8f9f7; +} + +#allClassify{ + cursor: pointer; +} + +#allClassify:hover{ + color: #2ea7e0; +} + +.classify_title{ + display: block; + color: #EE2C2C; + font-size: 16px; + line-height: 40px; + padding-bottom: 5px; + background-color: rgba(255,255,255,.9); + border-bottom: 1px solid #EE2C2C; + text-align: center; +} + +.classify li:last-child{ + border-bottom: none; +} + +.classify li a{ + margin: 0 60px; + color: #787977; + font-size: 14px; +} + +.blog_classify>ul>li>ul>li>a:before{ + content: counter(nums,decimal); + width: 20px; + height: 20px; + line-height: 20px; + text-align: center; + position: absolute; + left: 25px; + top: 9px; + border-radius: 100%; + background-color: #edefee; + text-shadow: 0 1px 0 rgba(255,255,255,.5); +} + +.blog_classify>ul>li>ul>li:first-child>a:before{ + margin-top: 10px; + background-color: #e24d46; + color: #ffffff; + text-shadow: none; +} + +.blog_classify>ul>li>ul>li:nth-child(2)>a:before{ + background-color: #2ea7e0; + color: #ffffff; + text-shadow: none; +} + +.blog_classify>ul>li>ul>li:nth-child(3)>a:before{ + background-color: #6bc30d; + color: #ffffff; + text-shadow: none; +} + +.blog_classify>ul>li>ul>li:first-child{ + padding-top: 10px; +} + +.blog_classify>ul>li>ul>li:last-child{ + padding-bottom: 10px; +} + +.hot_article{ + background-color: rgba(255,255,255,.9);; +} + +.hot_article li{ + display: block; + line-height: 38px; + position: relative; + counter-increment: nums; + padding-left: 30px; + overflow: hidden; + word-wrap: normal!important; + white-space: nowrap; + text-overflow: ellipsis; +} + +.hot_article li a{ + color: #787977; + font-size: 13px; + margin: 0 30px; +} + +.hot_article li a:hover{ + color: #EE2C2C; + text-decoration: underline; +} + +.hot_tag{ + position: relative; + overflow: hidden; + height: 330px; + background-color: rgba(255,255,255,.9);; +} + +#tag_cloud_widget span{ + display: block; + position: absolute; + font-size: 14px; + color: #fff; + text-align: center; + text-overflow: ellipsis; + white-space: nowrap; + top: 0; + left: 0; + padding: 3px 5px; + box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08); + line-height: 15px; + background: #999; + cursor: pointer; +} + +#tag_cloud_widget{ + position: relative; + width: 100%; + height: 240px; + overflow: hidden; + margin: 10px auto 10px; +} + +#tag_cloud_widget span:nth-child(n) { + white-space: nowrap; + _white-space: normal; + *white-space: normal; + overflow: hidden; + text-overflow: ellipsis; +} + +#tag_cloud_widget span:nth-child(2n) { + background: #d1a601; +} + +#tag_cloud_widget span:nth-child(3n) { + background: #286c4a; +} + +#tag_cloud_widget span:nth-child(5n) { + background: #518ab2; +} + +#tag_cloud_widget span:nth-child(4n) { + background: #c91d13; +} + +.left1{ + display: none; +} + +.left2{ + display: none; +} + +.top1{ + display: none; +} + +@media screen and (max-width: 500px){ + /*article页面适配手机*/ + .blog_content{ + width: 100%; + } + + .blog_image{ + width: 100%; + height: 100%; + min-height: 150px; + margin: 37px 20px 0 0; + } + + .blog_content ul li h3{ + position: absolute; + width: 100%; + } + + .article{ + overflow: initial; + } + + .read_more{ + display: none; + } + + .article_classify{ + top: 47px; + } + + .article_content{ + width: 100%; + } + + .blog_date{ + margin-right: 0; + } + + .blog_comment{ + margin-left: 8px; + } + + .blog_heart{ + margin-left: 8px; + } + + .article_info{ + font-size: 12px; + } + + .mobile_close{ + display: none; + } + + .hot_mobile_open{ + width: 70%; + position: fixed; + top: 10%; + right: 0; + background-color: rgba(255,255,255,.4); + z-index: 200; + overflow-y: scroll; + } + + .top_mobile_open{ + width: 70%; + position: fixed; + bottom: 20%; + right: 0; + background-color: rgba(255,255,255,.4); + z-index: 200; + overflow-y: scroll; + } + + .label_mobile_open{ + width: 80%; + position: fixed; + top: calc(51% - 135px); + right: 0; + background-color: rgba(255,255,255,.4); + z-index: 200; + overflow-y: scroll; + } + + .classify_mobile_open{ + width: 90%; + position: fixed; + top: 70px; + left: 5%; + z-index: 200; + } + + .left1{ + display: block; + position: fixed; + right: 0; + top: 20%; + width: 15px; + background: rgba(238, 44, 44,.8); + color: #fff; + font-size: 16px; + padding: 30px 0; + z-index: 9999; + text-align: center; + } + + .left2{ + display: block; + position: fixed; + right: 0; + bottom: 20%; + width: 15px; + background-color: rgba(165, 51, 225, .8); + color: #fff; + font-size: 16px; + padding: 30px 0; + z-index: 9999; + text-align: center; + } + + .top1{ + display: block; + position: fixed; + width: 40px; + height: 40px; + text-align: center; + left: 25px; + top: 12px; + color: rgba(255,255,255,.8); + background-color: rgba(0,0,0,.1); + border-radius: 50%; + z-index: 500; + } + + .top1:hover{ + background-color: #EE2C2C; + } + + .top1 i{ + line-height: 40px; + font-size: 18px; + } + + #tag_cloud_widget{ + right: 13%; + overflow: initial; + } +} + diff --git a/css/base.css b/css/base.css new file mode 100644 index 0000000..1a606be --- /dev/null +++ b/css/base.css @@ -0,0 +1,541 @@ +* { + padding: 0; + margin: 0; +} + +ul li { + list-style: none; +} + +a, img { + text-decoration: none; + border: none; +} + +label { + display: inline-block; +} + +::selection { + background: #EE2C2C; + color: white; +} + +input::-webkit-input-placeholder { + color: #c9c9c9; + font-size: 12px; +} + +input::placeholder { + color: #c9c9c9; + font-size: 12px; +} + +body{ + background-image: url(http://wx3.sinaimg.cn/large/007aGNoFly1fvzkpbekttj30ev0b1acd.jpg); + background-attachment: fixed; + background-size: cover; + background-repeat: no-repeat; +} + +nav { + width: 100%; + height: 60px; + position: fixed; + top: 0; + background-color: rgba(0, 0, 0, .3); + z-index: 501; +} + +select { + width: 138px; + height: 32px; + font-size: 14px; + line-height: 32px; + border: 1px solid #ddd; + border-radius: 4px; + background-color: #f4f4f4; + box-sizing: border-box; + padding-left: 16px; + margin-left: 10px; + outline: none; +} + +iframe{ + display: none; +} + +.nav { + width: 1000px; + margin: 0 auto; + height: 60px; + line-height: 60px; + text-align: center; +} + +.nav-logo{ + float: left; +} + +.nav-logo h1 { + margin-left: 10px; + font-size: 18px; + color: #ffffff; + float: left; +} + +.nav-logo img { + float: left; + width: 30px; + height: 30px; + margin: 15px 0; +} + +.nav-content { + float: right; +} + +.nav-content ul li { + float: left; + margin-right: 30px; +} + +.nav-content a { + font-size: 12px; + letter-spacing: 1px; + color: #FFFFFF; +} + +.nav-content a:hover { + color: #EE2C2C; +} + +#header{ + overflow: hidden; +} + +menu { + display: block; + width: 40px; + height: 40px; + background-color: rgba(0, 0, 0, .1); + border-radius: 50%; + z-index: 502; + position: fixed; + right: 55px; + top: 12px; + cursor: pointer; +} + +menu span { + display: block; + height: 2px; + width: 26px; + background-color: #ffffff; + line-height: 10px; + margin: 5px auto; +} + +.menu_close span:first-child { + margin-top: 12px; + +} + +.menu_open span:first-child { + margin-top: 18px; + transform: rotate(45deg); + -o-transform: rotate(45deg); + -moz-transform: rotate(45deg); + -ms-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + -webkit-transition: all .5s; + -moz-transition: all .5s; + -ms-transition: all .5s; + -o-transition: all .5s; + transition: all .5s; +} + +.menu_open span:nth-last-of-type(2) { + margin-top: -6px; + -webkit-transform: rotate(-45deg); + -moz-transform: rotate(-45deg); + -ms-transform: rotate(-45deg); + -o-transform: rotate(-45deg); + transform: rotate(-45deg); + -webkit-transition: all .5s; + -moz-transition: all .5s; + -ms-transition: all .5s; + -o-transition: all .5s; + transition: all .5s; +} + +.menu_close span:last-child, .menu_close span:last-child, .menu_close span:nth-last-of-type(2) { + -webkit-transform: rotate(0); + -moz-transform: rotate(0); + -ms-transform: rotate(0); + -o-transform: rotate(0); + transform: rotate(0); + -webkit-transition: all .5s; + -moz-transition: all .5s; + -ms-transition: all .5s; + -o-transition: all .5s; + transition: all .5s; +} + +.menu_open span:last-child { + display: none; +} + +menu:hover { + background-color: #EE2C2C; +} + +.fix_bar { + position: fixed; + right: 15px; + bottom: 15px; + z-index: 999; +} + +.fix_bar li { + width: 50px; + height: 50px; + line-height: 50px; + margin-bottom: 2px; + text-align: center; + cursor: pointer; + font-size: 20px; + background-color: rgba(0, 0, 0, .5); + color: #fff; + border-radius: 2px; + opacity: .95; +} + +.searchBox { + padding: 14px; + background-color: grey; + border-radius: 15px 15px 0 0; +} + +.searchBox input { + display: block; + width: 100%; + height: 40px; + border-radius: 40px; + border: none; + text-align: center; + outline: none; +} + +.searchBox i { + float: right; + position: relative; + right: 16px; + bottom: 28px; + color: rgba(0, 0, 0, .5); + cursor: pointer; +} + +.box_bounceInDown_fixed { + position: fixed; + top: auto; + bottom: 200px; + width: 280px; + margin-top: 0; + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-name: bounceInDown; + animation-name: bounceInDown; +} + +.box_bounceInUp_fixed { + position: fixed; + top: auto; + bottom: 200px; + width: 230px; + margin-top: 0; + -webkit-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + animation-fill-mode: both; + -webkit-animation-name: bounceInUp; + animation-name: bounceInUp; +} + +.about_me { + background-color: rgba(255, 255, 255, 0.9); + padding: 29px 29px 10px 29px; + margin-bottom: 30px; + border-radius: 10px; +} + +.about_me h2, .weChat h2 { + font-size: 22px; + text-align: center; + color: #EE2C2C; +} + +.about_me p { + line-height: 30px; + color: #232328; + font-size: 12px; +} + +.about_me > div > p:first-child { + margin-top: 20px; +} + +.about_me img { + display: block; + margin: auto; + border-radius: 50px; + margin-top: 20px; +} + +.weChat { + background-color: #FFFFFF; + padding-top: 29px; + margin-top: 30px; + opacity: 0.9; + border-radius: 10px; + text-align: center; +} + +.w1000 { + width: 1000px; + margin: 0 auto; + margin-top: 80px; + overflow: hidden; +} + +.w700{ + max-width: 700px; + margin: 70px auto 0 auto; + padding: 30px; + border-radius:4px; + background-color: rgba(255,255,255,.95); +} + +.link img { + float: left; + width: 40px; + height: 40px; + border-radius: 100%; +} + +.link h3 { + text-align: left; + padding: 5px 0 0 5px; + font-size: 16px; + font-weight: normal; + color: #000000; + height: 20px; + line-height: 20px; + display: -webkit-box; + -ms-text-overflow: ellipsis; + text-overflow: ellipsis; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + overflow: hidden; +} + +.link p { + height: 56px; + overflow: hidden; + margin-top: 22px; + font-size: 12px; + line-height: 28px; + color: #232328; + display: -webkit-box; + -ms-text-overflow: ellipsis; + text-overflow: ellipsis; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +#overLay { + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); + position: fixed; + top: 0; + left: 0; + z-index: 198; +} + +#footer { + text-align: center; + padding: 20px; +} + +#footer a { + display: inline-block; + width: 30px; + height: 30px; + background-color: rgba(0, 0, 0, .3); + text-align: center; + line-height: 30px; + text-shadow: 1px 1px 1px rgba(0, 0, 0, .5); + font-size: 14px; + margin-left: 15px; + margin-right: 0; + border-radius: 100%; + text-decoration: none; + color: rgba(255, 255, 255, .7); + -webkit-transition: all .3s; + transition: all .3s; +} + +#footer a:hover { + font-size: 16px; +} + +#footer a:first-child:hover { + background-color: #b952c5; +} + +#footer a:nth-child(2):hover { + background-color: #EE2C2C; +} + +#footer a:nth-child(3):hover { + background-color: #668f20; +} + +#footer a:nth-child(4):hover { + background-color: #06a2c9; +} + +.swal-modal{ + opacity: 0; + pointer-events: none; + background-color: rgba(33, 34, 32, .6); + text-align: center; + border-radius: 5px; + position: static; + margin: 20px auto; + display: inline-block; + vertical-align: middle; + -webkit-transform: scale(1); + transform: scale(1); + -webkit-transform-origin: 50% 50%; + transform-origin: 50% 50%; + z-index: 10001; + transition: opacity .2s,-webkit-transform .3s; + transition: transform .3s,opacity .2s; + transition: transform .3s,opacity .2s,-webkit-transform .3s; +} + +.swal-text:last-child { + margin-bottom: 15px; +} + +.swal-text:first-child { + margin-top: 15px; +} + +.swal-text { + font-size: 14px; + position: relative; + float: none; + line-height: normal; + vertical-align: top; + text-align: left; + display: inline-block; + margin: 0; + padding: 0 10px; + font-weight: 400; + color: rgba(255,255,255,.95); + max-width: calc(100% - 20px); + overflow-wrap: break-word; + box-sizing: border-box; +} + +.w-e-toolbar .w-e-active i{ + color: #EE2C2C !important; +} + +.toolbar { + background-color: #eeeeee; + border: 1px solid #c9c9c9; + font-size: 12px; +} +.text { + border: 1px solid #ccc; + height: 180px; + border-top: none; +} + +input:not([type~="checkbox"]):not([type~="radio"]), textarea, button, .btn { + -webkit-transition:all .2s; + -moz-transition:all .2s; + -ms-transition:all .2s; + -o-transition:all .2s; + transition:all .2s; + border-radius: 3px; + -webkit-appearance: none; +} + +input[type="text"]:focus { + background-color: #fff!important; +} + +.w-e-item img { + width: 78px; + height: 78px; + display: inline-block; + margin: 3px; + padding: 6px; + border-radius: 5px; + background: #EEEEEE; +} + +.w-e-panel-container .w-e-panel-tab-title { + list-style: none; + display: -webkit-box; + display: -ms-flexbox; + display: flex; + font-size: 16px; + margin: 2px 10px 0 10px; + border-bottom: 1px solid #f1f1f1; + box-sizing: border-box; +} + +.w-e-panel-container{ + width: 500px!important; +} + +.w-e-text:focus{ + background-color: rgba(255,255,255,.9); +} + +@media screen and (max-width: 500px){ + + .w1000{ + width: 90%; + } + + menu{ + right: 25px; + } + + nav{ + height: auto; + } + + .nav { + width: 90%; + height: auto; + } + + .nav-content{ + float: none; + text-align: left; + padding-top: 60px; + padding-left: 8px; + } + + +} diff --git a/css/baseArticle.css b/css/baseArticle.css new file mode 100644 index 0000000..e4dc051 --- /dev/null +++ b/css/baseArticle.css @@ -0,0 +1,246 @@ +.article { + width: 1000px; + margin: 0 auto; + overflow: hidden; +} + +.news img { + float: left; + -webkit-transition: all 0.5s; + -moz-transition: all 0.5s; + -ms-transition: all 0.5s; + -o-transition: all 0.5s; + transition: all 0.5s; +} + +.news:hover { + cursor: pointer; +} + +.news img:hover { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + -ms-transform: scale(1.1); + -o-transform: scale(1.1); + transform: scale(1.1); +} + +.news ul li { + float: left; + width: 33.33%; + overflow: hidden; +} + +.news ul li:first-child { + margin-bottom: 30px; +} + +.news ul li:nth-child(2) { + margin-bottom: 30px; +} + +.news ul li:nth-child(3) { + margin-bottom: 30px; +} + +.single_new { + border: 1px solid #e6ebf5; + background-color: rgba(255, 255, 255, 0.73); + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .05); + border-radius: 4px; + overflow: hidden; + max-width: 270px; + margin: 0 auto; + transform-style: preserve-3d; + transform: rotate(0deg); + -webkit-transform: rotate(0deg); +} + +.single_new:hover .articleImg { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + transform: scale(1.1); + -webkit-filter: blur(3px); + -moz-filter: blur(3px); + filter: blur(3px); +} + +.single_new:hover .archive_content { + -webkit-animation: fade-in .5s; + animation: fade-in .5s; + opacity: 1; +} + +.new { + position: relative; + display: inherit; + overflow: hidden; +} + +.new:before { + content: "Loading..."; + position: absolute; + width: 100%; + left: 0; + text-align: center; + -webkit-transform: translateY(-34%); + -moz-transform: translateY(-34%); + -ms-transform: translateY(-34%); + -o-transform: translateY(-34%); + transform: translateY(-34%); + line-height: 500px; + font-size: 25px; + color: #b7b6b6; + z-index: -1; +} + +.new:after { + content: ""; + background: rgba(0, 0, 0, 0.01); + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; +} + +.articleImg { + display: inherit; + min-height: 160px; + -webkit-transition: -webkit-transform .5s ease, filter .5s ease; + -moz-transition: -moz-transform .5s ease, filter .5s ease; + -o-transition: -o-transform .5s ease, filter .5s ease; + transition: transform .5s ease, filter .5s ease; + background-position: 50% 50%; + background-size: cover; + background-repeat: no-repeat; +} + +.archive_content { + padding: 160px 20px; + position: absolute; + top: 50%; + left: 0; + right: 0; + -webkit-transform: translateY(-50%); + -moz-transform: translateY(-50%); + -ms-transform: translateY(-50%); + -o-transform: translateY(-50%); + transform: translateY(-50%); + background-color: rgba(0, 0, 0, .5); + text-align: left; + color: #fff; + opacity: 0; + font-size: 12px; + line-height: 26px; +} + +.archive_content > span { + display: block; + position: relative; + overflow: hidden; + height: 78px; +} + +.article_other { + padding: 10px 10px 0 10px; + min-height: 75px; + position: relative; +} + +.article_info { + font-size: 12px; + text-decoration: none; + color: #666; + position: absolute; + bottom: 5px; + cursor: default; +} + +.article_info > i:first-child { + margin-right: 3px; +} + +.article_info > i:nth-child(n+2) { + margin-left: 5px; + margin-right: 3px; +} + +.article_title{ + font-size: 18px; + color: #222; + font-weight: 400; + -webkit-font-smoothing: antialiased; + line-height: 1.8; +} + +.article_title > a { + text-decoration: none; + font-size: 14px; + line-height: 22px; + font-weight: normal; + color: #000; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + word-break: break-all; +} + +.article > div > div:after { + content: ""; + display: block; + position: absolute; + bottom: -12px; + left: 25px; + width: 0; + height: 1.5px; + background-color: #2D93CA; + -webkit-transition: width .6s; + -moz-transition: width .6s; + -ms-transition: width .6s; + -o-transition: width .6s; + transition: width .6s; +} + +.article > div > div:hover:after { + width: 360px; +} + +@media screen and (max-width: 500px){ + .article{ + width: 90%; + } + + .single_new{ + max-width: 500px; + } + + .news ul li{ + width: 100%; + margin-bottom: 30px; + } +} + +@-webkit-keyframes fade-in { + 0% { + -webkit-transform: translateY(-45%); + opacity: 0 + } + 100% { + -webkit-transform: translateY(-50%); + opacity: 1 + } +} + +@keyframes fade-in { + 0% { + transform: translateY(-45%); + opacity: 0 + } + 100% { + transform: translateY(-50%); + opacity: 1 + } +} diff --git a/css/detail.css b/css/detail.css new file mode 100644 index 0000000..341534b --- /dev/null +++ b/css/detail.css @@ -0,0 +1,1027 @@ + +fieldset { + border: 1px solid #eee; + border-radius: 3px; + padding: 10px 15px; +} + +fieldset > legend { + background-color: #eb5055; + color: #fff; + border-radius: 2px; + padding: 2px 5px; + font-size: 12px; +} + +.article_label { + font-size: 14px; + word-wrap: break-word; + word-break: break-word; + margin: 0; + padding: 15px 0 15px; +} + +.article_label a { + font-size: 13px; + font-weight: 600; + display: inline-block; + margin: 4px 8px 0 0; + padding: 0 15px; + -webkit-transition-duration: .4s; + transition-duration: .4s; + letter-spacing: 0; +} + +.article_label a:nth-child(n) { + color: #fff; + border: 1px solid #b952c5; + border-radius: 15px; + background: #b952c5; +} + +.article_label a:nth-child(2n) { + color: #fff; + border: 1px solid #ff9800; + border-radius: 15px; + background: #ff9800; +} + +.article_label a:nth-child(3n) { + color: #fff; + border: 1px solid #46c47c; + border-radius: 15px; + background: #46c47c; +} + +.article_label a:nth-child(4n) { + color: #fff; + border: 1px solid #6fa3ef; + border-radius: 15px; + background: #6fa3ef; +} + +.article_label a:nth-child(5n) { + color: #fff; + border: 1px solid #EE2C2C; + border-radius: 15px; + background: #EE2C2C; +} + +.article_label a:hover{ + color: #5f5f5f; + border: 1px solid #f7f7f7; + outline-style: none; + background: #f7f7f7; +} + +.detail_info { + font-size: 13px; + color: #a5a5a5; + text-decoration: none; + text-shadow: 0 0 2px #fff; + padding-bottom: 20px; + border-bottom: 1px dashed #c5c5c5; +} + +.detail_info span { + margin-right: 15px; + display: inline-block; +} + +.detail_info span i { + margin: 0 5px 0 5px; +} + +.detail_content { + margin-top: 30px; +} + +.detail_content > div { + margin-top: 30px; +} + +.detail_comment { + margin-top: 70px; +} + +.reply_comment { + margin-top: 10px; +} + +.detail_comment > h3 { + border-left: 4px solid #eb5055; + padding-left: 10px; + font-size: 16px; + display: inline-block; + line-height: 30px; + margin-bottom: 5px; +} + +.detail_comment > form > ul, #reply_form > ul { + margin-top: 20px; + overflow: hidden; +} + +.detail_comment > form > ul > li:first-child, #reply_form > ul > li:first-child { + position: relative; + bottom: 3px; + width: 14%; + text-align: center; +} + +.detail_comment > form > ul > li:last-child, #reply_form > ul > li:last-child { + margin-left: 30px; +} + +.detail_comment > form > ul > li, #reply_form > ul > li { + float: left; + overflow: hidden; + box-sizing: border-box; + padding-right: 30px; + padding-bottom: 10px; +} + +input[type=text] { + width: 100%; + height: 20px; + background: #F7F7F9; + border: 1px solid #D3D3D7; + border-radius: 5px; + font-size: 14px; + color: black; + padding: 6px 8px; + outline: none; +} + +label { + font-size: 12px; + line-height: 20px; + padding-bottom: 5px; + display: block; +} + +.detail_editor { + padding: 10px 0; +} + +.headImg { + background-color: rgba(0, 0, 0, .4); + text-align: center; + width: 250px; + height: 256px; + position: fixed; + top: calc(50% - 130px); + left: calc(50% - 128px); + z-index: 5; +} + +.headImg ul { + overflow: hidden; + padding: 10px; +} + +.headImg ul li { + overflow: hidden; + display: block; + width: 24%; + padding-top: 5px; + float: left; +} + +.headImg ul li img { + border-radius: 50px; + cursor: pointer; + -webkit-transition: all .3s; + -moz-transition: all .3s; + -ms-transition: all .3s; + -o-transition: all .3s; + transition: all .3s; +} + +.headImg ul li img:hover { + transform: scale(1.3); +} + +.close { + position: absolute; + top: 5px; + right: 5px; + cursor: pointer; +} + +.close i { + font-size: 14px; + color: #EE2C2C; + margin-right: 5px; +} + +#commentHeadImage, #replyHeadImage { + z-index: 2; + border-radius: 50px; + cursor: pointer; + -webkit-transition: all .3s; + -moz-transition: all .3s; + -ms-transition: all .3s; + -o-transition: all .3s; + transition: all .3s; +} + +#commentHeadImage:hover, #replyHeadImage:hover { + transform: scale(1.3); +} + +.email_reply, .email_comment { + position: relative; + float: left; + height: 24px; + margin-bottom: 3px; + vertical-align: middle; + cursor: pointer; +} + +.email_comment span, .email_reply span { + position: relative; + font-size: 14px; + margin-left: 10px; + bottom: 6px; + cursor: pointer; +} + +.email_comment:before, .email_reply:before { + display: inline-block; + position: relative; + content: ''; + width: 45px; + height: 24px; + background-color: #D8D8D8; + border-radius: 100px; + transition: background-color .5s; +} + +.email_comment:after, .email_reply:after { + position: absolute; + left: 4px; + top: 4px; + content: ''; + width: 16px; + height: 16px; + border-radius: 50%; + background-color: #fff; + transition: transform 0.3s ease-in; +} + +#email_reply:checked + .email_reply:before { + background-color: #EE2C2C; +} + +#email_reply:checked + .email_reply:after { + transform: translateX(130%); +} + +#email_comment:checked + .email_comment:before { + background-color: #EE2C2C; +} + +#email_comment:checked + .email_comment:after { + transform: translateX(130%); +} + +#email_reply, #email_comment { + display: none; +} + +.commit_comment, .reply_commit { + border-radius: 5px; + color: #FFFFFF; + font-size: 12px; + padding: 2px 20px; + line-height: 25px; + width: auto; + float: right; + background-color: #EE2C2C; + cursor: pointer; +} + +.submit_info { + overflow: hidden; + text-align: center; + vertical-align: middle; +} + +.commentHeadImg { + position: absolute; +} + +.commentHeadImg img { + width: 48px; + height: 48px; + border-radius: 50%; + border: 0; + vertical-align: middle; + user-select: none; +} + +.replyHeadImg { + position: absolute; +} + +.replyHeadImg img { + width: 35px; + height: 35px; + border-radius: 50%; + border: 0; + vertical-align: middle; + user-select: none; +} + +.comment { + margin-left: 75px; +} + +.comment_reply { + margin-left: 50px; +} + +.comment > h3, .comment_reply > h3 { + line-height: 18px; + padding-bottom: 4px; + display: block; + word-wrap: break-word; + text-decoration: none; + font-size: 12px; + font-weight: 700; + color: #6d757a; + cursor: pointer; +} + +.comment > span, .comment_reply > span { + line-height: 25px; + padding: 2px 0; + font-size: 14px; + text-shadow: none; + overflow: hidden; + word-wrap: break-word; + word-break: break-word; +} + +.comment > span img, .comment_reply > span img { + width: 78px; + height: 78px; +} + +.comment > p, .comment_reply > p { + margin-top: 4px; + margin-bottom: 8px; + font-size: 13px; + color: #99a2aa; +} + +.article_comment { + margin-top: 20px; +} + +.reply { + margin-left: 10px; + cursor: pointer; +} + +.reply:hover { + color: #EE2C2C; +} + +.article_reply { + margin-top: 20px; + margin-left: 75px; +} + +.reply_sign { + font-size: 12px; + color: #EE2C2C; +} + +#commentBox > li { + padding-top: 20px; +} + +#commentBox > li:after { + margin-left: 75px; + content: ""; + display: block; + height: 1px; + background-color: #e5e9ef; + margin-top: 20px; +} + +.prise { + user-select: none; + border-top: 1px solid #eee; + border-bottom: 1px solid #eee; + padding: 15px 5px; + margin: 10px 0; + text-align: center; + -webkit-transition: .4s; + -moz-transition: .4s; + -o-transition: .4s; + -ms-transition: .4s; + opacity: .3; +} + +.prise:hover { + opacity: 1; +} + +.prise > div { + display: inline-block; + margin-right: 15px; + padding-left: 35px; + position: relative; + cursor: pointer; +} + +.likeHeart, .likeHeart:before, .likeHeart:after { + background: url(../images/like_heart.png); + background-position: left; + background-repeat: no-repeat; + height: 80px; + width: 80px; + cursor: pointer; + position: absolute; + left: -25px; + top: -30px; + background-size: 2900%; +} + +.like:hover { + background: 0; +} + +.like:hover .likeHeart { + background-position: right; +} + +.like:hover .likeHeart:before { + content: ''; + background-position: right; + position: absolute; + -webkit-animation: i-like 2.13584698s infinite; + animation: i-like 2.13584698s infinite; + z-index: 0; +} + +.like:hover .likeHeart:after { + content: ''; + background-position: right; + position: absolute; + -webkit-animation: i-like 3.141592653s infinite; + animation: i-like 3.141592653s infinite; +} + +.prise i { + font-size: 28px; + position: absolute; + width: 30px; + left: 0; + top: -5px; + color: #aab8c2; +} + +.priseImg { + position: fixed; + display: none; + background-color: #FFFFFF; + padding-top: 10px; + top: calc(50% - 100px); + left: calc(50% - 200px); + -webkit-animation: dance 5s infinite ease-in-out; + animation: dance 5s infinite ease-in-out; +} + +.weChatPay { + float: left; +} + +.aliPay { + float: right; +} + +.pay:hover .priseImg { + display: block; +} + +.pay img { + padding: 10px; +} + +.mobile{ + display: none; +} + +@media screen and (max-width: 500px) { + .w700 { + padding: 20px 10px 0 10px; + } + + .detail_comment > form > ul > li:first-child, #reply_form > ul > li:first-child { + width: 20%; + } + + .detail_comment > form > ul > li, #reply_form > ul > li { + padding-bottom: 0; + width: 40%; + } + + .detail_comment > form > ul > li:last-child, #reply_form > ul > li:last-child { + margin-left: 0; + } + + .article_reply{ + margin-left: 12px; + } + + #commentBox > li:after{ + margin-left: 2px; + } + + .comment .reply_comment{ + margin-left: -75px; + } + + .comment_reply .reply_comment{ + margin-left: -62px; + } + + .w-e-panel-container{ + width: 320px!important; + } + + .priseImg img{ + width: 100px; + height: 100px; + } + + .priseImg{ + top: calc(50% - 50px); + left: calc(50% - 120px); + } + + .mobile{ + display: block; + } + +} + +@-webkit-keyframes i-like { + 0% { + -webkit-transform: translateY(29px); + transform: translateY(29px); + margin-left: 25px + } + 20% { + margin-left: 35px + } + 40% { + margin-left: -6px + } + 60% { + margin-left: 4px + } + 80% { + margin-left: -2px + } + 100% { + opacity: 0; + -webkit-transform: translateY(-50px) rotate(180deg) scale(.5); + transform: translateY(-50px) rotate(180deg) scale(.5) + } +} + +@keyframes i-like { + 0% { + -webkit-transform: translateY(29px); + transform: translateY(29px); + margin-left: 25px + } + 20% { + margin-left: 35px + } + 40% { + margin-left: -6px + } + 60% { + margin-left: 4px + } + 80% { + margin-left: -2px + } + 100% { + opacity: 0; + -webkit-transform: translateY(-50px) rotate(180deg) scale(.5); + transform: translateY(-50px) rotate(180deg) scale(.5) + } +} + +@-webkit-keyframes dance { + 2% { + -webkit-transform: translateY(1.5px) rotate(1.5deg); + transform: translateY(1.5px) rotate(1.5deg) + } + 4% { + -webkit-transform: translateY(-1.5px) rotate(-.5deg); + transform: translateY(-1.5px) rotate(-.5deg) + } + 6% { + -webkit-transform: translateY(1.5px) rotate(-1.5deg); + transform: translateY(1.5px) rotate(-1.5deg) + } + 8% { + -webkit-transform: translateY(-1.5px) rotate(-1.5deg); + transform: translateY(-1.5px) rotate(-1.5deg) + } + 10% { + -webkit-transform: translateY(2.5px) rotate(1.5deg); + transform: translateY(2.5px) rotate(1.5deg) + } + 12% { + -webkit-transform: translateY(-.5px) rotate(1.5deg); + transform: translateY(-.5px) rotate(1.5deg) + } + 14% { + -webkit-transform: translateY(-1.5px) rotate(1.5deg); + transform: translateY(-1.5px) rotate(1.5deg) + } + 16% { + -webkit-transform: translateY(-.5px) rotate(-1.5deg); + transform: translateY(-.5px) rotate(-1.5deg) + } + 18% { + -webkit-transform: translateY(.5px) rotate(-1.5deg); + transform: translateY(.5px) rotate(-1.5deg) + } + 20% { + -webkit-transform: translateY(-1.5px) rotate(2.5deg); + transform: translateY(-1.5px) rotate(2.5deg) + } + 22% { + -webkit-transform: translateY(.5px) rotate(-1.5deg); + transform: translateY(.5px) rotate(-1.5deg) + } + 24% { + -webkit-transform: translateY(1.5px) rotate(1.5deg); + transform: translateY(1.5px) rotate(1.5deg) + } + 26% { + -webkit-transform: translateY(.5px) rotate(.5deg); + transform: translateY(.5px) rotate(.5deg) + } + 28% { + -webkit-transform: translateY(.5px) rotate(1.5deg); + transform: translateY(.5px) rotate(1.5deg) + } + 30% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 32% { + -webkit-transform: translateY(1.5px) rotate(-.5deg); + transform: translateY(1.5px) rotate(-.5deg) + } + 34% { + -webkit-transform: translateY(1.5px) rotate(-.5deg); + transform: translateY(1.5px) rotate(-.5deg) + } + 36% { + -webkit-transform: translateY(-1.5px) rotate(2.5deg); + transform: translateY(-1.5px) rotate(2.5deg) + } + 38% { + -webkit-transform: translateY(1.5px) rotate(-1.5deg); + transform: translateY(1.5px) rotate(-1.5deg) + } + 40% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 42% { + -webkit-transform: translateY(2.5px) rotate(-1.5deg); + transform: translateY(2.5px) rotate(-1.5deg) + } + 44% { + -webkit-transform: translateY(1.5px) rotate(.5deg); + transform: translateY(1.5px) rotate(.5deg) + } + 46% { + -webkit-transform: translateY(-1.5px) rotate(2.5deg); + transform: translateY(-1.5px) rotate(2.5deg) + } + 48% { + -webkit-transform: translateY(-.5px) rotate(.5deg); + transform: translateY(-.5px) rotate(.5deg) + } + 50% { + -webkit-transform: translateY(.5px) rotate(.5deg); + transform: translateY(.5px) rotate(.5deg) + } + 52% { + -webkit-transform: translateY(2.5px) rotate(2.5deg); + transform: translateY(2.5px) rotate(2.5deg) + } + 54% { + -webkit-transform: translateY(-1.5px) rotate(1.5deg); + transform: translateY(-1.5px) rotate(1.5deg) + } + 56% { + -webkit-transform: translateY(2.5px) rotate(2.5deg); + transform: translateY(2.5px) rotate(2.5deg) + } + 58% { + -webkit-transform: translateY(.5px) rotate(2.5deg); + transform: translateY(.5px) rotate(2.5deg) + } + 60% { + -webkit-transform: translateY(2.5px) rotate(2.5deg); + transform: translateY(2.5px) rotate(2.5deg) + } + 62% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 64% { + -webkit-transform: translateY(-.5px) rotate(1.5deg); + transform: translateY(-.5px) rotate(1.5deg) + } + 66% { + -webkit-transform: translateY(1.5px) rotate(-.5deg); + transform: translateY(1.5px) rotate(-.5deg) + } + 68% { + -webkit-transform: translateY(-1.5px) rotate(-.5deg); + transform: translateY(-1.5px) rotate(-.5deg) + } + 70% { + -webkit-transform: translateY(1.5px) rotate(.5deg); + transform: translateY(1.5px) rotate(.5deg) + } + 72% { + -webkit-transform: translateY(2.5px) rotate(1.5deg); + transform: translateY(2.5px) rotate(1.5deg) + } + 74% { + -webkit-transform: translateY(-.5px) rotate(.5deg); + transform: translateY(-.5px) rotate(.5deg) + } + 76% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 78% { + -webkit-transform: translateY(-.5px) rotate(1.5deg); + transform: translateY(-.5px) rotate(1.5deg) + } + 80% { + -webkit-transform: translateY(1.5px) rotate(1.5deg); + transform: translateY(1.5px) rotate(1.5deg) + } + 82% { + -webkit-transform: translateY(-.5px) rotate(.5deg); + transform: translateY(-.5px) rotate(.5deg) + } + 84% { + -webkit-transform: translateY(1.5px) rotate(2.5deg); + transform: translateY(1.5px) rotate(2.5deg) + } + 86% { + -webkit-transform: translateY(-1.5px) rotate(-1.5deg); + transform: translateY(-1.5px) rotate(-1.5deg) + } + 88% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 90% { + -webkit-transform: translateY(2.5px) rotate(-.5deg); + transform: translateY(2.5px) rotate(-.5deg) + } + 92% { + -webkit-transform: translateY(.5px) rotate(-.5deg); + transform: translateY(.5px) rotate(-.5deg) + } + 94% { + -webkit-transform: translateY(2.5px) rotate(.5deg); + transform: translateY(2.5px) rotate(.5deg) + } + 96% { + -webkit-transform: translateY(-.5px) rotate(1.5deg); + transform: translateY(-.5px) rotate(1.5deg) + } + 98% { + -webkit-transform: translateY(-1.5px) rotate(-.5deg); + transform: translateY(-1.5px) rotate(-.5deg) + } + 0%, to { + -webkit-transform: translate(0) rotate(0deg); + transform: translate(0) rotate(0deg) + } +} + +@keyframes dance { + 2% { + -webkit-transform: translateY(1.5px) rotate(1.5deg); + transform: translateY(1.5px) rotate(1.5deg) + } + 4% { + -webkit-transform: translateY(-1.5px) rotate(-.5deg); + transform: translateY(-1.5px) rotate(-.5deg) + } + 6% { + -webkit-transform: translateY(1.5px) rotate(-1.5deg); + transform: translateY(1.5px) rotate(-1.5deg) + } + 8% { + -webkit-transform: translateY(-1.5px) rotate(-1.5deg); + transform: translateY(-1.5px) rotate(-1.5deg) + } + 10% { + -webkit-transform: translateY(2.5px) rotate(1.5deg); + transform: translateY(2.5px) rotate(1.5deg) + } + 12% { + -webkit-transform: translateY(-.5px) rotate(1.5deg); + transform: translateY(-.5px) rotate(1.5deg) + } + 14% { + -webkit-transform: translateY(-1.5px) rotate(1.5deg); + transform: translateY(-1.5px) rotate(1.5deg) + } + 16% { + -webkit-transform: translateY(-.5px) rotate(-1.5deg); + transform: translateY(-.5px) rotate(-1.5deg) + } + 18% { + -webkit-transform: translateY(.5px) rotate(-1.5deg); + transform: translateY(.5px) rotate(-1.5deg) + } + 20% { + -webkit-transform: translateY(-1.5px) rotate(2.5deg); + transform: translateY(-1.5px) rotate(2.5deg) + } + 22% { + -webkit-transform: translateY(.5px) rotate(-1.5deg); + transform: translateY(.5px) rotate(-1.5deg) + } + 24% { + -webkit-transform: translateY(1.5px) rotate(1.5deg); + transform: translateY(1.5px) rotate(1.5deg) + } + 26% { + -webkit-transform: translateY(.5px) rotate(.5deg); + transform: translateY(.5px) rotate(.5deg) + } + 28% { + -webkit-transform: translateY(.5px) rotate(1.5deg); + transform: translateY(.5px) rotate(1.5deg) + } + 30% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 32% { + -webkit-transform: translateY(1.5px) rotate(-.5deg); + transform: translateY(1.5px) rotate(-.5deg) + } + 34% { + -webkit-transform: translateY(1.5px) rotate(-.5deg); + transform: translateY(1.5px) rotate(-.5deg) + } + 36% { + -webkit-transform: translateY(-1.5px) rotate(2.5deg); + transform: translateY(-1.5px) rotate(2.5deg) + } + 38% { + -webkit-transform: translateY(1.5px) rotate(-1.5deg); + transform: translateY(1.5px) rotate(-1.5deg) + } + 40% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 42% { + -webkit-transform: translateY(2.5px) rotate(-1.5deg); + transform: translateY(2.5px) rotate(-1.5deg) + } + 44% { + -webkit-transform: translateY(1.5px) rotate(.5deg); + transform: translateY(1.5px) rotate(.5deg) + } + 46% { + -webkit-transform: translateY(-1.5px) rotate(2.5deg); + transform: translateY(-1.5px) rotate(2.5deg) + } + 48% { + -webkit-transform: translateY(-.5px) rotate(.5deg); + transform: translateY(-.5px) rotate(.5deg) + } + 50% { + -webkit-transform: translateY(.5px) rotate(.5deg); + transform: translateY(.5px) rotate(.5deg) + } + 52% { + -webkit-transform: translateY(2.5px) rotate(2.5deg); + transform: translateY(2.5px) rotate(2.5deg) + } + 54% { + -webkit-transform: translateY(-1.5px) rotate(1.5deg); + transform: translateY(-1.5px) rotate(1.5deg) + } + 56% { + -webkit-transform: translateY(2.5px) rotate(2.5deg); + transform: translateY(2.5px) rotate(2.5deg) + } + 58% { + -webkit-transform: translateY(.5px) rotate(2.5deg); + transform: translateY(.5px) rotate(2.5deg) + } + 60% { + -webkit-transform: translateY(2.5px) rotate(2.5deg); + transform: translateY(2.5px) rotate(2.5deg) + } + 62% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 64% { + -webkit-transform: translateY(-.5px) rotate(1.5deg); + transform: translateY(-.5px) rotate(1.5deg) + } + 66% { + -webkit-transform: translateY(1.5px) rotate(-.5deg); + transform: translateY(1.5px) rotate(-.5deg) + } + 68% { + -webkit-transform: translateY(-1.5px) rotate(-.5deg); + transform: translateY(-1.5px) rotate(-.5deg) + } + 70% { + -webkit-transform: translateY(1.5px) rotate(.5deg); + transform: translateY(1.5px) rotate(.5deg) + } + 72% { + -webkit-transform: translateY(2.5px) rotate(1.5deg); + transform: translateY(2.5px) rotate(1.5deg) + } + 74% { + -webkit-transform: translateY(-.5px) rotate(.5deg); + transform: translateY(-.5px) rotate(.5deg) + } + 76% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 78% { + -webkit-transform: translateY(-.5px) rotate(1.5deg); + transform: translateY(-.5px) rotate(1.5deg) + } + 80% { + -webkit-transform: translateY(1.5px) rotate(1.5deg); + transform: translateY(1.5px) rotate(1.5deg) + } + 82% { + -webkit-transform: translateY(-.5px) rotate(.5deg); + transform: translateY(-.5px) rotate(.5deg) + } + 84% { + -webkit-transform: translateY(1.5px) rotate(2.5deg); + transform: translateY(1.5px) rotate(2.5deg) + } + 86% { + -webkit-transform: translateY(-1.5px) rotate(-1.5deg); + transform: translateY(-1.5px) rotate(-1.5deg) + } + 88% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 90% { + -webkit-transform: translateY(2.5px) rotate(-.5deg); + transform: translateY(2.5px) rotate(-.5deg) + } + 92% { + -webkit-transform: translateY(.5px) rotate(-.5deg); + transform: translateY(.5px) rotate(-.5deg) + } + 94% { + -webkit-transform: translateY(2.5px) rotate(.5deg); + transform: translateY(2.5px) rotate(.5deg) + } + 96% { + -webkit-transform: translateY(-.5px) rotate(1.5deg); + transform: translateY(-.5px) rotate(1.5deg) + } + 98% { + -webkit-transform: translateY(-1.5px) rotate(-.5deg); + transform: translateY(-1.5px) rotate(-.5deg) + } + 0%, to { + -webkit-transform: translate(0) rotate(0deg); + transform: translate(0) rotate(0deg) + } +} diff --git a/css/detail.css.bak b/css/detail.css.bak new file mode 100644 index 0000000..d97d9f4 --- /dev/null +++ b/css/detail.css.bak @@ -0,0 +1,1028 @@ + +fieldset { + border: 1px solid #eee; + border-radius: 3px; + padding: 10px 15px; +} + +fieldset > legend { + background-color: #eb5055; + color: #fff; + border-radius: 2px; + padding: 2px 5px; + font-size: 12px; +} + +.article_label { + font-size: 14px; + word-wrap: break-word; + word-break: break-word; + margin: 0; + padding: 15px 0 15px; +} + +.article_label a { + font-size: 13px; + font-weight: 600; + display: inline-block; + margin: 4px 8px 0 0; + padding: 0 15px; + -webkit-transition-duration: .4s; + transition-duration: .4s; + letter-spacing: 0; +} + +.article_label a:nth-child(n) { + color: #fff; + border: 1px solid #b952c5; + border-radius: 15px; + background: #b952c5; +} + +.article_label a:nth-child(2n) { + color: #fff; + border: 1px solid #ff9800; + border-radius: 15px; + background: #ff9800; +} + +.article_label a:nth-child(3n) { + color: #fff; + border: 1px solid #46c47c; + border-radius: 15px; + background: #46c47c; +} + +.article_label a:nth-child(4n) { + color: #fff; + border: 1px solid #6fa3ef; + border-radius: 15px; + background: #6fa3ef; +} + +.article_label a:nth-child(5n) { + color: #fff; + border: 1px solid #EE2C2C; + border-radius: 15px; + background: #EE2C2C; +} + +.article_label a:hover{ + color: #5f5f5f; + border: 1px solid #f7f7f7; + outline-style: none; + background: #f7f7f7; +} + +.detail_info { + font-size: 13px; + color: #a5a5a5; + text-decoration: none; + text-shadow: 0 0 2px #fff; + padding-bottom: 20px; + border-bottom: 1px dashed #c5c5c5; +} + +.detail_info span { + margin-right: 15px; + display: inline-block; +} + +.detail_info span i { + margin: 0 5px 0 5px; +} + +.detail_content { + margin-top: 30px; +} + +.detail_content > div { + margin-top: 30px; +} + +.detail_comment { + margin-top: 70px; +} + +.reply_comment { + margin-top: 10px; +} + +.detail_comment > h3 { + border-left: 4px solid #eb5055; + padding-left: 10px; + font-size: 16px; + display: inline-block; + line-height: 30px; + margin-bottom: 5px; +} + +.detail_comment > form > ul, #reply_form > ul { + margin-top: 20px; + overflow: hidden; +} + +.detail_comment > form > ul > li:first-child, #reply_form > ul > li:first-child { + position: relative; + bottom: 3px; + width: 14%; + text-align: center; +} + +.detail_comment > form > ul > li:last-child, #reply_form > ul > li:last-child { + margin-left: 30px; +} + +.detail_comment > form > ul > li, #reply_form > ul > li { + float: left; + overflow: hidden; + box-sizing: border-box; + padding-right: 30px; + padding-bottom: 10px; +} + +input[type=text] { + width: 100%; + height: 20px; + background: #F7F7F9; + border: 1px solid #D3D3D7; + border-radius: 5px; + font-size: 14px; + color: black; + padding: 6px 8px; + outline: none; +} + +label { + font-size: 12px; + line-height: 20px; + padding-bottom: 5px; + display: block; +} + +.detail_editor { + padding: 10px 0; +} + +.headImg { + background-color: rgba(0, 0, 0, .4); + text-align: center; + width: 250px; + height: 256px; + position: fixed; + top: calc(50% - 130px); + left: calc(50% - 128px); + z-index: 5; +} + +.headImg ul { + overflow: hidden; + padding: 10px; +} + +.headImg ul li { + overflow: hidden; + display: block; + width: 24%; + padding-top: 5px; + float: left; +} + +.headImg ul li img { + border-radius: 50px; + cursor: pointer; + -webkit-transition: all .3s; + -moz-transition: all .3s; + -ms-transition: all .3s; + -o-transition: all .3s; + transition: all .3s; +} + +.headImg ul li img:hover { + transform: scale(1.3); +} + +.close { + position: absolute; + top: 5px; + right: 5px; + cursor: pointer; +} + +.close i { + font-size: 14px; + color: #EE2C2C; + margin-right: 5px; +} + +#commentHeadImage, #replyHeadImage { + z-index: 2; + border-radius: 50px; + cursor: pointer; + -webkit-transition: all .3s; + -moz-transition: all .3s; + -ms-transition: all .3s; + -o-transition: all .3s; + transition: all .3s; +} + +#commentHeadImage:hover, #replyHeadImage:hover { + transform: scale(1.3); +} + +.email_reply, .email_comment { + position: relative; + float: left; + height: 24px; + margin-bottom: 3px; + vertical-align: middle; + cursor: pointer; +} + +.email_comment span, .email_reply span { + position: relative; + font-size: 14px; + margin-left: 10px; + bottom: 6px; + cursor: pointer; +} + +.email_comment:before, .email_reply:before { + display: inline-block; + position: relative; + content: ''; + width: 45px; + height: 24px; + background-color: #D8D8D8; + border-radius: 100px; + transition: background-color .5s; +} + +.email_comment:after, .email_reply:after { + position: absolute; + left: 4px; + top: 4px; + content: ''; + width: 16px; + height: 16px; + border-radius: 50%; + background-color: #fff; + transition: transform 0.3s ease-in; +} + +#email_reply:checked + .email_reply:before { + background-color: #EE2C2C; +} + +#email_reply:checked + .email_reply:after { + transform: translateX(130%); +} + +#email_comment:checked + .email_comment:before { + background-color: #EE2C2C; +} + +#email_comment:checked + .email_comment:after { + transform: translateX(130%); +} + +#email_reply, #email_comment { + display: none; +} + +.commit_comment, .reply_commit { + border-radius: 5px; + color: #FFFFFF; + font-size: 12px; + padding: 2px 20px; + line-height: 25px; + width: auto; + float: right; + background-color: #EE2C2C; + cursor: pointer; +} + +.submit_info { + overflow: hidden; + text-align: center; + vertical-align: middle; +} + +.commentHeadImg { + position: absolute; +} + +.commentHeadImg img { + width: 48px; + height: 48px; + border-radius: 50%; + border: 0; + vertical-align: middle; + user-select: none; +} + +.replyHeadImg { + position: absolute; +} + +.replyHeadImg img { + width: 35px; + height: 35px; + border-radius: 50%; + border: 0; + vertical-align: middle; + user-select: none; +} + +.comment { + margin-left: 75px; +} + +.comment_reply { + margin-left: 50px; +} + +.comment > h3, .comment_reply > h3 { + line-height: 18px; + padding-bottom: 4px; + display: block; + word-wrap: break-word; + text-decoration: none; + font-size: 12px; + font-weight: 700; + color: #6d757a; + cursor: pointer; +} + +.comment > span, .comment_reply > span { + line-height: 25px; + padding: 2px 0; + font-size: 14px; + text-shadow: none; + overflow: hidden; + word-wrap: break-word; + word-break: break-word; +} + +.comment > span img, .comment_reply > span img { + width: 78px; + height: 78px; +} + +.comment > p, .comment_reply > p { + margin-top: 4px; + margin-bottom: 8px; + font-size: 13px; + color: #99a2aa; +} + +.article_comment { + margin-top: 20px; +} + +.reply { + margin-left: 10px; + cursor: pointer; +} + +.reply:hover { + color: #EE2C2C; +} + +.article_reply { + margin-top: 20px; + margin-left: 75px; +} + +.reply_sign { + font-size: 12px; + color: #EE2C2C; +} + +#commentBox > li { + padding-top: 20px; +} + +#commentBox > li:after { + margin-left: 75px; + content: ""; + display: block; + height: 1px; + background-color: #e5e9ef; + margin-top: 20px; +} + +.prise { + user-select: none; + border-top: 1px solid #eee; + border-bottom: 1px solid #eee; + padding: 15px 5px; + margin: 10px 0; + text-align: center; + -webkit-transition: .4s; + -moz-transition: .4s; + -o-transition: .4s; + -ms-transition: .4s; + opacity: .3; +} + +.prise:hover { + opacity: 1; +} + +.prise > div { + display: inline-block; + margin-right: 15px; + padding-left: 35px; + position: relative; + cursor: pointer; +} + +.likeHeart, .likeHeart:before, .likeHeart:after { + background: url(../images/like_heart.png); + background-position: left; + background-repeat: no-repeat; + height: 80px; + width: 80px; + cursor: pointer; + position: absolute; + left: -25px; + top: -30px; + background-size: 2900%; +} + +.like:hover { + background: 0; +} + +.like:hover .likeHeart { + background-position: right; +} + +.like:hover .likeHeart:before { + content: ''; + background-position: right; + position: absolute; + -webkit-animation: i-like 2.13584698s infinite; + animation: i-like 2.13584698s infinite; + z-index: 0; +} + +.like:hover .likeHeart:after { + content: ''; + background-position: right; + position: absolute; + -webkit-animation: i-like 3.141592653s infinite; + animation: i-like 3.141592653s infinite; +} + +.prise i { + font-size: 28px; + position: absolute; + width: 30px; + left: 0; + top: -5px; + color: #aab8c2; +} + +.priseImg { + position: fixed; + display: none; + background-color: #FFFFFF; + padding-top: 10px; + top: calc(50% - 100px); + left: calc(50% - 200px); + -webkit-animation: dance 5s infinite ease-in-out; + animation: dance 5s infinite ease-in-out; +} + +.weChatPay { + float: left; +} + +.aliPay { + float: right; +} + +.pay:hover .priseImg { + display: block; +} + +.pay img { + padding: 10px; +} + +.mobile{ + display: none; +} + +@media screen and (max-width: 500px) { + .w700 { + width: 90%; + padding: 20px 10px 0 10px; + } + + .detail_comment > form > ul > li:first-child, #reply_form > ul > li:first-child { + width: 20%; + } + + .detail_comment > form > ul > li, #reply_form > ul > li { + padding-bottom: 0; + width: 40%; + } + + .detail_comment > form > ul > li:last-child, #reply_form > ul > li:last-child { + margin-left: 0; + } + + .article_reply{ + margin-left: 12px; + } + + #commentBox > li:after{ + margin-left: 2px; + } + + .comment .reply_comment{ + margin-left: -75px; + } + + .comment_reply .reply_comment{ + margin-left: -62px; + } + + .w-e-panel-container{ + width: 320px!important; + } + + .priseImg img{ + width: 100px; + height: 100px; + } + + .priseImg{ + top: calc(50% - 50px); + left: calc(50% - 120px); + } + + .mobile{ + display: block; + } + +} + +@-webkit-keyframes i-like { + 0% { + -webkit-transform: translateY(29px); + transform: translateY(29px); + margin-left: 25px + } + 20% { + margin-left: 35px + } + 40% { + margin-left: -6px + } + 60% { + margin-left: 4px + } + 80% { + margin-left: -2px + } + 100% { + opacity: 0; + -webkit-transform: translateY(-50px) rotate(180deg) scale(.5); + transform: translateY(-50px) rotate(180deg) scale(.5) + } +} + +@keyframes i-like { + 0% { + -webkit-transform: translateY(29px); + transform: translateY(29px); + margin-left: 25px + } + 20% { + margin-left: 35px + } + 40% { + margin-left: -6px + } + 60% { + margin-left: 4px + } + 80% { + margin-left: -2px + } + 100% { + opacity: 0; + -webkit-transform: translateY(-50px) rotate(180deg) scale(.5); + transform: translateY(-50px) rotate(180deg) scale(.5) + } +} + +@-webkit-keyframes dance { + 2% { + -webkit-transform: translateY(1.5px) rotate(1.5deg); + transform: translateY(1.5px) rotate(1.5deg) + } + 4% { + -webkit-transform: translateY(-1.5px) rotate(-.5deg); + transform: translateY(-1.5px) rotate(-.5deg) + } + 6% { + -webkit-transform: translateY(1.5px) rotate(-1.5deg); + transform: translateY(1.5px) rotate(-1.5deg) + } + 8% { + -webkit-transform: translateY(-1.5px) rotate(-1.5deg); + transform: translateY(-1.5px) rotate(-1.5deg) + } + 10% { + -webkit-transform: translateY(2.5px) rotate(1.5deg); + transform: translateY(2.5px) rotate(1.5deg) + } + 12% { + -webkit-transform: translateY(-.5px) rotate(1.5deg); + transform: translateY(-.5px) rotate(1.5deg) + } + 14% { + -webkit-transform: translateY(-1.5px) rotate(1.5deg); + transform: translateY(-1.5px) rotate(1.5deg) + } + 16% { + -webkit-transform: translateY(-.5px) rotate(-1.5deg); + transform: translateY(-.5px) rotate(-1.5deg) + } + 18% { + -webkit-transform: translateY(.5px) rotate(-1.5deg); + transform: translateY(.5px) rotate(-1.5deg) + } + 20% { + -webkit-transform: translateY(-1.5px) rotate(2.5deg); + transform: translateY(-1.5px) rotate(2.5deg) + } + 22% { + -webkit-transform: translateY(.5px) rotate(-1.5deg); + transform: translateY(.5px) rotate(-1.5deg) + } + 24% { + -webkit-transform: translateY(1.5px) rotate(1.5deg); + transform: translateY(1.5px) rotate(1.5deg) + } + 26% { + -webkit-transform: translateY(.5px) rotate(.5deg); + transform: translateY(.5px) rotate(.5deg) + } + 28% { + -webkit-transform: translateY(.5px) rotate(1.5deg); + transform: translateY(.5px) rotate(1.5deg) + } + 30% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 32% { + -webkit-transform: translateY(1.5px) rotate(-.5deg); + transform: translateY(1.5px) rotate(-.5deg) + } + 34% { + -webkit-transform: translateY(1.5px) rotate(-.5deg); + transform: translateY(1.5px) rotate(-.5deg) + } + 36% { + -webkit-transform: translateY(-1.5px) rotate(2.5deg); + transform: translateY(-1.5px) rotate(2.5deg) + } + 38% { + -webkit-transform: translateY(1.5px) rotate(-1.5deg); + transform: translateY(1.5px) rotate(-1.5deg) + } + 40% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 42% { + -webkit-transform: translateY(2.5px) rotate(-1.5deg); + transform: translateY(2.5px) rotate(-1.5deg) + } + 44% { + -webkit-transform: translateY(1.5px) rotate(.5deg); + transform: translateY(1.5px) rotate(.5deg) + } + 46% { + -webkit-transform: translateY(-1.5px) rotate(2.5deg); + transform: translateY(-1.5px) rotate(2.5deg) + } + 48% { + -webkit-transform: translateY(-.5px) rotate(.5deg); + transform: translateY(-.5px) rotate(.5deg) + } + 50% { + -webkit-transform: translateY(.5px) rotate(.5deg); + transform: translateY(.5px) rotate(.5deg) + } + 52% { + -webkit-transform: translateY(2.5px) rotate(2.5deg); + transform: translateY(2.5px) rotate(2.5deg) + } + 54% { + -webkit-transform: translateY(-1.5px) rotate(1.5deg); + transform: translateY(-1.5px) rotate(1.5deg) + } + 56% { + -webkit-transform: translateY(2.5px) rotate(2.5deg); + transform: translateY(2.5px) rotate(2.5deg) + } + 58% { + -webkit-transform: translateY(.5px) rotate(2.5deg); + transform: translateY(.5px) rotate(2.5deg) + } + 60% { + -webkit-transform: translateY(2.5px) rotate(2.5deg); + transform: translateY(2.5px) rotate(2.5deg) + } + 62% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 64% { + -webkit-transform: translateY(-.5px) rotate(1.5deg); + transform: translateY(-.5px) rotate(1.5deg) + } + 66% { + -webkit-transform: translateY(1.5px) rotate(-.5deg); + transform: translateY(1.5px) rotate(-.5deg) + } + 68% { + -webkit-transform: translateY(-1.5px) rotate(-.5deg); + transform: translateY(-1.5px) rotate(-.5deg) + } + 70% { + -webkit-transform: translateY(1.5px) rotate(.5deg); + transform: translateY(1.5px) rotate(.5deg) + } + 72% { + -webkit-transform: translateY(2.5px) rotate(1.5deg); + transform: translateY(2.5px) rotate(1.5deg) + } + 74% { + -webkit-transform: translateY(-.5px) rotate(.5deg); + transform: translateY(-.5px) rotate(.5deg) + } + 76% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 78% { + -webkit-transform: translateY(-.5px) rotate(1.5deg); + transform: translateY(-.5px) rotate(1.5deg) + } + 80% { + -webkit-transform: translateY(1.5px) rotate(1.5deg); + transform: translateY(1.5px) rotate(1.5deg) + } + 82% { + -webkit-transform: translateY(-.5px) rotate(.5deg); + transform: translateY(-.5px) rotate(.5deg) + } + 84% { + -webkit-transform: translateY(1.5px) rotate(2.5deg); + transform: translateY(1.5px) rotate(2.5deg) + } + 86% { + -webkit-transform: translateY(-1.5px) rotate(-1.5deg); + transform: translateY(-1.5px) rotate(-1.5deg) + } + 88% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 90% { + -webkit-transform: translateY(2.5px) rotate(-.5deg); + transform: translateY(2.5px) rotate(-.5deg) + } + 92% { + -webkit-transform: translateY(.5px) rotate(-.5deg); + transform: translateY(.5px) rotate(-.5deg) + } + 94% { + -webkit-transform: translateY(2.5px) rotate(.5deg); + transform: translateY(2.5px) rotate(.5deg) + } + 96% { + -webkit-transform: translateY(-.5px) rotate(1.5deg); + transform: translateY(-.5px) rotate(1.5deg) + } + 98% { + -webkit-transform: translateY(-1.5px) rotate(-.5deg); + transform: translateY(-1.5px) rotate(-.5deg) + } + 0%, to { + -webkit-transform: translate(0) rotate(0deg); + transform: translate(0) rotate(0deg) + } +} + +@keyframes dance { + 2% { + -webkit-transform: translateY(1.5px) rotate(1.5deg); + transform: translateY(1.5px) rotate(1.5deg) + } + 4% { + -webkit-transform: translateY(-1.5px) rotate(-.5deg); + transform: translateY(-1.5px) rotate(-.5deg) + } + 6% { + -webkit-transform: translateY(1.5px) rotate(-1.5deg); + transform: translateY(1.5px) rotate(-1.5deg) + } + 8% { + -webkit-transform: translateY(-1.5px) rotate(-1.5deg); + transform: translateY(-1.5px) rotate(-1.5deg) + } + 10% { + -webkit-transform: translateY(2.5px) rotate(1.5deg); + transform: translateY(2.5px) rotate(1.5deg) + } + 12% { + -webkit-transform: translateY(-.5px) rotate(1.5deg); + transform: translateY(-.5px) rotate(1.5deg) + } + 14% { + -webkit-transform: translateY(-1.5px) rotate(1.5deg); + transform: translateY(-1.5px) rotate(1.5deg) + } + 16% { + -webkit-transform: translateY(-.5px) rotate(-1.5deg); + transform: translateY(-.5px) rotate(-1.5deg) + } + 18% { + -webkit-transform: translateY(.5px) rotate(-1.5deg); + transform: translateY(.5px) rotate(-1.5deg) + } + 20% { + -webkit-transform: translateY(-1.5px) rotate(2.5deg); + transform: translateY(-1.5px) rotate(2.5deg) + } + 22% { + -webkit-transform: translateY(.5px) rotate(-1.5deg); + transform: translateY(.5px) rotate(-1.5deg) + } + 24% { + -webkit-transform: translateY(1.5px) rotate(1.5deg); + transform: translateY(1.5px) rotate(1.5deg) + } + 26% { + -webkit-transform: translateY(.5px) rotate(.5deg); + transform: translateY(.5px) rotate(.5deg) + } + 28% { + -webkit-transform: translateY(.5px) rotate(1.5deg); + transform: translateY(.5px) rotate(1.5deg) + } + 30% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 32% { + -webkit-transform: translateY(1.5px) rotate(-.5deg); + transform: translateY(1.5px) rotate(-.5deg) + } + 34% { + -webkit-transform: translateY(1.5px) rotate(-.5deg); + transform: translateY(1.5px) rotate(-.5deg) + } + 36% { + -webkit-transform: translateY(-1.5px) rotate(2.5deg); + transform: translateY(-1.5px) rotate(2.5deg) + } + 38% { + -webkit-transform: translateY(1.5px) rotate(-1.5deg); + transform: translateY(1.5px) rotate(-1.5deg) + } + 40% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 42% { + -webkit-transform: translateY(2.5px) rotate(-1.5deg); + transform: translateY(2.5px) rotate(-1.5deg) + } + 44% { + -webkit-transform: translateY(1.5px) rotate(.5deg); + transform: translateY(1.5px) rotate(.5deg) + } + 46% { + -webkit-transform: translateY(-1.5px) rotate(2.5deg); + transform: translateY(-1.5px) rotate(2.5deg) + } + 48% { + -webkit-transform: translateY(-.5px) rotate(.5deg); + transform: translateY(-.5px) rotate(.5deg) + } + 50% { + -webkit-transform: translateY(.5px) rotate(.5deg); + transform: translateY(.5px) rotate(.5deg) + } + 52% { + -webkit-transform: translateY(2.5px) rotate(2.5deg); + transform: translateY(2.5px) rotate(2.5deg) + } + 54% { + -webkit-transform: translateY(-1.5px) rotate(1.5deg); + transform: translateY(-1.5px) rotate(1.5deg) + } + 56% { + -webkit-transform: translateY(2.5px) rotate(2.5deg); + transform: translateY(2.5px) rotate(2.5deg) + } + 58% { + -webkit-transform: translateY(.5px) rotate(2.5deg); + transform: translateY(.5px) rotate(2.5deg) + } + 60% { + -webkit-transform: translateY(2.5px) rotate(2.5deg); + transform: translateY(2.5px) rotate(2.5deg) + } + 62% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 64% { + -webkit-transform: translateY(-.5px) rotate(1.5deg); + transform: translateY(-.5px) rotate(1.5deg) + } + 66% { + -webkit-transform: translateY(1.5px) rotate(-.5deg); + transform: translateY(1.5px) rotate(-.5deg) + } + 68% { + -webkit-transform: translateY(-1.5px) rotate(-.5deg); + transform: translateY(-1.5px) rotate(-.5deg) + } + 70% { + -webkit-transform: translateY(1.5px) rotate(.5deg); + transform: translateY(1.5px) rotate(.5deg) + } + 72% { + -webkit-transform: translateY(2.5px) rotate(1.5deg); + transform: translateY(2.5px) rotate(1.5deg) + } + 74% { + -webkit-transform: translateY(-.5px) rotate(.5deg); + transform: translateY(-.5px) rotate(.5deg) + } + 76% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 78% { + -webkit-transform: translateY(-.5px) rotate(1.5deg); + transform: translateY(-.5px) rotate(1.5deg) + } + 80% { + -webkit-transform: translateY(1.5px) rotate(1.5deg); + transform: translateY(1.5px) rotate(1.5deg) + } + 82% { + -webkit-transform: translateY(-.5px) rotate(.5deg); + transform: translateY(-.5px) rotate(.5deg) + } + 84% { + -webkit-transform: translateY(1.5px) rotate(2.5deg); + transform: translateY(1.5px) rotate(2.5deg) + } + 86% { + -webkit-transform: translateY(-1.5px) rotate(-1.5deg); + transform: translateY(-1.5px) rotate(-1.5deg) + } + 88% { + -webkit-transform: translateY(-.5px) rotate(2.5deg); + transform: translateY(-.5px) rotate(2.5deg) + } + 90% { + -webkit-transform: translateY(2.5px) rotate(-.5deg); + transform: translateY(2.5px) rotate(-.5deg) + } + 92% { + -webkit-transform: translateY(.5px) rotate(-.5deg); + transform: translateY(.5px) rotate(-.5deg) + } + 94% { + -webkit-transform: translateY(2.5px) rotate(.5deg); + transform: translateY(2.5px) rotate(.5deg) + } + 96% { + -webkit-transform: translateY(-.5px) rotate(1.5deg); + transform: translateY(-.5px) rotate(1.5deg) + } + 98% { + -webkit-transform: translateY(-1.5px) rotate(-.5deg); + transform: translateY(-1.5px) rotate(-.5deg) + } + 0%, to { + -webkit-transform: translate(0) rotate(0deg); + transform: translate(0) rotate(0deg) + } +} diff --git a/css/friendsLink.css b/css/friendsLink.css new file mode 100644 index 0000000..68edcf8 --- /dev/null +++ b/css/friendsLink.css @@ -0,0 +1,189 @@ + + +.link_left { + float: left; + width: 68%; + overflow: hidden; +} + +.link_right { + float: right; + width: 28%; + overflow: hidden; +} + +.link_left > div > h3 { + margin-bottom: 20px; + padding-left: 20px; + margin-top: 20px; + border-left: 3px solid #EE2C2C; + font-size: 18px; + line-height: 22px; +} + +.link_desc p { + line-height: 28px; + margin-left: 20px; + color: #232328; + font-size: 12px; +} + +.link_left > div { + position: relative; + background-color: rgba(255, 255, 255, 0.9); + padding: 20px; + margin-bottom: 30px; + border-radius: 10px; + overflow: hidden; +} + +.link_desc a { + color: #EE2C2C; +} + +.link_desc a:hover { + text-decoration: underline; +} + +.link_desc p:last-child { + color: #EE2C2C; +} + +.link_desc i:nth-child(n+2) { + margin-left: 6px; +} + +.link { + float: left; + padding: 15px 10px 10px 20px; +} + +.link a { + display: block; + padding: 12px; +} + +.link_left ul { + overflow: hidden; +} + +.link_left ul li { + float: left; + width: 33.3%; + overflow: hidden; +} + +.link_add { + position: absolute; + top: 40px; + right: 40px; + line-height: 22px; + font-size: 13px; + color: #EE2C2C; + cursor: pointer; +} + +.link_add:hover { + text-decoration: underline; +} + +.link_add i { + margin-right: 5px; +} + +.add_link_box { + background-color: rgba(255, 255, 255, 0.9); + position: fixed; + z-index: 1000; + min-height: 290px; + min-width: 300px; + font-size: 12px; + padding: 30px 30px 0 30px; + text-align: right; + top: calc(50% - 150px); + left: calc(50% - 180px); +} + +.add_link_box span { + display: table; + background: #EE2C2C; + border: none; + border-radius: 100px; + font-size: 16px; + color: #FFFFFF; + padding: 7px 28px; + margin: 0 auto; + margin-top: 10px; + cursor: pointer; + +} + +input[type="text"] { + width: 240px; + height: 20px; + background: #F7F7F9; + border: 1px solid #D3D3D7; + border-radius: 5px; + font-size: 14px; + color: black; + padding: 6px 8px; + outline: none; +} + +.add_link_box i { + font-size: 14px; + color: #EE2C2C; + margin-right: 5px; +} + +.add_link_box p { + line-height: 56px; +} + +.close { + position: absolute; + top: 10px; + right: 10px; + cursor: pointer; +} + +/*适配友情连接的手机页面*/ +@media screen and (max-width: 500px) { + + .link_left { + width: 100%; + } + + .link_right { + display: none; + } + + .link_left ul li { + width: 50%; + } + + .link { + padding: 5px 0 10px 10px; + } + + .link a { + padding: 0; + } + + .add_link_box { + background-color: rgba(255, 255, 255, 1); + position: fixed; + z-index: 1000; + min-height: 290px; + width: 90%; + font-size: 12px; + padding: 30px 30px 0 0; + text-align: right; + top: calc(50% - 145px); + left: calc(5% - 15px); + } + + .link_left > div { + border-radius: 5px; + } +} diff --git a/css/index.css b/css/index.css new file mode 100644 index 0000000..6789045 --- /dev/null +++ b/css/index.css @@ -0,0 +1,427 @@ +body { + background-color: #F7F7F9; + background-size: 0; +} + +page { + display: table; + table-layout: fixed; + padding: 40px 0; + width: 100%; + background-size: cover; + overflow: hidden; + position: relative; +} + +.page1 { + background-image: url(http://wx2.sinaimg.cn/large/007aGNoFly1fvysv5m71bj30ev09rdgu.jpg); + height: 100vh; + background-color: transparent; + background-position: center; + background-repeat: no-repeat; + background-attachment: fixed; + padding: 0; +} + +.page1:after, .page3:after { + content: ""; + position: absolute; + top: 0; + left: 0; + z-index: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, .5); +} + +.table_cell { + display: table-cell; + vertical-align: middle; + width: 100%; + height: 100%; + position: relative; + z-index: 1; +} + +.mText { + text-align: center; + color: #ffffff; +} + +.mText h2 { + font-size: 26px; + letter-spacing: 8px; +} + +.mText p { + letter-spacing: 8px; + margin: 20px 0; + font-size: 16px; +} + +#next { + width: 40px; + height: 40px; + border-radius: 50%; + position: absolute; + bottom: 60px; + left: 50%; + margin-left: -24px; + z-index: 0; + -webkit-transition: all .5s ease-out; + transition: all .5s ease-out; + cursor: pointer; +} + +#next:hover { + background-color: #EE2C2C; +} + +#next:after { + display: inline-block; + font-family: FontAwesome; + content: "\f107"; + color: #ffffff; + font-size: 2rem; + width: 40px; + height: 40px; + text-align: center; + line-height: 40px; +} + +.page2 { + width: 100%; + position: relative; + margin: 0 auto; + font-family: "Microsoft YaHei Mono"; +} + +.article_box { + width: 100%; + height: 100%; + position: relative; +} + +.title { + text-align: center; +} + +.title h1 { + font-size: 20px; + padding-bottom: 50px; + position: relative; +} + +.title h1:after { + position: absolute; + width: 50px; + height: 2px; + content: ""; + left: 50%; + margin-left: -25px; + bottom: 35px; + background-color: #EE2C2C; +} + +.page3 { + padding: 100px 0; + background-image: url(http://wx4.sinaimg.cn/large/007aGNoFly1fvysv60e57j30dc08cdg0.jpg); + background-position: center; + background-attachment: fixed; + background-repeat: no-repeat; + background-color: rgba(0, 0, 0, .5); +} + +.about_box { + width: 100%; + position: relative; + color: #ffffff; + font-family: "Microsoft YaHei Mono"; +} + +.about { + width: 1000px; + margin: auto; + text-align: center; +} + +.about ul li { + display: inline-block; + width: 200px; + height: 46px; + margin: 10px; + border: 1px solid #b4b4b4; + position: relative; + text-align: center; + overflow: hidden; +} + +.about ul li:after { + content: ""; + display: block; + position: absolute; + left: 0; + top: 0; + width: 0; + height: 46px; + background-color: #EE2C2C; + opacity: 0.5; + -webkit-transition: width 0.6s; + -moz-transition: width 0.6s; + -ms-transition: width 0.6s; + -o-transition: width 0.6s; + transition: width 0.6s; +} + +.about ul li:hover:after { + width: 200px; +} + +.about ul li a { + display: block; + line-height: 26px; + padding: 10px; + color: #ffffff; + text-decoration: none; + font-size: 14px; + position: relative; + z-index: 1; +} + +.about ul li a i { + margin-right: 5px; + font-size: 14px; + width: 20px; +} + +.links { + width: 1000px; + margin: 0 auto; + overflow: hidden; +} + +.links ul li { + float: left; + width: 25%; +} + +.link { + float: left; + padding: 0 30px 20px; +} + +.link a { + display: block; + padding: 20px; + min-width: 170px; + border-radius: 10px; +} + +.page5 { + background-color: #232328; + padding: 60px 0; +} + +.footer_box { + width: 1000px; + position: relative; + margin: 0 auto; + padding-left: 60px; +} + +.footer > li { + display: block; + float: left; + line-height: 40px; + width: 33.33%; +} + +.footer > li > h2 { + color: #FFFFFF; + font-size: 22px; + margin-bottom: 10px; + letter-spacing: 5px; +} + +.footer > li > p { + color: #eee; +} + +.footer > li > a { + display: block; + line-height: 38px; + width: 68px; + text-align: center; + padding: 0 18px; + font-size: 14px; + border: none; + color: #ffffff; + border-radius: 2px; + background-color: rgba(238, 44, 44, .9); + margin-top: 15px; +} + +.footer > li > button:hover { + background-color: rgba(238, 44, 44, 1); +} + +.footer > li > h3 { + color: #ffffff; + font-size: 18px; + margin-bottom: 10px; + font-weight: 100; +} + +.all_link > li { + float: left; + width: 50%; + line-height: 38px; + font-size: 14px; +} + +.all_link > li > a { + color: #eeeeee; + letter-spacing: 1px; +} + +.all_link > li > a:hover{ + color: #EE2C2C; +} + +.all_link > li > a > i { + margin-right: 5px; +} + +#contact > li { + color: #eeeeee; + line-height: 38px; + font-size: 14px; +} + +#contact > li > i { + margin-right: 10px; + width: 20px; + font-size: 16px; + color: #eeeeee; +} + +#loading { + background-color: #374140; + height: 100%; + width: 100%; + position: fixed; + z-index: 1; + margin-top: 0; + top: 0; +} + +#loading-center { + width: 100%; + height: 100%; + position: relative; +} + +#loading-center-absolute { + position: absolute; + left: calc(50% - 75px); + top: calc(50% - 75px); + height: 150px; + width: 150px; +} + +.object { + width: 20px; + height: 20px; + background-color: #fff; + float: left; + margin-right: 15px; + margin-left: 15px; + margin-top: 65px; + -moz-border-radius: 50% 50% 50% 50%; + -webkit-border-radius: 50% 50% 50% 50%; + border-radius: 50% 50% 50% 50%; +} + +#object_one { + -webkit-animation: object 1.5s infinite; + animation: object 1.5s infinite; +} + +#object_two { + -webkit-animation: object 1.5s infinite; + animation: object 1.5s infinite; + -webkit-animation-delay: .25s; + animation-delay: .25s; +} + +#object_three { + -webkit-animation: object 1.5s infinite; + animation: object 1.5s infinite; + -webkit-animation-delay: .5s; + animation-delay: .5s; +} + +@-webkit-keyframes object { + 75% { + -webkit-transform: scale(0); + -moz-transform: scale(0); + -ms-transform: scale(0); + -o-transform: scale(0); + transform: scale(0); + } +} + +@keyframes object{ + 75% { + -webkit-transform: scale(0); + -moz-transform: scale(0); + -ms-transform: scale(0); + -o-transform: scale(0); + transform: scale(0); + } +} + +@media screen and (max-width: 500px){ + .page1 { + background-position: 58%; + } + + .about{ + width: 90%; + } + + .links{ + width: 90%; + } + + .links ul li{ + width: 50%; + } + + .link{ + padding: 0; + } + + .link a{ + min-width: 120px; + width: 120px; + } + + .article_info > i:nth-child(n+2){ + margin-left: 20px; + } + + .footer_box{ + width: 90%; + padding: 0 15px; + } + + .footer > li{ + width: 100%; + margin-bottom: 30px; + } + + .footer > li:last-child{ + margin-bottom: 0; + } +} diff --git a/css/label.css b/css/label.css new file mode 100644 index 0000000..bd9c651 --- /dev/null +++ b/css/label.css @@ -0,0 +1,38 @@ +.single_new { + border: none; + background-color: #FFFFFF; +} + +.news ul li{ + margin-bottom: 30px; +} + +.label_title { + width: 100%; + margin-top: 80px; + color: #FFFFFF; + text-align: center; +} + +.label_title h1 { + font-weight: 100; + font-size: 24px; + margin-bottom: 15px; + letter-spacing: .1em; + color: #fff; + text-shadow: 0 4px 8px rgba(7,17,27,.4); +} + +.label_title p { + font-size: 15px; + font-weight: 100; + color: rgba(255,255,255,.8); +} + +.label_title a{ + color: #EE2C2C; +} + +.w1000{ + margin-top: 50px; +} \ No newline at end of file diff --git a/css/prettify.css b/css/prettify.css new file mode 100644 index 0000000..0f751c2 --- /dev/null +++ b/css/prettify.css @@ -0,0 +1,152 @@ +/* ======================== +//#google-prettify-monokai-theme +//#Version: 0.3 +//#Author: RaphaelDDL +//#Github: https://github.com/RaphaelDDL/google-prettify-monokai-theme/ +//For use with Google Code Prettify, HTML Syntax only +//======================== */ +li.L0, li.L1, li.L2, li.L3,li.L4, +li.L5, li.L6, li.L7, li.L8,li.L9{ + list-style-type: decimal !important; + font-family: consolas, menlo, courier, monospace; + font-size: 14px; + min-height: 20px; + line-height: 20px; + word-wrap: break-word; +} +li.L0 span, li.L1 span, li.L2 span, li.L3 span,li.L4 span, +li.L5 span, li.L6 span, li.L7 span, li.L8 span,li.L9 span{ + font-family: consolas, menlo, courier, monospace; + font-size: 14px; + line-height: 1.75; +} +pre .str, code .str { color: #e6db5a; } /* string */ +pre .kwd, code .kwd { color: #66d9ef; } /* keyword */ +pre .com, code .com { color: #75715e; font-style: italic; } /* comment */ +pre .typ, code .typ { color: #66d9ef; } /* type */ +pre .lit, code .lit { color: #ae81ff; } /* literal */ +pre .pun, code .pun { color: #fff; } /* punctuation */ +pre .pln, code .pln { color: #fff; } /* plaintext */ +pre .tag, code .tag { color: #f92672; } /* html/xml tag */ +pre .atn, code .atn { color: #a6e22a; } /* html/xml attribute name */ +pre .atv, code .atv { color: #e6db74; } /* html/xml attribute value */ +pre .dec, code .dec { color: #ae81ff; } /* decimal */ + +pre.prettyprint, code.prettyprint { + background-color: #272822; + -moz-border-radius: 8px; + -webkit-border-radius: 8px; + -o-border-radius: 8px; + -ms-border-radius: 8px; + -khtml-border-radius: 8px; + border-radius: 8px; + font-family: consolas, menlo, courier, monospace; +} + +pre.prettyprint { + max-width: 100%; + margin: 1em auto; + padding: 1em; + white-space: pre-wrap; +} + +pre.prettyprinted { + box-shadow:inset 0 0 1px 2px #3c3d39, 0 0 15px rgba(0,0,0,0.5); + border:1px solid #0b0c0a; +} + + +/* ------------------------ +//Section: class 'linenums' for line numbering +//------------------------ */ +ol.linenums { + margin-top: 0; + margin-bottom: 0; + margin-left: 40px; + color: #75715e; +} /* IE indents via margin-left */ + + +/* ============================================= +//Section: Print Styles (partially from Sunburn Theme) +//================================================ */ +@media print { + pre.prettyprinted, pre.prettyprint, code.prettyprint { + background-color:#fff; + color:#000; + -moz-border-radius:0; + -webkit-border-radius:0; + -o-border-radius:0; + -ms-border-radius:0; + -khtml-border-radius:0; + border-radius:0; + } + + pre .str, code .str { color: #060; } + pre .kwd, code .kwd { color: #006; font-weight: bold; } + pre .com, code .com { color: #600; font-style: italic; } + pre .typ, code .typ { color: #404; font-weight: bold; } + pre .lit, code .lit { color: #044; } + pre .pun, code .pun { color: #440; } + pre .pln, code .pln { color: #000; } + pre .tag, code .tag { color: #006; font-weight: bold; } + pre .atn, code .atn { color: #404; } + pre .atv, code .atv { color: #060; } +} + +.code-pretty-container { + position: relative; + padding-top: 9px; + margin-bottom: 20px; +} + +.code-pretty-toolbar { + position: absolute; + top: -2px; + left: 0; + color: #ddd; +} + +.code-pretty-toolbar .title{ + display: inline-block; + vertical-align: top; + padding: 4px 14px 2px; + margin-right: 12px; + line-height: 1.75; + background-color: #1E1F1A; + border: 1px solid #0b0c0a; + border-radius: 8px 8px 0 0; + border-bottom: none; + box-shadow: inset 2px 3px 1px 0px #3c3d39, 0 -1px 12px rgba(0,0,0,0.5); + font-size: 12px; +} + +.code-pretty-toolbar .tool { + margin: -2px 3px 0 0; + height: 24px; + width: 24px; + font-size: 16px; + color: #777777; +} + +.code-pretty-toolbar span, .code-pretty-toolbar a { + display: inline-block; + vertical-align: top; +} + +.code-pretty-text { + position: absolute; + top: 36px; + left: 2px; + padding: 4px; + color: #FFF; + font-family: consolas, menlo, courier, monospace; + font-size: 14px; + word-break: break-all; + line-height: 20px; + border: none; + overflow: hidden; + background-color: rgb(39, 40, 34); + resize: none; + outline: none; +} \ No newline at end of file diff --git a/css/publish.css b/css/publish.css new file mode 100644 index 0000000..2686c20 --- /dev/null +++ b/css/publish.css @@ -0,0 +1,335 @@ +.publishBlog { + padding-bottom: 10px; + overflow: hidden; + background: rgba(255, 255, 255, .9); + border-radius: 10px; +} + +.publishBlog > form > ul > li:nth-child(n+2) > div > i { + margin-right: 10px; + font-size: 16px; + color: #EE2C2C; + line-height: 36px; +} + +.publishBlog > form > ul > li { + padding-left: 40px; + overflow: hidden; +} + +.publishBlog > form > ul > li:nth-child(n+2) { + padding-top: 2px; + padding-bottom: 30px; +} + +.publishBlog > form > ul > li > div { + position: relative; +} + +.publishBlog > form > ul > li > div:first-child { + width: 60%; +} + +.publishBlog > form > ul > li > div:nth-child(2) { + width: 40%; +} + +.uploadImg { + float: left; + background-position: 55% 50%; + background-repeat: no-repeat; + background-size: 35% 60%; +} + +.uploadImg label { + position: absolute; + background-color: #EE2C2C; + display: block; + width: 100px; + height: 30px; + left: 80px; + top: 88px; + text-align: center; + line-height: 30px; + color: #FFFFFF; + border-radius: 5px; +} + +.uploadImg label i{ + margin-right: 8px; +} + +.uploadImg > i { + margin-right: 10px; + font-size: 16px; + color: #EE2C2C; + line-height: 200px; +} + +.uploadImg img { + position: relative; + top: 50px; + left: 5px; +} + +.uploadImg > span { + margin-left: 12%; +} + +#uploadImg { + position: absolute; + left: 55px; + line-height: 200px; + top: 0; + opacity: 0; +} + +.classify { + float: right; +} + +.classify i { + margin-right: 10px; + font-size: 16px; + color: #EE2C2C; + line-height: 200px; +} + +.title { + float: left; +} + +.top { + float: right; +} + +.top span { + font-size: 14px; + color: #787977; + margin-left: 8px; + display: none; +} + +#top { + display: none; +} + +#top:checked + .top_label:before { + background-color: #EE2C2C; +} + +.top_label { + position: relative; + height: 24px; + margin-bottom: 3px; + margin-left: 10px; + vertical-align: middle; + cursor: pointer; +} + +.top_label:before { + display: inline-block; + position: relative; + content: ''; + width: 45px; + height: 24px; + background-color: #D8D8D8; + border-radius: 100px; + transition: background-color 0.3s +} + +.top_label:after { + position: absolute; + left: 4px; + top: 4px; + content: ''; + width: 16px; + height: 16px; + border-radius: 50%; + background-color: #fff; + transition: transform 0.3s ease-in; +} + +#top:checked + .top_label:after { + transform: translateX(130%); +} + +#top:checked ~ span { + display: inline; +} + +.label { + float: left; +} + +.private { + float: right; +} + +.private span { + font-size: 14px; + color: #787977; + margin-left: 8px; + display: none; +} + +#private { + display: none; +} + +#private:checked + .private_label:before { + background-color: #EE2C2C; +} + +.private_label { + position: relative; + height: 24px; + margin-bottom: 3px; + margin-left: 10px; + vertical-align: middle; + cursor: pointer; +} + +.private_label:before { + display: inline-block; + position: relative; + content: ''; + width: 45px; + height: 24px; + background-color: #D8D8D8; + border-radius: 100px; + transition: background-color 0.3s +} + +.private_label:after { + position: absolute; + left: 4px; + top: 4px; + content: ''; + width: 16px; + height: 16px; + border-radius: 50%; + background-color: #fff; + transition: transform 0.3s ease-in; +} + +#private:checked + .private_label:after { + transform: translateX(130%); +} + +#private:checked ~ span { + display: inline; +} + +.publish_editor { + padding: 10px 40px; +} + +.admire { + float: left; +} + +.type { + float: right; +} + +.type span { + font-size: 14px; + color: #787977; + margin-left: 8px; + display: none; +} + +#type { + display: none; +} + +#type:checked + .type_label:before { + background-color: #EE2C2C; +} + +.type_label { + position: relative; + height: 24px; + margin-bottom: 3px; + margin-left: 10px; + vertical-align: middle; + cursor: pointer; +} + +.type_label:before { + display: inline-block; + position: relative; + content: ''; + width: 45px; + height: 24px; + background-color: #D8D8D8; + border-radius: 100px; + transition: background-color 0.3s +} + +.type_label:after { + position: absolute; + left: 4px; + top: 4px; + content: ''; + width: 16px; + height: 16px; + border-radius: 50%; + background-color: #fff; + transition: transform 0.3s ease-in; +} + +#type:checked + .type_label:after { + transform: translateX(130%); +} + +#type:checked ~ span { + display: inline; +} + +.commit_message { + display: table; + background: #EE2C2C; + border: none; + border-radius: 100px; + font-size: 16px; + color: #FFFFFF; + padding: 7px 28px; + margin: 0 auto; + cursor: pointer; +} + +input[type="text"] { + width: 240px; + height: 20px; + background: #F7F7F9; + border: 1px solid #D3D3D7; + border-radius: 5px; + font-size: 14px; + color: black; + padding: 6px 8px; + margin-left: 10px; + outline: none; +} + +.top_text { + border: 1px solid #ccc; + height: 180px; + border-top: none; +} + +.publish_text { + border: 1px solid #ccc; + min-height: 600px; + border-top: none; +} + +.publish_text > .w-e-text { + min-height: 600px; +} + +.article_top { + margin-left: 40px; + margin-top: 5px; +} diff --git a/css/test.css b/css/test.css new file mode 100644 index 0000000..7a4bdf3 --- /dev/null +++ b/css/test.css @@ -0,0 +1,3041 @@ +@charset "utf-8"; +/* +Theme Name: mkBlog +Theme URI: https://mkblog.cn/theme-mkblog/ +Author: 孟坤博客 +Author URI: https://mkblog.cn +Description: 一款简洁但不简单的 WordPress 主题 +Version: 1.6 +*/ + +/* style */ +* { + margin: 0; + padding: 0; + font-family: Microsoft Yahei, "微软雅黑", "Helvetica Neue", Helvetica, Hiragino Sans GB, WenQuanYi Micro Hei, sans-serif; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box +} + +::-webkit-scrollbar { + width: 8px; + height: 8px +} + +::-webkit-scrollbar-track { + background-color: transparent; + -webkit-border-radius: 2em; + -moz-border-radius: 2em; + border-radius: 2em +} + +::-webkit-scrollbar-thumb { + background-color: #F90; + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .4) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .4) 50%, rgba(255, 255, 255, .4) 75%, transparent 75%, transparent); + -webkit-border-radius: 2em; + -moz-border-radius: 2em; + border-radius: 2em +} + +::-moz-selection { + color: #fff; + background-color: #eb5055 +} + +::selection { + color: #fff; + background-color: #eb5055 +} + +a:focus, button:focus, input:focus, select:focus, textarea:focus, .fancybox-close-small:focus { + outline: 0 +} + +a { + text-decoration: none; + color: #313131 +} + +img { + border: 0; + -ms-interpolation-mode: bicubic; + image-rendering: optimizeQuality +} + +img[src=""] { + opacity: 0 +} + +table { + border-collapse: collapse; + border-spacing: 0 +} + +.text-center { + text-align: center +} + +.clear-fix { + zoom: 1 +} + +.clear-fix:before, .clear-fix:after { + display: table; + line-height: 0; + content: "" +} + +.clear-fix:after { + clear: both +} + +.hidden { + display: none !important +} + +.no-shadow { + -webkit-box-shadow: none !important; + -moz-box-shadow: none !important; + box-shadow: none !important +} + +.anim-trans { + -webkit-transition: .3s ease all; + -moz-transition: .3s ease all; + -o-transition: .3s ease all; + transition: .3s ease all +} + +body, html { + position: relative; + margin: 0; + padding: 0; + font-size: 14px; + height: 100% +} + +.fancybox-close-small:focus:after { + outline: 0 +} + +fieldset { + border: 1px solid #eee; + border-radius: 3px; + padding: 10px 15px +} + +fieldset > legend { + background-color: #eb5055; + color: #fff; + border-radius: 2px; + padding: 2px 5px; + font-size: 12px +} + +.entry-content fieldset > :nth-child(2) { + margin-top: 0 +} + +.entry-content fieldset > :last-child { + margin-bottom: 0 +} + +table th, table td { + border: 1px solid #f2f2f2; + padding: 8px +} + +.links { + color: #313131; + border-bottom: 1px solid #ccc; + text-decoration: none; + margin: 0 5px; + -webkit-transition: .2s; + -moz-transition: .2s; + -o-transition: .2s; + -ms-transition: .2s; + cursor: pointer +} + +.links:hover { + color: #eb5055; + border-bottom: 1px solid #eb5055 +} + +input:not([type~="checkbox"]):not([type~="radio"]), textarea, button, .btn { + -webkit-transition: .2s; + -moz-transition: .2s; + -ms-transition: .2s; + -o-transition: .2s; + transition: .2s; + font-size: 1em; + border-radius: 3px; + -webkit-appearance: none +} + +input:not([type~="checkbox"]):not([type~="radio"]):disabled, textarea:disabled, button:disabled, .btn:disabled { + background-color: #a9a9a9; + cursor: not-allowed +} + +input, textarea { + width: 100%; + padding: 5px; + box-sizing: border-box; + border: 1px solid #e5e9ef; + background-color: #f4f5f7; + resize: vertical +} + +input:focus, textarea:focus { + background-color: #fff +} + +button, .btn { + border: 0; + background: #eb5055; + color: #fff; + cursor: pointer; + opacity: 1; + user-select: none +} + +button:hover, button:focus, .btn:hover, .btn:focus { + opacity: .9 +} + +button:active, .btn:active { + opacity: 1 +} + +.btn { + padding: 6px 12px; + margin-right: 4px; + margin-bottom: 4px; + display: inline-block; + line-height: 1.5 +} + +.mk-checkbox { + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + display: inline-block; + cursor: pointer +} + +.mk-checkbox input[type="checkbox"] { + position: absolute; + opacity: 0; + width: auto !important +} + +.mk-checkbox input[type="checkbox"] + div { + vertical-align: middle; + width: 40px; + height: 20px; + border: 1px solid rgba(0, 0, 0, .4); + border-radius: 999px; + background-color: rgba(0, 0, 0, 0.1); + -webkit-transition-duration: .4s; + -moz-transition-duration: .4s; + -o-transition-duration: .4s; + -webkit-transition-property: transform, background-color, box-shadow; + -moz-transition-property: transform, background-color; + -o-transition-property: transform, background-color; + box-shadow: inset 0 0 0 0 rgba(0, 0, 0, 0.4); + display: inline-block; + margin-right: 3px +} + +.mk-checkbox input[type="checkbox"] + div > div { + float: left; + width: 18px; + height: 18px; + border-radius: inherit; + background: #fff; + -webkit-transition-timing-function: cubic-bezier(.54, 1.85, .5, 1); + -moz-transition-timing-function: cubic-bezier(.54, 1.85, .5, 1); + -o-transition-timing-function: cubic-bezier(.54, 1.85, .5, 1); + -webkit-transition-duration: .4s; + -moz-transition-duration: .4s; + -o-transition-duration: .4s; + -webkit-transition-property: transform, background-color, box-shadow; + -moz-transition-property: transform, background-color; + -o-transition-property: transform, background-color; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 0, 0, 0.4); + pointer-events: none +} + +.mk-checkbox input[type="checkbox"]:checked + div > div { + -webkit-transform: translate3d(20px, 0, 0); + -moz-transform: translate3d(20px, 0, 0); + -ms-transform: translate3d(20px, 0, 0); + -o-transform: translate3d(20px, 0, 0); + transform: translate3d(20px, 0, 0); + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(8, 80, 172, 1) +} + +.mk-checkbox input[type="checkbox"]:checked + div { + background-color: #f85200; + border: 1px solid #eb5055; + box-shadow: inset 0 0 0 10px #eb5055 +} + +.mk-checkbox input[type="checkbox"]:checked + div > div { + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3), 0 0 0 1px #eb5055 +} + +body { + overflow-x: hidden; + padding-top: 60px +} + +.no-ie { + position: fixed; + bottom: 0; + height: 50px; + line-height: 50px; + width: 100%; + text-align: center; + z-index: 9999999999; + background-color: #923838; + color: #fff; + font-size: 16px +} + +.no-ie a { + color: #fff; + border-bottom: 2px solid #c5baba +} + +.no-ie a:hover { + color: #eee; + border-bottom: 3px solid #c5baba +} + +#top-navi { + height: 60px; + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.43); + position: fixed; + width: 100%; + top: 0; + z-index: 999; + background-color: #fff; + background-color: rgba(255, 255, 255, 0.95) +} + +.admin-bar #top-navi { + top: 32px +} + +#top-navi.headroom--unpinned { + top: -65px +} + +.top-navi-content { + height: 100%; + max-width: 1000px; + margin: 0 auto +} + +.top-navi-logo { + display: block; + height: 100%; + width: auto; + float: left; + padding: 8px +} + +.top-navi-logo > img { + display: inline-block; + height: 100% +} + +.top-navi-logo > h1 { + font-size: 22px; + font-weight: 900; + line-height: 42px; + letter-spacing: .03em; + text-shadow: 2px 2px 1px #eee; + color: #505050 +} + +.top-navi-search-btn { + width: 40px; + height: 100%; + float: right; + cursor: pointer; + text-align: center +} + +#top-navi .main-menu { + display: inline-block; + float: right; + height: 100% +} + +#top-navi .main-menu::-webkit-scrollbar { + height: 6px; + width: 6px +} + +#top-navi .main-menu::-webkit-scrollbar-track-piece { + background-color: #f5f5f5 +} + +#top-navi .main-menu::-webkit-scrollbar-thumb { + height: 6px; + width: 6px; + border-radius: 0; + background: #cbcbcb +} + +#top-navi .main-menu::-webkit-scrollbar-thumb:hover { + background: #909090 +} + +#top-navi .main-menu ul { + list-style: none; + position: relative; + display: inline-table; + z-index: 999 +} + +#top-navi .main-menu ul:after { + content: ""; + clear: both; + display: block +} + +#top-navi .main-menu ul li { + float: left +} + +#top-navi .main-menu > ul > li > a, .top-navi-search-btn { + line-height: 60px; + font-size: 14px +} + +#top-navi .main-menu ul li a { + display: block; + padding: 0 20px; + height: 100%; + color: #000; + text-decoration: none +} + +#top-navi .main-menu ul li a, .top-navi-search-btn { + -webkit-transition: .3s ease all; + -moz-transition: .3s ease all; + -o-transition: .3s ease all; + transition: .3s ease all +} + +#top-navi .main-menu ul li:hover > a, .top-navi-search-btn:hover { + color: #eb5055 +} + +#top-navi .main-menu ul li:hover > ul { + visibility: visible; + filter: alpha(Opacity=98); + -moz-opacity: .98; + opacity: .98; + margin-top: 0 +} + +#top-navi .main-menu ul ul { + background: #fff; + padding: 0; + position: absolute; + top: 100%; + box-shadow: 0 0 10px 0 #cacaca; + -webkit-transition: all .3s ease-in-out; + -moz-transition: all .3s ease-in-out; + -o-transition: all .3s ease-in-out; + transition: all .3s ease-in-out; + visibility: hidden; + opacity: 0; + margin-top: -15px +} + +#top-navi .main-menu ul ul li { + float: none; + position: relative +} + +#top-navi .main-menu ul ul li a { + padding: 15px 25px; + width: 160px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap +} + +#top-navi .main-menu ul ul li a:hover { + padding-left: 32px +} + +#top-navi .main-menu ul ul ul li a:hover { + padding-left: 22px +} + +#top-navi .main-menu ul ul ul { + position: absolute; + left: 100%; + top: 5px +} + +#top-navi .main-menu ul ul ul li a { + padding: 12px 15px; + width: 160px +} + +#menu-btn { + display: none +} + +@media screen and (max-width: 750px) { + body { + padding-top: 50px; + webkit-transition: .5s linear all; + -moz-transition: .5s linear all; + -o-transition: .5s linear all; + transition: .5s linear all + } + + #top-navi { + height: 50px; + box-shadow: 5px 0 5px 0 rgba(0, 0, 0, 0.33) + } + + .top-navi-search-btn { + top: 5px; + right: 5px; + display: block; + width: 40px; + height: 40px; + line-height: 40px; + font-size: 26px; + color: #848484; + position: absolute + } + + .top-navi-content { + text-align: center + } + + .top-navi-logo { + float: none; + margin: 0 auto; + display: inline-block + } + + .top-navi-logo > h1 { + line-height: 32px; + text-shadow: none + } + + .main-menu { + position: fixed; + top: 0; + bottom: 0; + right: 100%; + width: 65%; + z-index: 999; + overflow-y: auto; + background: #fff; + background: rgba(255, 255, 255, 0.68) + } + + .main-menu-on .main-menu { + box-shadow: 0 0 15px 0 #9c9c9c + } + + #top-navi .main-menu:before { + content: "Navigation"; + font-size: 26px; + line-height: 55px; + color: #e2e2e2 + } + + #top-navi .main-menu li a { + padding: 0 20px !important; + line-height: 45px !important; + display: block !important; + width: 100% !important; + text-align: left + } + + #top-navi .main-menu ul { + width: 100%; + padding: 0 + } + + #top-navi .main-menu ul li { + display: block; + width: 100%; + position: static + } + + #top-navi .main-menu .current-menu-item > a, #top-navi .main-menu .current-menu-item > a:hover { + background-color: #eb5055 !important; + color: #fff !important + } + + #top-navi .main-menu a, #top-navi .main-menu ul li:hover a { + background-color: transparent; + color: #000 + } + + #top-navi .main-menu ul li a:hover { + background-color: #eee; + color: #eb5055 + } + + #top-navi .main-menu ul ul, #top-navi .main-menu ul ul ul { + visibility: visible; + filter: alpha(Opacity=100); + -moz-opacity: 1; + opacity: 1; + background-color: transparent; + position: static; + box-shadow: none; + margin: 0; + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none + } + + #menu-btn { + display: block; + position: absolute; + width: 40px; + height: 40px; + left: 8px; + top: 7px; + border-radius: 15px; + cursor: pointer; + z-index: 999999 + } + + #menu-btn .menu-btn-bar:nth-of-type(1) { + margin-top: 7px + } + + #menu-btn .menu-btn-bar:nth-of-type(3) { + margin-bottom: 0 + } + + #menu-btn .menu-btn-bar { + position: relative; + display: block; + width: 30px; + height: 3px; + margin: 6px auto; + background-color: #848484; + border-radius: 10px; + -webkit-transition: .3s; + -moz-transition: .3s; + -o-transition: .3s; + transition: .3s + } + + .main-menu-on #menu-btn .menu-btn-bar:nth-of-type(1) { + -webkit-transform: translateY(9px) rotate(-45deg); + -ms-transform: translateY(9px) rotate(-45deg); + transform: translateY(9px) rotate(-45deg) + } + + .main-menu-on #menu-btn .menu-btn-bar:nth-of-type(2) { + opacity: 0 + } + + .main-menu-on #menu-btn .menu-btn-bar:nth-of-type(3) { + -webkit-transform: translateY(-9px) rotate(45deg); + -ms-transform: translateY(-9px) rotate(45deg); + transform: translateY(-9px) rotate(45deg) + } + + .main-menu-on { + -webkit-transform: translateX(65%); + -moz-transform: translateX(65%); + -ms-transform: translateX(65%); + -o-transform: translateX(65%); + transform: translateX(65%); + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + overflow: hidden + } + + .main-menu-on:after { + content: ""; + cursor: pointer; + position: absolute; + width: 100%; + height: 100%; + z-index: 998; + left: 0; + top: 0; + background-color: rgba(0, 0, 0, 0.02) + } +} + +#top-navi { + webkit-transition: .5s ease all; + -moz-transition: .5s ease all; + -o-transition: .5s ease all; + transition: .5s ease all +} + +.banner-bg-header { + background: url(https://ws1.sinaimg.cn/large/a15b4afegy1fmeb638hhjj228009gdgq.jpg) no-repeat; + -webkit-background-size: cover; + -moz-background-size: cover; + -ms-background-size: cover; + background-size: cover; + padding: 90px 0 30px; + text-align: center; + margin-top: -60px +} + +.banner-bg-header .banner-title { + font-weight: 100; + font-size: 30px; + margin-bottom: 10px; + letter-spacing: .1em; + color: #fff; + text-shadow: 0 4px 8px rgba(7, 17, 27, .4) +} + +.banner-bg-header .banner-sub-title { + font-weight: 100; + font-size: 15px; + color: #eee; + color: rgba(255, 255, 255, 0.54) +} + +@media screen and (max-width: 660px) { + .banner-bg-header .banner-title { + font-size: 26px + } + + .banner-bg-header .banner-sub-title { + font-size: 14px + } +} + +.index-header-title { + text-align: center; + color: #c3c3c3; + font-size: 16px +} + +#post-lists { + max-width: 900px; + margin: 20px auto 0 +} + +#post-lists > article { + width: 33.33%; + float: left +} + +.post-item-card { + margin: 20px +} + +.post-item-card .post-item-card-body { + border: 1px solid #e6ebf5; + background-color: #fff; + background-color: rgba(255, 255, 255, 0.73); + box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .05); + border-radius: 4px; + overflow: hidden; + max-width: 270px; + margin: 0 auto; + transform-style: preserve-3d; + transform: rotate(0deg); + -webkit-transform: rotate(0deg) +} + +.post-item-card .item-thumb { + position: relative; + display: inherit; + overflow: hidden +} + +.post-item-card .thumbnail { + display: inherit; + min-height: 160px; + -webkit-transition: -webkit-transform .5s ease, filter .5s ease; + -moz-transition: -moz-transform .5s ease, filter .5s ease; + -o-transition: -o-transform .5s ease, filter .5s ease; + transition: transform .5s ease, filter .5s ease; + background-position: 50% 50%; + background-size: cover +} + +.post-item-card:hover .item-thumb .thumbnail { + -webkit-transform: scale(1.1); + -moz-transform: scale(1.1); + transform: scale(1.1); + -webkit-filter: blur(3px); + -moz-filter: blur(3px); + filter: blur(3px) +} + +.post-item-card .item-thumb:before { + content: "Loading..."; + position: absolute; + width: 100%; + left: 0; + background-color: #eee; + background-color: rgba(238, 238, 238, 0.67); + text-align: center; + -webkit-transform: translateY(-34%); + -moz-transform: translateY(-34%); + -ms-transform: translateY(-34%); + -o-transform: translateY(-34%); + transform: translateY(-34%); + line-height: 500px; + font-size: 25px; + color: #b7b6b6; + z-index: -1 +} + +.post-item-card .item-thumb:after { + content: ""; + background: rgba(0, 0, 0, 0.01); + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0 +} + +.post-item-card .archive-content { + padding: 160px 20px; + position: absolute; + top: 50%; + left: 0; + right: 0; + -webkit-transform: translateY(-50%); + -moz-transform: translateY(-50%); + -ms-transform: translateY(-50%); + -o-transform: translateY(-50%); + transform: translateY(-50%); + text-align: center; + color: #fff; + font-size: 14px; + line-height: 26px; + opacity: 0; + background-color: rgba(0, 0, 0, .5) +} + +.post-item-card:hover .archive-content { + -webkit-animation: fade-in .5s; + animation: fade-in .5s; + opacity: 1 +} + +@keyframes fade-in { + 0% { + transform: translateY(-45%); + opacity: 0 + } + 100% { + transform: translateY(-50%); + opacity: 1 + } +} + +@-webkit-keyframes fade-in { + 0% { + -webkit-transform: translateY(-45%); + opacity: 0 + } + 100% { + -webkit-transform: translateY(-50%); + opacity: 1 + } +} + +.post-item-card .entry-header { + margin: 10px; + min-height: 90px; + position: relative +} + +.post-item-card .entry-title > a { + text-decoration: none; + font-size: 16px; + line-height: 26px; + font-weight: normal; + color: #000; + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + word-break: break-all +} + +.article-ontop { + color: #eb5055; + font-weight: bold +} + +.post-item-card .entry-meta { + position: absolute; + bottom: 0; + cursor: default +} + +.post-item-card .entry-meta, .entry-meta > a { + font-size: 12px; + text-decoration: none; + color: #666 +} + +.post-item-card .entry-meta > .fa { + margin-right: 3px; + margin-left: 10px +} + +.post-item-card .entry-meta > .fa:first-child { + margin-left: 0 +} + +@media screen and (max-width: 900px) { + #post-lists { + width: 650px; + margin: 0 auto + } + + #post-lists > article { + width: 50% + } +} + +@media screen and (max-width: 660px) { + #post-lists { + width: auto + } + + #post-lists > article { + width: 100% + } + + .post-item-card .post-item-card-body { + max-width: 500px + } + + .post-item-card .thumbnail { + height: 220px + } + + .post-item-card .entry-title > a { + font-size: 20px; + line-height: 32px + } + + .post-item-card .entry-meta, .entry-meta > a { + font-size: 14px + } +} + +@media screen and (max-width: 500px) { + .post-item-card .thumbnail { + height: auto + } + + .post-item-card .entry-header { + margin: 13px; + min-height: 95px + } +} + +.single .post, .single .attachment, .page .page, .comments-area, .width-short, #SOHUCS, #SOHUCS #SOHU_MAIN { + max-width: 700px; + padding: 10px 25px 15px; + margin: 10px auto 0; + background-color: #fff; + background-color: rgba(255, 255, 255, 0.68); + border-radius: 3px +} + +.entry-title { + font-size: 21px; + color: #222; + font-weight: 400; + -webkit-font-smoothing: antialiased; + line-height: 1.8 +} + +.header-info { + font-size: 13px; + margin-top: 10px; + padding-bottom: 15px; + border-bottom: 1px dashed #c5c5c5; + margin-bottom: 20px +} + +.header-info, .header-info a { + color: #a5a5a5; + text-decoration: none; + text-shadow: 0 0 2px #fff +} + +.header-info > span { + margin-right: 10px; + display: inline-block +} + +.article-report { + display: inline-block; + background-color: #f44336; + color: #fff; + text-align: center; + border-radius: 5px; + width: 20px; + height: 20px; + line-height: 20px; + font-size: 12px; + margin-right: 2px; + cursor: pointer; + text-shadow: none +} + +.wp-smiley { + height: 26px !important; + width: auto !important; + max-height: none !important; + vertical-align: bottom; + -webkit-box-shadow: none !important; + -moz-box-shadow: none !important; + box-shadow: none !important; + border: none !important; + border-radius: 0 !important +} + +.entry-content { + font-size: 1em +} + +.entry-content p { + word-wrap: break-word; + word-break: break-word; + margin: 20px 0; + vertical-align: baseline; + line-height: 1.8 +} + +.entry-content ul, .entry-content ol { + padding-left: 20px +} + +.entry-content ul > li, .entry-content ol > li { + margin: .6em 0; + line-height: 1.8em +} + +.entry-content h1 { + font-weight: bold; + font-size: 1.5em; + margin: 35px 0 0 +} + +.entry-content h2 { + font-weight: 500; + position: relative; + margin: 30px 0 20px; + font-size: 1.3em; + color: #444 +} + +.entry-content h2:before { + font-weight: 600; + position: absolute; + top: 0; + left: -15px; + content: '#'; + color: #eb5055 +} + +.entry-content h3 { + font-size: 1.1em; + font-weight: 700; + margin: 1em 0 .8em +} + +.entry-content blockquote { + padding: 5px 10px 5px 20px; + border-left: 4px solid #ddd; + margin: .6em 0; + vertical-align: baseline +} + +.entry-content blockquote > :first-child { + margin-top: 0 +} + +.entry-content blockquote > :last-child { + margin-bottom: 0 +} + +.entry-content code { + color: #fff; + background-color: #9b9b9b; + border-radius: 3px; + padding: 0 3px; + font-size: 100%; + font-weight: normal; + margin: 0 2px +} + +.entry-content .wp-caption { + max-width: 100% +} + +.entry-content .aligncenter, .entry-content .alignnone, .entry-content img.alignnone { + display: block; + margin: 0 auto; + text-align: center +} + +.entry-content .wp-caption .wp-caption-text { + text-align: center; + margin: 10px auto 30px; + border-bottom: 1px #c3c3c3 dashed; + display: inline-block; + padding: 0 6px 1px; + color: #949292; + font-size: .9em +} + +.entry-content img { + max-width: 100%; + height: auto; + border-radius: 2px; + -webkit-box-shadow: 0 0 2.6875rem rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 2.6875rem rgba(0, 0, 0, 0.15); + box-shadow: 0 0 2.6875rem rgba(0, 0, 0, 0.15) +} + +.entry-content a:not([class]):not([data-fancybox]) { + color: #313131; + border-bottom: 1px solid #ccc; + text-decoration: none; + margin: 0 5px +} + +.entry-content a:not([class]):not([data-fancybox]):hover, .comment-content-text a:not([class]):not([data-fancybox]):hover { + color: #eb5055; + border-bottom: 1px solid #eb5055 +} + +.entry-content .gallery { + clear: both; + font-size: 18px +} + +.entry-content .gallery .gallery-item { + margin: 0 !important; + overflow: hidden; + position: relative; + float: left +} + +.entry-content .gallery-caption { + pointer-events: none; + padding: 1000px 20px; + position: absolute; + top: 50%; + left: 0; + right: 0; + -webkit-transform: translateY(-50%); + -moz-transform: translateY(-50%); + -ms-transform: translateY(-50%); + -o-transform: translateY(-50%); + transform: translateY(-50%); + webkit-transition: .5s ease all; + -moz-transition: .5s ease all; + -o-transition: .5s ease all; + transition: .5s ease all; + text-align: center; + color: #fff; + opacity: 0; + background-color: rgba(0, 0, 0, .70); + cursor: pointer +} + +.entry-content .gallery .gallery-item:hover .gallery-caption { + opacity: 1 +} + +.entry-content .gallery-columns-1 .gallery-item { + width: 100% !important +} + +.entry-content .gallery-columns-2 .gallery-item { + width: 50% !important +} + +.entry-content .gallery-columns-3 .gallery-item { + width: 33.3333333% !important +} + +.entry-content .gallery-columns-4 .gallery-item { + width: 25% !important +} + +.entry-content .gallery-columns-5 .gallery-item { + width: 20% !important +} + +.entry-content .gallery-columns-6 .gallery-item { + width: 16.6666667% !important +} + +.entry-content .gallery-columns-7 .gallery-item { + width: 14.2857142857% !important; + font-size: .9em +} + +.entry-content .gallery-columns-8 .gallery-item { + width: 12.5% !important; + font-size: .8em +} + +.entry-content .gallery-columns-9 .gallery-item { + width: 11.11111112% !important; + font-size: .7em +} + +.entry-content .gallery .gallery-item dt:before { + content: ""; + display: block; + padding-top: 100% +} + +.entry-content .gallery .gallery-item dt { + position: relative; + box-shadow: 0 0 0 1px rgba(0, 0, 0, .1) inset; + background: #eee; + cursor: pointer; + overflow: hidden +} + +.entry-content .gallery .gallery-item a { + display: block; + width: 100%; + height: 100%; + position: absolute; + top: 0; + border: 0; + margin: 0 +} + +.entry-content .gallery .gallery-item img { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + object-fit: cover; + border: 0 !important; + box-shadow: none +} + +.mk-side-form input { + float: left; + padding: 2px 10px; + width: 77%; + height: 37px; + border: 1px solid #ebebeb; + border-right-color: transparent; + border-radius: 2px 0 0 2px; + line-height: 37px +} + +.mk-side-form button { + position: relative; + overflow: visible; + width: 23%; + height: 37px; + border-radius: 0 2px 2px 0; + text-transform: uppercase +} + +.entry-content .content-extras { + margin: 5px 0 20px +} + +.entry-content .content-extras p { + margin: 5px 0 +} + +.single-copyright { + display: inline-block +} + +.single-tags { + display: inline-block; + float: right +} + +.single-tags > .fa { + color: #b3b3b3 +} + +p.mk-article-collapse, p.mk-article-collapse .fa { + -webkit-transition: all .2s; + -moz-transition: all .2s; + -o-transition: all .2s; + transition: all .2s +} + +p.mk-article-collapse { + cursor: pointer; + background-color: #f5f5f5; + background-color: rgba(245, 245, 245, 0.6); + padding: 5px; + border-radius: 3px; + text-align: center; + font-size: 13px; + margin: 20px auto 10px; + color: #807e7e; + word-break: keep-all; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none +} + +p.mk-article-collapse:hover { + background-color: #eee +} + +.mk-collapse-open .fa { + -webkit-transform: rotate(180deg); + -moz-transform: rotate(180deg); + -ms-transform: rotate(180deg); + -o-transform: rotate(180deg); + transform: rotate(180deg) +} + +.code-pretty-container { + position: relative; + margin-bottom: 1em +} + +.code-pretty-container .code-type { + position: absolute; + top: 0; + right: 0; + padding: 5px 10px; + background: #eb5055; + color: #fff; + cursor: pointer; + border-radius: 0 3px 0 5px; + font-size: .8em; + user-select: none +} + +.code-pretty-container .prettyprint { + margin-bottom: .5em; + border-radius: 3px +} + +.code-pretty-container textarea { + position: absolute; + top: 0 +} + +.code-pretty-container .code-pretty-toolbar .btn.fa { + font-size: .8em +} + +.code-pretty-container .code-pretty-toolbar .msg { + line-height: 1.8; + font-size: .8em; + padding: 6px 12px; + padding-left: 20px; + color: #827171; + display: none +} + +.code-pretty-container .code-pretty-toolbar .back-to-pretty { + display: none +} + +.social-main { + user-select: none; + border-top: 1px solid #eee; + border-bottom: 1px solid #eee; + padding: 15px 5px; + margin: 10px 0; + text-align: center; + -webkit-transition: .4s; + -moz-transition: .4s; + -o-transition: .4s; + -ms-transition: .4s; + opacity: .3 +} + +.social-main:hover { + opacity: 1 +} + +.social-main > div { + display: inline-block; + margin-right: 15px; + padding-left: 35px; + position: relative; + cursor: pointer +} + +.social-main > div:last-child { + margin-right: 0 +} + +.social-main > div .fa { + font-size: 28px; + position: absolute; + width: 30px; + left: 0; + top: -5px +} + +.social-main .like:hover { + background: 0 +} + +.social-main .likeHeart { + z-index: 2 +} + +.social-main .likeHeart, .social-main .likeHeart:after, .social-main .likeHeart:before { + background: url(images/like_heart.png); + background-position: left; + background-repeat: no-repeat; + height: 80px; + width: 80px; + cursor: pointer; + position: absolute; + left: -25px; + top: -30px; + background-size: 2900% +} + +.social-main .like:hover .likeHeart, .social-main .like:focus .likeHeart { + background-position: right +} + +.social-main .like:hover .likeHeart:before, .social-main .like:hover .likeHeart:after { + content: ''; + background-position: right; + position: absolute; + -webkit-animation: ilike 2.13584698s infinite; + animation: ilike 2.13584698s infinite; + z-index: 0 +} + +.social-main .like:hover .likeHeart:after { + content: ''; + background-position: right; + position: absolute; + -webkit-animation: ilike 3.141592653s infinite; + animation: ilike 3.141592653s infinite +} + +@-webkit-keyframes ilike { + 0% { + -webkit-transform: translateY(29px); + transform: translateY(29px); + margin-left: 25px + } + 20% { + margin-left: 35px + } + 40% { + margin-left: -6px + } + 60% { + margin-left: 4px + } + 80% { + margin-left: -2px + } + 100% { + opacity: 0; + -webkit-transform: translateY(-50px) rotate(180deg) scale(.5); + transform: translateY(-50px) rotate(180deg) scale(.5) + } +} + +@keyframes ilike { + 0% { + -webkit-transform: translateY(29px); + transform: translateY(29px); + margin-left: 25px + } + 20% { + margin-left: 35px + } + 40% { + margin-left: -6px + } + 60% { + margin-left: 4px + } + 80% { + margin-left: -2px + } + 100% { + opacity: 0; + -webkit-transform: translateY(-50px) rotate(180deg) scale(.5); + transform: translateY(-50px) rotate(180deg) scale(.5) + } +} + +.social-main .done { + display: inline-block; + -webkit-animation-name: heartBlast; + animation-name: heartBlast; + -webkit-animation-duration: .8s; + animation-duration: .8s; + -webkit-animation-iteration-count: 1; + animation-iteration-count: 1; + -webkit-animation-timing-function: steps(28); + animation-timing-function: steps(28); + background-position: right +} + +@-webkit-keyframes heartBlast { + 0% { + background-position: left + } + 100% { + background-position: right + } +} + +@keyframes heartBlast { + 0% { + background-position: left + } + 100% { + background-position: right + } +} + +.social-main .reward .fa { + color: #aab8c2 +} + +.social-main .reward .reward-qrcode { + background-color: #fff; + box-shadow: 0 0 6px rgba(14, 22, 30, .3); + left: -40px; + top: -15px; + position: absolute; + width: 130px; + height: 0; + max-width: 130px; + z-index: 10; + padding: 5px; + opacity: 0; + pointer-events: none; + -webkit-transition: .4s; + -moz-transition: .4s; + -o-transition: .4s; + -ms-transition: .4s +} + +.social-main .reward:hover .reward-qrcode { + display: block; + opacity: 1; + height: 130px; + top: -145px +} + +#article-share, #article-menu { + position: fixed; + left: 50%; + top: 50%; + transform: translate(0, -50%) +} + +#article-share { + margin-left: -430px; + color: #8590a6; + opacity: 0; + text-align: center; + display: none +} + +#article-share.headroom--pinned { + opacity: 1; + visibility: visible +} + +#article-share.headroom--unpinned { + opacity: 0; + visibility: hidden; + display: none +} + +#article-share .share-item { + cursor: pointer; + width: 48px; + height: 50px; + font-size: 12px; + margin: 18px 0 +} + +#article-share .share-item[data-site="weixin"] { + color: #7dd239 +} + +#article-share .share-item[data-site="weibo"] { + color: #f96e76 +} + +#article-share .share-item[data-site="qq"] { + color: #1e93ec +} + +#article-share .share-item:hover { + color: #8590a6 +} + +#article-share .fa { + font-size: 23px; + display: block; + margin-bottom: 6px +} + +.fancybox-stage .share-qrcode { + max-width: 240px +} + +@media screen and (max-width: 900px) { + #article-share, #article-menu { + display: none + } +} + +#article-menu::-webkit-scrollbar { + height: 6px; + width: 6px +} + +#article-menu::-webkit-scrollbar-track-piece { + background-color: #f5f5f5 +} + +#article-menu::-webkit-scrollbar-thumb { + height: 6px; + width: 6px; + border-radius: 0; + background: #cbcbcb +} + +#article-menu::-webkit-scrollbar-thumb:hover { + background: #909090 +} + +#article-menu { + margin-left: 350px; + overflow: hidden; + overflow-y: hidden; + width: 200px; + max-height: 300px +} + +#article-menu:hover { + overflow-y: auto +} + +#article-menu ul { + margin: 10px; + border-left: 3px #eee solid; + padding-left: 10px; + position: relative; + display: none +} + +#article-menu ul > li { + list-style: none; + padding: 5px 0; + position: relative +} + +#article-menu ul > li > a { + display: block; + word-break: keep-all; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + color: #8590a6 +} + +#article-menu ul > li > a:hover { + color: gray +} + +#article-menu ul > li.active > a { + color: #f44336 +} + +#article-menu ul > li.active:before { + content: ""; + width: 12px; + height: 12px; + border-radius: 100%; + position: absolute; + left: -18px; + background: #9e9e9e; + top: 50%; + transform: translate(0, -50%) +} + +#article-menu ul > li.menu-level-two { + padding-left: 8px; + font-size: .8em +} + +#respond { + margin: 20px 0 +} + +.comment-reply-title { + margin-bottom: 15px +} + +.comment-reply-title span { + border-left: 4px solid #eb5055; + padding-left: 5px; + font-size: 16px; + display: inline-block; + line-height: 30px +} + +#cancel-comment-reply-link { + float: right; + color: #e26f6f; + line-height: 30px +} + +.comment-author-welcome { + margin: 10px 0 +} + +.comment-author-welcome .avatar { + border-radius: 50%; + vertical-align: middle; + margin-right: 10px; + width: 30px; + height: 30px; + user-select: none +} + +.comment-author-welcome .links { + user-select: none; + display: inline-block +} + +#comment-author-info > div { + width: 33.33%; + box-sizing: border-box; + padding-right: 10px; + float: left; + padding-bottom: 10px +} + +#comment-author-info > div:last-child { + padding-right: 0 +} + +#comment-author-info > div > label { + font-size: 12px; + line-height: 20px; + padding-bottom: 3px; + display: block +} + +.comment-form-comment { + margin-bottom: 5px +} + +#comment-tips { + display: none; + margin: 5px 0 +} + +#comment-tips .comment-error { + color: #eb5055 +} + +#comment-tips .comment-success { + color: #4caf50 +} + +.comment-form-tools { + margin-bottom: 10px; + border-bottom: 1px dashed #e5e9ef; + padding-bottom: 2px; + display: none; + user-select: none +} + +.comment-form-tools span { + display: inline-block; + margin-right: 5px; + padding-left: 1px; + cursor: pointer; + height: 25px; + line-height: 25px; + text-align: center; + font-size: 14px; + border-radius: 3px; + color: #848484 +} + +.comment-extra-input { + width: 100%; + max-width: 450px +} + +.comment-extra-input h5 { + font-size: 23px; + font-weight: 100; + text-align: center; + margin: 0 auto 15px; + letter-spacing: .1em +} + +.comment-extra-input form input { + margin-bottom: 8px; + padding: 8px 6px +} + +.comment-extra-input form button { + width: 100%; + height: 33px; + margin-top: 6px +} + +.comment-pic-input .or { + margin: 2px auto 10px; + font-size: 20px; + color: #777575 +} + +.comment-pic-upload { + position: relative +} + +.comment-pic-upload #comment-pic-upload { + position: absolute; + z-index: 1; + cursor: pointer; + opacity: 0 +} + +.comment-pic-upload .comment-pic-upload-btn, .comment-pic-upload #comment-pic-upload { + width: 100%; + background: #dcdada; + margin: 0 auto 20px; + display: block; + height: 80px; + color: #4a4a4a; + border: 3px dashed #888; + -webkit-transition: .2s; + -moz-transition: .2s; + -ms-transition: .2s; + -o-transition: .2s; + transition: .2s +} + +.comment-pic-upload:hover .comment-pic-upload-btn, .comment-pic-upload:hover #comment-pic-upload { + background: #f5f3f3 +} + +.comment-pic-upload.ondrag .comment-pic-upload-btn, .comment-pic-upload.ondrag #comment-pic-upload { + border-color: #000 +} + +.comment-mail-notify { + display: inline-block; + line-height: 29px +} + +.comment-form-vf-code { + display: inline-block +} + +.comment-form-vf-code img { + cursor: pointer; + margin-left: 10px; + margin-top: 3px +} + +.comment-form-vf-code input { + display: inline-block; + width: 60px; + float: left +} + +.comment-form-submit #submit, .comment-form-submit #submit:focus, .comment-form-submit #submit:hover { + border-radius: 2px; + font-size: 12px; + padding: 2px 20px; + line-height: 25px; + width: auto; + float: right +} + +.comment-list, .comment-list ol, .comment-list ul { + list-style: none +} + +.comment-list > li { + padding-top: 20px +} + +.comment-body { + position: relative; + min-height: 55px +} + +.comment-avatar-area { + position: absolute +} + +.comment-avatar-area > .avatar { + width: 48px; + height: 48px; + border-radius: 50%; + border: 0; + vertical-align: middle; + user-select: none +} + +.comment-list > li:after { + content: ""; + display: block; + height: 1px; + background-color: #e5e9ef; + margin-top: 20px +} + +.comment-content-user { + line-height: 18px; + padding-bottom: 4px; + display: block; + word-wrap: break-word +} + +.comment-content-user .comment-auth, .comment-content-user .comment-auth a { + text-decoration: none; + font-size: 12px; + font-weight: 700; + word-wrap: break-word; + color: #6d757a; + cursor: pointer +} + +.comment-content-user .level { + margin-left: 5px; + font-size: 12px; + color: #fff; + background-color: #666; + padding: 0 4px; + border-radius: 2px; + font-size: 12px; + cursor: pointer; + -webkit-transition: .3s; + -moz-transition: .3s; + -o-transition: .3s; + -ms-transition: .3s; + filter: alpha(opacity=50); + -moz-opacity: .5; + -khtml-opacity: .5; + opacity: .5; + line-height: 150%; + display: inline-block; + vertical-align: middle +} + +.comment-content-area:hover .comment-content-user .level { + filter: alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1 +} + +.comment-content-user .level-1 { + background: #348be8 +} + +.comment-content-user .level-2 { + background: #0bf +} + +.comment-content-user .level-3 { + background: #fd8edb +} + +.comment-content-user .level-4 { + background: #673ab7 +} + +.comment-content-user .level-5 { + background: #ffb31e +} + +.comment-content-user .level-6 { + background: #6ec400 +} + +.comment-content-user .level-7 { + background: #fc912d +} + +.comment-content-user .level-8 { + background: #fd5d3c +} + +.comment-content-user .level-9 { + background: #fd5d3c +} + +.comment-content-user .level-admin { + background: #fd5d3c +} + +.comment-content-text { + line-height: 25px; + padding: 2px 0; + font-size: 14px; + text-shadow: none; + overflow: hidden; + word-wrap: break-word; + word-break: break-word +} + +.comment-awaiting-moderation { + color: #eb5055 +} + +.comment-content-info { + margin-top: 4px; + margin-bottom: 8px; + font-size: 13px +} + +.comment-content-info, .comment-content-info a { + color: #99a2aa; + text-decoration: none +} + +.comment-content-info span { + margin-right: 6px +} + +.comment-content-area, .comment.depth-1 > .children, .comment-list > li:after, .comment-list > .comment.depth-1 > #respond { + margin-left: 75px +} + +.comment.depth-1 > .children .comment-body { + margin-top: 20px +} + +.comment.depth-1 > .children .comment-avatar-area > .avatar { + width: 35px; + height: 35px +} + +.comment.depth-1 > .children .comment-content-area { + margin-left: 50px +} + +.comment-at { + color: #eb5055 !important; + border: none !important; + margin-right: 5px +} + +@media screen and (max-width: 750px) { + .comment-content-area, .comment.depth-1 > .children, .comment-list > li:after, .comment-list > .comment.depth-1 > #respond { + margin-left: 65px + } +} + +@media screen and (max-width: 500px) { + .comment.depth-1 > .children, .comment-list > li:after, .comment-list > .comment.depth-1 > #respond { + margin-left: 0 + } + + .comment.depth-1 > .children { + border-left: 3px dotted #f3f3f3; + padding-left: 12px + } + + .comment-at { + display: inline-block + } +} + +.page-navi, .comment-navi, .article-navi { + margin: 0; + padding: 0 10px; + list-style: none; + text-align: center; + margin: 20px 0; + text-shadow: 1px 1px 10px #fff +} + +.page-navi li { + display: inline-block; + color: #5f5f5f; + line-height: 20px +} + +.article-navi a { + border: none !important; + margin: 0 !important +} + +.page-navi li a, .comment-navi .page-numbers, .article-navi span, .article-navi > a > span { + display: inline-block; + font-size: 14px; + padding: 4px 15px 4px; + color: #5f5f5f; + text-decoration: none +} + +.page-navi li.current a, .comment-navi .page-numbers.current, .article-navi span { + color: #eb5055 +} + +@media screen and (max-width: 750px) { + .single .post, .page .page, .comments-area, .width-short { + max-width: none; + width: 100%; + padding-left: 10px; + padding-right: 10px + } + + .entry-content h2 { + margin-left: 15px + } +} + +#site-footer { + font-size: 13px; + margin-top: 10px; + text-align: center; + padding: 12px +} + +#site-footer, #site-footer a { + color: #9a9a9a; + vertical-align: baseline; + text-decoration: none +} + +#site-footer .fa { + margin-left: 5px; + font-size: 20px +} + +@media screen and (max-width: 650px) { + #site-footer span { + display: none + } + + #scroll-to-top.show { + right: 30px + } +} + +#scroll-to-top { + width: 40px; + height: 40px; + line-height: 37px; + text-align: center; + font-size: 18px; + color: #9c9c9c; + position: fixed; + right: 50px; + bottom: 50px; + cursor: pointer; + background-color: #fff; + border-radius: 100%; + box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.43); + opacity: 0; + -webkit-transition: .5s ease all; + -moz-transition: .5s ease all; + -o-transition: .5s ease all; + transition: .5s ease all +} + +#scroll-to-top.show { + opacity: .5 +} + +#scroll-to-top.show:hover { + opacity: 1 +} + +#scroll-to-top.show.headroom--pinned { + bottom: 50px +} + +#scroll-to-top.show.headroom--unpinned { + bottom: -60px; + opacity: 0 +} + +#post-lists, .single .post, .page .page, .comments-area, .width-short { + -webkit-animation: fadeIn .6s linear; + animation: fadeIn .6s linear +} + +@-webkit-keyframes fadeIn { + from { + opacity: 0; + -webkit-transform: translateY(-15px) + } + to { + opacity: 1; + -webkit-transform: translateY(0) + } +} + +@keyframes fadeIn { + from { + opacity: 0; + transform: translateY(-15px) + } + to { + opacity: 1; + transform: translateY(0) + } +} + +.post-item-card .post-item-card-body, .single .post, .single .attachment, .page .page, .comments-area, .width-short, #SOHUCS, #SOHUCS #SOHU_MAIN { + background-color: #fff; + background-color: rgba(255, 255, 255, 0.88) +} + +.entry-content ul.wp-block-gallery { + padding-left: 0 +} + +.wp-block-button .wp-block-button__link { + font-size: 1em; + padding: 5px 15px +} + +.wp-block-latest-comments__comment-excerpt p { + margin: 0 +} + +.blocks-gallery-item img { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none +} + +.prettyprint { + margin-bottom: 1em; + overflow: auto; + overflow-y: hidden +} + +.prettyprint ol.linenums, .prettyprint ol { + padding: 10px 0 10px 20px; + margin-left: 15px +} + +.prettyprint ol > li { + margin: 0; + padding: 0 !important +} + +.prettyprint .pre-title { + padding: 8px 0 0 8px +} + +.prettyprint { + background: #151718; + font-family: Menlo, Bitstream Vera Sans Mono, DejaVu Sans Mono, Monaco, Consolas, monospace; + border: 0 !important +} + +.pln { + color: #e6e9ed +} + +ol.linenums { + margin-top: 0; + margin-bottom: 0; + color: #484646 +} + +li.L0, li.L1, li.L2, li.L3, li.L4, li.L5, li.L6, li.L7, li.L8, li.L9 { + padding-left: 1em; + list-style-type: decimal +} + +@media screen { + .str { + color: #ffce54 + } + + .kwd { + color: #4fc1e9 + } + + .com { + color: #676767 + } + + .typ { + color: #4fc1e9 + } + + .lit { + color: #ac92ec + } + + .pun { + color: #e6e9ed + } + + .opn { + color: #e6e9ed + } + + .clo { + color: #e6e9ed + } + + .tag { + color: #ed5565 + } + + .atn { + color: #a0d468 + } + + .atv { + color: #ffce54 + } + + .dec { + color: #ac92ec + } + + .var { + color: #e6e9ed + } + + .fun { + color: #e6e9ed + } +} + +/* highlight */ +.dp-highlighter { + background: #fff; + border: 1px solid #e8e9e7; + word-break: break-all; + white-space: normal; + overflow: auto; + padding: 2px 5px; + font-size: 13px +} + +.dp-highlighter .bar { + padding: 0 +} + +.dp-highlighter .collapsed .bar, .dp-highlighter .nogutter .bar { + padding-left: 0 +} + +.dp-highlighter ol { + margin: 0 0 1px -10px; + padding: 2px; + color: #666 +} + +.dp-highlighter.nogutter ol { + list-style-type: none +} + +.dp-highlighter ol li, .dp-highlighter .columns div { + border-left: 1px solid #e8e9e7; + padding-left: 10px; + line-height: 2em; + list-style-position: outside; + white-space: nowrap; + margin: 0 0 0 35px +} + +.dp-highlighter.nogutter ol li, .dp-highlighter.nogutter .columns div { + border: 0; + margin: 0 +} + +.dp-highlighter .columns { + color: gray; + width: 100% +} + +.dp-highlighter .columns div { + padding-bottom: 5px +} + +.dp-highlighter ol li span { + color: Black +} + +.dp-highlighter .collapsed ol { + margin: 0 +} + +.dp-highlighter .collapsed ol li { + display: none +} + +.dp-highlighter .printing { + border: 0 +} + +.dp-highlighter .printing .tools { + display: none !important +} + +.dp-highlighter .printing li { + display: list-item !important +} + +.dp-highlighter .tools { + padding: 3px 8px 3px 15px; + border-bottom: 1px solid #2b91af; + color: silver +} + +.dp-highlighter .collapsed .tools { + border-bottom: 0 +} + +.dp-highlighter .tools a { + font-size: 9pt; + color: gray; + text-decoration: none; + margin-right: 10px +} + +.dp-highlighter .tools a:hover { + color: red; + text-decoration: underline +} + +.dp-about { + background-color: #fff; + margin: 0; + padding: 0 +} + +.dp-about table { + width: 100%; + height: 100% +} + +.dp-about td { + padding: 10px; + vertical-align: top +} + +.dp-about .copy { + border-bottom: 1px solid #aca899; + height: 95% +} + +.dp-about .title { + color: red; + font-weight: bold +} + +.dp-about .para { + margin: 0 0 4px 0 +} + +.dp-about .footer { + background-color: #eceadb; + border-top: 1px solid #fff; + text-align: right +} + +.dp-about .close { + background-color: #eceadb; + width: 60px; + height: 22px +} + +.dp-c .comment { + color: green +} + +.dp-c .string { + color: blue +} + +.dp-c .preprocessor { + color: gray +} + +.dp-c .keyword { + color: blue +} + +.dp-c .vars { + color: #d00 +} + +.dp-vb .comment { + color: green +} + +.dp-vb .string { + color: blue +} + +.dp-vb .preprocessor { + color: gray +} + +.dp-vb .keyword { + color: blue +} + +.dp-sql .comment { + color: green +} + +.dp-sql .string { + color: red +} + +.dp-sql .keyword { + color: #7f0055 +} + +.dp-sql .func { + color: #ff1493 +} + +.dp-sql .op { + color: blue +} + +.dp-xml .cdata { + color: #ff1493 +} + +.dp-xml .comments { + color: green +} + +.dp-xml .tag { + font-weight: bold; + color: blue +} + +.dp-xml .tag-name { + color: #7f0055; + font-weight: bold +} + +.dp-xml .attribute { + color: red +} + +.dp-xml .attribute-value { + color: blue +} + +.dp-delphi .comment { + color: #008200; + font-style: italic +} + +.dp-delphi .string { + color: blue +} + +.dp-delphi .number { + color: blue +} + +.dp-delphi .directive { + color: #008284 +} + +.dp-delphi .keyword { + font-weight: bold; + color: navy +} + +.dp-delphi .vars { + color: #000 +} + +.dp-py .comment { + color: green +} + +.dp-py .string { + color: red +} + +.dp-py .docstring { + color: green +} + +.dp-py .keyword { + color: blue; + font-weight: bold +} + +.dp-py .builtins { + color: #ff1493 +} + +.dp-py .magicmethods { + color: #808080 +} + +.dp-py .exceptions { + color: brown +} + +.dp-py .types { + color: brown; + font-style: italic +} + +.dp-py .commonlibs { + color: #8a2be2; + font-style: italic +} + +.dp-rb .comment { + color: #c00 +} + +.dp-rb .string { + color: #f0c +} + +.dp-rb .symbol { + color: #02b902 +} + +.dp-rb .keyword { + color: #069 +} + +.dp-rb .variable { + color: #6cf +} + +.dp-css .comment { + color: green +} + +.dp-css .string { + color: red +} + +.dp-css .keyword { + color: blue +} + +.dp-css .colors { + color: darkred +} + +.dp-css .vars { + color: #d00 +} + +.dp-j .comment { + color: #3f7f5f +} + +.dp-j .string { + color: #2a00ff +} + +.dp-j .keyword { + color: #7f0055; + font-weight: bold +} + +.dp-j .annotation { + color: #646464 +} + +.dp-j .number { + color: #c00000 +} + +.dp-cpp .comment { + color: #e00 +} + +.dp-cpp .string { + color: red +} + +.dp-cpp .preprocessor { + color: #cd00cd; + font-weight: bold +} + +.dp-cpp .keyword { + color: #5697d9; + font-weight: bold +} + +.dp-cpp .datatypes { + color: #2e8b57; + font-weight: bold +} + +.dp-perl .comment { + color: green +} + +.dp-perl .string { + color: red +} + +.dp-perl .keyword { + color: #7f0055 +} + +.dp-perl .func { + color: #ff1493 +} + +.dp-perl .declarations { + color: blue +} + +.dp-css .vars { + color: #d00 +} + +.dp-g .comment { + color: #3f7f5f +} + +.dp-g .string { + color: #2a00ff +} + +.dp-g .keyword { + color: #7f0055; + font-weight: bold +} + +.dp-g .type { + color: #007f00; + font-weight: bold +} + +.dp-g .modifier { + color: #640064; + font-weight: bold +} + +.dp-g .constant { + color: #f00; + font-weight: bold +} + +.dp-g .method { + color: #ff6000; + font-weight: bold +} + +.dp-g .number { + color: #c00000 +} + +.dp-html .cdata { + color: #ff1493 +} + +.dp-html .comments { + color: #236e25 +} + +.dp-html .tag { + color: #bcacba +} + +.dp-html .tag-name { + color: #881280 +} + +.dp-html .attribute { + color: #ab652d +} + +.dp-html .attribute-value { + color: #1a1aa6 +} + +.comment-list .dp-highlighter { + background: #fff; + margin-top: 5px; + border: 1px solid #e8e9e7 +} + +.comment-list .dp-highlighter li { + margin: 0; + padding: 0 5px; + border: 0 +} + +.comment-list .dp-highlighter ol { + margin: 0 +} + +/* emoji */ +.emoji_btn { + position: absolute; + display: inline-block; + cursor: pointer; + width: 25px; + height: 25px +} + +.emoji_container * { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box +} + +.emoji_container { + display: none; + max-width: 544px; + position: absolute; + background-color: #fff; + border: 1px solid #bfbfbf; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.176) +} + +.emoji_container ul { + list-style: none; + padding-left: 0; + margin: 0 +} + +.emoji_content { + height: 277px; + overflow-y: auto; + padding: 5px +} + +.emoji_content ul { + padding-top: 1px; + padding-left: 1px +} + +.emoji_content ul li { + width: 54px; + height: 54px; + float: left; + border: 1px solid #e3e3e3; + margin-top: -1px; + margin-left: -1px; + margin-right: 0; + margin-bottom: 0 +} + +.emoji_content ul li a { + display: block; + line-height: 54px; + text-align: center; + cursor: pointer +} + +.emoji_content ul li a img { + vertical-align: middle; + max-width: 52px; + max-height: 52px +} + +.emoji_content .mCSB_scrollTools { + width: 10px +} + +.emoji_content .mCSB_outside + .mCS-minimal-dark.mCSB_scrollTools_vertical, .emoji_content .mCSB_outside + .mCS-minimal.mCSB_scrollTools_vertical { + margin: 5px 0 +} + +.emoji_tab { + background-color: #f7f7f7; + border-top: 1px solid #e3e3e3; + color: #666; + height: 32px; + position: relative +} + +.emoji_tab_prev { + border-top: 4px solid transparent; + border-bottom: 4px solid transparent; + border-right: 4px dashed; + cursor: pointer; + left: 8px; + top: 12px; + position: absolute; + display: inline-block; + height: 0; + vertical-align: middle; + width: 0 +} + +.emoji_tab_next { + border-top: 4px solid transparent; + border-bottom: 4px solid transparent; + border-left: 4px dashed; + cursor: pointer; + right: 7px; + top: 12px; + position: absolute; + display: inline-block; + height: 0; + vertical-align: middle; + width: 0 +} + +.emoji_tab_list { + left: 22px; + overflow: hidden; + position: absolute; + top: 0; + width: 500px +} + +.emoji_tab_list ul { + width: 1500px; + transition: all .8s ease 0s +} + +.emoji_tab_list ul li { + border-top: 0 none; + cursor: pointer; + float: left; + height: 22px; + line-height: 22px; + margin: 5px 4px 0 0; + font-size: 12px; + border-radius: 3px; + text-align: center; + width: 68px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis +} + +.emoji_tab_list ul li:hover { + background: #e5e5e5 +} + +.emoji_tab_list ul li.selected { + color: #fff; + background: steelblue +} + +.emoji_preview { + position: absolute; + top: 0; + border: 1px solid #c8c8c8; + border-radius: 50%; + width: 65px; + height: 65px; + background: #fff; + text-align: center; + line-height: 65px; + box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.176); + z-index: 2; + display: none +} + +.emoji_preview img { + vertical-align: middle; + max-width: 42px; + max-height: 42px +} + +.emoji_tab_next, .emoji_tab_prev { + display: none +} + +.emoji_tab_list { + left: 8px +} + +.emoji_tab_list ul li { + width: auto; + padding: 0 15px; + -khtml-user-select: none; + -moz-user-select: none; + user-select: none; + -webkit-transition: .2s; + -moz-transition: .2s; + -o-transition: .2s; + -ms-transition: .2s; + transition: .2s +} + +.emoji_content ul li { + display: inline-block; + float: none +} + +.emoji_content ul li a img { + max-height: 35px +} + +.emoji_container { + margin-right: 10px; + max-width: 520px +} + +.emoji_preview { + pointer-events: none +} diff --git a/html/about.html b/html/about.html new file mode 100644 index 0000000..122d0c9 --- /dev/null +++ b/html/about.html @@ -0,0 +1,79 @@ + + +
+ +因为一个人,爱上一座城。
+毕业之后,因为一个故事来到了帝都。
+博铭:三十功名尘与土,八千里路云和月
可通过如下方式联系到我
+QQ:876784235
+Email:zengzhiwei_hfut@163.com
+Github:zengzhiwei12138 +
+Gitee:zzwazj
+本站建于2018年9月,主要记录技术分享,交流,生活心得,吐槽等...
+本站所用技术
+前端:art-template html5&css3 es6 wow tagCould esc
+后端:springmvc spring mybatis dubbo esc
+数据库:mariadb
原创优先技术优先经常宕机不合法规插边球站红标报毒
+本站信息如下:
+名称:AZJ
+ +图标:https://wx3.sinaimg.cn/small/007aGNoFly1fvysv6bn70g305k05k3yy.gif
+描述:AZJ @ 二人世界
+注意:本站开放自主填写友情链接权限,如自主添加后,请自觉将本站加为友联,本站会不定时清理违规友联
网名:AZJ
+职业:Java后端攻城狮
+籍贯:河南-信阳
+邮箱:876784235@qq.com
三十功名尘与土,八千里路云和月
我也是有底线的!
"; + +let pageNum = 1; +let articleRender = template.compile(article); +let exist = false; + +//定义分类,标签,搜索 +let is_classify_id = 0; +let is_search_keywords = ""; +let is_label_id = ""; + +$(function () { + getPageArticle(pageNum); + let classifyRender = template.compile(classify); + $.ajax({ + url: '/classify/getClassify.action', + type: 'POST', + success: function (res) { + let classifyData = { + classifyList: res.data + }; + let classifyHtml = classifyRender(classifyData); + $('#classify').html(classifyHtml); + //分类的点击事件 + $('#classify>li').each(function () { + $(this).click(function () { + let classifyId = $(this).attr('name'); + + getArticleByClassify(classifyId); + }); + }); + } + }); + + let hotArticleRender = template.compile(hot_article); + $.ajax({ + url: '/article/hotArticle.action', + type: 'POST', + success: function (res) { + let hotArticleData = { + hotArticleList: res.data + }; + let hotArticleHtml = hotArticleRender(hotArticleData); + $('#hot_article').html(hotArticleHtml); + } + }); + + $.ajax({ + url: '/article/topArticle.action', + type: 'POST', + success: function (res) { + let topArticleData = { + hotArticleList: res.data + }; + let topArticleHtml = hotArticleRender(topArticleData); + $('#top_article').html(topArticleHtml); + } + }); + + let labelRender = template.compile(label); + $.ajax({ + url: '/label/getLabel.action', + type: 'POST', + success: function (res) { + let labelData = { + labelList: res.data + }; + let labelHtml = labelRender(labelData); + $('#tag_cloud_widget').html(labelHtml); + tagCloud(); + $('#tag_cloud_widget>span').each(function () { + $(this).click(function () { + // 清楚分类和搜索的标记 + is_classify_id = 0; + is_search_keywords = ""; + pageNum = 1; + exist = false; + // 获取labelId + let labelId = $(this).attr('name'); + is_label_id = labelId; + getPageArticle(pageNum); + $('body,html').animate({scrollTop: 0}, 300); + }); + }); + } + }); + + if (document.body.offsetWidth <= 500) { + $('.left1').click(function () { + let hot_article = $("li[name='hot_article']"); + let article_label = $("li[name='article_label']"); + let classify = $('#classifyBox'); + if ($('.left1').text() == '<') { + $('#overLay').removeAttr('hidden'); + $('.left1').text('>'); + if (article_label.hasClass('label_mobile_open')) { + article_label.removeAttr('style'); + article_label.removeClass('fadeInUp'); + article_label.addClass('fadeOutDown'); + $('.left2').text('<'); + } + if (classify.hasClass('classify_mobile_open')) { + classify.removeAttr('style'); + classify.removeClass('bounceInDown'); + classify.addClass('bounceOutDown'); + } + if (hot_article.hasClass('hot_mobile_open')) { + hot_article.removeAttr('style'); + hot_article.addClass('fadeInRight'); + hot_article.removeClass('fadeOutRight'); + } else { + hot_article.addClass('hot_mobile_open'); + hot_article.removeClass('mobile_close'); + } + } else { + hot_article.removeAttr('style'); + hot_article.removeClass('fadeInRight'); + hot_article.addClass('fadeOutRight'); + $('#overLay').attr('hidden', 'hidden'); + $('.left1').text('<'); + } + + $('#overLay').click(function () { + hot_article.removeAttr('style'); + hot_article.removeClass('fadeInRight'); + hot_article.addClass('fadeOutRight'); + $('#overLay').attr('hidden', 'hidden'); + $('.left1').text('<'); + }); + }); + + $('.left2').click(function () { + let hot_article = $("li[name='hot_article']"); + let article_label = $("li[name='article_label']"); + let classify = $('#classifyBox'); + if (hot_article.hasClass('hot_mobile_open')) { + hot_article.removeAttr('style'); + hot_article.removeClass('fadeInRight'); + hot_article.addClass('fadeOutRight'); + $('.left1').text('<'); + } + if (classify.hasClass('classify_mobile_open')) { + classify.removeAttr('style'); + classify.removeClass('bounceInDown'); + classify.addClass('bounceOutDown'); + } + if ($('.left2').text() == '<') { + $('#overLay').removeAttr('hidden'); + $('.left2').text('>'); + if (article_label.hasClass('label_mobile_open')) { + article_label.removeAttr('style'); + article_label.addClass('fadeInUp'); + article_label.removeClass('fadeOutDown'); + } else { + article_label.addClass('label_mobile_open'); + article_label.removeClass('mobile_close'); + } + } else { + article_label.removeAttr('style'); + article_label.removeClass('fadeInUp'); + article_label.addClass('fadeOutDown'); + $('#overLay').attr('hidden', 'hidden'); + $('.left2').text('<'); + } + + $('#overLay').click(function () { + article_label.removeAttr('style'); + article_label.removeClass('fadeInUp'); + article_label.addClass('fadeOutDown'); + $('#overLay').attr('hidden', 'hidden'); + $('.left2').text('<'); + }); + }); + + $('.top1').click(function () { + let hot_article = $("li[name='hot_article']"); + let article_label = $("li[name='article_label']"); + let classify = $('#classifyBox'); + if (hot_article.hasClass('hot_mobile_open')) { + hot_article.removeAttr('style'); + hot_article.removeClass('fadeInRight'); + hot_article.addClass('fadeOutRight'); + $('.left1').text('<'); + } + if (article_label.hasClass('label_mobile_open')) { + article_label.removeAttr('style'); + article_label.removeClass('fadeInUp'); + article_label.addClass('fadeOutDown'); + $('.left2').text('<'); + } + $('#overLay').removeAttr('hidden'); + if (classify.hasClass('classify_mobile_open')) { + if (classify.hasClass('bounceInDown')) { + classify.removeAttr('style'); + classify.removeClass('bounceInDown'); + classify.addClass('bounceOutDown'); + $('#overLay').attr('hidden', 'hidden'); + } else { + classify.removeAttr('style'); + classify.addClass('bounceInDown'); + classify.removeClass('bounceOutDown'); + } + } else { + classify.removeAttr('style'); + classify.removeClass('flipInY'); + classify.addClass('bounceInDown'); + classify.addClass('classify_mobile_open'); + classify.removeClass('mobile_close'); + } + $('#overLay').click(function () { + classify.removeAttr('style'); + classify.removeClass('bounceInDown'); + classify.addClass('bounceOutDown'); + $('#overLay').attr('hidden', 'hidden'); + }); + }); + } + + $('#allClassify').click(function () { + is_search_keywords = ""; + is_classify_id = 0; + is_label_id = ""; + exist = false; + pageNum = 1; + getPageArticle(pageNum); + $('body,html').animate({scrollTop: 0}, 300); + }); + + $(".searchBox>input[type='text']").click(function () { + $(document).keyup(function (event) { + if (event.keyCode == 13) { + searchArticle(); + } + }); + }); + + $('.searchBox>i').click(function () { + searchArticle(); + }); + +}); + +function searchArticle() { + is_label_id = ""; + is_classify_id = 0; + pageNum = 1; + exist = false; + is_search_keywords = $(".searchBox>input[type='text']").val(); + if (is_search_keywords == "") { + swal("请输入查询关键字!", { + button: false, + timer: 2000 + }); + } + getPageArticle(pageNum); + $('body,html').animate({scrollTop: 0}, 300); +} + +function getArticleByClassify(classifyId) { + // 清空标签和搜索的分页条件 + is_search_keywords = ""; + is_label_id = ""; + exist = false; + pageNum = 1; + is_classify_id = classifyId; + getPageArticle(pageNum); + $('body,html').animate({scrollTop: 0}, 300); +} + +//获取滚动条当前的位置 +function getScrollTop() { + let scrollTop = 0; + if (document.documentElement && document.documentElement.scrollTop) { + scrollTop = document.documentElement.scrollTop; + } else if (document.body) { + scrollTop = document.body.scrollTop; + } + return scrollTop; +} + +//获取当前可视范围的高度 +function getClientHeight() { + let clientHeight = 0; + if (document.body.clientHeight && document.documentElement.clientHeight) { + clientHeight = Math.min(document.body.clientHeight, document.documentElement.clientHeight); + } else { + clientHeight = Math.max(document.body.clientHeight, document.documentElement.clientHeight); + } + return clientHeight; +} + +//获取文档完整的高度 +function getScrollHeight() { + return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); +} + +//滚动事件触发 +window.onscroll = function () { + if (getScrollTop() + getClientHeight() > getScrollHeight() - 110) { + pageNum++; + getPageArticle(pageNum); + } +}; + +function getPageArticle(pageNum) { + if (!exist) { + $.ajax({ + url: '/article/getPageArticle.action', + data: { + pageNum: pageNum, + labelId: is_label_id, + classifyId: is_classify_id, + keywords: is_search_keywords + }, + type: 'POST', + success: function (res) { + if (document.body.offsetWidth <= 500){ + let hot_article = $("li[name='hot_article']"); + let article_label = $("li[name='article_label']"); + let classify = $('#classifyBox'); + if (article_label.hasClass('label_mobile_open')) { + article_label.removeAttr('style'); + article_label.removeClass('fadeInUp'); + article_label.addClass('fadeOutDown'); + $('.left2').text('<'); + } + if (classify.hasClass('classify_mobile_open')) { + classify.removeAttr('style'); + classify.removeClass('bounceInDown'); + classify.addClass('bounceOutDown'); + } + if (hot_article.hasClass('hot_mobile_open')) { + hot_article.removeAttr('style'); + hot_article.removeClass('fadeInRight'); + hot_article.addClass('fadeOutRight'); + $('.left1').text('<'); + } + $('#overLay').attr('hidden', 'hidden'); + } + if (res.data.length > 0) { + var articleData = { + articleList: res.data + }; + let articleHtml = articleRender(articleData); + if (pageNum == 1) { + $('#blog_content').html(articleHtml); + } else { + $('#blog_content').append(articleHtml); + } + $('.article_classify').each(function () { + $(this).click(function () { + let classifyId = $(this).attr('name'); + getArticleByClassify(classifyId); + }); + }); + if (res.data.length < 20){ + $('#blog_content').append(line); + exist = true; + } + } else { + if (pageNum == 1) { + $('#blog_content').html(line); + exist = true; + } else if (!exist) { + $('#blog_content').append(line); + exist = true; + } + } + } + }); + } +} diff --git a/js/base.js b/js/base.js new file mode 100644 index 0000000..55208b3 --- /dev/null +++ b/js/base.js @@ -0,0 +1,135 @@ +// 富文本编辑器表情管理 +const emoji = []; +const toot = []; +const cute = []; +const mogutou = []; + +getImg(emoji,"emoji",96); +getImg(toot,"toot",16); +getImg(cute,'cute',8); +getImg(mogutou,'mogutou',15); + +function getImg(arr,name,max) { + if (max < 10){ + for(let i = 1; i< max; i++){ + arr.push({alt:"0"+i,src:"https://www.zzwazj.online/images/emoticon/"+name+"/0"+i+".gif"}); + } + }else { + for(let i = 1; i < 10; i++){ + arr.push({alt:"0"+i,src:"https://www.zzwazj.online/images/emoticon/"+name+"/0"+i+".gif"}); + } + for (let j = 10; j <= max; j++){ + arr.push({alt:j,src:"https://www.zzwazj.online/images/emoticon/"+name+"/"+j+".gif"}); + } + } +} + +$(function () { + console.log("如果你喜欢本站模板,欢迎发邮件给876784235@qq.com,免费分享本站静态模板哦~"); + console.log("欢迎加群进行学习交流哦~"); + // 刷新回到顶部 防止wow.js的动画失效 + $('body,html').animate({scrollTop: 0},700); + // 初始化wow + new WOW().init(); + + // 鼠标点击事件 + var i = 0; + $('html').click(function (element) { + let arr = ["富强","民主","文明","和谐","自由","平等","公正","法治","爱国","敬业","诚信","友善"]; + let dom = $("").text(arr[i]); + i = (i+1) % arr.length; + let x = element.pageX; + let y = element.pageY; + dom.css({ + "z-index": 99999, + "top": y - 20, + "left": x, + "position": "absolute", + "font-weight": "bold", + "color": "#ff6651" + }); + $('body').append(dom); + dom.animate({ + "top": y-180, + "opacity":0 + },1500,function () { + dom.remove(); + }); + }); + // toTop事件 + $('#toTop').click(function () { + $('html,body').animate({scrollTop:0},500); + }); + + // 上一次滚轮的位置 + var last_position = 0; + // 监听滚轮事件 + $(window).scroll(function () { + let offset = 500; + let pageY = $(window).scrollTop(); + pageY > offset ? $('#toTop').removeAttr('hidden') : $('#toTop').attr('hidden','hidden'); + if (document.body.offsetWidth > 500){ + if (pageY > 1000){ + $("#classifyBox").removeAttr('style'); + $("#classifyBox").addClass('box_bounceInDown_fixed'); + }else { + $("#classifyBox").removeClass('box_bounceInDown_fixed'); + } + if (pageY>700){ + $('.about_me').removeAttr('style'); + $('.about_me').addClass('box_bounceInDown_fixed'); + }else { + $('.about_me').removeClass('box_bounceInDown_fixed'); + } + if (pageY>600){ + $('#message_search').removeAttr('hidden','hidden'); + $("#message_search").removeAttr('style'); + $("#message_search").addClass('box_bounceInUp_fixed'); + }else{ + $('#message_search').attr('hidden','hidden'); + $("#message_search").removeClass('box_bounceInUp_fixed'); + } + } + // 获取当前位置 + let position = window.scrollY; + if(position - last_position > 0) { + let menuId = $('#menu'); + let nav = $('#nav'); + if (menuId.hasClass("menu_open")) { + nav.removeClass('bounceInRight'); + nav.removeAttr('style'); + nav.addClass('bounceOutRight'); + menuId.removeClass('menu_open'); + menuId.addClass('menu_close'); + } + } + last_position = position; + }); +}); + + + +function getEditorConfig(editor) { + editor.customConfig.emotions = [ + { + title: '默认', + type: 'image', + content: emoji + }, + { + title: '蒙嘟嘟', + type: 'image', + content: toot + }, + { + title: '乖巧宝宝', + type: 'image', + content: cute + }, + { + title: '骚气蘑菇头', + type: 'image', + content: mogutou + } + ]; +} \ No newline at end of file diff --git a/js/detail.js b/js/detail.js new file mode 100644 index 0000000..a5c4267 --- /dev/null +++ b/js/detail.js @@ -0,0 +1,671 @@ +let detail = `+ {{each labelList label index}} + ${{label.labelName}} + {{/each}} +
+微信打赏
+ +支付宝打赏
+ +手机版可截图扫描相册二维码打赏
+{{comment.commentTime}}回复
+ +{{reply.replyTime}}回复
+ +{{reply.replyTime}}回复
+ +{{comment.commentTime}}回复
") != -1) { + pageFun.highLight(); + } + $('html,body').animate({ + scrollTop: $('#commentBox').offset().top + }, 200); + }, + error : function () { + pageFun.showCommentMsg('error','评论发布失败,请联系站长!',true , true); + } + }) + } + }) +}); + +function replyClick() { + $('.reply').each(function () { + $(this).unbind('click'); + $(this).click(function () { + let text = $(this).text(); + let commentId = ""; + let replyId = ""; + // 判断是否是评论还是回复 + if ($(this).parent().parent().hasClass('comment')) { + // 是要回复评论 + commentId = $(this).attr('name'); + } else { + commentId = $(this).parent().parent().parent().parent().attr('name'); + replyId = $(this).attr('name'); + } + let commentName = $(this).parent().prev().prev().text(); + if (text == '回复') { + $(this).text('取消回复'); + let num = $('.reply_comment').length; + if (num > 0) { + $('.reply_comment').parent().prev().find('.reply').text('回复'); + $('.reply_comment').parent().html(""); + } + $(this).parent().next().html(replyHtml); + reply_editor.create(); + $('#replyName').focus(function () { + pageFun.showCommentMsg('success','新功能:在昵称框输入qq号可快速获取昵称,邮箱和头像!',true , false); + }); + $('#replyName').blur(function () { + let qq = $('#replyName').val(); + if (/^[1-9]\d{4,12}$/.test(qq)) { + $.ajax({ + url: 'https://users.qzone.qq.com/fcg-bin/cgi_get_portrait.fcg?uins=' + qq, + dataType: "jsonp", + jsonpCallback: "portraitCallBack", + scriptCharset: "gbk", + beforeSend: function () { + $('#replyName').val(''); + $('#replyName').attr('placeholder', '获取中...') + }, + success: function (res) { + if (res[qq] && res[qq][6]) { + $('#replyName').val(res[qq][6]); + $('#replyEmail').val(qq + '@qq.com'); + $('#replyName').removeAttr('placeholder'); + $('#replyHeadImage').attr('src','https://q1.qlogo.cn/g?b=qq&nk='+qq+'&s=100'); + }else { + pageFun.showCommentMsg('error', 'QQ信息获取失败!', true , false); + $('#replyName').val(qq); + } + } + }); + } + }); + $('#replyHeadImage').click(function () { + $('.headImg').removeAttr('hidden'); + replyOrComment = 'reply' + }); + $('.reply_commit').click(function () { + let replyHeadImage = $('#replyHeadImage').attr('src'); + let reply = $('#reply_text>div'); + let replyHtml = reply.html(); + // 验证表单内容 主要验证邮箱和评论不能为空 + if (validateForm($('#replyName').val(), $('#replyEmail').val(), replyHtml , false)) { + $("input[name='replyId']").val(replyId); + $("#reply_form input[name='commentName']").val(commentName); + $("input[name='replyHeadImage']").val(replyHeadImage); + $("textarea[name='replyComment']").val(replyHtml); + $("input[name='commentId']").val(commentId); + $("#reply_form input[name='articleId']").val(articleId); + // 获取本文章的浏览量 + let commentNum = $('.detail_info>span:last-child').text(); + $("#reply_form input[name='commentNum']").val(commentNum); + $.ajax({ + url: '/article/addReply.action', + data: $('#reply_form').serialize(), + type: 'POST', + beforeSend : function(res){ + pageFun.showCommentMsg('wait','让回复飞一会儿~',false , false); + }, + success: function (res) { + if (res.status == 200) { + let replyContentRender = template.compile(replyContent); + let replyContentData = { + reply: res.data, + }; + let replyContentHtml = replyContentRender(replyContentData); + // 情况reply form的数据 + $('#replyHeadImage').attr('src','https://wx1.sinaimg.cn/square/007aGNoFly1fvys0zjwv7j301o01o0si.jpg'); + $('#replyName').val(""); + $('#replyEmail').val(""); + $('#email_reply').prop('checked', false); + reply.html(""); + pageFun.showCommentMsg('success','回复发布成功!',true , false); + // 隐藏回复框 + $('.reply_comment').parent().prev().find('.reply').text('回复'); + $('.reply_comment').parent().html(""); + // 更新文章评论量 + $('.detail_info>span:last-child').text(res.data.commentNum); + let dom = $("li[name=" + commentId + "]"); + $('html,body').animate({ + scrollTop: dom.innerHeight() + dom.offset().top - 200 + }, 200); + dom.append(replyContentHtml); + if (replyContentHtml.indexOf("") != -1) { + pageFun.highLight(); + } + replyClick(); + } + }, + error : function () { + pageFun.showCommentMsg('success','回复发布失败,请联系站长!',true , false); + } + }) + } + ; + }) + } else { + $(this).text('回复'); + $(this).parent().next().html(""); + } + }) + }) +} + +function getScrollTop() { + let scrollTop = 0; + if (document.documentElement && document.documentElement.scrollTop) { + scrollTop = document.documentElement.scrollTop + } else if (document.body) { + scrollTop = document.body.scrollTop + } + return scrollTop; +} + +function getClientHeight() { + let clientHeight = 0; + if (document.body.clientHeight && document.documentElement.clientHeight) { + clientHeight = Math.min(document.body.clientHeight, document.documentElement.clientHeight) + } else { + clientHeight = Math.max(document.body.clientHeight, document.documentElement.clientHeight) + } + return clientHeight; +} + +function getScrollHeight() { + return Math.max(document.body.scrollHeight, document.documentElement.scrollHeight); +} + +window.onscroll = function () { + if (getScrollTop() + getClientHeight() > getScrollHeight() - 110) { + pageNum++; + getPageComment(pageNum, articleId); + } +}; + +function getPageComment(pageNum, articleId) { + if (!exist) { + $.ajax({ + url: '/article/detail.action', + type: 'POST', + data: { + pageNum: pageNum, + articleId: articleId + }, + success: function (res) { + if (pageNum == 1) { + let detailData = { + article: res.data.article, + labelList: res.data.labelList + }; + let detailHtml = detailRender(detailData); + $('#detail').html(detailHtml); + var menu = ""; + // 右边导航栏 + $('.detail_content h2 , .detail_content h3').each(function (index) { + // 获取标题文本 + let text = $(this).text(); + text = text.replace('$',''); + $(this).attr('id',"title"+index); + menu += $(this).prop('tagName') == 'H2' ? "
设置标题
'), + type: 'list', // droplist 以列表形式展示 + list: [{$elem: $('正文
'), value: ''}], + onClick: function onClick(value) { + // 注意 this 是指向当前的 Head 对象 + _this._command(value); + } + }); + } + +// 原型 + Head.prototype = { + constructor: Head, + + // 执行命令 + _command: function _command(value) { + var editor = this.editor; + + var $selectionElem = editor.selection.getSelectionContainerElem(); + if (editor.$textElem.equal($selectionElem)) { + // 不能选中多行来设置标题,否则会出现问题 + // 例如选中的是
xxx
yyy
来设置标题,设置之后会成为字号
'), + type: 'list', // droplist 以列表形式展示 + list: [{ + $elem: $('x-small'), + value: '1' + }, {$elem: $('small'), value: '2'}, { + $elem: $('normal'), + value: '3' + }, { + $elem: $('large'), + value: '4' + }, { + $elem: $('x-large'), + value: '5' + }, {$elem: $('xx-large'), value: '6'}], + onClick: function onClick(value) { + // 注意 this 是指向当前的 FontSize 对象 + _this._command(value); + } + }); + } + +// 原型 + FontSize.prototype = { + constructor: FontSize, + + // 执行命令 + _command: function _command(value) { + var editor = this.editor; + editor.cmd.do('fontSize', value); + } + }; + + /* + menu - fontName +*/ + +// 构造函数 + function FontName(editor) { + var _this = this; + + this.editor = editor; + this.$elem = $(' '); + this.type = 'droplist'; + + // 当前是否 active 状态 + this._active = false; + + // 获取配置的字体 + var config = editor.config; + var fontNames = config.fontNames || []; + + // 初始化 droplist + this.droplist = new DropList(this, { + width: 100, + $title: $('字体
'), + type: 'list', // droplist 以列表形式展示 + list: fontNames.map(function (fontName) { + return { + $elem: $('' + fontName + ''), + value: fontName + }; + }), + onClick: function onClick(value) { + // 注意 this 是指向当前的 FontName 对象 + _this._command(value); + } + }); + } + +// 原型 + FontName.prototype = { + constructor: FontName, + + _command: function _command(value) { + var editor = this.editor; + editor.cmd.do('fontName', value); + } + }; + + /* + panel +*/ + + var emptyFn = function emptyFn() { + }; + +// 记录已经显示 panel 的菜单 + var _isCreatedPanelMenus = []; + +// 构造函数 + function Panel(menu, opt) { + this.menu = menu; + this.opt = opt; + } + +// 原型 + Panel.prototype = { + constructor: Panel, + + // 显示(插入DOM) + show: function show() { + var _this = this; + + var menu = this.menu; + if (_isCreatedPanelMenus.indexOf(menu) >= 0) { + // 该菜单已经创建了 panel 不能再创建 + return; + } + + var editor = menu.editor; + var $body = $('body'); + var $textContainerElem = editor.$textContainerElem; + var opt = this.opt; + + // panel 的容器 + var $container = $(''); + var width = opt.width || 300; // 默认 300px + $container.css('width', width + 'px').css('margin-left', (0 - width) / 2 + 'px'); + + // 添加关闭按钮 + var $closeBtn = $(''); + $container.append($closeBtn); + $closeBtn.on('click', function () { + _this.hide(); + }); + + // 准备 tabs 容器 + var $tabTitleContainer = $('设置列表
'), + type: 'list', // droplist 以列表形式展示 + list: [{ + $elem: $(' 有序列表'), + value: 'insertOrderedList' + }, {$elem: $(' 无序列表'), value: 'insertUnorderedList'}], + onClick: function onClick(value) { + // 注意 this 是指向当前的 List 对象 + _this._command(value); + } + }); + } + +// 原型 + List.prototype = { + constructor: List, + + // 执行命令 + _command: function _command(value) { + var editor = this.editor; + var $textElem = editor.$textElem; + editor.selection.restoreSelection(); + if (editor.cmd.queryCommandState(value)) { + return; + } + editor.cmd.do(value); + + // 验证列表是否被包裹在之内 + var $selectionElem = editor.selection.getSelectionContainerElem(); + if ($selectionElem.getNodeName() === 'LI') { + $selectionElem = $selectionElem.parent(); + } + if (/^ol|ul$/i.test($selectionElem.getNodeName()) === false) { + return; + } + if ($selectionElem.equal($textElem)) { + // 证明是顶级标签,没有被
包裹 + return; + } + var $parent = $selectionElem.parent(); + if ($parent.equal($textElem)) { + // $parent 是顶级标签,不能删除 + return; + } + + $selectionElem.insertAfter($parent); + $parent.remove(); + }, + + // 试图改变 active 状态 + tryChangeActive: function tryChangeActive(e) { + var editor = this.editor; + var $elem = this.$elem; + if (editor.cmd.queryCommandState('insertUnOrderedList') || editor.cmd.queryCommandState('insertOrderedList')) { + this._active = true; + $elem.addClass('w-e-active'); + } else { + this._active = false; + $elem.removeClass('w-e-active'); + } + } + }; + + /* + menu - justify +*/ + +// 构造函数 + function Justify(editor) { + var _this = this; + + this.editor = editor; + this.$elem = $('
'); + this.type = 'droplist'; + + // 当前是否 active 状态 + this._active = false; + + // 初始化 droplist + this.droplist = new DropList(this, { + width: 100, + $title: $('对齐方式
'), + type: 'list', // droplist 以列表形式展示 + list: [{ + $elem: $(' 靠左'), + value: 'justifyLeft' + }, { + $elem: $(' 居中'), + value: 'justifyCenter' + }, {$elem: $(' 靠右'), value: 'justifyRight'}], + onClick: function onClick(value) { + // 注意 this 是指向当前的 List 对象 + _this._command(value); + } + }); + } + +// 原型 + Justify.prototype = { + constructor: Justify, + + // 执行命令 + _command: function _command(value) { + var editor = this.editor; + editor.cmd.do(value); + } + }; + + /* + menu - Forecolor +*/ + +// 构造函数 + function ForeColor(editor) { + var _this = this; + + this.editor = editor; + this.$elem = $(' '); + this.type = 'droplist'; + + // 获取配置的颜色 + var config = editor.config; + var colors = config.colors || []; + + // 当前是否 active 状态 + this._active = false; + + // 初始化 droplist + this.droplist = new DropList(this, { + width: 120, + $title: $('文字颜色
'), + type: 'inline-block', // droplist 内容以 block 形式展示 + list: colors.map(function (color) { + return {$elem: $(''), value: color}; + }), + onClick: function onClick(value) { + // 注意 this 是指向当前的 ForeColor 对象 + _this._command(value); + } + }); + } + +// 原型 + ForeColor.prototype = { + constructor: ForeColor, + + // 执行命令 + _command: function _command(value) { + var editor = this.editor; + editor.cmd.do('foreColor', value); + } + }; + + /* + menu - BackColor +*/ + +// 构造函数 + function BackColor(editor) { + var _this = this; + + this.editor = editor; + this.$elem = $(' '); + this.type = 'droplist'; + + // 获取配置的颜色 + var config = editor.config; + var colors = config.colors || []; + + // 当前是否 active 状态 + this._active = false; + + // 初始化 droplist + this.droplist = new DropList(this, { + width: 120, + $title: $('背景色
'), + type: 'inline-block', // droplist 内容以 block 形式展示 + list: colors.map(function (color) { + return {$elem: $(''), value: color}; + }), + onClick: function onClick(value) { + // 注意 this 是指向当前的 BackColor 对象 + _this._command(value); + } + }); + } + +// 原型 + BackColor.prototype = { + constructor: BackColor, + + // 执行命令 + _command: function _command(value) { + var editor = this.editor; + editor.cmd.do('backColor', value); + } + }; + + /* + menu - quote +*/ + +// 构造函数 + function Quote(editor) { + this.editor = editor; + this.$elem = $(' '); + this.type = 'click'; + + // 当前是否 active 状态 + this._active = false; + } + +// 原型 + Quote.prototype = { + constructor: Quote, + + onClick: function onClick(e) { + var editor = this.editor; + var $selectionElem = editor.selection.getSelectionContainerElem(); + var nodeName = $selectionElem.getNodeName(); + + if (!UA.isIE()) { + if (nodeName === 'BLOCKQUOTE') { + // 撤销 quote + editor.cmd.do('formatBlock', ''); + } else { + // 转换为 quote + editor.cmd.do('formatBlock', '
'); + } + return; + } + + // IE 中不支持 formatBlock,要用其他方式兼容 + var content = void 0, + $targetELem = void 0; + if (nodeName === 'P') { + // 将 P 转换为 quote + content = $selectionElem.text(); + $targetELem = $('' + content + ''); + $targetELem.insertAfter($selectionElem); + $selectionElem.remove(); + return; + } + if (nodeName === 'BLOCKQUOTE') { + // 撤销 quote + content = $selectionElem.text(); + $targetELem = $('' + content + '
'); + $targetELem.insertAfter($selectionElem); + $selectionElem.remove(); + } + }, + + tryChangeActive: function tryChangeActive(e) { + var editor = this.editor; + var $elem = this.$elem; + var reg = /^BLOCKQUOTE$/i; + var cmdValue = editor.cmd.queryCommandValue('formatBlock'); + if (reg.test(cmdValue)) { + this._active = true; + $elem.addClass('w-e-active'); + } else { + this._active = false; + $elem.removeClass('w-e-active'); + } + } + }; + + /* + menu - code +*/ + +// 构造函数 + function Code(editor) { + this.editor = editor; + this.$elem = $(' '); + this.type = 'panel'; + + // 当前是否 active 状态 + this._active = false; + } + +// 原型 + Code.prototype = { + constructor: Code, + + onClick: function onClick(e) { + var editor = this.editor; + var $startElem = editor.selection.getSelectionStartElem(); + var $endElem = editor.selection.getSelectionEndElem(); + var isSeleEmpty = editor.selection.isSelectionEmpty(); + var selectionText = editor.selection.getSelectionText(); + var $code = void 0; + + if (!$startElem.equal($endElem)) { + // 跨元素选择,不做处理 + editor.selection.restoreSelection(); + return; + } + if (!isSeleEmpty) { + // 选取不是空,用包裹即可 + $code = $('
' + selectionText + '
'); + editor.cmd.do('insertElem', $code); + editor.selection.createRangeByElem($code, false); + editor.selection.restoreSelection(); + return; + } + + // 选取是空,且没有夸元素选择,则插入+ if (this._active) { + // 选中状态,将编辑内容 + this._createPanel($startElem.html()); + } else { + // 未选中状态,将创建内容 + this._createPanel(); + } + }, + + _createPanel: function _createPanel(value) { + var _this = this; + + // value - 要编辑的内容 + value = value || ''; + var type = !value ? 'new' : 'edit'; + var langId = getRandom('langId'); + var textId = getRandom('texxt'); + var btnId = getRandom('btn'); + + var panel = new Panel(this, { + width: 500, + // 一个 Panel 包含多个 tab + tabs: [{ + // 标题 + title: '插入代码', + // 模板 + tpl: '
\n \n\n', + // 事件绑定 + events: [ + // 插入代码 + { + selector: '#' + btnId, + type: 'click', + fn: function fn() { + var $lang = $('#' + langId); + var $text = $('#' + textId); + var lang = $lang.val(); + var text = $text.val() || $text.html(); + text = replaceHtmlSymbol(text); + if (type === 'new') { + // 新插入 + _this._insertCode(text,lang); + } else { + // 编辑更新 + _this._updateCode(text); + } + + // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 + return true; + } + }] + } // first tab end + ] // tabs end + }); // new Panel end + + // 显示 panel + panel.show(); + + // 记录属性 + this.panel = panel; + }, + + // 插入代码 + _insertCode: function _insertCode(value,lang) { + var editor = this.editor; + editor.cmd.do('insertHTML', '' + value + '
'); + }, + + // 更新代码 + _updateCode: function _updateCode(value) { + var editor = this.editor; + var $selectionELem = editor.selection.getSelectionContainerElem(); + if (!$selectionELem) { + return; + } + $selectionELem.html(value); + editor.selection.restoreSelection(); + }, + + // 试图改变 active 状态 + tryChangeActive: function tryChangeActive(e) { + var editor = this.editor; + var $elem = this.$elem; + var $selectionELem = editor.selection.getSelectionContainerElem(); + if (!$selectionELem) { + return; + } + var $parentElem = $selectionELem.parent(); + if ($selectionELem.getNodeName() === 'CODE' && $parentElem.getNodeName() === 'PRE') { + this._active = true; + $elem.addClass('w-e-active'); + } else { + this._active = false; + $elem.removeClass('w-e-active'); + } + } + }; + + /* + menu - emoticon +*/ + +// 构造函数 + function Emoticon(editor) { + this.editor = editor; + this.$elem = $(' '); + this.type = 'panel'; + + // 当前是否 active 状态 + this._active = false; + } + +// 原型 + Emoticon.prototype = { + constructor: Emoticon, + + onClick: function onClick() { + this._createPanel(); + }, + + _createPanel: function _createPanel() { + var _this = this; + + var editor = this.editor; + var config = editor.config; + // 获取表情配置 + var emotions = config.emotions || []; + + // 创建表情 dropPanel 的配置 + var tabConfig = []; + emotions.forEach(function (emotData) { + var emotType = emotData.type; + var content = emotData.content || []; + + // 这一组表情最终拼接出来的 html + var faceHtml = ''; + + // emoji 表情 + if (emotType === 'emoji') { + content.forEach(function (item) { + if (item) { + faceHtml += '' + item + ''; + } + }); + } + // 图片表情 + if (emotType === 'image') { + content.forEach(function (item) { + var src = item.src; + var alt = item.alt; + if (src) { + // 加一个 data-w-e 属性,点击图片的时候不再提示编辑图片 + faceHtml += ''; + } + }); + } + + tabConfig.push({ + title: emotData.title, + tpl: '
' + faceHtml + '', + events: [{ + selector: 'span.w-e-item', + type: 'click', + fn: function fn(e) { + var target = e.target; + var $target = $(target); + var nodeName = $target.getNodeName(); + + var insertHtml = void 0; + if (nodeName === 'IMG') { + // 插入图片 + insertHtml = $target.parent().html(); + } else { + // 插入 emoji + insertHtml = '' + $target.html() + ''; + } + + _this._insert(insertHtml); + // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 + return true; + } + }] + }); + }); + + var panel = new Panel(this, { + width: 300, + height: 200, + // 一个 Panel 包含多个 tab + tabs: tabConfig + }); + + // 显示 panel + panel.show(); + + // 记录属性 + this.panel = panel; + }, + + // 插入表情 + _insert: function _insert(emotHtml) { + var editor = this.editor; + editor.cmd.do('insertHTML', emotHtml); + } + }; + + /* + menu - table +*/ + +// 构造函数 + function Table(editor) { + this.editor = editor; + this.$elem = $(' '); + this.type = 'panel'; + + // 当前是否 active 状态 + this._active = false; + } + +// 原型 + Table.prototype = { + constructor: Table, + + onClick: function onClick() { + if (this._active) { + // 编辑现有表格 + this._createEditPanel(); + } else { + // 插入新表格 + this._createInsertPanel(); + } + }, + + // 创建插入新表格的 panel + _createInsertPanel: function _createInsertPanel() { + var _this = this; + + // 用到的 id + var btnInsertId = getRandom('btn'); + var textRowNum = getRandom('row'); + var textColNum = getRandom('col'); + + var panel = new Panel(this, { + width: 250, + // panel 包含多个 tab + tabs: [{ + // 标题 + title: '插入表格', + // 模板 + tpl: '\n', + // 事件绑定 + events: [{ + // 点击按钮,插入表格 + selector: '#' + btnInsertId, + type: 'click', + fn: function fn() { + var rowNum = parseInt($('#' + textRowNum).val()); + var colNum = parseInt($('#' + textColNum).val()); + + if (rowNum && colNum && rowNum > 0 && colNum > 0) { + // form 数据有效 + _this._insert(rowNum, colNum); + } + + // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 + return true; + } + }] + } // first tab end + ] // tabs end + }); // panel end + + // 展示 panel + panel.show(); + + // 记录属性 + this.panel = panel; + }, + + // 插入表格 + _insert: function _insert(rowNum, colNum) { + // 拼接 table 模板 + var r = void 0, + c = void 0; + var html = '\n \u521B\u5EFA\n \n \u884C\n \n \u5217\u7684\u8868\u683C\n
\n \n'; + for (r = 0; r < rowNum; r++) { + html += '
'; + if (r === 0) { + for (c = 0; c < colNum; c++) { + html += ' '; + } + html += ''; + } + } else { + for (c = 0; c < colNum; c++) { + html += ' '; + } + } + html += ' '; + + // 执行命令 + var editor = this.editor; + editor.cmd.do('insertHTML', html); + + // 防止 firefox 下出现 resize 的控制点 + editor.cmd.do('enableObjectResizing', false); + editor.cmd.do('enableInlineTableEditing', false); + }, + + // 创建编辑表格的 panel + _createEditPanel: function _createEditPanel() { + var _this2 = this; + + // 可用的 id + var addRowBtnId = getRandom('add-row'); + var addColBtnId = getRandom('add-col'); + var delRowBtnId = getRandom('del-row'); + var delColBtnId = getRandom('del-col'); + var delTableBtnId = getRandom('del-table'); + + // 创建 panel 对象 + var panel = new Panel(this, { + width: 320, + // panel 包含多个 tab + tabs: [{ + // 标题 + title: '编辑表格', + // 模板 + tpl: '
\n\n ', + // 事件绑定 + events: [{ + // 增加行 + selector: '#' + addRowBtnId, + type: 'click', + fn: function fn() { + _this2._addRow(); + // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 + return true; + } + }, { + // 增加列 + selector: '#' + addColBtnId, + type: 'click', + fn: function fn() { + _this2._addCol(); + // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 + return true; + } + }, { + // 删除行 + selector: '#' + delRowBtnId, + type: 'click', + fn: function fn() { + _this2._delRow(); + // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 + return true; + } + }, { + // 删除列 + selector: '#' + delColBtnId, + type: 'click', + fn: function fn() { + _this2._delCol(); + // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 + return true; + } + }, { + // 删除表格 + selector: '#' + delTableBtnId, + type: 'click', + fn: function fn() { + _this2._delTable(); + // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 + return true; + } + }] + }] + }); + // 显示 panel + panel.show(); + }, + + // 获取选中的单元格的位置信息 + _getLocationData: function _getLocationData() { + var result = {}; + var editor = this.editor; + var $selectionELem = editor.selection.getSelectionContainerElem(); + if (!$selectionELem) { + return; + } + var nodeName = $selectionELem.getNodeName(); + if (nodeName !== 'TD' && nodeName !== 'TH') { + return; + } + + // 获取 td index + var $tr = $selectionELem.parent(); + var $tds = $tr.children(); + var tdLength = $tds.length; + $tds.forEach(function (td, index) { + if (td === $selectionELem[0]) { + // 记录并跳出循环 + result.td = { + index: index, + elem: td, + length: tdLength + }; + return false; + } + }); + + // 获取 tr index + var $tbody = $tr.parent(); + var $trs = $tbody.children(); + var trLength = $trs.length; + $trs.forEach(function (tr, index) { + if (tr === $tr[0]) { + // 记录并跳出循环 + result.tr = { + index: index, + elem: tr, + length: trLength + }; + return false; + } + }); + + // 返回结果 + return result; + }, + + // 增加行 + _addRow: function _addRow() { + // 获取当前单元格的位置信息 + var locationData = this._getLocationData(); + if (!locationData) { + return; + } + var trData = locationData.tr; + var $currentTr = $(trData.elem); + var tdData = locationData.td; + var tdLength = tdData.length; + + // 拼接即将插入的字符串 + var newTr = document.createElement('tr'); + var tpl = '', + i = void 0; + for (i = 0; i < tdLength; i++) { + tpl += ''; + } + newTr.innerHTML = tpl; + // 插入 + $(newTr).insertAfter($currentTr); + }, + + // 增加列 + _addCol: function _addCol() { + // 获取当前单元格的位置信息 + var locationData = this._getLocationData(); + if (!locationData) { + return; + } + var trData = locationData.tr; + var tdData = locationData.td; + var tdIndex = tdData.index; + var $currentTr = $(trData.elem); + var $trParent = $currentTr.parent(); + var $trs = $trParent.children(); + + // 遍历所有行 + $trs.forEach(function (tr) { + var $tr = $(tr); + var $tds = $tr.children(); + var $currentTd = $tds.get(tdIndex); + var name = $currentTd.getNodeName().toLowerCase(); + + // new 一个 td,并插入 + var newTd = document.createElement(name); + $(newTd).insertAfter($currentTd); + }); + }, + + // 删除行 + _delRow: function _delRow() { + // 获取当前单元格的位置信息 + var locationData = this._getLocationData(); + if (!locationData) { + return; + } + var trData = locationData.tr; + var $currentTr = $(trData.elem); + $currentTr.remove(); + }, + + // 删除列 + _delCol: function _delCol() { + // 获取当前单元格的位置信息 + var locationData = this._getLocationData(); + if (!locationData) { + return; + } + var trData = locationData.tr; + var tdData = locationData.td; + var tdIndex = tdData.index; + var $currentTr = $(trData.elem); + var $trParent = $currentTr.parent(); + var $trs = $trParent.children(); + + // 遍历所有行 + $trs.forEach(function (tr) { + var $tr = $(tr); + var $tds = $tr.children(); + var $currentTd = $tds.get(tdIndex); + // 删除 + $currentTd.remove(); + }); + }, + + // 删除表格 + _delTable: function _delTable() { + var editor = this.editor; + var $selectionELem = editor.selection.getSelectionContainerElem(); + if (!$selectionELem) { + return; + } + var $table = $selectionELem.parentUntil('table'); + if (!$table) { + return; + } + $table.remove(); + }, + + // 试图改变 active 状态 + tryChangeActive: function tryChangeActive(e) { + var editor = this.editor; + var $elem = this.$elem; + var $selectionELem = editor.selection.getSelectionContainerElem(); + if (!$selectionELem) { + return; + } + var nodeName = $selectionELem.getNodeName(); + if (nodeName === 'TD' || nodeName === 'TH') { + this._active = true; + $elem.addClass('w-e-active'); + } else { + this._active = false; + $elem.removeClass('w-e-active'); + } + } + }; + + /* + menu - video +*/ + +// 构造函数 + function Video(editor) { + this.editor = editor; + this.$elem = $(' '); + this.type = 'panel'; + + // 当前是否 active 状态 + this._active = false; + } + +// 原型 + Video.prototype = { + constructor: Video, + + onClick: function onClick() { + this._createPanel(); + }, + + _createPanel: function _createPanel() { + var _this = this; + + // 创建 id + var textValId = getRandom('text-val'); + var btnId = getRandom('btn'); + + // 创建 panel + var panel = new Panel(this, { + width: 350, + // 一个 panel 多个 tab + tabs: [{ + // 标题 + title: '插入视频', + // 模板 + tpl: ' \n \n', + // 事件绑定 + events: [{ + selector: '#' + btnId, + type: 'click', + fn: function fn() { + var $text = $('#' + textValId); + var val = $text.val().trim(); + + // 测试用视频地址 + // + + if (val) { + // 插入视频 + _this._insert(val); + } + + // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 + return true; + } + }] + } // first tab end + ] // tabs end + }); // panel end + + // 显示 panel + panel.show(); + + // 记录属性 + this.panel = panel; + }, + + // 插入视频 + _insert: function _insert(val) { + var editor = this.editor; + editor.cmd.do('insertHTML', val + ' \n'); + } + }; + + /* + menu - img +*/ + +// 构造函数 + function Image(editor) { + this.editor = editor; + var imgMenuId = getRandom('w-e-img'); + this.$elem = $(' '); + editor.imgMenuId = imgMenuId; + this.type = 'panel'; + + // 当前是否 active 状态 + this._active = false; + } + +// 原型 + Image.prototype = { + constructor: Image, + + onClick: function onClick() { + var editor = this.editor; + var config = editor.config; + if (config.qiniu) { + return; + } + if (this._active) { + this._createEditPanel(); + } else { + this._createInsertPanel(); + } + }, + + _createEditPanel: function _createEditPanel() { + var editor = this.editor; + + // id + var width30 = getRandom('width-30'); + var width50 = getRandom('width-50'); + var width100 = getRandom('width-100'); + var delBtn = getRandom('del-btn'); + + // tab 配置 + var tabsConfig = [{ + title: '编辑图片', + tpl: '
\n\n ', + events: [{ + selector: '#' + width30, + type: 'click', + fn: function fn() { + var $img = editor._selectedImg; + if ($img) { + $img.css('max-width', '30%'); + } + // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 + return true; + } + }, { + selector: '#' + width50, + type: 'click', + fn: function fn() { + var $img = editor._selectedImg; + if ($img) { + $img.css('max-width', '50%'); + } + // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 + return true; + } + }, { + selector: '#' + width100, + type: 'click', + fn: function fn() { + var $img = editor._selectedImg; + if ($img) { + $img.css('max-width', '100%'); + } + // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 + return true; + } + }, { + selector: '#' + delBtn, + type: 'click', + fn: function fn() { + var $img = editor._selectedImg; + if ($img) { + $img.remove(); + } + // 返回 true,表示该事件执行完之后,panel 要关闭。否则 panel 不会关闭 + return true; + } + }] + }]; + + // 创建 panel 并显示 + var panel = new Panel(this, { + width: 300, + tabs: tabsConfig + }); + panel.show(); + + // 记录属性 + this.panel = panel; + }, + + _createInsertPanel: function _createInsertPanel() { + var editor = this.editor; + var uploadImg = editor.uploadImg; + var config = editor.config; + + // id + var upTriggerId = getRandom('up-trigger'); + var upFileId = getRandom('up-file'); + var linkUrlId = getRandom('link-url'); + var linkBtnId = getRandom('link-btn'); + + // tabs 的配置 + var tabsConfig = [{ + title: '上传图片', + tpl: '\n', + events: [{ + // 触发选择图片 + selector: '#' + upTriggerId, + type: 'click', + fn: function fn() { + var $file = $('#' + upFileId); + var fileElem = $file[0]; + if (fileElem) { + fileElem.click(); + } else { + // 返回 true 可关闭 panel + return true; + } + } + }, { + // 选择图片完毕 + selector: '#' + upFileId, + type: 'change', + fn: function fn() { + var $file = $('#' + upFileId); + var fileElem = $file[0]; + if (!fileElem) { + // 返回 true 可关闭 panel + return true; + } + + // 获取选中的 file 对象列表 + var fileList = fileElem.files; + if (fileList.length) { + uploadImg.uploadImg(fileList); + } + + // 返回 true 可关闭 panel + return true; + } + }] + }, // first tab end + { + title: '网络图片', + tpl: '\n \n\n \n\n \n', + events: [{ + selector: '#' + linkBtnId, + type: 'click', + fn: function fn() { + var $linkUrl = $('#' + linkUrlId); + var url = $linkUrl.val().trim(); + + if (url) { + uploadImg.insertLinkImg(url); + } + + // 返回 true 表示函数执行结束之后关闭 panel + return true; + } + }] + } // second tab end + ]; // tabs end + + // 判断 tabs 的显示 + var tabsConfigResult = []; + if ((config.uploadImgShowBase64 || config.uploadImgServer || config.customUploadImg) && window.FileReader) { + // 显示“上传图片” + tabsConfigResult.push(tabsConfig[0]); + } + if (config.showLinkImg) { + // 显示“网络图片” + tabsConfigResult.push(tabsConfig[1]); + } + + // 创建 panel 并显示 + var panel = new Panel(this, { + width: 300, + tabs: tabsConfigResult + }); + panel.show(); + + // 记录属性 + this.panel = panel; + }, + + // 试图改变 active 状态 + tryChangeActive: function tryChangeActive(e) { + var editor = this.editor; + var $elem = this.$elem; + if (editor._selectedImg) { + this._active = true; + $elem.addClass('w-e-active'); + } else { + this._active = false; + $elem.removeClass('w-e-active'); + } + } + }; + + /* + 所有菜单的汇总 +*/ + +// 存储菜单的构造函数 + var MenuConstructors = {}; + + MenuConstructors.bold = Bold; + + MenuConstructors.head = Head; + + MenuConstructors.fontSize = FontSize; + + MenuConstructors.fontName = FontName; + + MenuConstructors.link = Link; + + MenuConstructors.italic = Italic; + + MenuConstructors.redo = Redo; + + MenuConstructors.strikeThrough = StrikeThrough; + + MenuConstructors.underline = Underline; + + MenuConstructors.undo = Undo; + + MenuConstructors.list = List; + + MenuConstructors.justify = Justify; + + MenuConstructors.foreColor = ForeColor; + + MenuConstructors.backColor = BackColor; + + MenuConstructors.quote = Quote; + + MenuConstructors.code = Code; + + MenuConstructors.emoticon = Emoticon; + + MenuConstructors.table = Table; + + MenuConstructors.video = Video; + + MenuConstructors.image = Image; + + /* + 菜单集合 +*/ + +// 构造函数 + function Menus(editor) { + this.editor = editor; + this.menus = {}; + } + +// 修改原型 + Menus.prototype = { + constructor: Menus, + + // 初始化菜单 + init: function init() { + var _this = this; + + var editor = this.editor; + var config = editor.config || {}; + var configMenus = config.menus || []; // 获取配置中的菜单 + + // 根据配置信息,创建菜单 + configMenus.forEach(function (menuKey) { + var MenuConstructor = MenuConstructors[menuKey]; + if (MenuConstructor && typeof MenuConstructor === 'function') { + // 创建单个菜单 + _this.menus[menuKey] = new MenuConstructor(editor); + } + }); + + // 添加到菜单栏 + this._addToToolbar(); + + // 绑定事件 + this._bindEvent(); + }, + + // 添加到菜单栏 + _addToToolbar: function _addToToolbar() { + var editor = this.editor; + var $toolbarElem = editor.$toolbarElem; + var menus = this.menus; + var config = editor.config; + // config.zIndex 是配置的编辑区域的 z-index,菜单的 z-index 得在其基础上 +1 + var zIndex = config.zIndex + 1; + objForEach(menus, function (key, menu) { + var $elem = menu.$elem; + if ($elem) { + // 设置 z-index + $elem.css('z-index', zIndex); + $toolbarElem.append($elem); + } + }); + }, + + // 绑定菜单 click mouseenter 事件 + _bindEvent: function _bindEvent() { + var menus = this.menus; + var editor = this.editor; + objForEach(menus, function (key, menu) { + var type = menu.type; + if (!type) { + return; + } + var $elem = menu.$elem; + var droplist = menu.droplist; + var panel = menu.panel; + + // 点击类型,例如 bold + if (type === 'click' && menu.onClick) { + $elem.on('click', function (e) { + if (editor.selection.getRange() == null) { + return; + } + menu.onClick(e); + }); + } + + // 下拉框,例如 head + if (type === 'droplist' && droplist) { + $elem.on('mouseenter', function (e) { + if (editor.selection.getRange() == null) { + return; + } + // 显示 + droplist.showTimeoutId = setTimeout(function () { + droplist.show(); + }, 200); + }).on('mouseleave', function (e) { + // 隐藏 + droplist.hideTimeoutId = setTimeout(function () { + droplist.hide(); + }, 0); + }); + } + + // 弹框类型,例如 link + if (type === 'panel' && menu.onClick) { + $elem.on('click', function (e) { + e.stopPropagation(); + if (editor.selection.getRange() == null) { + return; + } + // 在自定义事件中显示 panel + menu.onClick(e); + }); + } + }); + }, + + // 尝试修改菜单状态 + changeActive: function changeActive() { + var menus = this.menus; + objForEach(menus, function (key, menu) { + if (menu.tryChangeActive) { + setTimeout(function () { + menu.tryChangeActive(); + }, 100); + } + }); + } + }; + + /* + 粘贴信息的处理 +*/ + +// 获取粘贴的纯文本 + function getPasteText(e) { + var clipboardData = e.clipboardData || e.originalEvent && e.originalEvent.clipboardData; + var pasteText = void 0; + if (clipboardData == null) { + pasteText = window.clipboardData && window.clipboardData.getData('text'); + } else { + pasteText = clipboardData.getData('text/plain'); + } + + return replaceHtmlSymbol(pasteText); + } + +// 获取粘贴的html + function getPasteHtml(e, filterStyle, ignoreImg) { + var clipboardData = e.clipboardData || e.originalEvent && e.originalEvent.clipboardData; + var pasteText = void 0, + pasteHtml = void 0; + if (clipboardData == null) { + pasteText = window.clipboardData && window.clipboardData.getData('text'); + } else { + pasteText = clipboardData.getData('text/plain'); + pasteHtml = clipboardData.getData('text/html'); + } + if (!pasteHtml && pasteText) { + pasteHtml = ' \n' + replaceHtmlSymbol(pasteText) + '
'; + } + if (!pasteHtml) { + return; + } + + // 过滤word中状态过来的无用字符 + var docSplitHtml = pasteHtml.split('
发表评论
+ +