mirror of
https://github.com/mashirozx/sakura.git
synced 2024-11-22 14:58:14 +08:00
2019.1.24 update v 3.1.1
This commit is contained in:
parent
bb03fc3b8b
commit
256c4d91b0
17
cdn/css/lib.css
Normal file
17
cdn/css/lib.css
Normal file
File diff suppressed because one or more lines are too long
6
cdn/css/src/baguetteBox.min.css
vendored
Normal file
6
cdn/css/src/baguetteBox.min.css
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
/*!
|
||||||
|
* baguetteBox.js
|
||||||
|
* @author feimosi
|
||||||
|
* @version 1.11.0
|
||||||
|
* @url https://github.com/feimosi/baguetteBox.js
|
||||||
|
*/#baguetteBox-overlay{display:none;opacity:0;position:fixed;overflow:hidden;top:0;left:0;width:100%;height:100%;z-index:1000000;background-color:#222;background-color:rgba(0,0,0,.8);-webkit-transition:opacity .5s ease;transition:opacity .5s ease}#baguetteBox-overlay.visible{opacity:1}#baguetteBox-overlay .full-image{display:inline-block;position:relative;width:100%;height:100%;text-align:center}#baguetteBox-overlay .full-image figure{display:inline;margin:0;height:100%}#baguetteBox-overlay .full-image img{display:inline-block;width:auto;height:auto;max-height:100%;max-width:100%;vertical-align:middle;-webkit-box-shadow:0 0 8px rgba(0,0,0,.6);-moz-box-shadow:0 0 8px rgba(0,0,0,.6);box-shadow:0 0 8px rgba(0,0,0,.6)}#baguetteBox-overlay .full-image figcaption{display:block;position:absolute;bottom:0;width:100%;text-align:center;line-height:1.8;white-space:normal;color:#ccc;background-color:#000;background-color:rgba(0,0,0,.6);font-family:sans-serif}#baguetteBox-overlay .full-image:before{content:"";display:inline-block;height:50%;width:1px;margin-right:-1px}#baguetteBox-slider{position:absolute;left:0;top:0;height:100%;width:100%;white-space:nowrap;-webkit-transition:left .4s ease,-webkit-transform .4s ease;transition:left .4s ease,-webkit-transform .4s ease;transition:left .4s ease,transform .4s ease;transition:left .4s ease,transform .4s ease,-webkit-transform .4s ease,-moz-transform .4s ease}#baguetteBox-slider.bounce-from-right{-webkit-animation:bounceFromRight .4s ease-out;animation:bounceFromRight .4s ease-out}#baguetteBox-slider.bounce-from-left{-webkit-animation:bounceFromLeft .4s ease-out;animation:bounceFromLeft .4s ease-out}@-webkit-keyframes bounceFromRight{0%,100%{margin-left:0}50%{margin-left:-30px}}@keyframes bounceFromRight{0%,100%{margin-left:0}50%{margin-left:-30px}}@-webkit-keyframes bounceFromLeft{0%,100%{margin-left:0}50%{margin-left:30px}}@keyframes bounceFromLeft{0%,100%{margin-left:0}50%{margin-left:30px}}.baguetteBox-button#next-button,.baguetteBox-button#previous-button{top:50%;top:calc(50% - 30px);width:44px;height:60px}.baguetteBox-button{position:absolute;cursor:pointer;outline:0;padding:0;margin:0;border:0;-moz-border-radius:15%;border-radius:15%;background-color:#323232;background-color:rgba(50,50,50,.5);color:#ddd;font:1.6em sans-serif;-webkit-transition:background-color .4s ease;transition:background-color .4s ease}.baguetteBox-button:focus,.baguetteBox-button:hover{background-color:rgba(50,50,50,.9)}.baguetteBox-button#next-button{right:2%}.baguetteBox-button#previous-button{left:2%}.baguetteBox-button#close-button{top:20px;right:2%;right:calc(2% + 6px);width:30px;height:30px}.baguetteBox-button svg{position:absolute;left:0;top:0}.baguetteBox-spinner{width:40px;height:40px;display:inline-block;position:absolute;top:50%;left:50%;margin-top:-20px;margin-left:-20px}.baguetteBox-double-bounce1,.baguetteBox-double-bounce2{width:100%;height:100%;-moz-border-radius:50%;border-radius:50%;background-color:#fff;opacity:.6;position:absolute;top:0;left:0;-webkit-animation:bounce 2s infinite ease-in-out;animation:bounce 2s infinite ease-in-out}.baguetteBox-double-bounce2{-webkit-animation-delay:-1s;animation-delay:-1s}@-webkit-keyframes bounce{0%,100%{-webkit-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1);transform:scale(1)}}@keyframes bounce{0%,100%{-webkit-transform:scale(0);-moz-transform:scale(0);transform:scale(0)}50%{-webkit-transform:scale(1);-moz-transform:scale(1);transform:scale(1)}}
|
7
cdn/css/src/font-awesome-animation.min.css
vendored
Normal file
7
cdn/css/src/font-awesome-animation.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
11
cdn/css/src/font-awesome.min.css
vendored
Normal file
11
cdn/css/src/font-awesome.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
1
cdn/css/src/jquery.fancybox.min.css
vendored
Normal file
1
cdn/css/src/jquery.fancybox.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
36
cdn/css/src/material-icons.css
Normal file
36
cdn/css/src/material-icons.css
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: 'Material Icons';
|
||||||
|
font-style: normal;
|
||||||
|
font-weight: 400;
|
||||||
|
src: url(MaterialIcons-Regular.eot); /* For IE6-8 */
|
||||||
|
src: local('Material Icons'),
|
||||||
|
local('MaterialIcons-Regular'),
|
||||||
|
url(../iconfont/MaterialIcons-Regular.woff2) format('woff2'),
|
||||||
|
url(../iconfont/MaterialIcons-Regular.woff) format('woff'),
|
||||||
|
url(../iconfont/MaterialIcons-Regular.ttf) format('truetype');
|
||||||
|
}
|
||||||
|
|
||||||
|
.material-icons {
|
||||||
|
font-family: 'Material Icons';
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 24px; /* Preferred icon size */
|
||||||
|
display: inline-block;
|
||||||
|
line-height: 1;
|
||||||
|
text-transform: none;
|
||||||
|
letter-spacing: normal;
|
||||||
|
word-wrap: normal;
|
||||||
|
white-space: nowrap;
|
||||||
|
direction: ltr;
|
||||||
|
|
||||||
|
/* Support for all WebKit browsers. */
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
/* Support for Safari and Chrome. */
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
|
||||||
|
/* Support for Firefox. */
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
|
||||||
|
/* Support for IE. */
|
||||||
|
font-feature-settings: 'liga';
|
||||||
|
}
|
270
cdn/css/src/sharejs.css
Normal file
270
cdn/css/src/sharejs.css
Normal file
@ -0,0 +1,270 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family:"socialshare";src:url("https://cdn.jsdelivr.net/gh/moezx/share.js@1.0.3/src/fonts/iconfont.eot");
|
||||||
|
src:url("https://cdn.jsdelivr.net/gh/moezx/share.js@1.0.3/src/fonts/iconfont.eot?#iefix") format("embedded-opentype"),url("https://cdn.jsdelivr.net/gh/moezx/share.js@1.0.3/src/fonts/iconfont.woff") format("woff"),url("https://cdn.jsdelivr.net/gh/moezx/share.js@1.0.3/src/fonts/iconfont.ttf") format("truetype"),url("https://cdn.jsdelivr.net/gh/moezx/share.js@1.0.3/src/fonts/iconfont.svg#iconfont") format("svg")
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share {
|
||||||
|
display: inline-block;
|
||||||
|
font-family: "socialshare" !important;
|
||||||
|
font-size: 16px;
|
||||||
|
font-style: normal;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-webkit-text-stroke-width: 0.2px;
|
||||||
|
-moz-osx-font-smoothing: grayscale
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share * {
|
||||||
|
font-family: "socialshare" !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-tencent:before {
|
||||||
|
content: "\f07a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-qq:before {
|
||||||
|
content: "\f11a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-weibo:before {
|
||||||
|
content: "\f12a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat:before {
|
||||||
|
content: "\f09a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-douban:before {
|
||||||
|
content: "\f10a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-heart:before {
|
||||||
|
content: "\f20a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-like:before {
|
||||||
|
content: "\f00a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-qzone:before {
|
||||||
|
content: "\f08a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-linkedin:before {
|
||||||
|
content: "\f01a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-diandian:before {
|
||||||
|
content: "\f05a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-facebook:before {
|
||||||
|
content: "\f03a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-google:before {
|
||||||
|
content: "\f04a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-twitter:before {
|
||||||
|
content: "\f06a"
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share a {
|
||||||
|
position: relative;
|
||||||
|
text-decoration: none;
|
||||||
|
margin: 0 4px;
|
||||||
|
display: inline-block;
|
||||||
|
outline: none
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .social-share-icon {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
font-size: 10px;
|
||||||
|
border-radius: 50%;
|
||||||
|
line-height: 16px;
|
||||||
|
border: 1px solid #666;
|
||||||
|
color: #666;
|
||||||
|
text-align: center;
|
||||||
|
vertical-align: middle;
|
||||||
|
transition: background 0.6s ease-out 0s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .social-share-icon:hover {
|
||||||
|
background: #666;
|
||||||
|
color: #fff
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-weibo {
|
||||||
|
color: #ff763b;
|
||||||
|
border-color: #ff763b
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-weibo:hover {
|
||||||
|
background: #ff763b
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-tencent {
|
||||||
|
color: #56b6e7;
|
||||||
|
border-color: #56b6e7
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-tencent:hover {
|
||||||
|
background: #56b6e7
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-qq {
|
||||||
|
color: #56b6e7;
|
||||||
|
border-color: #56b6e7
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-qq:hover {
|
||||||
|
background: #56b6e7
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-qzone {
|
||||||
|
color: #FDBE3D;
|
||||||
|
border-color: #FDBE3D
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-qzone:hover {
|
||||||
|
background: #FDBE3D
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-douban {
|
||||||
|
color: #33b045;
|
||||||
|
border-color: #33b045
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-douban:hover {
|
||||||
|
background: #33b045
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-linkedin {
|
||||||
|
color: #0077B5;
|
||||||
|
border-color: #0077B5
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-linkedin:hover {
|
||||||
|
background: #0077B5
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-facebook {
|
||||||
|
color: #44619D;
|
||||||
|
border-color: #44619D
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-facebook:hover {
|
||||||
|
background: #44619D
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-google {
|
||||||
|
color: #db4437;
|
||||||
|
border-color: #db4437
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-google:hover {
|
||||||
|
background: #db4437
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-twitter {
|
||||||
|
color: #55acee;
|
||||||
|
border-color: #55acee
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-twitter:hover {
|
||||||
|
background: #55acee
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-diandian {
|
||||||
|
color: #307DCA;
|
||||||
|
border-color: #307DCA
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-diandian:hover {
|
||||||
|
background: #307DCA
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat {
|
||||||
|
position: relative;
|
||||||
|
color: #7bc549;
|
||||||
|
border-color: #7bc549
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat:hover {
|
||||||
|
background: #7bc549
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat .wechat-qrcode {
|
||||||
|
display: none;
|
||||||
|
border: 1px solid #eee;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 9;
|
||||||
|
top: -205px;
|
||||||
|
left: -84px;
|
||||||
|
width: 200px;
|
||||||
|
height: 192px;
|
||||||
|
color: #666;
|
||||||
|
font-size: 12px;
|
||||||
|
text-align: center;
|
||||||
|
background-color: #fff;
|
||||||
|
box-shadow: 0 2px 10px #aaa;
|
||||||
|
transition: all 200ms;
|
||||||
|
-webkit-tansition: all 350ms;
|
||||||
|
-moz-transition: all 350ms
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat .wechat-qrcode.bottom {
|
||||||
|
top: 40px;
|
||||||
|
left: -84px
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat .wechat-qrcode.bottom:after {
|
||||||
|
display: none
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat .wechat-qrcode h4 {
|
||||||
|
font-weight: normal;
|
||||||
|
height: 26px;
|
||||||
|
line-height: 26px;
|
||||||
|
font-size: 12px;
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
color: #777
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat .wechat-qrcode .qrcode {
|
||||||
|
width: 105px;
|
||||||
|
margin: 10px auto
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat .wechat-qrcode .qrcode table {
|
||||||
|
margin: 0 !important
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat .wechat-qrcode .help p {
|
||||||
|
font-weight: normal;
|
||||||
|
line-height: 16px;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat .wechat-qrcode:after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -6px;
|
||||||
|
bottom: -13px;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border-width: 8px 6px 6px 6px;
|
||||||
|
border-style: solid;
|
||||||
|
border-color: #fff transparent transparent transparent
|
||||||
|
}
|
||||||
|
|
||||||
|
.social-share .icon-wechat:hover .wechat-qrcode {
|
||||||
|
display: block
|
||||||
|
}
|
86
cdn/css/src/third-part.css
Normal file
86
cdn/css/src/third-part.css
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
/* Fix: Aplayer beautify*/
|
||||||
|
.aplayer {
|
||||||
|
background: rgba(255, 255, 255, .3);
|
||||||
|
font-family: 'Noto Serif CJK SC', 'Noto Serif CJK', 'Source Han Serif SC', 'Source Han Serif', 'source-han-serif-sc', 'PT Serif', 'SongTi SC', 'MicroSoft Yahei', Georgia, serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aplayer .aplayer-lrc::before {
|
||||||
|
background: rgba(255, 255, 255, 0);
|
||||||
|
filter: none
|
||||||
|
}
|
||||||
|
|
||||||
|
.aplayer .aplayer-lrc::after {
|
||||||
|
background: rgba(255, 255, 255, 0);
|
||||||
|
filter: none
|
||||||
|
}
|
||||||
|
|
||||||
|
.aplayer {
|
||||||
|
box-shadow: 0 0 0 1px #eee;
|
||||||
|
border-radius: 3px;
|
||||||
|
margin: 15px 0
|
||||||
|
}
|
||||||
|
|
||||||
|
.aplayer .aplayer-info {
|
||||||
|
padding: 9px 7px 0 10px
|
||||||
|
}
|
||||||
|
|
||||||
|
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap {
|
||||||
|
margin-left: 1px;
|
||||||
|
padding-right: 3px
|
||||||
|
}
|
||||||
|
|
||||||
|
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar,
|
||||||
|
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-loaded,
|
||||||
|
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played {
|
||||||
|
height: 6px;
|
||||||
|
border-radius: 10px
|
||||||
|
}
|
||||||
|
|
||||||
|
.aplayer .aplayer-info .aplayer-controller .aplayer-bar-wrap .aplayer-bar .aplayer-played .aplayer-thumb {
|
||||||
|
height: 12px;
|
||||||
|
width: 12px;
|
||||||
|
right: 3px;
|
||||||
|
box-shadow: 0 0 5px 0 rgba(0, 0, 0, .18);
|
||||||
|
transition: all .35s
|
||||||
|
}
|
||||||
|
|
||||||
|
.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar,
|
||||||
|
.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar .aplayer-volume {
|
||||||
|
border-radius: 10px;
|
||||||
|
width: 6px
|
||||||
|
}
|
||||||
|
|
||||||
|
.aplayer .aplayer-info .aplayer-controller .aplayer-volume-wrap .aplayer-volume-bar-wrap .aplayer-volume-bar {
|
||||||
|
right: 10.5px
|
||||||
|
}
|
||||||
|
|
||||||
|
.aplayer .aplayer-list ol li {
|
||||||
|
border-top: none
|
||||||
|
}
|
||||||
|
|
||||||
|
.aplayer .aplayer-list ol li.aplayer-list-light {
|
||||||
|
background: #f8f8f8
|
||||||
|
}
|
||||||
|
|
||||||
|
#aplayer-float {
|
||||||
|
background: rgba(255, 255, 255, 1);
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ap-hover {
|
||||||
|
left: -66px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ap-hover:hover {
|
||||||
|
left: 0px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#aplayer-float .aplayer-lrc-current {
|
||||||
|
color: orange;
|
||||||
|
font-size: 15px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aplayer-lrc {
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
59
cdn/do.py
Normal file
59
cdn/do.py
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
# coding: utf-8
|
||||||
|
'''
|
||||||
|
Created on Apr 12, 2018
|
||||||
|
Update on 2018-04-13
|
||||||
|
@author: Mashiro @ https://2heng.xin
|
||||||
|
|
||||||
|
Desc: Auto compress & minfy JavaScript codes and CSS style sheet
|
||||||
|
'''
|
||||||
|
import os
|
||||||
|
from os import listdir
|
||||||
|
from os.path import isfile, join
|
||||||
|
from jsmin import jsmin
|
||||||
|
from csscompressor import compress
|
||||||
|
import time
|
||||||
|
import codecs
|
||||||
|
|
||||||
|
localtime = time.asctime( time.localtime(time.time()) )
|
||||||
|
print (localtime)
|
||||||
|
|
||||||
|
pathJS = 'js/src/'
|
||||||
|
pathJSroot = 'js/'
|
||||||
|
pathCSS = 'css/src/'
|
||||||
|
pathCSSroot = 'css/'
|
||||||
|
|
||||||
|
jsfiles = [f for f in listdir(pathJS) if isfile(join(pathJS, f))]
|
||||||
|
cssfiles = [f for f in listdir(pathCSS) if isfile(join(pathCSS, f))]
|
||||||
|
|
||||||
|
strJS = '/*! Generate by Mashiro. ' + localtime + '*/'
|
||||||
|
strCSS = '/*! Generate by Mashiro. ' + localtime + '*/'
|
||||||
|
|
||||||
|
for f in jsfiles:
|
||||||
|
with codecs.open(pathJS + f, 'r', encoding='utf-8') as file:
|
||||||
|
data = file.read()
|
||||||
|
strJS = strJS + data
|
||||||
|
print(f)
|
||||||
|
|
||||||
|
JSminified = jsmin(strJS)
|
||||||
|
|
||||||
|
with codecs.open(pathJSroot + "lib.js", "w", encoding='utf-8') as text_file:
|
||||||
|
print(JSminified, file=text_file)
|
||||||
|
|
||||||
|
|
||||||
|
print('------------------JS Done------------------')
|
||||||
|
|
||||||
|
for f in cssfiles:
|
||||||
|
with codecs.open(pathCSS + f, 'r', encoding='utf-8') as file:
|
||||||
|
data = file.read()
|
||||||
|
strCSS = strCSS + data
|
||||||
|
print(f)
|
||||||
|
|
||||||
|
CSSminified = compress(strCSS)
|
||||||
|
|
||||||
|
with codecs.open(pathCSSroot + "lib.css", "w", encoding='utf-8') as text_file:
|
||||||
|
print(CSSminified, file=text_file)
|
||||||
|
|
||||||
|
print('------------------CSS Done------------------')
|
||||||
|
|
||||||
|
key = input('Press any key to quit')
|
||||||
|
quit()
|
50
cdn/js/lib.js
Normal file
50
cdn/js/lib.js
Normal file
File diff suppressed because one or more lines are too long
2
cdn/js/src/01.jquery.min.js
vendored
Normal file
2
cdn/js/src/01.jquery.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
cdn/js/src/02.jquery.pjax.min.js
vendored
Normal file
2
cdn/js/src/02.jquery.pjax.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
cdn/js/src/03.highlight.pack.js
Normal file
2
cdn/js/src/03.highlight.pack.js
Normal file
File diff suppressed because one or more lines are too long
2
cdn/js/src/04.highlightjs-line-numbers.min.js
vendored
Normal file
2
cdn/js/src/04.highlightjs-line-numbers.min.js
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/*! line-number */
|
||||||
|
!function(n,e){"use strict";function t(){var n=e.createElement("style");n.type="text/css",n.innerHTML=h(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}",[f,m,j]),e.getElementsByTagName("head")[0].appendChild(n)}function r(t){"complete"===e.readyState?l(t):n.addEventListener("DOMContentLoaded",function(){l(t)})}function l(t){try{var r=e.querySelectorAll("code.hljs");for(var l in r)r.hasOwnProperty(l)&&i(r[l],t)}catch(o){n.console.error("LineNumbers error: ",o)}}function i(n,e){if("object"==typeof n){e=e||{singleLine:!1};var t=e.singleLine?0:1;u(function(){s(n),n.innerHTML=o(n.innerHTML,t)})}}function o(n,e){var t=c(n);if(""===t[t.length-1].trim()&&t.pop(),t.length>e){for(var r="",l=0,i=t.length;l<i;l++)r+=h('<tr><td class="{0}"><div class="{1} {2}" {3}="{5}"></div></td><td class="{4}"><div class="{1}">{6}</div></td></tr>',[v,g,m,j,p,l+1,t[l].length>0?t[l]:" "]);return h('<table class="{0}">{1}</table>',[f,r])}return n}function s(n){var e=n.childNodes;for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];d(r.textContent)>0&&(r.childNodes.length>0?s(r):a(r.parentNode))}}function a(n){var e=n.className;if(/hljs-/.test(e)){for(var t=c(n.innerHTML),r=0,l="";r<t.length;r++)l+=h('<span class="{0}">{1}</span>\n',[e,t[r]]);n.innerHTML=l.trim()}}function c(n){return 0===n.length?[]:n.split(L)}function d(n){return(n.trim().match(L)||[]).length}function u(e){n.setTimeout(e,0)}function h(n,e){return n.replace(/\{(\d+)\}/g,function(n,t){return e[t]?e[t]:n})}var f="hljs-ln",g="hljs-ln-line",p="hljs-ln-code",v="hljs-ln-numbers",m="hljs-ln-n",j="data-line-number",L=/\r\n|\r|\n/g;n.hljs?(n.hljs.initLineNumbersOnLoad=r,n.hljs.lineNumbersBlock=i,t()):n.console.error("highlight.js not detected!")}(window,document);
|
1
cdn/js/src/05.nprogress.min.js
vendored
Normal file
1
cdn/js/src/05.nprogress.min.js
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
!function(n,e){"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=e():n.NProgress=e()}(this,function(){function n(n,e,t){return e>n?e:n>t?t:n}function e(n){return 100*(-1+n)}function t(n,t,r){var i;return i="translate3d"===c.positionUsing?{transform:"translate3d("+e(n)+"%,0,0)"}:"translate"===c.positionUsing?{transform:"translate("+e(n)+"%,0)"}:{"margin-left":e(n)+"%"},i.transition="all "+t+"ms "+r,i}function r(n,e){var t="string"==typeof n?n:o(n);return t.indexOf(" "+e+" ")>=0}function i(n,e){var t=o(n),i=t+e;r(t,e)||(n.className=i.substring(1))}function s(n,e){var t,i=o(n);r(n,e)&&(t=i.replace(" "+e+" "," "),n.className=t.substring(1,t.length-1))}function o(n){return(" "+(n.className||"")+" ").replace(/\s+/gi," ")}function a(n){n&&n.parentNode&&n.parentNode.removeChild(n)}var u={};u.version="0.2.0";var c=u.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};u.configure=function(n){var e,t;for(e in n)t=n[e],void 0!==t&&n.hasOwnProperty(e)&&(c[e]=t);return this},u.status=null,u.set=function(e){var r=u.isStarted();e=n(e,c.minimum,1),u.status=1===e?null:e;var i=u.render(!r),s=i.querySelector(c.barSelector),o=c.speed,a=c.easing;return i.offsetWidth,l(function(n){""===c.positionUsing&&(c.positionUsing=u.getPositioningCSS()),f(s,t(e,o,a)),1===e?(f(i,{transition:"none",opacity:1}),i.offsetWidth,setTimeout(function(){f(i,{transition:"all "+o+"ms linear",opacity:0}),setTimeout(function(){u.remove(),n()},o)},o)):setTimeout(n,o)}),this},u.isStarted=function(){return"number"==typeof u.status},u.start=function(){u.status||u.set(0);var n=function(){setTimeout(function(){u.status&&(u.trickle(),n())},c.trickleSpeed)};return c.trickle&&n(),this},u.done=function(n){return n||u.status?u.inc(.3+.5*Math.random()).set(1):this},u.inc=function(e){var t=u.status;return t?("number"!=typeof e&&(e=(1-t)*n(Math.random()*t,.1,.95)),t=n(t+e,0,.994),u.set(t)):u.start()},u.trickle=function(){return u.inc(Math.random()*c.trickleRate)},function(){var n=0,e=0;u.promise=function(t){return t&&"resolved"!==t.state()?(0===e&&u.start(),n++,e++,t.always(function(){e--,0===e?(n=0,u.done()):u.set((n-e)/n)}),this):this}}(),u.render=function(n){if(u.isRendered())return document.getElementById("nprogress");i(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=c.template;var r,s=t.querySelector(c.barSelector),o=n?"-100":e(u.status||0),l=document.querySelector(c.parent);return f(s,{transition:"all 0 linear",transform:"translate3d("+o+"%,0,0)"}),c.showSpinner||(r=t.querySelector(c.spinnerSelector),r&&a(r)),l!=document.body&&i(l,"nprogress-custom-parent"),l.appendChild(t),t},u.remove=function(){s(document.documentElement,"nprogress-busy"),s(document.querySelector(c.parent),"nprogress-custom-parent");var n=document.getElementById("nprogress");n&&a(n)},u.isRendered=function(){return!!document.getElementById("nprogress")},u.getPositioningCSS=function(){var n=document.body.style,e="WebkitTransform"in n?"Webkit":"MozTransform"in n?"Moz":"msTransform"in n?"ms":"OTransform"in n?"O":"";return e+"Perspective"in n?"translate3d":e+"Transform"in n?"translate":"margin"};var l=function(){function n(){var t=e.shift();t&&t(n)}var e=[];return function(t){e.push(t),1==e.length&&n()}}(),f=function(){function n(n){return n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(n,e){return e.toUpperCase()})}function e(n){var e=document.body.style;if(n in e)return n;for(var t,r=i.length,s=n.charAt(0).toUpperCase()+n.slice(1);r--;)if(t=i[r]+s,t in e)return t;return n}function t(t){return t=n(t),s[t]||(s[t]=e(t))}function r(n,e,r){e=t(e),n.style[e]=r}var i=["Webkit","O","Moz","ms"],s={};return function(n,e){var t,i,s=arguments;if(2==s.length)for(t in e)i=e[t],void 0!==i&&e.hasOwnProperty(t)&&r(n,t,i);else r(n,s[1],s[2])}}();return u});
|
324
cdn/js/src/06.activate-power-mode.js
Normal file
324
cdn/js/src/06.activate-power-mode.js
Normal file
@ -0,0 +1,324 @@
|
|||||||
|
(function webpackUniversalModuleDefinition(root, factory) {
|
||||||
|
if(typeof exports === 'object' && typeof module === 'object')
|
||||||
|
module.exports = factory();
|
||||||
|
else if(typeof define === 'function' && define.amd)
|
||||||
|
define([], factory);
|
||||||
|
else if(typeof exports === 'object')
|
||||||
|
exports["POWERMODE"] = factory();
|
||||||
|
else
|
||||||
|
root["POWERMODE"] = factory();
|
||||||
|
})(this, function() {
|
||||||
|
return /******/ (function(modules) { // webpackBootstrap
|
||||||
|
/******/ // The module cache
|
||||||
|
/******/ var installedModules = {};
|
||||||
|
|
||||||
|
/******/ // The require function
|
||||||
|
/******/ function __webpack_require__(moduleId) {
|
||||||
|
|
||||||
|
/******/ // Check if module is in cache
|
||||||
|
/******/ if(installedModules[moduleId])
|
||||||
|
/******/ return installedModules[moduleId].exports;
|
||||||
|
|
||||||
|
/******/ // Create a new module (and put it into the cache)
|
||||||
|
/******/ var module = installedModules[moduleId] = {
|
||||||
|
/******/ exports: {},
|
||||||
|
/******/ id: moduleId,
|
||||||
|
/******/ loaded: false
|
||||||
|
/******/ };
|
||||||
|
|
||||||
|
/******/ // Execute the module function
|
||||||
|
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||||
|
|
||||||
|
/******/ // Flag the module as loaded
|
||||||
|
/******/ module.loaded = true;
|
||||||
|
|
||||||
|
/******/ // Return the exports of the module
|
||||||
|
/******/ return module.exports;
|
||||||
|
/******/ }
|
||||||
|
|
||||||
|
|
||||||
|
/******/ // expose the modules object (__webpack_modules__)
|
||||||
|
/******/ __webpack_require__.m = modules;
|
||||||
|
|
||||||
|
/******/ // expose the module cache
|
||||||
|
/******/ __webpack_require__.c = installedModules;
|
||||||
|
|
||||||
|
/******/ // __webpack_public_path__
|
||||||
|
/******/ __webpack_require__.p = "";
|
||||||
|
|
||||||
|
/******/ // Load entry module and return exports
|
||||||
|
/******/ return __webpack_require__(0);
|
||||||
|
/******/ })
|
||||||
|
/************************************************************************/
|
||||||
|
/******/ ([
|
||||||
|
/* 0 */
|
||||||
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var canvas = document.createElement('canvas');
|
||||||
|
canvas.width = window.innerWidth;
|
||||||
|
canvas.height = window.innerHeight;
|
||||||
|
canvas.style.cssText = 'position:fixed;top:0;left:0;pointer-events:none;z-index:999999';
|
||||||
|
window.addEventListener('resize', function () {
|
||||||
|
canvas.width = window.innerWidth;
|
||||||
|
canvas.height = window.innerHeight;
|
||||||
|
});
|
||||||
|
document.body.appendChild(canvas);
|
||||||
|
var context = canvas.getContext('2d');
|
||||||
|
var particles = [];
|
||||||
|
var particlePointer = 0;
|
||||||
|
var rendering = false;
|
||||||
|
|
||||||
|
POWERMODE.shake = true;
|
||||||
|
|
||||||
|
function getRandom(min, max) {
|
||||||
|
return Math.random() * (max - min) + min;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getColor(el) {
|
||||||
|
if (POWERMODE.colorful) {
|
||||||
|
var u = getRandom(0, 360);
|
||||||
|
return 'hsla(' + getRandom(u - 10, u + 10) + ', 100%, ' + getRandom(50, 80) + '%, ' + 1 + ')';
|
||||||
|
} else {
|
||||||
|
return window.getComputedStyle(el).color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCaret() {
|
||||||
|
var el = document.activeElement;
|
||||||
|
var bcr;
|
||||||
|
if (el.tagName === 'TEXTAREA' ||
|
||||||
|
(el.tagName === 'INPUT' && el.getAttribute('type') === 'text')) {
|
||||||
|
var offset = __webpack_require__(1)(el, el.selectionEnd);
|
||||||
|
bcr = el.getBoundingClientRect();
|
||||||
|
return {
|
||||||
|
x: offset.left + bcr.left,
|
||||||
|
y: offset.top + bcr.top,
|
||||||
|
color: getColor(el)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
var selection = window.getSelection();
|
||||||
|
if (selection.rangeCount) {
|
||||||
|
var range = selection.getRangeAt(0);
|
||||||
|
var startNode = range.startContainer;
|
||||||
|
if (startNode.nodeType === document.TEXT_NODE) {
|
||||||
|
startNode = startNode.parentNode;
|
||||||
|
}
|
||||||
|
bcr = range.getBoundingClientRect();
|
||||||
|
return {
|
||||||
|
x: bcr.left,
|
||||||
|
y: bcr.top,
|
||||||
|
color: getColor(startNode)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return { x: 0, y: 0, color: 'transparent' };
|
||||||
|
}
|
||||||
|
|
||||||
|
function createParticle(x, y, color) {
|
||||||
|
return {
|
||||||
|
x: x,
|
||||||
|
y: y,
|
||||||
|
alpha: 1,
|
||||||
|
color: color,
|
||||||
|
velocity: {
|
||||||
|
x: -1 + Math.random() * 2,
|
||||||
|
y: -3.5 + Math.random() * 2
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function POWERMODE() {
|
||||||
|
{ // spawn particles
|
||||||
|
var caret = getCaret();
|
||||||
|
var numParticles = 5 + Math.round(Math.random() * 10);
|
||||||
|
while (numParticles--) {
|
||||||
|
particles[particlePointer] = createParticle(caret.x, caret.y, caret.color);
|
||||||
|
particlePointer = (particlePointer + 1) % 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
{ // shake screen
|
||||||
|
if (POWERMODE.shake) {
|
||||||
|
var intensity = 1 + 2 * Math.random();
|
||||||
|
var x = intensity * (Math.random() > 0.5 ? -1 : 1);
|
||||||
|
var y = intensity * (Math.random() > 0.5 ? -1 : 1);
|
||||||
|
document.body.style.marginLeft = x + 'px';
|
||||||
|
document.body.style.marginTop = y + 'px';
|
||||||
|
setTimeout(function() {
|
||||||
|
document.body.style.marginLeft = '';
|
||||||
|
document.body.style.marginTop = '';
|
||||||
|
}, 75);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(!rendering){
|
||||||
|
requestAnimationFrame(loop);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
POWERMODE.colorful = false;
|
||||||
|
|
||||||
|
function loop() {
|
||||||
|
rendering = true;
|
||||||
|
context.clearRect(0, 0, canvas.width, canvas.height);
|
||||||
|
var rendered = false;
|
||||||
|
var rect = canvas.getBoundingClientRect();
|
||||||
|
for (var i = 0; i < particles.length; ++i) {
|
||||||
|
var particle = particles[i];
|
||||||
|
if (particle.alpha <= 0.1) continue;
|
||||||
|
particle.velocity.y += 0.075;
|
||||||
|
particle.x += particle.velocity.x;
|
||||||
|
particle.y += particle.velocity.y;
|
||||||
|
particle.alpha *= 0.96;
|
||||||
|
context.globalAlpha = particle.alpha;
|
||||||
|
context.fillStyle = particle.color;
|
||||||
|
context.fillRect(
|
||||||
|
Math.round(particle.x - 1.5) - rect.left,
|
||||||
|
Math.round(particle.y - 1.5) - rect.top,
|
||||||
|
3, 3
|
||||||
|
);
|
||||||
|
rendered = true;
|
||||||
|
}
|
||||||
|
if(rendered){
|
||||||
|
requestAnimationFrame(loop);
|
||||||
|
}else{
|
||||||
|
rendering = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = POWERMODE;
|
||||||
|
|
||||||
|
|
||||||
|
/***/ }),
|
||||||
|
/* 1 */
|
||||||
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
|
/* jshint browser: true */
|
||||||
|
|
||||||
|
(function () {
|
||||||
|
|
||||||
|
// The properties that we copy into a mirrored div.
|
||||||
|
// Note that some browsers, such as Firefox,
|
||||||
|
// do not concatenate properties, i.e. padding-top, bottom etc. -> padding,
|
||||||
|
// so we have to do every single property specifically.
|
||||||
|
var properties = [
|
||||||
|
'direction', // RTL support
|
||||||
|
'boxSizing',
|
||||||
|
'width', // on Chrome and IE, exclude the scrollbar, so the mirror div wraps exactly as the textarea does
|
||||||
|
'height',
|
||||||
|
'overflowX',
|
||||||
|
'overflowY', // copy the scrollbar for IE
|
||||||
|
|
||||||
|
'borderTopWidth',
|
||||||
|
'borderRightWidth',
|
||||||
|
'borderBottomWidth',
|
||||||
|
'borderLeftWidth',
|
||||||
|
'borderStyle',
|
||||||
|
|
||||||
|
'paddingTop',
|
||||||
|
'paddingRight',
|
||||||
|
'paddingBottom',
|
||||||
|
'paddingLeft',
|
||||||
|
|
||||||
|
// https://developer.mozilla.org/en-US/docs/Web/CSS/font
|
||||||
|
'fontStyle',
|
||||||
|
'fontVariant',
|
||||||
|
'fontWeight',
|
||||||
|
'fontStretch',
|
||||||
|
'fontSize',
|
||||||
|
'fontSizeAdjust',
|
||||||
|
'lineHeight',
|
||||||
|
'fontFamily',
|
||||||
|
|
||||||
|
'textAlign',
|
||||||
|
'textTransform',
|
||||||
|
'textIndent',
|
||||||
|
'textDecoration', // might not make a difference, but better be safe
|
||||||
|
|
||||||
|
'letterSpacing',
|
||||||
|
'wordSpacing',
|
||||||
|
|
||||||
|
'tabSize',
|
||||||
|
'MozTabSize'
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
var isFirefox = window.mozInnerScreenX != null;
|
||||||
|
|
||||||
|
function getCaretCoordinates(element, position, options) {
|
||||||
|
|
||||||
|
var debug = options && options.debug || false;
|
||||||
|
if (debug) {
|
||||||
|
var el = document.querySelector('#input-textarea-caret-position-mirror-div');
|
||||||
|
if ( el ) { el.parentNode.removeChild(el); }
|
||||||
|
}
|
||||||
|
|
||||||
|
// mirrored div
|
||||||
|
var div = document.createElement('div');
|
||||||
|
div.id = 'input-textarea-caret-position-mirror-div';
|
||||||
|
document.body.appendChild(div);
|
||||||
|
|
||||||
|
var style = div.style;
|
||||||
|
var computed = window.getComputedStyle? getComputedStyle(element) : element.currentStyle; // currentStyle for IE < 9
|
||||||
|
|
||||||
|
// default textarea styles
|
||||||
|
style.whiteSpace = 'pre-wrap';
|
||||||
|
if (element.nodeName !== 'INPUT')
|
||||||
|
style.wordWrap = 'break-word'; // only for textarea-s
|
||||||
|
|
||||||
|
// position off-screen
|
||||||
|
style.position = 'absolute'; // required to return coordinates properly
|
||||||
|
if (!debug)
|
||||||
|
style.visibility = 'hidden'; // not 'display: none' because we want rendering
|
||||||
|
|
||||||
|
// transfer the element's properties to the div
|
||||||
|
properties.forEach(function (prop) {
|
||||||
|
style[prop] = computed[prop];
|
||||||
|
});
|
||||||
|
|
||||||
|
if (isFirefox) {
|
||||||
|
// Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275
|
||||||
|
if (element.scrollHeight > parseInt(computed.height))
|
||||||
|
style.overflowY = 'scroll';
|
||||||
|
} else {
|
||||||
|
style.overflow = 'hidden'; // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll'
|
||||||
|
}
|
||||||
|
|
||||||
|
div.textContent = element.value.substring(0, position);
|
||||||
|
// the second special handling for input type="text" vs textarea: spaces need to be replaced with non-breaking spaces - http://stackoverflow.com/a/13402035/1269037
|
||||||
|
if (element.nodeName === 'INPUT')
|
||||||
|
div.textContent = div.textContent.replace(/\s/g, "\u00a0");
|
||||||
|
|
||||||
|
var span = document.createElement('span');
|
||||||
|
// Wrapping must be replicated *exactly*, including when a long word gets
|
||||||
|
// onto the next line, with whitespace at the end of the line before (#7).
|
||||||
|
// The *only* reliable way to do that is to copy the *entire* rest of the
|
||||||
|
// textarea's content into the <span> created at the caret position.
|
||||||
|
// for inputs, just '.' would be enough, but why bother?
|
||||||
|
span.textContent = element.value.substring(position) || '.'; // || because a completely empty faux span doesn't render at all
|
||||||
|
div.appendChild(span);
|
||||||
|
|
||||||
|
var coordinates = {
|
||||||
|
top: span.offsetTop + parseInt(computed['borderTopWidth']),
|
||||||
|
left: span.offsetLeft + parseInt(computed['borderLeftWidth'])
|
||||||
|
};
|
||||||
|
|
||||||
|
if (debug) {
|
||||||
|
span.style.backgroundColor = '#aaa';
|
||||||
|
} else {
|
||||||
|
document.body.removeChild(div);
|
||||||
|
}
|
||||||
|
|
||||||
|
return coordinates;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof module != "undefined" && typeof module.exports != "undefined") {
|
||||||
|
module.exports = getCaretCoordinates;
|
||||||
|
} else {
|
||||||
|
window.getCaretCoordinates = getCaretCoordinates;
|
||||||
|
}
|
||||||
|
|
||||||
|
}());
|
||||||
|
|
||||||
|
/***/ })
|
||||||
|
/******/ ])
|
||||||
|
});
|
||||||
|
;
|
2
cdn/js/src/07.APlayer.min.js
vendored
Normal file
2
cdn/js/src/07.APlayer.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
cdn/js/src/08.lazyload.min.js
vendored
Normal file
2
cdn/js/src/08.lazyload.min.js
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
/*! Lazy Load 2.0.0-beta.2 - MIT license - Copyright 2007-2017 Mika Tuupola */
|
||||||
|
!function(t,e){"object"==typeof exports?module.exports=e(t):"function"==typeof define&&define.amd?define([],e(t)):t.LazyLoad=e(t)}("undefined"!=typeof global?global:this.window||this.global,function(t){"use strict";function e(t,e){this.settings=r(s,e||{}),this.images=t||document.querySelectorAll(this.settings.selector),this.observer=null,this.init()}const s={src:"data-src",srcset:"data-srcset",selector:".lazyload"},r=function(){let t={},e=!1,s=0,o=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],s++);for(;s<o;s++)!function(s){for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e&&"[object Object]"===Object.prototype.toString.call(s[o])?t[o]=r(!0,t[o],s[o]):t[o]=s[o])}(arguments[s]);return t};if(e.prototype={init:function(){if(!t.IntersectionObserver)return void this.loadImages();let e=this,s={root:null,rootMargin:"0px",threshold:[0]};this.observer=new IntersectionObserver(function(t){t.forEach(function(t){if(t.intersectionRatio>0){e.observer.unobserve(t.target);let s=t.target.getAttribute(e.settings.src),r=t.target.getAttribute(e.settings.srcset);"img"===t.target.tagName.toLowerCase()?(s&&(t.target.src=s),r&&(t.target.srcset=r)):t.target.style.backgroundImage="url("+s+")"}})},s),this.images.forEach(function(t){e.observer.observe(t)})},loadAndDestroy:function(){this.settings&&(this.loadImages(),this.destroy())},loadImages:function(){if(!this.settings)return;let t=this;this.images.forEach(function(e){let s=e.getAttribute(t.settings.src),r=e.getAttribute(t.settings.srcset);"img"===e.tagName.toLowerCase()?(s&&(e.src=s),r&&(e.srcset=r)):e.style.backgroundImage="url("+s+")"})},destroy:function(){this.settings&&(this.observer.disconnect(),this.settings=null)}},t.lazyload=function(t,s){return new e(t,s)},t.jQuery){const s=t.jQuery;s.fn.lazyload=function(t){return t=t||{},t.attribute=t.attribute||"data-src",new e(s.makeArray(this),t),this}}return e});
|
6
cdn/js/src/10.materialize.min.js
vendored
Normal file
6
cdn/js/src/10.materialize.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
16
cdn/js/src/11.third-part-functions.js
Normal file
16
cdn/js/src/11.third-part-functions.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
// Gravatar
|
||||||
|
function get_gravatar(email, size) {
|
||||||
|
|
||||||
|
// MD5 (Message-Digest Algorithm) by WebToolkit
|
||||||
|
//
|
||||||
|
|
||||||
|
var MD5=function(s){function L(k,d){return(k<<d)|(k>>>(32-d))}function K(G,k){var I,d,F,H,x;F=(G&2147483648);H=(k&2147483648);I=(G&1073741824);d=(k&1073741824);x=(G&1073741823)+(k&1073741823);if(I&d){return(x^2147483648^F^H)}if(I|d){if(x&1073741824){return(x^3221225472^F^H)}else{return(x^1073741824^F^H)}}else{return(x^F^H)}}function r(d,F,k){return(d&F)|((~d)&k)}function q(d,F,k){return(d&k)|(F&(~k))}function p(d,F,k){return(d^F^k)}function n(d,F,k){return(F^(d|(~k)))}function u(G,F,aa,Z,k,H,I){G=K(G,K(K(r(F,aa,Z),k),I));return K(L(G,H),F)}function f(G,F,aa,Z,k,H,I){G=K(G,K(K(q(F,aa,Z),k),I));return K(L(G,H),F)}function D(G,F,aa,Z,k,H,I){G=K(G,K(K(p(F,aa,Z),k),I));return K(L(G,H),F)}function t(G,F,aa,Z,k,H,I){G=K(G,K(K(n(F,aa,Z),k),I));return K(L(G,H),F)}function e(G){var Z;var F=G.length;var x=F+8;var k=(x-(x%64))/64;var I=(k+1)*16;var aa=Array(I-1);var d=0;var H=0;while(H<F){Z=(H-(H%4))/4;d=(H%4)*8;aa[Z]=(aa[Z]|(G.charCodeAt(H)<<d));H++}Z=(H-(H%4))/4;d=(H%4)*8;aa[Z]=aa[Z]|(128<<d);aa[I-2]=F<<3;aa[I-1]=F>>>29;return aa}function B(x){var k="",F="",G,d;for(d=0;d<=3;d++){G=(x>>>(d*8))&255;F="0"+G.toString(16);k=k+F.substr(F.length-2,2)}return k}function J(k){k=k.replace(/rn/g,"n");var d="";for(var F=0;F<k.length;F++){var x=k.charCodeAt(F);if(x<128){d+=String.fromCharCode(x)}else{if((x>127)&&(x<2048)){d+=String.fromCharCode((x>>6)|192);d+=String.fromCharCode((x&63)|128)}else{d+=String.fromCharCode((x>>12)|224);d+=String.fromCharCode(((x>>6)&63)|128);d+=String.fromCharCode((x&63)|128)}}}return d}var C=Array();var P,h,E,v,g,Y,X,W,V;var S=7,Q=12,N=17,M=22;var A=5,z=9,y=14,w=20;var o=4,m=11,l=16,j=23;var U=6,T=10,R=15,O=21;s=J(s);C=e(s);Y=1732584193;X=4023233417;W=2562383102;V=271733878;for(P=0;P<C.length;P+=16){h=Y;E=X;v=W;g=V;Y=u(Y,X,W,V,C[P+0],S,3614090360);V=u(V,Y,X,W,C[P+1],Q,3905402710);W=u(W,V,Y,X,C[P+2],N,606105819);X=u(X,W,V,Y,C[P+3],M,3250441966);Y=u(Y,X,W,V,C[P+4],S,4118548399);V=u(V,Y,X,W,C[P+5],Q,1200080426);W=u(W,V,Y,X,C[P+6],N,2821735955);X=u(X,W,V,Y,C[P+7],M,4249261313);Y=u(Y,X,W,V,C[P+8],S,1770035416);V=u(V,Y,X,W,C[P+9],Q,2336552879);W=u(W,V,Y,X,C[P+10],N,4294925233);X=u(X,W,V,Y,C[P+11],M,2304563134);Y=u(Y,X,W,V,C[P+12],S,1804603682);V=u(V,Y,X,W,C[P+13],Q,4254626195);W=u(W,V,Y,X,C[P+14],N,2792965006);X=u(X,W,V,Y,C[P+15],M,1236535329);Y=f(Y,X,W,V,C[P+1],A,4129170786);V=f(V,Y,X,W,C[P+6],z,3225465664);W=f(W,V,Y,X,C[P+11],y,643717713);X=f(X,W,V,Y,C[P+0],w,3921069994);Y=f(Y,X,W,V,C[P+5],A,3593408605);V=f(V,Y,X,W,C[P+10],z,38016083);W=f(W,V,Y,X,C[P+15],y,3634488961);X=f(X,W,V,Y,C[P+4],w,3889429448);Y=f(Y,X,W,V,C[P+9],A,568446438);V=f(V,Y,X,W,C[P+14],z,3275163606);W=f(W,V,Y,X,C[P+3],y,4107603335);X=f(X,W,V,Y,C[P+8],w,1163531501);Y=f(Y,X,W,V,C[P+13],A,2850285829);V=f(V,Y,X,W,C[P+2],z,4243563512);W=f(W,V,Y,X,C[P+7],y,1735328473);X=f(X,W,V,Y,C[P+12],w,2368359562);Y=D(Y,X,W,V,C[P+5],o,4294588738);V=D(V,Y,X,W,C[P+8],m,2272392833);W=D(W,V,Y,X,C[P+11],l,1839030562);X=D(X,W,V,Y,C[P+14],j,4259657740);Y=D(Y,X,W,V,C[P+1],o,2763975236);V=D(V,Y,X,W,C[P+4],m,1272893353);W=D(W,V,Y,X,C[P+7],l,4139469664);X=D(X,W,V,Y,C[P+10],j,3200236656);Y=D(Y,X,W,V,C[P+13],o,681279174);V=D(V,Y,X,W,C[P+0],m,3936430074);W=D(W,V,Y,X,C[P+3],l,3572445317);X=D(X,W,V,Y,C[P+6],j,76029189);Y=D(Y,X,W,V,C[P+9],o,3654602809);V=D(V,Y,X,W,C[P+12],m,3873151461);W=D(W,V,Y,X,C[P+15],l,530742520);X=D(X,W,V,Y,C[P+2],j,3299628645);Y=t(Y,X,W,V,C[P+0],U,4096336452);V=t(V,Y,X,W,C[P+7],T,1126891415);W=t(W,V,Y,X,C[P+14],R,2878612391);X=t(X,W,V,Y,C[P+5],O,4237533241);Y=t(Y,X,W,V,C[P+12],U,1700485571);V=t(V,Y,X,W,C[P+3],T,2399980690);W=t(W,V,Y,X,C[P+10],R,4293915773);X=t(X,W,V,Y,C[P+1],O,2240044497);Y=t(Y,X,W,V,C[P+8],U,1873313359);V=t(V,Y,X,W,C[P+15],T,4264355552);W=t(W,V,Y,X,C[P+6],R,2734768916);X=t(X,W,V,Y,C[P+13],O,1309151649);Y=t(Y,X,W,V,C[P+4],U,4149444226);V=t(V,Y,X,W,C[P+11],T,3174756917);W=t(W,V,Y,X,C[P+2],R,718787259);X=t(X,W,V,Y,C[P+9],O,3951481745);Y=K(Y,h);X=K(X,E);W=K(W,v);V=K(V,g)}var i=B(Y)+B(X)+B(W)+B(V);return i.toLowerCase()};
|
||||||
|
|
||||||
|
var size = size || 80;
|
||||||
|
|
||||||
|
return 'https://gravatar.shino.cc/avatar/' + MD5(email) + '.jpg?s=' + size + '&d=mm';
|
||||||
|
}
|
||||||
|
|
||||||
|
// sync css
|
||||||
|
!function(e){"use strict";var n=function(n,t,o){var l,r=e.document,i=r.createElement("link");if(t)l=t;else{var a=(r.body||r.getElementsByTagName("head")[0]).childNodes;l=a[a.length-1]}var d=r.styleSheets;i.rel="stylesheet",i.href=n,i.media="only x",l.parentNode.insertBefore(i,t?l:l.nextSibling);var f=function(e){for(var n=i.href,t=d.length;t--;)if(d[t].href===n)return e();setTimeout(function(){f(e)})};return i.onloadcssdefined=f,f(function(){i.media=o||"all"}),i};"undefined"!=typeof module?module.exports=n:e.loadCSS=n}("undefined"!=typeof global?global:this);
|
||||||
|
|
1
cdn/js/src/13.social-share.min.js
vendored
Normal file
1
cdn/js/src/13.social-share.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
cdn/js/src/14.baguetteBox.min.js
vendored
Normal file
7
cdn/js/src/14.baguetteBox.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
2
cdn/js/src/16.hls.js
Normal file
2
cdn/js/src/16.hls.js
Normal file
File diff suppressed because one or more lines are too long
13
cdn/js/src/17.query.fancybox.min.js
vendored
Normal file
13
cdn/js/src/17.query.fancybox.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
7
cdn/js/src/18.clipboard.min.js
vendored
Normal file
7
cdn/js/src/18.clipboard.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
@ -7,7 +7,8 @@
|
|||||||
* @package Sakura
|
* @package Sakura
|
||||||
*/
|
*/
|
||||||
|
|
||||||
define( 'SAKURA_VERSION', '3.1.0' );
|
define( 'SAKURA_VERSION', '3.1.1' );
|
||||||
|
define( 'JSDELIVR_VERSION', '3.6.3' );
|
||||||
|
|
||||||
//ini_set('display_errors', true);
|
//ini_set('display_errors', true);
|
||||||
//error_reporting(E_ALL);
|
//error_reporting(E_ALL);
|
||||||
@ -169,11 +170,10 @@ add_action( 'after_setup_theme', 'akina_content_width', 0 );
|
|||||||
* Enqueue scripts and styles.
|
* Enqueue scripts and styles.
|
||||||
*/
|
*/
|
||||||
function sakura_scripts() {
|
function sakura_scripts() {
|
||||||
wp_enqueue_script( 'share-js', 'https://cdn.jsdelivr.net/gh/moezx/cdn@3.5.7/js/src/13.social-share.min.js', array(), SAKURA_VERSION, true );
|
|
||||||
if(akina_option('jsdelivr_cdn_test')){
|
if(akina_option('jsdelivr_cdn_test')){
|
||||||
wp_enqueue_script( 'js_lab', 'https://pages.shino.cc/cdn/js/lib.js', array(), SAKURA_VERSION, true );
|
wp_enqueue_script( 'js_lib', get_template_directory_uri() . '/cdn/js/lib.js', array(), SAKURA_VERSION.akina_option('cookie_version', ''), true );
|
||||||
} else {
|
} else {
|
||||||
wp_enqueue_script( 'js_lab', 'https://cdn.jsdelivr.net/gh/moezx/cdn@' . akina_option('jsdelivr_cdn_version', 'latest') . '/js/lib.min.js', array(), SAKURA_VERSION, true );
|
wp_enqueue_script( 'js_lib', 'https://cdn.jsdelivr.net/gh/moezx/cdn@' . JSDELIVR_VERSION . '/sakura/js/lib.min.js', array(), SAKURA_VERSION, true );
|
||||||
}
|
}
|
||||||
wp_enqueue_style( 'saukra_css', get_stylesheet_uri(), array(), SAKURA_VERSION );
|
wp_enqueue_style( 'saukra_css', get_stylesheet_uri(), array(), SAKURA_VERSION );
|
||||||
wp_enqueue_script( 'app', get_template_directory_uri() . '/js/sakura-app.js', array(), SAKURA_VERSION, true );
|
wp_enqueue_script( 'app', get_template_directory_uri() . '/js/sakura-app.js', array(), SAKURA_VERSION, true );
|
||||||
@ -223,7 +223,7 @@ require get_template_directory() . '/inc/categories-images.php';
|
|||||||
|
|
||||||
//Comment Location Start
|
//Comment Location Start
|
||||||
function convertip($ip) {
|
function convertip($ip) {
|
||||||
$dat_path = dirname(__FILE__).'/QQWry.Dat';
|
$dat_path = dirname(__FILE__).'/inc/QQWry.Dat';
|
||||||
if(!$fd = @fopen($dat_path, 'rb')){
|
if(!$fd = @fopen($dat_path, 'rb')){
|
||||||
return 'IP date file not exists or access denied';
|
return 'IP date file not exists or access denied';
|
||||||
}
|
}
|
||||||
@ -1382,22 +1382,56 @@ function codecheese_register_post( $sanitized_user_login, $user_email, $errors )
|
|||||||
$errors->add('invalid_email', __('<b>ERROR</b>: This email domain (<b>@'.$email[1].'</b>) has been blocked. Please use another email.'));
|
$errors->add('invalid_email', __('<b>ERROR</b>: This email domain (<b>@'.$email[1].'</b>) has been blocked. Please use another email.'));
|
||||||
}
|
}
|
||||||
|
|
||||||
// lazyload images in atricles
|
// html 标签处理器
|
||||||
function lazyload_img($content) {
|
function html_tag_parser($content) {
|
||||||
if(!is_feed()) {
|
if(!is_feed()) {
|
||||||
$content=preg_replace('/<img(.+)src=[\'"]([^\'"]+)[\'"](.*)>/i',"<img\$1class=\"lazyload\" data-src=\"\$2\" src=\"https://cdn.jsdelivr.net/gh/moezx/cdn@3.0.2/img/svg/loader/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\"\$3 >\n<noscript>\$0</noscript>",$content);
|
$content=preg_replace(
|
||||||
|
'/<img(.+)src=[\'"]([^\'"]+)[\'"](.*)>/i',
|
||||||
|
"<img\$1class=\"lazyload\" data-src=\"\$2\" src=\"https://cdn.jsdelivr.net/gh/moezx/cdn@3.0.2/img/svg/loader/trans.ajax-spinner-preloader.svg\" onerror=\"imgError(this)\"\$3 >\n<noscript>\$0</noscript>",
|
||||||
|
$content
|
||||||
|
);
|
||||||
|
|
||||||
|
//Fancybox
|
||||||
|
/* Markdown Regex Pattern for Matching URLs:
|
||||||
|
* https://daringfireball.net/2010/07/improved_regex_for_matching_urls
|
||||||
|
*/
|
||||||
|
$url_regex ='(((http|https):\/\/)?(\w(\:\w)?@)?([0-9a-z_-]+\.)*?([a-z0-9-]+\.[a-z]{2,6}(\.[a-z]{2})?(\:[0-9]{2,6})?)((\/[^?#<>\/\\*":]*)+(\?[^#]*)?(#.*)?)?)';
|
||||||
|
|
||||||
|
//With Thumbnail: !{alt}(url)[th_url]
|
||||||
|
$content=preg_replace(
|
||||||
|
'/!\{([^\{\}]+)*\}\('.$url_regex.'\)\['.$url_regex.'\]/i',
|
||||||
|
'<a data-fancybox="gallery"
|
||||||
|
data-caption="$1"
|
||||||
|
class="fancybox"
|
||||||
|
href="$2"
|
||||||
|
alt="$1"
|
||||||
|
title="$1"><img src="$15" target="_blank" rel="nofollow" class="fancybox"></a>',
|
||||||
|
$content
|
||||||
|
);
|
||||||
|
|
||||||
|
//Without Thumbnail :!{alt}(url)
|
||||||
|
$content=preg_replace(
|
||||||
|
'/!\{([^\{\}]+)*\}\('.$url_regex.'\)/i',
|
||||||
|
'<a data-fancybox="gallery"
|
||||||
|
data-caption="$1"
|
||||||
|
class="fancybox"
|
||||||
|
href="$2"
|
||||||
|
alt="$1"
|
||||||
|
title="$1"><img src="$2" target="_blank" rel="nofollow" class="fancybox"></a>',
|
||||||
|
$content
|
||||||
|
);
|
||||||
}
|
}
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
add_filter('the_content', 'lazyload_img'); //替换文章关键词
|
add_filter('the_content', 'html_tag_parser'); //替换文章关键词
|
||||||
//add_filter( 'comment_text', 'lazyload_img' );//替换评论关键词
|
//add_filter( 'comment_text', 'html_tag_parser' );//替换评论关键词
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* QQ 评论
|
* QQ 评论
|
||||||
*/
|
*/
|
||||||
// 数据库插入评论表单的qq字段
|
// 数据库插入评论表单的qq字段
|
||||||
add_action('wp_insert_comment','inlojv_sql_insert_qq_field',10,2);
|
add_action('wp_insert_comment','sql_insert_qq_field',10,2);
|
||||||
function inlojv_sql_insert_qq_field($comment_ID,$commmentdata) {
|
function sql_insert_qq_field($comment_ID,$commmentdata) {
|
||||||
$qq = isset($_POST['new_field_qq']) ? $_POST['new_field_qq'] : false;
|
$qq = isset($_POST['new_field_qq']) ? $_POST['new_field_qq'] : false;
|
||||||
update_comment_meta($comment_ID,'new_field_qq',$qq); // new_field_qq 是表单name值,也是存储在数据库里的字段名字
|
update_comment_meta($comment_ID,'new_field_qq',$qq); // new_field_qq 是表单name值,也是存储在数据库里的字段名字
|
||||||
}
|
}
|
||||||
@ -1419,8 +1453,8 @@ function output_comments_qq_columns( $column_name, $comment_id ){
|
|||||||
/**
|
/**
|
||||||
* 头像调用路径
|
* 头像调用路径
|
||||||
*/
|
*/
|
||||||
add_filter( 'get_avatar', 'inlojv_change_avatar', 10, 3 );
|
add_filter( 'get_avatar', 'change_avatar', 10, 3 );
|
||||||
function inlojv_change_avatar($avatar){
|
function change_avatar($avatar){
|
||||||
global $comment;
|
global $comment;
|
||||||
if( get_comment_meta( $comment->comment_ID, 'new_field_qq', true ) ){
|
if( get_comment_meta( $comment->comment_ID, 'new_field_qq', true ) ){
|
||||||
$qq_number = get_comment_meta( $comment->comment_ID, 'new_field_qq', true );
|
$qq_number = get_comment_meta( $comment->comment_ID, 'new_field_qq', true );
|
||||||
|
@ -119,5 +119,11 @@ window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</header><!-- #masthead -->
|
</header><!-- #masthead -->
|
||||||
<?php the_headPattern(); ?>
|
<?php if (get_post_meta(get_the_ID(), 'cover_type', true) == 'hls') {
|
||||||
|
the_video_headPattern_hls();
|
||||||
|
} elseif (get_post_meta(get_the_ID(), 'cover_type', true) == 'normal') {
|
||||||
|
the_video_headPattern_normal();
|
||||||
|
}else {
|
||||||
|
the_headPattern();
|
||||||
|
} ?>
|
||||||
<div id="content" class="site-content">
|
<div id="content" class="site-content">
|
Binary file not shown.
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 14 KiB |
@ -27,7 +27,7 @@ if ( akina_option('theme_skin') ) { ?>
|
|||||||
}
|
}
|
||||||
|
|
||||||
.scrollbar,.butterBar-message {
|
.scrollbar,.butterBar-message {
|
||||||
background: <?php echo akina_option('theme_skin'); ?>
|
background: <?php echo akina_option('theme_skin'); ?> !important
|
||||||
}
|
}
|
||||||
|
|
||||||
#nprogress .spinner-icon{
|
#nprogress .spinner-icon{
|
||||||
|
@ -25,6 +25,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||||||
|
|
||||||
/* If the user can't edit theme options, no use running this plugin */
|
/* If the user can't edit theme options, no use running this plugin */
|
||||||
|
|
||||||
|
if ( get_user_locale( get_current_user_id() ) == "zh_CN") {
|
||||||
|
define( 'SAKURA_OPTIONS', 'Sakura主题设置' );
|
||||||
|
}
|
||||||
|
if ( get_user_locale( get_current_user_id() ) == "zh_TW") {
|
||||||
|
define( 'SAKURA_OPTIONS', 'Sakura主題設置' );
|
||||||
|
}
|
||||||
|
if ( get_user_locale( get_current_user_id() ) == "ja") {
|
||||||
|
define( 'SAKURA_OPTIONS', 'さくらテーマの設定' );
|
||||||
|
}
|
||||||
|
if ( get_user_locale( get_current_user_id() ) == "ja-JP") {
|
||||||
|
define( 'SAKURA_OPTIONS', 'さくらテーマの設定' );
|
||||||
|
} else {
|
||||||
|
define( 'SAKURA_OPTIONS', 'Sakura Options' );
|
||||||
|
}
|
||||||
|
|
||||||
add_action( 'init', 'optionsframework_rolescheck' );
|
add_action( 'init', 'optionsframework_rolescheck' );
|
||||||
|
|
||||||
function optionsframework_rolescheck () {
|
function optionsframework_rolescheck () {
|
||||||
@ -179,8 +194,8 @@ function optionsframework_setdefaults() {
|
|||||||
function optionsframework_menu_settings() {
|
function optionsframework_menu_settings() {
|
||||||
|
|
||||||
$menu = array(
|
$menu = array(
|
||||||
'page_title' => __( 'Sakura Options', 'optionsframework'),
|
'page_title' => __( SAKURA_OPTIONS, 'optionsframework'),
|
||||||
'menu_title' => __('Sakura Options', 'optionsframework'),
|
'menu_title' => __( SAKURA_OPTIONS, 'optionsframework'),
|
||||||
'capability' => 'edit_theme_options',
|
'capability' => 'edit_theme_options',
|
||||||
'menu_slug' => 'options-framework',
|
'menu_slug' => 'options-framework',
|
||||||
'callback' => 'optionsframework_page'
|
'callback' => 'optionsframework_page'
|
||||||
@ -410,7 +425,7 @@ function optionsframework_adminbar() {
|
|||||||
$wp_admin_bar->add_menu( array(
|
$wp_admin_bar->add_menu( array(
|
||||||
'parent' => 'appearance',
|
'parent' => 'appearance',
|
||||||
'id' => 'of_theme_options',
|
'id' => 'of_theme_options',
|
||||||
'title' => __( 'Sakura Options', 'options_framework_theme' ),
|
'title' => __( SAKURA_OPTIONS, 'options_framework_theme' ),
|
||||||
'href' => admin_url( 'themes.php?page=options-framework' )
|
'href' => admin_url( 'themes.php?page=options-framework' )
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -13,19 +13,44 @@ mashiro_option.site_name = "<?php echo akina_option('site_name', ''); ?>";
|
|||||||
mashiro_option.author_name = "<?php echo akina_option('author_name', ''); ?>";
|
mashiro_option.author_name = "<?php echo akina_option('author_name', ''); ?>";
|
||||||
mashiro_option.template_url = "<?php echo get_template_directory_uri(); ?>";
|
mashiro_option.template_url = "<?php echo get_template_directory_uri(); ?>";
|
||||||
mashiro_option.site_url = "<?php echo site_url(); ?>";
|
mashiro_option.site_url = "<?php echo site_url(); ?>";
|
||||||
mashiro_option.cover_api = "<?php echo get_site_url() ?>/wp-content/themes/Sakura/cover/";
|
mashiro_option.qq_api_url = "https://api.2heng.xin/qqinfo/";
|
||||||
mashiro_option.qq_api_url = "https://api.mashiro.top/qqinfo/";
|
mashiro_option.qq_avatar_api_url = "https://api.2heng.xin/qqinfo/";
|
||||||
mashiro_option.qq_avatar_api_url = "https://api.mashiro.top/qqinfo/";
|
|
||||||
|
<?php if( is_home() ){ ?>
|
||||||
|
mashiro_option.land_at_home = true;
|
||||||
|
<?php }else {?>
|
||||||
|
mashiro_option.land_at_home = false;
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if(akina_option('image_viewer') == 0){ ?>
|
||||||
|
mashiro_option.baguetteBoxON = false;
|
||||||
|
<?php }else {?>
|
||||||
|
mashiro_option.baguetteBoxON = true;
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
|
<?php if(akina_option('clipboard_copyright') == 0){ ?>
|
||||||
|
mashiro_option.clipboardCopyright = false;
|
||||||
|
<?php }else {?>
|
||||||
|
mashiro_option.clipboardCopyright = true;
|
||||||
|
<?php } ?>
|
||||||
|
|
||||||
<?php if(akina_option('jsdelivr_cdn_test')){ ?>
|
<?php if(akina_option('jsdelivr_cdn_test')){ ?>
|
||||||
mashiro_option.jsdelivr_css_src = "https://pages.shino.cc/cdn/css/lib.css";
|
mashiro_option.jsdelivr_css_src = "<?php echo get_template_directory_uri() ?>/cdn/css/lib.css?<?php echo SAKURA_VERSION.akina_option('cookie_version', ''); ?>";
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
mashiro_option.jsdelivr_css_src = "https://cdn.jsdelivr.net/gh/moezx/cdn@<?php echo akina_option('jsdelivr_cdn_version', 'latest'); ?>/css/lib.min.css";
|
mashiro_option.jsdelivr_css_src = "https://cdn.jsdelivr.net/gh/moezx/cdn@<?php echo JSDELIVR_VERSION; ?>/sakura/css/lib.min.css";
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (akina_option('playlist_id', '')): ?>
|
<?php if (akina_option('playlist_id', '')): ?>
|
||||||
mashiro_option.float_player_on = true;
|
mashiro_option.float_player_on = true;
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if (akina_option('cover_img')) {
|
||||||
|
$imgurl = akina_option('cover_img');
|
||||||
|
} else {
|
||||||
|
$imgurl = get_site_url()."/wp-content/themes/Sakura/cover/index.php";
|
||||||
|
} ?>
|
||||||
|
mashiro_option.cover_api = "<?php echo $imgurl; ?>";
|
||||||
|
|
||||||
/*End of Initial Variables*/
|
/*End of Initial Variables*/
|
||||||
</script>
|
</script>
|
||||||
<?php }
|
<?php }
|
||||||
|
@ -320,6 +320,143 @@ function the_headPattern(){
|
|||||||
endif;
|
endif;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*视频封面*/
|
||||||
|
function the_video_headPattern_hls(){
|
||||||
|
$t = ''; // 标题
|
||||||
|
$full_image_url = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full');
|
||||||
|
$thubm_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(get_the_ID()), 'thumbnail');
|
||||||
|
|
||||||
|
$video_cover = get_post_meta(get_the_ID(), 'video_cover', true);
|
||||||
|
$video_cover_thumb = get_post_meta(get_the_ID(), 'video_cover_thumb', true);
|
||||||
|
// 检查这个字段是否有值
|
||||||
|
if (empty ( $video_cover_thumb )) { //如果值为空,输出默认值
|
||||||
|
$video_poster_attr = "";
|
||||||
|
} else {
|
||||||
|
$video_poster_attr = ' poster="' . $video_cover_thumb . '" ';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(is_single()){
|
||||||
|
$full_image_url = $full_image_url[0];
|
||||||
|
$thubm_image_url = $thubm_image_url[0];
|
||||||
|
if (have_posts()) : while (have_posts()) : the_post();
|
||||||
|
$center = 'single-center';
|
||||||
|
$header = 'single-header';
|
||||||
|
$ava = akina_option('focus_logo', '') ? akina_option('focus_logo', '') : get_avatar_url(get_the_author_meta('user_email'));
|
||||||
|
global $user_ID;
|
||||||
|
if($user_ID && current_user_can('level_10')) {
|
||||||
|
$edit_this_post_link = '<span class="bull">·</span><a href="'.get_edit_post_link().'">EDIT</a>';
|
||||||
|
} else {
|
||||||
|
$edit_this_post_link = '';
|
||||||
|
}
|
||||||
|
$t .= the_title( '<h1 class="entry-title">', '<button id="coverVideo-btn" class=".constant-width-to-height-ratio" onclick="coverVideo()"><i class="fa fa-pause" aria-hidden="true"></i></button></h1>', false);
|
||||||
|
$t .= '<p class="entry-census"><span><a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'),get_the_author_meta( 'user_nicename' ))) .'"><img src="'. get_avatar_url( get_the_author_meta('ID'), 64 )/*$ava*/ .'"></a></span><span><a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'),get_the_author_meta( 'user_nicename' ))) .'">'. get_the_author() .'</a></span><span class="bull">·</span>'. poi_time_since(get_post_time('U', true),false,true) .'<span class="bull">·</span>'. get_post_views(get_the_ID()) .' 次阅读'.$edit_this_post_link.'</p>';
|
||||||
|
endwhile; endif;
|
||||||
|
}elseif(is_page()){
|
||||||
|
$full_image_url = $full_image_url[0];
|
||||||
|
$thubm_image_url = $thubm_image_url[0];
|
||||||
|
$t .= the_title( '<h1 class="entry-title">', '</h1>', false);
|
||||||
|
}elseif(is_archive()){
|
||||||
|
$full_image_url = z_taxonomy_image_url();
|
||||||
|
$thubm_image_url = 'https://cdn.jsdelivr.net/gh/moezx/cdn@3.0.1/img/svg/loader/orange.progress-bar-stripe-loader.svg';
|
||||||
|
$des = category_description() ? category_description() : ''; // 描述
|
||||||
|
$t .= '<h1 class="cat-title">'.single_cat_title('', false).'</h1>';
|
||||||
|
$t .= ' <span class="cat-des">'.$des.'</span>';
|
||||||
|
}elseif(is_search()){
|
||||||
|
$full_image_url = get_random_bg_url();
|
||||||
|
$thubm_image_url = 'https://cdn.jsdelivr.net/gh/moezx/cdn@3.0.1/img/svg/loader/orange.progress-bar-stripe-loader.svg';
|
||||||
|
$t .= '<h1 class="entry-title search-title"> 关于“ '.get_search_query().' ”的搜索结果</h1>';
|
||||||
|
}
|
||||||
|
$thubm_image_url = $thubm_image_url . "#lazyload-blur";
|
||||||
|
$thubm_image_url = str_replace(akina_option('qiniu_cdn'),'https://cdn.2heng.xin/',$thubm_image_url);
|
||||||
|
if(akina_option('patternimg')) $full_image_url = false;
|
||||||
|
if(!is_home() && $full_image_url) : ?>
|
||||||
|
<div class="pattern-center-blank"></div>
|
||||||
|
<div class="pattern-center <?php if(is_single()){echo $center;} ?>">
|
||||||
|
<div class="pattern-attachment-img" style="height: auto;">
|
||||||
|
<video loop id="coverVideo" class='hls'
|
||||||
|
style="width: 100%; height: 100%"
|
||||||
|
<?php echo $video_poster_attr; ?>
|
||||||
|
data-src="<?php echo $video_cover; ?>">
|
||||||
|
|
||||||
|
</video>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>.pattern-center::before,.pattern-center-sakura::before{display:none}</style>
|
||||||
|
<header class="pattern-header <?php if(is_single()){echo $header;} ?>"><?php echo $t; ?></header>
|
||||||
|
</div>
|
||||||
|
<?php else :
|
||||||
|
echo '<div class="blank"></div>';
|
||||||
|
endif;
|
||||||
|
}
|
||||||
|
//普通视频
|
||||||
|
function the_video_headPattern_normal(){
|
||||||
|
$t = ''; // 标题
|
||||||
|
$full_image_url = wp_get_attachment_image_src(get_post_thumbnail_id(get_the_ID()), 'full');
|
||||||
|
$thubm_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(get_the_ID()), 'thumbnail');
|
||||||
|
|
||||||
|
$video_cover = get_post_meta(get_the_ID(), 'video_cover', true);
|
||||||
|
$video_cover_thumb = get_post_meta(get_the_ID(), 'video_cover_thumb', true);
|
||||||
|
// 检查这个字段是否有值
|
||||||
|
if (empty ( $video_cover_thumb )) { //如果值为空,输出默认值
|
||||||
|
$video_poster_attr = "";
|
||||||
|
} else {
|
||||||
|
$video_poster_attr = ' poster="' . $video_cover_thumb . '" ';
|
||||||
|
}
|
||||||
|
|
||||||
|
if(is_single()){
|
||||||
|
$full_image_url = $full_image_url[0];
|
||||||
|
$thubm_image_url = $thubm_image_url[0];
|
||||||
|
if (have_posts()) : while (have_posts()) : the_post();
|
||||||
|
$center = 'single-center';
|
||||||
|
$header = 'single-header';
|
||||||
|
$ava = akina_option('focus_logo', '') ? akina_option('focus_logo', '') : get_avatar_url(get_the_author_meta('user_email'));
|
||||||
|
global $user_ID;
|
||||||
|
if($user_ID && current_user_can('level_10')) {
|
||||||
|
$edit_this_post_link = '<span class="bull">·</span><a href="'.get_edit_post_link().'">EDIT</a>';
|
||||||
|
} else {
|
||||||
|
$edit_this_post_link = '';
|
||||||
|
}
|
||||||
|
$t .= the_title( '<h1 class="entry-title">', '<button id="coverVideo-btn" class=".constant-width-to-height-ratio" onclick="coverVideo()"><i class="fa fa-pause" aria-hidden="true"></i></button></h1>', false);
|
||||||
|
$t .= '<p class="entry-census"><span><a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'),get_the_author_meta( 'user_nicename' ))) .'"><img src="'. get_avatar_url( get_the_author_meta('ID'), 64 )/*$ava*/ .'"></a></span><span><a href="'. esc_url(get_author_posts_url(get_the_author_meta('ID'),get_the_author_meta( 'user_nicename' ))) .'">'. get_the_author() .'</a></span><span class="bull">·</span>'. poi_time_since(get_post_time('U', true),false,true) .'<span class="bull">·</span>'. get_post_views(get_the_ID()) .' 次阅读'.$edit_this_post_link.'</p>';
|
||||||
|
endwhile; endif;
|
||||||
|
}elseif(is_page()){
|
||||||
|
$full_image_url = $full_image_url[0];
|
||||||
|
$thubm_image_url = $thubm_image_url[0];
|
||||||
|
$t .= the_title( '<h1 class="entry-title">', '</h1>', false);
|
||||||
|
}elseif(is_archive()){
|
||||||
|
$full_image_url = z_taxonomy_image_url();
|
||||||
|
$thubm_image_url = 'https://cdn.jsdelivr.net/gh/moezx/cdn@3.0.1/img/svg/loader/orange.progress-bar-stripe-loader.svg';
|
||||||
|
$des = category_description() ? category_description() : ''; // 描述
|
||||||
|
$t .= '<h1 class="cat-title">'.single_cat_title('', false).'</h1>';
|
||||||
|
$t .= ' <span class="cat-des">'.$des.'</span>';
|
||||||
|
}elseif(is_search()){
|
||||||
|
$full_image_url = get_random_bg_url();
|
||||||
|
$thubm_image_url = 'https://cdn.jsdelivr.net/gh/moezx/cdn@3.0.1/img/svg/loader/orange.progress-bar-stripe-loader.svg';
|
||||||
|
$t .= '<h1 class="entry-title search-title"> 关于“ '.get_search_query().' ”的搜索结果</h1>';
|
||||||
|
}
|
||||||
|
$thubm_image_url = $thubm_image_url . "#lazyload-blur";
|
||||||
|
$thubm_image_url = str_replace(akina_option('qiniu_cdn'),'https://cdn.2heng.xin/',$thubm_image_url);
|
||||||
|
if(akina_option('patternimg')) $full_image_url = false;
|
||||||
|
if(!is_home() && $full_image_url) : ?>
|
||||||
|
<div class="pattern-center-blank"></div>
|
||||||
|
<div class="pattern-center <?php if(is_single()){echo $center;} ?>">
|
||||||
|
<div class="pattern-attachment-img" style="height: auto;">
|
||||||
|
<video autoplay loop id="coverVideo" class="normal-cover-video"
|
||||||
|
style="width: 100%; height: 100%"
|
||||||
|
<?php echo $video_poster_attr; ?>>
|
||||||
|
<source src="<?php echo $video_cover; ?>" type="video/mp4">
|
||||||
|
Your browser does not support HTML5 video.
|
||||||
|
</video>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>.pattern-center::before,.pattern-center-sakura::before{display:none}</style>
|
||||||
|
<header class="pattern-header <?php if(is_single()){echo $header;} ?>"><?php echo $t; ?></header>
|
||||||
|
</div>
|
||||||
|
<?php else :
|
||||||
|
echo '<div class="blank"></div>';
|
||||||
|
endif;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 导航栏用户菜单
|
* 导航栏用户菜单
|
||||||
|
299
js/sakura-app.js
299
js/sakura-app.js
@ -14,11 +14,15 @@ mashiro_global.ini = new function () {
|
|||||||
lazyload();
|
lazyload();
|
||||||
social_share();
|
social_share();
|
||||||
mashiro_global.post_list_show_animation.ini();
|
mashiro_global.post_list_show_animation.ini();
|
||||||
|
copy_code_block();
|
||||||
|
coverVideoIni();
|
||||||
}
|
}
|
||||||
this.pjax = function () {
|
this.pjax = function () {
|
||||||
pjaxInit();
|
pjaxInit();
|
||||||
social_share();
|
social_share();
|
||||||
mashiro_global.post_list_show_animation.ini();
|
mashiro_global.post_list_show_animation.ini();
|
||||||
|
copy_code_block();
|
||||||
|
coverVideoIni();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,6 +63,7 @@ function imgError(ele, type) {
|
|||||||
ele.src = 'https://view.moezx.cc/images/2018/05/13/image-404.png';
|
ele.src = 'https://view.moezx.cc/images/2018/05/13/image-404.png';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mashiro_global.post_list_show_animation = new function () {
|
mashiro_global.post_list_show_animation = new function () {
|
||||||
this.ini = function (ajax) {
|
this.ini = function (ajax) {
|
||||||
$("article.post-list-thumb").each(function (i) {
|
$("article.post-list-thumb").each(function (i) {
|
||||||
@ -68,7 +73,11 @@ mashiro_global.post_list_show_animation = new function () {
|
|||||||
if ($(".headertop").hasClass("headertop-bar")) {
|
if ($(".headertop").hasClass("headertop-bar")) {
|
||||||
var window_height = 0;
|
var window_height = 0;
|
||||||
} else {
|
} else {
|
||||||
|
if (mashiro_option.land_at_home) {
|
||||||
var window_height = $(window).height() - 300;
|
var window_height = $(window).height() - 300;
|
||||||
|
} else {
|
||||||
|
var window_height = $(window).height();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var article_height = $("article.post-list-thumb").eq(i).offset().top;
|
var article_height = $("article.post-list-thumb").eq(i).offset().top;
|
||||||
@ -492,6 +501,70 @@ function timeSeriesReload(flag) {
|
|||||||
}
|
}
|
||||||
timeSeriesReload();
|
timeSeriesReload();
|
||||||
|
|
||||||
|
/*视频feature*/
|
||||||
|
function coverVideo() {
|
||||||
|
var video = document.getElementById("coverVideo");
|
||||||
|
var btn = document.getElementById("coverVideo-btn");
|
||||||
|
|
||||||
|
if (video.paused) {
|
||||||
|
video.play();
|
||||||
|
try {
|
||||||
|
btn.innerHTML = '<i class="fa fa-pause" aria-hidden="true"></i>';
|
||||||
|
} catch (e) {};
|
||||||
|
//console.info('play:coverVideo()');
|
||||||
|
} else {
|
||||||
|
video.pause();
|
||||||
|
try {
|
||||||
|
btn.innerHTML = '<i class="fa fa-play" aria-hidden="true"></i>';
|
||||||
|
} catch (e) {};
|
||||||
|
//console.info('pause:coverVideo()');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function killCoverVideo() {
|
||||||
|
var video = document.getElementById("coverVideo");
|
||||||
|
var btn = document.getElementById("coverVideo-btn");
|
||||||
|
|
||||||
|
if (video.paused) {
|
||||||
|
//console.info('none:killCoverVideo()');
|
||||||
|
} else {
|
||||||
|
video.pause();
|
||||||
|
try {
|
||||||
|
btn.innerHTML = '<i class="fa fa-play" aria-hidden="true"></i>';
|
||||||
|
} catch (e) {};
|
||||||
|
//console.info('pause:killCoverVideo()');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function coverVideoIni() {
|
||||||
|
if ($('video').hasClass('hls')) {
|
||||||
|
var video = document.getElementById('coverVideo');
|
||||||
|
var video_src = $('#coverVideo').attr('data-src');
|
||||||
|
if(Hls.isSupported()) {
|
||||||
|
var hls = new Hls();
|
||||||
|
hls.loadSource(video_src);
|
||||||
|
hls.attachMedia(video);
|
||||||
|
hls.on(Hls.Events.MANIFEST_PARSED,function() {
|
||||||
|
video.play();
|
||||||
|
});
|
||||||
|
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
|
||||||
|
video.src = video_src;
|
||||||
|
video.addEventListener('loadedmetadata',function() {
|
||||||
|
video.play();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//console.info('ini:coverVideoIni()');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function copy_code_block() {
|
||||||
|
$('pre code').each(function (i, block) {
|
||||||
|
$(block).attr({ id: 'hljs-' + i });
|
||||||
|
$(this).after('<a class="copy-code" href="javascript:" data-clipboard-target="#hljs-' + i + '" title="拷贝代码"><i class="fa fa-clipboard" aria-hidden="true"></i></a>');
|
||||||
|
});
|
||||||
|
var clipboard = new ClipboardJS('.copy-code');
|
||||||
|
}
|
||||||
|
|
||||||
function tableOfContentScroll(flag) {
|
function tableOfContentScroll(flag) {
|
||||||
if (document.body.clientWidth <= 1200) {
|
if (document.body.clientWidth <= 1200) {
|
||||||
return;
|
return;
|
||||||
@ -536,7 +609,7 @@ var pjaxInit = function () {
|
|||||||
code_highlight_style();
|
code_highlight_style();
|
||||||
} catch (e) {};
|
} catch (e) {};
|
||||||
try {
|
try {
|
||||||
inlojv_js_getqqinfo();
|
getqqinfo();
|
||||||
} catch (e) {};
|
} catch (e) {};
|
||||||
lazyload();
|
lazyload();
|
||||||
$("#to-load-aplayer").click(function () {
|
$("#to-load-aplayer").click(function () {
|
||||||
@ -696,19 +769,19 @@ $("bot-ui").click(function () {
|
|||||||
|
|
||||||
function add_copyright() {
|
function add_copyright() {
|
||||||
document.body.addEventListener("copy", function (e) {
|
document.body.addEventListener("copy", function (e) {
|
||||||
if (window.getSelection().toString().length > 30) {
|
if (window.getSelection().toString().length > 30 && mashiro_option.clipboardCopyright) {
|
||||||
setClipboardText(e);
|
setClipboardText(e);
|
||||||
}
|
}
|
||||||
|
addComment.createButterbar("复制成功!<br>Copied to clipboard successfully!", 1000);
|
||||||
});
|
});
|
||||||
|
|
||||||
function setClipboardText(event) {
|
function setClipboardText(event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
var htmlData = "" + "著作权归作者所有。<br>" + "商业转载请联系作者获得授权,非商业转载请注明出处。<br>" + "作者:" + mashiro_option.author_name + "<br>" + "链接:" + window.location.href + "<br>" + "来源:" + mashiro_option.site_name + "<br><br>" + window.getSelection().toString().replace(/\r\n/g, "<br>");;
|
var htmlData = "# 商业转载请联系作者获得授权,非商业转载请注明出处。<br>" + "# For commercial use, please contact the author for authorization. For non-commercial use, please indicate the source.<br>" + "# 协议(License):署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)<br>" + "# 作者(Author):" + mashiro_option.author_name + "<br>" + "# 链接(URL):" + window.location.href + "<br>" + "# 来源(Source):" + mashiro_option.site_name + "<br><br>" + window.getSelection().toString().replace(/\r\n/g, "<br>");;
|
||||||
var textData = "" + "著作权归作者所有。\n" + "商业转载请联系作者获得授权,非商业转载请注明出处。\n" + "" + mashiro_option.author_name + "\n" + "链接:" + window.location.href + "\n" + "来源:" + mashiro_option.site_name + "\n\n" + window.getSelection().toString().replace(/\r\n/g, "\n");
|
var textData = "# 商业转载请联系作者获得授权,非商业转载请注明出处。\n" + "# For commercial use, please contact the author for authorization. For non-commercial use, please indicate the source.\n" + "# 协议(License):署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)\n" + "# 作者(Author):" + mashiro_option.author_name + "\n" + "# 链接(URL):" + window.location.href + "\n" + "# 来源(Source):" + mashiro_option.site_name + "\n\n" + window.getSelection().toString().replace(/\r\n/g, "\n");
|
||||||
if (event.clipboardData) {
|
if (event.clipboardData) {
|
||||||
event.clipboardData.setData("text/html", htmlData);
|
event.clipboardData.setData("text/html", htmlData);
|
||||||
event.clipboardData.setData("text/plain", textData);
|
event.clipboardData.setData("text/plain", textData);
|
||||||
addComment.createButterbar("复制成功!<br>Copied to clipboard successfully!", 1000);
|
|
||||||
} else if (window.clipboardData) {
|
} else if (window.clipboardData) {
|
||||||
return window.clipboardData.setData("text", textData);
|
return window.clipboardData.setData("text", textData);
|
||||||
}
|
}
|
||||||
@ -716,7 +789,7 @@ function add_copyright() {
|
|||||||
}
|
}
|
||||||
add_copyright();
|
add_copyright();
|
||||||
$(function () {
|
$(function () {
|
||||||
inlojv_js_getqqinfo();
|
getqqinfo();
|
||||||
});
|
});
|
||||||
|
|
||||||
if(mashiro_option.float_player_on) {
|
if(mashiro_option.float_player_on) {
|
||||||
@ -821,7 +894,7 @@ if(mashiro_option.float_player_on) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function inlojv_js_getqqinfo() {
|
function getqqinfo() {
|
||||||
var is_get_by_qq = false;
|
var is_get_by_qq = false;
|
||||||
if (!getCookie('user_qq') && !getCookie('user_qq_email') && !getCookie('user_author')) {
|
if (!getCookie('user_qq') && !getCookie('user_qq_email') && !getCookie('user_author')) {
|
||||||
$('input#qq,input#author,input#email,input#url').val('');
|
$('input#qq,input#author,input#email,input#url').val('');
|
||||||
@ -988,7 +1061,6 @@ loadCSS(mashiro_option.jsdelivr_css_src);
|
|||||||
loadCSS("https://at.alicdn.com/t/font_679578_qyt5qzzavdo39pb9.css");
|
loadCSS("https://at.alicdn.com/t/font_679578_qyt5qzzavdo39pb9.css");
|
||||||
loadCSS("https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.css");
|
loadCSS("https://cdn.jsdelivr.net/npm/aplayer@1.10.1/dist/APlayer.min.css");
|
||||||
loadCSS("https://fonts.googleapis.com/css?family=Noto+SerifMerriweather|Merriweather+Sans|Source+Code+Pro|Ubuntu:400,700|Noto+Serif+SC");
|
loadCSS("https://fonts.googleapis.com/css?family=Noto+SerifMerriweather|Merriweather+Sans|Source+Code+Pro|Ubuntu:400,700|Noto+Serif+SC");
|
||||||
loadCSS("https://cdn.jsdelivr.net/gh/moezx/cdn@3.3.9/css/sharejs.css");
|
|
||||||
(function webpackUniversalModuleDefinition(b, a) {
|
(function webpackUniversalModuleDefinition(b, a) {
|
||||||
if (typeof exports === "object" && typeof module === "object") {
|
if (typeof exports === "object" && typeof module === "object") {
|
||||||
module.exports = a()
|
module.exports = a()
|
||||||
@ -1200,200 +1272,7 @@ loadCSS("https://cdn.jsdelivr.net/gh/moezx/cdn@3.3.9/css/sharejs.css");
|
|||||||
}())
|
}())
|
||||||
}])
|
}])
|
||||||
});
|
});
|
||||||
var baguetteBox = function () {
|
|
||||||
function t(t, n) {
|
|
||||||
H.transforms = f(), H.svg = g(), e(), j = document.querySelectorAll(t), [].forEach.call(j, function (t) {
|
|
||||||
n && n.filter && (A = n.filter);
|
|
||||||
var e = t.getElementsByTagName("a");
|
|
||||||
e = [].filter.call(e, function (t) {
|
|
||||||
return A.test(t.href)
|
|
||||||
});
|
|
||||||
var o = D.length;
|
|
||||||
D.push(e), D[o].options = n, [].forEach.call(D[o], function (t, e) {
|
|
||||||
m(t, "click", function (t) {
|
|
||||||
t.preventDefault ? t.preventDefault() : t.returnValue = !1, i(o), a(e)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function e() {
|
|
||||||
return (b = v("baguetteBox-overlay")) ? (k = v("baguetteBox-slider"), w = v("previous-button"), C = v("next-button"), T = v("close-button"), void 0) : (b = y("div"), b.id = "baguetteBox-overlay", document.getElementsByTagName("body")[0].appendChild(b), k = y("div"), k.id = "baguetteBox-slider", b.appendChild(k), w = y("button"), w.id = "previous-button", w.innerHTML = H.svg ? E : "<", b.appendChild(w), C = y("button"), C.id = "next-button", C.innerHTML = H.svg ? x : ">", b.appendChild(C), T = y("button"), T.id = "close-button", T.innerHTML = H.svg ? B : "X", b.appendChild(T), w.className = C.className = T.className = "baguetteBox-button", n(), void 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
function n() {
|
|
||||||
m(b, "click", function (t) {
|
|
||||||
t.target && "IMG" !== t.target.nodeName && "FIGCAPTION" !== t.target.nodeName && r()
|
|
||||||
}), m(w, "click", function (t) {
|
|
||||||
t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0, c()
|
|
||||||
}), m(C, "click", function (t) {
|
|
||||||
t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0, u()
|
|
||||||
}), m(T, "click", function (t) {
|
|
||||||
t.stopPropagation ? t.stopPropagation() : t.cancelBubble = !0, r()
|
|
||||||
}), m(b, "touchstart", function (t) {
|
|
||||||
N = t.changedTouches[0].pageX
|
|
||||||
}), m(b, "touchmove", function (t) {
|
|
||||||
S || (t.preventDefault ? t.preventDefault() : t.returnValue = !1, touch = t.touches[0] || t.changedTouches[0], touch.pageX - N > 40 ? (S = !0, c()) : touch.pageX - N < -40 && (S = !0, u()))
|
|
||||||
}), m(b, "touchend", function () {
|
|
||||||
S = !1
|
|
||||||
}), m(document, "keydown", function (t) {
|
|
||||||
switch (t.keyCode) {
|
|
||||||
case 37:
|
|
||||||
c();
|
|
||||||
break;
|
|
||||||
case 39:
|
|
||||||
u();
|
|
||||||
break;
|
|
||||||
case 27:
|
|
||||||
r()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function i(t) {
|
|
||||||
if (M !== t) {
|
|
||||||
for (M = t, o(D[t].options); k.firstChild;) k.removeChild(k.firstChild);
|
|
||||||
X.length = 0;
|
|
||||||
for (var e, n = 0; n < D[t].length; n++) e = y("div"), e.className = "full-image", e.id = "baguette-img-" + n, X.push(e), k.appendChild(X[n])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function o(t) {
|
|
||||||
t || (t = {});
|
|
||||||
for (var e in P) I[e] = P[e], "undefined" != typeof t[e] && (I[e] = t[e]);
|
|
||||||
k.style.transition = k.style.webkitTransition = "fadeIn" === I.animation ? "opacity .4s ease" : "slideIn" === I.animation ? "" : "none", "auto" === I.buttons && ("ontouchstart" in window || 1 === D[M].length) && (I.buttons = !1), w.style.display = C.style.display = I.buttons ? "" : "none"
|
|
||||||
}
|
|
||||||
|
|
||||||
function a(t) {
|
|
||||||
"block" !== b.style.display && (L = t, s(L, function () {
|
|
||||||
p(L), h(L)
|
|
||||||
}), d(), b.style.display = "block", setTimeout(function () {
|
|
||||||
b.className = "visible", I.afterShow && I.afterShow()
|
|
||||||
}, 50), I.onChange && I.onChange(L, X.length))
|
|
||||||
}
|
|
||||||
|
|
||||||
function r() {
|
|
||||||
"none" !== b.style.display && (b.className = "", setTimeout(function () {
|
|
||||||
b.style.display = "none", I.afterHide && I.afterHide()
|
|
||||||
}, 500))
|
|
||||||
}
|
|
||||||
|
|
||||||
function s(t, e) {
|
|
||||||
var n = X[t];
|
|
||||||
if ("undefined" != typeof n) {
|
|
||||||
if (n.getElementsByTagName("img")[0]) return e && e(), void 0;
|
|
||||||
imageElement = D[M][t], imageCaption = "function" == typeof I.captions ? I.captions.call(D[M], imageElement) : imageElement.getAttribute("data-caption") || imageElement.title, imageSrc = l(imageElement);
|
|
||||||
var i = y("figure"),
|
|
||||||
o = y("img"),
|
|
||||||
a = y("figcaption");
|
|
||||||
n.appendChild(i), i.innerHTML = '<div class="spinner"><div class="double-bounce1"></div><div class="double-bounce2"></div></div>', o.onload = function () {
|
|
||||||
var n = document.querySelector("#baguette-img-" + t + " .spinner");
|
|
||||||
i.removeChild(n), !I.async && e && e()
|
|
||||||
}, o.setAttribute("src", imageSrc), i.appendChild(o), I.captions && imageCaption && (a.innerHTML = imageCaption, i.appendChild(a)), I.async && e && e()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function l(t) {
|
|
||||||
var e = imageElement.href;
|
|
||||||
if (t.dataset) {
|
|
||||||
var n = [];
|
|
||||||
for (var i in t.dataset) "at-" !== i.substring(0, 3) || isNaN(i.substring(3)) || (n[i.replace("at-", "")] = t.dataset[i]);
|
|
||||||
keys = Object.keys(n).sort(function (t, e) {
|
|
||||||
return parseInt(t) < parseInt(e) ? -1 : 1
|
|
||||||
});
|
|
||||||
for (var o = window.innerWidth * window.devicePixelRatio, a = 0; a < keys.length - 1 && keys[a] < o;) a++;
|
|
||||||
e = n[keys[a]] || e
|
|
||||||
}
|
|
||||||
return e
|
|
||||||
}
|
|
||||||
|
|
||||||
function u() {
|
|
||||||
var t;
|
|
||||||
return L <= X.length - 2 ? (L++, d(), p(L), t = !0) : I.animation && (k.className = "bounce-from-right", setTimeout(function () {
|
|
||||||
k.className = ""
|
|
||||||
}, 400), t = !1), I.onChange && I.onChange(L, X.length), t
|
|
||||||
}
|
|
||||||
|
|
||||||
function c() {
|
|
||||||
var t;
|
|
||||||
return L >= 1 ? (L--, d(), h(L), t = !0) : I.animation && (k.className = "bounce-from-left", setTimeout(function () {
|
|
||||||
k.className = ""
|
|
||||||
}, 400), t = !1), I.onChange && I.onChange(L, X.length), t
|
|
||||||
}
|
|
||||||
|
|
||||||
function d() {
|
|
||||||
var t = 100 * -L + "%";
|
|
||||||
"fadeIn" === I.animation ? (k.style.opacity = 0, setTimeout(function () {
|
|
||||||
H.transforms ? k.style.transform = k.style.webkitTransform = "translate3d(" + t + ",0,0)" : k.style.left = t, k.style.opacity = 1
|
|
||||||
}, 400)) : H.transforms ? k.style.transform = k.style.webkitTransform = "translate3d(" + t + ",0,0)" : k.style.left = t
|
|
||||||
}
|
|
||||||
|
|
||||||
function f() {
|
|
||||||
var t = y("div");
|
|
||||||
return "undefined" != typeof t.style.perspective || "undefined" != typeof t.style.webkitPerspective
|
|
||||||
}
|
|
||||||
|
|
||||||
function g() {
|
|
||||||
var t = y("div");
|
|
||||||
return t.innerHTML = "<svg/>", "http://www.w3.org/2000/svg" == (t.firstChild && t.firstChild.namespaceURI)
|
|
||||||
}
|
|
||||||
|
|
||||||
function p(t) {
|
|
||||||
t - L >= I.preload || s(t + 1, function () {
|
|
||||||
p(t + 1)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function h(t) {
|
|
||||||
L - t >= I.preload || s(t - 1, function () {
|
|
||||||
h(t - 1)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
function m(t, e, n) {
|
|
||||||
t.addEventListener ? t.addEventListener(e, n, !1) : t.attachEvent("on" + e, n)
|
|
||||||
}
|
|
||||||
|
|
||||||
function v(t) {
|
|
||||||
return document.getElementById(t)
|
|
||||||
}
|
|
||||||
|
|
||||||
function y(t) {
|
|
||||||
return document.createElement(t)
|
|
||||||
}
|
|
||||||
var b, k, w, C, T, N, E = '<svg width="44" height="60"><polyline points="30 10 10 30 30 50" stroke="rgba(255,255,255,.8)" stroke-width="4"stroke-linecap="butt" fill="none" stroke-linejoin="round"/></svg>',
|
|
||||||
x = '<svg width="44" height="60"><polyline points="14 10 34 30 14 50" stroke="rgba(255,255,255,.8)" stroke-width="4"stroke-linecap="butt" fill="none" stroke-linejoin="round"/></svg>',
|
|
||||||
B = '<svg width="30" height="30"><g stroke="rgba(255,255,255,.8)" stroke-width="4"><line x1="5" y1="5" x2="25" y2="25"/><line x1="5" y1="25" x2="25" y2="5"/></g></svg>',
|
|
||||||
I = {},
|
|
||||||
P = {
|
|
||||||
captions: !0,
|
|
||||||
buttons: "auto",
|
|
||||||
async: !1,
|
|
||||||
preload: 2,
|
|
||||||
animation: "slideIn",
|
|
||||||
afterShow: null,
|
|
||||||
afterHide: null,
|
|
||||||
onChange: null
|
|
||||||
},
|
|
||||||
H = {},
|
|
||||||
L = 0,
|
|
||||||
M = -1,
|
|
||||||
S = !1,
|
|
||||||
A = /.+\.(gif|jpe?g|png|webp)/i,
|
|
||||||
j = [],
|
|
||||||
D = [],
|
|
||||||
X = [];
|
|
||||||
return [].forEach || (Array.prototype.forEach = function (t, e) {
|
|
||||||
for (var n = 0; n < this.length; n++) t.call(e, this[n], n, this)
|
|
||||||
}), [].filter || (Array.prototype.filter = function (t, e, n, i, o) {
|
|
||||||
for (n = this, i = [], o = 0; o < n.length; o++) t.call(e, n[o], o, n) && i.push(n[o]);
|
|
||||||
return i
|
|
||||||
}), {
|
|
||||||
run: t,
|
|
||||||
showNext: u,
|
|
||||||
showPrevious: c
|
|
||||||
}
|
|
||||||
}();
|
|
||||||
var home = location.href,
|
var home = location.href,
|
||||||
s = $('#bgvideo')[0],
|
s = $('#bgvideo')[0],
|
||||||
Siren = {
|
Siren = {
|
||||||
@ -1558,11 +1437,14 @@ var home = location.href,
|
|||||||
$(this).next().slideToggle('fast');
|
$(this).next().slideToggle('fast');
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
if (mashiro_option.baguetteBoxON) {
|
||||||
baguetteBox.run('.entry-content', {
|
baguetteBox.run('.entry-content', {
|
||||||
captions: function (element) {
|
captions: function (element) {
|
||||||
return element.getElementsByTagName('img')[0].alt;
|
return element.getElementsByTagName('img')[0].alt;
|
||||||
}
|
},
|
||||||
|
ignoreClass: 'fancybox',
|
||||||
});
|
});
|
||||||
|
}
|
||||||
$('.js-toggle-search').on('click', function () {
|
$('.js-toggle-search').on('click', function () {
|
||||||
$('.js-toggle-search').toggleClass('is-active');
|
$('.js-toggle-search').toggleClass('is-active');
|
||||||
$('.js-search').toggleClass('is-visible');
|
$('.js-search').toggleClass('is-visible');
|
||||||
@ -1790,10 +1672,10 @@ var home = location.href,
|
|||||||
if ($(this).scrollTop() > offset) {
|
if ($(this).scrollTop() > offset) {
|
||||||
$back_to_top.addClass('cd-is-visible');
|
$back_to_top.addClass('cd-is-visible');
|
||||||
$(".changeSkin-gear").css("bottom", "0");
|
$(".changeSkin-gear").css("bottom", "0");
|
||||||
if (screen.height > 650) {
|
if ($(window).height() > 950) {
|
||||||
$(".cd-top.cd-is-visible").css("top", "-326px");
|
$(".cd-top.cd-is-visible").css("top", "0");
|
||||||
} else {
|
} else {
|
||||||
$(".cd-top.cd-is-visible").css("top", (screen.height * 0.9 - 900) + "px");
|
$(".cd-top.cd-is-visible").css("top", ($(window).height() - 950) + "px");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$(".changeSkin-gear").css("bottom", "-999px");
|
$(".changeSkin-gear").css("bottom", "-999px");
|
||||||
@ -1804,6 +1686,7 @@ var home = location.href,
|
|||||||
$back_to_top.addClass('cd-fade-out');
|
$back_to_top.addClass('cd-fade-out');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
//smooth scroll to top
|
||||||
$back_to_top.on('click', function (event) {
|
$back_to_top.on('click', function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
$('body,html').animate({
|
$('body,html').animate({
|
||||||
@ -1828,6 +1711,12 @@ $(function () {
|
|||||||
$(document).pjax('a[target!=_top]', '#page', {
|
$(document).pjax('a[target!=_top]', '#page', {
|
||||||
fragment: '#page',
|
fragment: '#page',
|
||||||
timeout: 8000,
|
timeout: 8000,
|
||||||
|
}).on('pjax:beforeSend', () => { //离开页面停止播放
|
||||||
|
$('.normal-cover-video').each(function() {
|
||||||
|
this.pause();
|
||||||
|
this.src = '';
|
||||||
|
this.load = '';
|
||||||
|
});
|
||||||
}).on('pjax:send', function () {
|
}).on('pjax:send', function () {
|
||||||
$("#bar").css("width", "0%");
|
$("#bar").css("width", "0%");
|
||||||
if (mashiro_option.NProgressON) NProgress.start();
|
if (mashiro_option.NProgressON) NProgress.start();
|
||||||
|
39
options.php
39
options.php
@ -275,7 +275,7 @@ function optionsframework_options() {
|
|||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
'name' => __('站长统计(不建议使用)', 'options_framework_theme'),
|
'name' => __('站长统计(不建议使用)', 'options_framework_theme'),
|
||||||
'desc' => __('填写统计代码,将被隐藏,如需要在下方填写链接地址', 'options_framework_theme'),
|
'desc' => __('填写统计代码,将被隐藏', 'options_framework_theme'),
|
||||||
'id' => 'site_statistics',
|
'id' => 'site_statistics',
|
||||||
'std' => '',
|
'std' => '',
|
||||||
'type' => 'textarea');
|
'type' => 'textarea');
|
||||||
@ -357,7 +357,7 @@ function optionsframework_options() {
|
|||||||
'desc' => __('此处留空则使用内置API(将需要随机展示的图片放入 /cover/gallery/ 目录)', 'options_framework_theme'),
|
'desc' => __('此处留空则使用内置API(将需要随机展示的图片放入 /cover/gallery/ 目录)', 'options_framework_theme'),
|
||||||
'id' => 'cover_img',
|
'id' => 'cover_img',
|
||||||
'std' => '',
|
'std' => '',
|
||||||
'type' => 'upload');
|
'type' => 'text');
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
'name' => __('背景图滤镜', 'akina'),
|
'name' => __('背景图滤镜', 'akina'),
|
||||||
@ -723,19 +723,12 @@ function optionsframework_options() {
|
|||||||
'type' => 'text');
|
'type' => 'text');
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
'name' => __('开启 jsDelivr 测试?', 'options_framework_theme'),
|
'name' => __('CDN 本地调试', 'options_framework_theme'),
|
||||||
'desc' => __('如不清楚什么意思切勿勾选!', 'options_framework_theme'),
|
'desc' => __('前端库不走 jsDelivr,不建议启用', 'options_framework_theme'),
|
||||||
'id' => 'jsdelivr_cdn_test',
|
'id' => 'jsdelivr_cdn_test',
|
||||||
'std' => '0',
|
'std' => '0',
|
||||||
'type' => 'checkbox');
|
'type' => 'checkbox');
|
||||||
|
|
||||||
$options[] = array(
|
|
||||||
'name' => __('jsDelivr 版本号', 'options_framework_theme'),
|
|
||||||
'desc' => __('默认值为3.4.5', 'options_framework_theme'),
|
|
||||||
'id' => 'jsdelivr_cdn_version',
|
|
||||||
'std' => '3.4.5',
|
|
||||||
'type' => 'text');
|
|
||||||
|
|
||||||
//其他
|
//其他
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
'name' => __('其他', 'options_framework_theme'),
|
'name' => __('其他', 'options_framework_theme'),
|
||||||
@ -756,8 +749,8 @@ function optionsframework_options() {
|
|||||||
'type' => 'text');
|
'type' => 'text');
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
'name' => __('Cookie 版本控制', 'options_framework_theme'),
|
'name' => __('版本控制', 'options_framework_theme'),
|
||||||
'desc' => __('用于更新前端 cookie,可使用任意字符串,比如日期:---2018/5/16', 'options_framework_theme'),
|
'desc' => __('用于更新前端 cookie 及浏览器缓存,可使用任意字符串', 'options_framework_theme'),
|
||||||
'id' => 'cookie_version',
|
'id' => 'cookie_version',
|
||||||
'std' => '',
|
'std' => '',
|
||||||
'type' => 'text');
|
'type' => 'text');
|
||||||
@ -804,11 +797,25 @@ function optionsframework_options() {
|
|||||||
'std' => '',
|
'std' => '',
|
||||||
'type' => 'text');
|
'type' => 'text');
|
||||||
|
|
||||||
|
$options[] = array(
|
||||||
|
'name' => __('启用 baguetteBox', 'options_framework_theme'),
|
||||||
|
'desc' => __('默认禁用,<a href="https://github.com/mashirozx/Sakura/wiki/Fancybox">请阅读说明</a>', 'options_framework_theme'),
|
||||||
|
'id' => 'image_viewer',
|
||||||
|
'std' => '0',
|
||||||
|
'type' => 'checkbox');
|
||||||
|
|
||||||
|
$options[] = array(
|
||||||
|
'name' => __('是否开启剪贴板版权标识', 'options_framework_theme'),
|
||||||
|
'desc' => __('复制超过30个字节时自动向剪贴板添加版权标识,默认开启', 'options_framework_theme'),
|
||||||
|
'id' => 'clipboard_copyright',
|
||||||
|
'std' => '1',
|
||||||
|
'type' => 'checkbox');
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
'name' => __('发件地址前缀', 'options_framework_theme'),
|
'name' => __('发件地址前缀', 'options_framework_theme'),
|
||||||
'desc' => __('用于发送系统邮件,在用户的邮箱中显示的发件人地址,不要使用中文,默认系统邮件地址为 poi@你的域名.com', 'options_framework_theme'),
|
'desc' => __('用于发送系统邮件,在用户的邮箱中显示的发件人地址,不要使用中文,默认系统邮件地址为 bibi@你的域名', 'options_framework_theme'),
|
||||||
'id' => 'mail_user_name',
|
'id' => 'mail_user_name',
|
||||||
'std' => 'poi',
|
'std' => 'bibi',
|
||||||
'type' => 'text');
|
'type' => 'text');
|
||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
@ -834,7 +841,7 @@ function optionsframework_options() {
|
|||||||
|
|
||||||
$options[] = array(
|
$options[] = array(
|
||||||
'name' => __('开启多说插件支持', 'options_framework_theme'),
|
'name' => __('开启多说插件支持', 'options_framework_theme'),
|
||||||
'desc' => __('如果使用多说插件,请勾选此项', 'options_framework_theme'),
|
'desc' => __('多说已经凉了', 'options_framework_theme'),
|
||||||
'id' => 'general_disqus_plugin_support',
|
'id' => 'general_disqus_plugin_support',
|
||||||
'std' => '0',
|
'std' => '0',
|
||||||
'type' => 'checkbox');
|
'type' => 'checkbox');
|
||||||
|
52
style.css
52
style.css
@ -5,7 +5,7 @@ Theme URI: https://2heng.xin/theme-sakura/
|
|||||||
Author: Mashiro, Louie, Fuzzz
|
Author: Mashiro, Louie, Fuzzz
|
||||||
Author URI: http://2heng.xin
|
Author URI: http://2heng.xin
|
||||||
Description: Akina主题分支(原版地址 http://www.akina.pw/themeakina)
|
Description: Akina主题分支(原版地址 http://www.akina.pw/themeakina)
|
||||||
Version: 3.1.0
|
Version: 3.1.1
|
||||||
License: GNU General Public License v2 or later
|
License: GNU General Public License v2 or later
|
||||||
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
||||||
Text Domain: akina
|
Text Domain: akina
|
||||||
@ -514,7 +514,7 @@ input[type=button]:hover,
|
|||||||
input[type=reset]:hover,
|
input[type=reset]:hover,
|
||||||
input[type=submit]:hover {
|
input[type=submit]:hover {
|
||||||
border-color: #ccc #bbb #aaa;
|
border-color: #ccc #bbb #aaa;
|
||||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 15px 17px rgba(255, 255, 255, .8), inset 0 -5px 12px rgba(0, 0, 0, .02)
|
box-shadow: none
|
||||||
}
|
}
|
||||||
|
|
||||||
button:active,
|
button:active,
|
||||||
@ -7986,14 +7986,15 @@ a.toc-link {
|
|||||||
background: #fc625d;
|
background: #fc625d;
|
||||||
width: 12px;
|
width: 12px;
|
||||||
height: 12px;
|
height: 12px;
|
||||||
left: 20px;
|
left: 12px;
|
||||||
margin-top: -20px;
|
margin-top: -18px;
|
||||||
-webkit-box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
|
-webkit-box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
|
||||||
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
|
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
|
||||||
z-index: 2
|
z-index: 2
|
||||||
}
|
}
|
||||||
|
|
||||||
.highlight-wrap {
|
.highlight-wrap {
|
||||||
|
position: relative;
|
||||||
background: #21252b;
|
background: #21252b;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
font: 15px/22px "Microsoft YaHei", Arial, Sans-Serif;
|
font: 15px/22px "Microsoft YaHei", Arial, Sans-Serif;
|
||||||
@ -8007,6 +8008,22 @@ a.toc-link {
|
|||||||
box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4)
|
box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.highlight-wrap .copy-code {
|
||||||
|
color: #fff;
|
||||||
|
position: absolute;
|
||||||
|
float: right;
|
||||||
|
right: 10px;
|
||||||
|
top: 0;
|
||||||
|
padding-top: 4px;
|
||||||
|
padding-right: 2px;
|
||||||
|
z-index: 2;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight-wrap .copy-code:hover {
|
||||||
|
color: rgba(255,255,255,.5);
|
||||||
|
}
|
||||||
|
|
||||||
.hljs-ln-line span::-moz-selection,
|
.hljs-ln-line span::-moz-selection,
|
||||||
.hljs-ln-line::-moz-selection {
|
.hljs-ln-line::-moz-selection {
|
||||||
background: #fff;
|
background: #fff;
|
||||||
@ -8051,12 +8068,12 @@ a.toc-link {
|
|||||||
.highlight-wrap code[data-rel]:before {
|
.highlight-wrap code[data-rel]:before {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
content: attr(data-rel);
|
content: attr(data-rel);
|
||||||
height: 38px;
|
height: 30px;
|
||||||
line-height: 38px;
|
line-height: 30px;
|
||||||
background: #21252b;
|
background: #21252b;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
margin-top: -35px;
|
margin-top: -30px;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
font-family: Ubuntu, sans-serif;
|
font-family: Ubuntu, sans-serif;
|
||||||
@ -8422,3 +8439,24 @@ td.hljs-ln-numbers {
|
|||||||
.aplayer-lrc {
|
.aplayer-lrc {
|
||||||
pointer-events: none
|
pointer-events: none
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*cover video*/
|
||||||
|
#coverVideo-btn {
|
||||||
|
all: initial;
|
||||||
|
display: inline-block;
|
||||||
|
width: 36px;
|
||||||
|
font-size: 26px;
|
||||||
|
margin-left: 16px;
|
||||||
|
padding: 7px;
|
||||||
|
border: 0;
|
||||||
|
background: transparent;
|
||||||
|
color: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#coverVideo-btn:hover {
|
||||||
|
background: #ddd;
|
||||||
|
color: black;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user