Merge pull request #1 from mashirozx/master

new version
pull/316/head
Himehane 2019-01-29 16:54:58 +08:00 committed by GitHub
commit 72f5c33edb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
51 changed files with 2723 additions and 399 deletions

View File

@ -1,9 +1,10 @@
Sakura🌸: A Wonderful WordPress Theme
Sakura🌸: A Wonderful WordPress Theme
===
![Sakura](https://view.moezx.cc/images/2018/05/26/sakura.png)
![PHP version from PHP-Eye](https://img.shields.io/php-eye/symfony/symfony.svg?style=flat-square)
![PHP version](https://img.shields.io/badge/PHP-7.1+-4F5B93.svg?style=flat-square)
![WP version](https://img.shields.io/badge/WordPress-5.0+-0073aa.svg?style=flat-square)
[![GitHub release](https://img.shields.io/github/release/mashirozx/Sakura.svg?style=flat-square)](https://github.com/mashirozx/Sakura/releases/latest)
[![Github commits (since latest release)](https://img.shields.io/github/commits-since/mashirozx/Sakura/latest.svg?style=flat-square)](https://github.com/mashirozx/Sakura/commits/)
[![](https://data.jsdelivr.com/v1/package/gh/moezx/cdn/badge)](https://www.jsdelivr.com/package/gh/moezx/cdn)
@ -12,14 +13,16 @@ Sakura🌸: A Wonderful WordPress Theme
两位前辈做得已经很棒了,或许我所做的只是把他们的代码弄得凌乱不堪吧 :)
注意:建议 `git clone` 下载;如果选择下载压缩包,解压后记得把文件夹名改回 `Sakura`,也即保证主题路径为 `/wp-content/themes/Sakura/`;请留意主题说明里的其他注意事项。
注意:建议 `git clone` 下载[简易 Git 使用指南](https://github.com/mashirozx/Sakura/wiki/Git-%E4%B8%8B%E8%BD%BD%E3%80%81%E6%9B%B4%E6%96%B0%E6%8C%87%E5%8D%97);如果选择下载压缩包,解压后记得把文件夹名改回 `Sakura`,也即保证主题路径为 `/wp-content/themes/Sakura/`;请安装必装插件 [WP Statistics](https://wordpress.org/plugins/wp-statistics/);请留意主题说明里的其他注意事项。
主题使用说明见:<https://2heng.xin/theme-sakura/>
本仓库国内镜像:<https://gitee.com/mashirozx/Sakura>
希望你喜欢!
### 打赏支持~
[微信支付](https://view.moezx.cc/images/2018/05/28/WeChanQR.png) | [支付宝](https://view.moezx.cc/images/2018/05/28/AliPayQR.jpg) | [PayPal](https://paypal.me/mashirozx)
### 需要服务器吗?
<a href="https://www.vultr.com/?ref=7674346"><img src="https://www.vultr.com/media/banner_3.png" width="300" height="250"></a>
<a href="https://www.vultr.com/?ref=7674346"><img src="https://www.vultr.com/media/banner_3.png" width="300" height="250"></a>

17
cdn/css/lib.css 100644

File diff suppressed because one or more lines are too long

View 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)}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View 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
}

View 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 100644
View 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 100644

File diff suppressed because one or more lines are too long

2
cdn/js/src/01.jquery.min.js vendored 100644

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View 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 100644
View 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});

View 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 100644

File diff suppressed because one or more lines are too long

2
cdn/js/src/08.lazyload.min.js vendored 100644
View 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});

File diff suppressed because one or more lines are too long

View 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/12.tocbot.min.js vendored 100644

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

7
cdn/js/src/18.clipboard.min.js vendored 100644

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,929 @@
.entry-content blockquote:before,.entry-content blockquote:after {
display: none
}
.entry-content {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
line-height: 1.5;
color: #24292e;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 16px;
line-height: 1.5;
word-wrap: break-word;
}
.entry-content .pl-c {
color: #6a737d;
}
.entry-content .pl-c1,
.entry-content .pl-s .pl-v {
color: #005cc5;
}
.entry-content .pl-e,
.entry-content .pl-en {
color: #6f42c1;
}
.entry-content .pl-smi,
.entry-content .pl-s .pl-s1 {
color: #24292e;
}
.entry-content .pl-ent {
color: #22863a;
}
.entry-content .pl-k {
color: #d73a49;
}
.entry-content .pl-s,
.entry-content .pl-pds,
.entry-content .pl-s .pl-pse .pl-s1,
.entry-content .pl-sr,
.entry-content .pl-sr .pl-cce,
.entry-content .pl-sr .pl-sre,
.entry-content .pl-sr .pl-sra {
color: #032f62;
}
.entry-content .pl-v,
.entry-content .pl-smw {
color: #e36209;
}
.entry-content .pl-bu {
color: #b31d28;
}
.entry-content .pl-ii {
color: #fafbfc;
background-color: #b31d28;
}
.entry-content .pl-c2 {
color: #fafbfc;
background-color: #d73a49;
}
.entry-content .pl-c2::before {
content: "^M";
}
.entry-content .pl-sr .pl-cce {
font-weight: bold;
color: #22863a;
}
.entry-content .pl-ml {
color: #735c0f;
}
.entry-content .pl-mh,
.entry-content .pl-mh .pl-en,
.entry-content .pl-ms {
font-weight: bold;
color: #005cc5;
}
.entry-content .pl-mi {
font-style: italic;
color: #24292e;
}
.entry-content .pl-mb {
font-weight: bold;
color: #24292e;
}
.entry-content .pl-md {
color: #b31d28;
background-color: #ffeef0;
}
.entry-content .pl-mi1 {
color: #22863a;
background-color: #f0fff4;
}
.entry-content .pl-mc {
color: #e36209;
background-color: #ffebda;
}
.entry-content .pl-mi2 {
color: #f6f8fa;
background-color: #005cc5;
}
.entry-content .pl-mdr {
font-weight: bold;
color: #6f42c1;
}
.entry-content .pl-ba {
color: #586069;
}
.entry-content .pl-sg {
color: #959da5;
}
.entry-content .pl-corl {
text-decoration: underline;
color: #032f62;
}
.entry-content .octicon {
display: inline-block;
vertical-align: text-top;
fill: currentColor;
}
.entry-content a {
background-color: transparent;
}
.entry-content a:active,
.entry-content a:hover {
outline-width: 0;
}
.entry-content strong {
font-weight: inherit;
}
.entry-content strong {
font-weight: bolder;
}
.entry-content h1 {
font-size: 2em;
margin: 0.67em 0;
}
.entry-content img {
border-style: none;
}
.entry-content code,
.entry-content kbd {
font-family: monospace, monospace;
font-size: 1em;
}
.entry-content hr {
box-sizing: content-box;
height: 0;
overflow: visible;
}
.entry-content input {
font: inherit;
margin: 0;
}
.entry-content input {
overflow: visible;
}
.entry-content [type="checkbox"] {
box-sizing: border-box;
padding: 0;
}
.entry-content * {
box-sizing: border-box;
}
.entry-content input {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
.entry-content a {
color: #0366d6;
text-decoration: none;
}
.entry-content a:hover {
text-decoration: underline;
}
.entry-content strong {
font-weight: 600;
}
.entry-content hr {
height: 0;
margin: 15px 0;
overflow: hidden;
background: transparent;
border: 0;
border-bottom: 1px solid #dfe2e5;
}
.entry-content hr::before {
display: table;
content: "";
}
.entry-content hr::after {
display: table;
clear: both;
content: "";
}
.entry-content table {
border-spacing: 0;
border-collapse: collapse;
}
.entry-content td,
.entry-content th {
padding: 0;
}
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
margin-top: 0;
margin-bottom: 0;
}
.entry-content h1 {
font-size: 32px;
font-weight: 600;
}
.entry-content h2 {
font-size: 24px;
font-weight: 600;
}
.entry-content h3 {
font-size: 20px;
font-weight: 600;
}
.entry-content h4 {
font-size: 16px;
font-weight: 600;
}
.entry-content h5 {
font-size: 14px;
font-weight: 600;
}
.entry-content h6 {
font-size: 12px;
font-weight: 600;
}
.entry-content p {
margin-top: 0;
margin-bottom: 10px;
}
.entry-content blockquote {
margin: 0;
}
.entry-content ul,
.entry-content ol {
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
}
.entry-content ol ol,
.entry-content ul ol {
list-style-type: lower-roman;
}
.entry-content ul ul ol,
.entry-content ul ol ol,
.entry-content ol ul ol,
.entry-content ol ol ol {
list-style-type: lower-alpha;
}
.entry-content dd {
margin-left: 0;
}
.entry-content code {
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
font-size: 12px;
}
.entry-content .octicon {
vertical-align: text-bottom;
}
.entry-content .pl-0 {
padding-left: 0 !important;
}
.entry-content .pl-1 {
padding-left: 4px !important;
}
.entry-content .pl-2 {
padding-left: 8px !important;
}
.entry-content .pl-3 {
padding-left: 16px !important;
}
.entry-content .pl-4 {
padding-left: 24px !important;
}
.entry-content .pl-5 {
padding-left: 32px !important;
}
.entry-content .pl-6 {
padding-left: 40px !important;
}
.entry-content::before {
display: table;
content: "";
}
.entry-content::after {
display: table;
clear: both;
content: "";
}
.entry-content>*:first-child {
margin-top: 0 !important;
}
.entry-content>*:last-child {
margin-bottom: 0 !important;
}
.entry-content a:not([href]) {
color: inherit;
text-decoration: none;
}
.entry-content .anchor {
float: left;
padding-right: 4px;
margin-left: -20px;
line-height: 1;
}
.entry-content .anchor:focus {
outline: none;
}
.entry-content p,
.entry-content blockquote,
.entry-content ul,
.entry-content ol,
.entry-content dl,
.entry-content table {
margin-top: 0;
margin-bottom: 16px;
}
.entry-content hr {
height: 0.25em;
padding: 0;
margin: 24px 0;
background-color: #e1e4e8;
border: 0;
}
.entry-content blockquote {
padding: 0 1em;
color: #6a737d;
border-left: 0.25em solid #dfe2e5;
}
.entry-content blockquote>:first-child {
margin-top: 0;
}
.entry-content blockquote>:last-child {
margin-bottom: 0;
}
.entry-content kbd {
display: inline-block;
padding: 3px 5px;
font-size: 11px;
line-height: 10px;
color: #444d56;
vertical-align: middle;
background-color: #fafbfc;
border: solid 1px #c6cbd1;
border-bottom-color: #959da5;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #959da5;
}
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
margin-top: 24px;
margin-bottom: 16px;
font-weight: 600;
line-height: 1.25;
}
.entry-content h1 .octicon-link,
.entry-content h2 .octicon-link,
.entry-content h3 .octicon-link,
.entry-content h4 .octicon-link,
.entry-content h5 .octicon-link,
.entry-content h6 .octicon-link {
color: #1b1f23;
vertical-align: middle;
visibility: hidden;
}
.entry-content h1:hover .anchor,
.entry-content h2:hover .anchor,
.entry-content h3:hover .anchor,
.entry-content h4:hover .anchor,
.entry-content h5:hover .anchor,
.entry-content h6:hover .anchor {
text-decoration: none;
}
.entry-content h1:hover .anchor .octicon-link,
.entry-content h2:hover .anchor .octicon-link,
.entry-content h3:hover .anchor .octicon-link,
.entry-content h4:hover .anchor .octicon-link,
.entry-content h5:hover .anchor .octicon-link,
.entry-content h6:hover .anchor .octicon-link {
visibility: visible;
}
.entry-content h1 {
padding-bottom: 0.3em;
font-size: 2em;
border-bottom: 1px solid #eaecef;
}
.entry-content h2 {
padding-bottom: 0.3em;
font-size: 1.5em;
border-bottom: 1px solid #eaecef;
}
.entry-content h3 {
font-size: 1.25em;
}
.entry-content h4 {
font-size: 1em;
}
.entry-content h5 {
font-size: 0.875em;
}
.entry-content h6 {
font-size: 0.85em;
color: #6a737d;
}
.entry-content ul,
.entry-content ol {
padding-left: 2em;
}
.entry-content ul ul,
.entry-content ul ol,
.entry-content ol ol,
.entry-content ol ul {
margin-top: 0;
margin-bottom: 0;
}
.entry-content li {
word-wrap: break-all;
}
.entry-content li>p {
margin-top: 16px;
}
.entry-content li+li {
margin-top: 0.25em;
}
.entry-content dl {
padding: 0;
}
.entry-content dl dt {
padding: 0;
margin-top: 16px;
font-size: 1em;
font-style: italic;
font-weight: 600;
}
.entry-content dl dd {
padding: 0 16px;
margin-bottom: 16px;
}
.entry-content table {
display: block;
width: 100%;
overflow: auto;
}
.entry-content table th {
font-weight: 600;
}
.entry-content table th,
.entry-content table td {
padding: 6px 13px;
border: 1px solid #dfe2e5;
}
.entry-content table tr {
background-color: #fff;
border-top: 1px solid #c6cbd1;
}
.entry-content table tr:nth-child(2n) {
background-color: #f6f8fa;
}
.entry-content img {
max-width: 100%;
box-sizing: content-box;
background-color: #fff;
}
.entry-content img[align=right] {
padding-left: 20px;
}
.entry-content img[align=left] {
padding-right: 20px;
}
.entry-content code {
padding: 0.2em 0.4em;
margin: 0;
font-size: 85%;
background-color: rgba(27,31,35,0.05);
border-radius: 3px;
}
.entry-content .full-commit .btn-outline:not(:disabled):hover {
color: #005cc5;
border-color: #005cc5;
}
.entry-content kbd {
display: inline-block;
padding: 3px 5px;
font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
line-height: 10px;
color: #444d56;
vertical-align: middle;
background-color: #fafbfc;
border: solid 1px #d1d5da;
border-bottom-color: #c6cbd1;
border-radius: 3px;
box-shadow: inset 0 -1px 0 #c6cbd1;
}
.entry-content :checked+.radio-label {
position: relative;
z-index: 1;
border-color: #0366d6;
}
.entry-content .task-list-item {
list-style-type: none;
}
.entry-content .task-list-item+.task-list-item {
margin-top: 3px;
}
.entry-content .task-list-item input {
margin: 0 0.2em 0.25em -1.6em;
vertical-align: middle;
}
.entry-content hr {
border-bottom-color: #eee;
}
/*fix mac code*/
.entry-content pre.highlight-wrap {
position: relative;
background: #21252b;
border-radius: 5px;
font: 15px/22px "Microsoft YaHei", Arial, Sans-Serif;
line-height: 1.6;
margin-bottom: 1.6em;
max-width: 100%;
overflow: auto;
text-shadow: none;
color: #000;
padding-top: 30px;
box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4)
}
.entry-content pre.highlight-wrap:before {
content: " ";
position: absolute;
-webkit-border-radius: 50%;
border-radius: 50%;
background: #fc625d;
width: 12px;
height: 12px;
left: 12px;
margin-top: -18px;
-webkit-box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
z-index: 2
}
.entry-content pre.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;
}
.entry-content pre.highlight-wrap .copy-code:hover {
color: rgba(255,255,255,.5);
}
.entry-content pre .hljs-ln-line span::-moz-selection,
.entry-content pre .hljs-ln-line::-moz-selection {
background: #fff;
color: #21252b
}
.entry-content pre .hljs-ln-line span::selection,
.entry-content pre .hljs-ln-line::selection {
background: #fff;
color: #21252b
}
.entry-content pre.highlight-wrap code::-webkit-scrollbar {
height: 10x !important;
width: 10x !important;
background-color: #1d1f21 !important
}
.entry-content pre.highlight-wrap code::-webkit-scrollbar-track {
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3) !important;
border-radius: 10px !important;
background-color: #21252b !important
}
.entry-content pre.highlight-wrap code::-webkit-scrollbar-thumb {
border-radius: 10px !important;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .5) !important;
background-color: #21252b !important
}
.entry-content pre table.hljs-ln::-webkit-scrollbar {
height: 10x !important;
width: 10x !important;
background-color: #1d1f21 !important;
}
.entry-content pre table.hljs-ln::-webkit-scrollbar-track {
background-color: #41454a;
}
.entry-content pre table.hljs-ln::-webkit-scrollbar-thumb {
border-radius: 10px !important;
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .5) !important;
background-color: #21252b !important;
}
.entry-content pre.highlight-wrap code {
background: #1d1f21;
color: #fff;
word-break: break-word;
font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif;
padding: 2px;
text-shadow: none;
border-radius: 0 0 5px 5px;
cursor: url(https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/cursor/texto.cur), auto
}
.entry-content pre.highlight-wrap code[data-rel]:before {
color: #fff;
content: attr(data-rel);
height: 30px;
line-height: 30px;
background: #21252b;
font-size: 16px;
position: absolute;
margin-top: -30px;
left: 0;
width: 100%;
font-family: Ubuntu, sans-serif;
font-weight: 700;
padding: 0 80px;
text-indent: 15px;
text-align: center;
float: left;
z-index: 1;
border-radius: 5px 5px 0 0;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
pointer-events: none
}
.entry-content pre .hljs {
display: block;
overflow-x: auto;
padding: .5em;
color: #abb2bf;
background: rgba(254, 250, 199, .5);
border-radius: 10px
}
.entry-content pre .hljs-comment,
.entry-content pre .hljs-quote {
color: #888f96;
font-style: italic
}
.entry-content pre .hljs-doctag,
.entry-content pre .hljs-formula,
.entry-content pre .hljs-keyword {
color: #c678dd
}
.entry-content pre .hljs-deletion,
.entry-content pre .hljs-name,
.entry-content pre .hljs-section,
.entry-content pre .hljs-selector-tag,
.entry-content pre .hljs-subst {
color: #e06c75
}
.entry-content pre .hljs-literal {
color: #56b6c2
}
.entry-content pre .hljs-addition,
.entry-content pre .hljs-attribute,
.entry-content pre .hljs-meta-string,
.entry-content pre .hljs-regexp,
.entry-content pre .hljs-string {
color: #98c379
}
.entry-content pre .hljs-built_in,
.entry-content pre .hljs-class .hljs-title {
color: #e6c07b
}
.entry-content pre .hljs-attr,
.entry-content pre .hljs-number,
.entry-content pre .hljs-selector-attr,
.entry-content pre .hljs-selector-class,
.entry-content pre .hljs-selector-pseudo,
.entry-content pre .hljs-template-variable,
.entry-content pre .hljs-type,
.entry-content pre .hljs-variable {
color: #d19a66
}
.entry-content pre .hljs-bullet,
.entry-content pre .hljs-link,
.entry-content pre .hljs-meta,
.entry-content pre .hljs-selector-id,
.entry-content pre .hljs-symbol,
.entry-content pre .hljs-title {
color: #61aeee
}
.entry-content pre .hljs-emphasis {
font-style: italic
}
.entry-content pre .hljs-strong {
font-weight: 700
}
.entry-content pre .hljs-link {
text-decoration: underline
}
.entry-content pre .hljs-ln {
margin: 6px 0 0 0 !important
}
.entry-content pre td .hljs-ln-numbers {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
text-align: center;
color: #888f96;
background: #1d1f21;
font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif;
vertical-align: top;
position: absolute;
left: 0;
width: 30px
}
.entry-content pre .hljs-ln-code .hljs-ln-line {
margin-left: 22px;
}
.entry-content pre .hljs-ln-code .hljs-ln-line:hover {
background-color: rgba(255, 255, 255, .1)
}
.entry-content pre .hljs-ln{border-collapse:collapse}
.entry-content pre .hljs-ln td{padding:0}
.entry-content pre .hljs-ln-n:before{content:attr(data-line-number)}
/*fix*/
.entry-content pre table tr {
background-color: transparent;
border-top: none;
}
.entry-content pre table th, .entry-content pre table td {
border: none;
}
.entry-content pre table tr {
background-color: transparent;
border-top: 0;
}
.entry-content pre table tr:nth-child(2n) {
background-color: transparent;
}
.code-block-fullscreen {
position: fixed !important;
top: 0 !important;
left: 0 !important;
width: 100% !important;
height: 100% !important;
min-width: 100% !important;
z-index: 9999999 !important;
margin: 0 !important;
animation: elastic 1s !important
}
.code-block-fullscreen code {
--widthA: 100%;
--widthB: calc(var(--widthA) - 30px);
height: var(--widthB) !important;
min-height: 99% !important;
overflow-y: hidden !important;
overflow-x: auto !important;
height: auto !important
}
.code-block-fullscreen-html-scroll {
overflow: hidden !important
}
/*other fix*/
.entry-content ol, ul {
margin: auto !important;
}

View File

@ -0,0 +1,391 @@
.entry-content blockquote:before,.entry-content blockquote:after {
display: block
}
.entry-content blockquote blockquote:before,.entry-content blockquote blockquote:after {
display: none
}
.entry-content .begin,
.single-begin {
float: left;
font-size: 3.6em;
line-height: 1em;
margin-right: 3px;
margin-top: 2px;
font-weight: 700
}
@media screen and (max-width:860px) {
.entry-content .begin,
.single-begin {
margin-top: 6px
}
}
.entry-content ul {
list-style: disc;
border: 1px dashed #E4E4E4;
padding: 15px 10px 15px 50px;
color: #616161;
margin-left: 0;
border-radius: 10px
}
.entry-content ul ul {
border: none;
padding: 15px 10px 15px 30px;
}
.entry-content ol {
list-style: decimal;
border: 1px dashed #E4E4E4;
padding: 15px 10px 15px 50px;
color: #616161;
margin-left: 0;
border-radius: 10px
}
.entry-content ol li,
.entry-content ul li {
padding: 8px 0
}
.entry-content {
position: relative
}
.entry-content h3 {
padding-bottom: 8px;
border-bottom: 1px dashed #ddd;
color: #737373
}
.entry-content h3:before {
content: "#";
margin-right: 5px;
color: #FF6D6D
}
.entry-content h4:before {
content: ">";
margin-right: 5px;
color: #FF6D6D
}
.entry-content h5:before {
content: "?";
margin-right: 5px;
color: #FF6D6D
}
.entry-content code {
background: rgba(254, 250, 199, 1);
color: #E67474;
word-break: break-word;
font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif;
padding: 2px;
text-shadow: none;
border-radius: 5px
}
.entry-content a {
color: #e67474;
text-decoration: underline dotted rgba(0, 0, 0, .1)
}
.entry-content a:hover {
color: orange;
text-decoration: underline orange
}
h1.entry-title {
font-size: 24px;
font-weight: 300
}
.entry-content p {
color: #797979
}
.entry-content p {
line-height: 30px
}
.entry-content hr {
margin-top: 40px;
margin-bottom: 40px;
display: block;
border: 0;
text-align: center;
background: 0 0
}
.entry-content hr:before {
content: '...';
display: inline-block;
margin-left: .6em;
color: rgba(0, 0, 0, .8);
position: relative;
top: -30px;
font-size: 28px;
letter-spacing: .6em
}
.entry-content table {
border-collapse: collapse;
width: 100%;
border-radius: 5px
}
.entry-content th, .entry-content td {
padding: 8px;
}
.entry-content tr:nth-child(even){background-color: #f2f2f2}
.entry-content th {
color: white;
}
/*fix code block*/
.entry-content pre th, .entry-content pre td {
padding: 0;
}
.entry-content pre tr:nth-child(even){
background-color: transparent
}
.entry-content pre th {
background-color: transparent !important;
}
.highlight-wrap:before {
content: " ";
position: absolute;
-webkit-border-radius: 50%;
border-radius: 50%;
background: #fc625d;
width: 12px;
height: 12px;
left: 12px;
margin-top: -18px;
-webkit-box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
z-index: 2
}
.highlight-wrap {
position: relative;
background: #21252b;
border-radius: 5px;
font: 15px/22px "Microsoft YaHei", Arial, Sans-Serif;
line-height: 1.6;
margin-bottom: 1.6em;
max-width: 100%;
overflow: auto;
text-shadow: none;
color: #000;
padding-top: 30px;
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::-moz-selection {
background: #fff;
color: #21252b
}
.hljs-ln-line span::selection,
.hljs-ln-line::selection {
background: #fff;
color: #21252b
}
.highlight-wrap code {
background: #1d1f21;
color: #fff;
word-break: break-word;
font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif;
padding: 2px;
text-shadow: none;
border-radius: 0 0 5px 5px;
cursor: url(https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/cursor/texto.cur), auto
}
.highlight-wrap code[data-rel]:before {
color: #fff;
content: attr(data-rel);
height: 30px;
line-height: 30px;
background: #21252b;
font-size: 16px;
position: absolute;
margin-top: -30px;
left: 0;
width: 100%;
font-family: Ubuntu, sans-serif;
font-weight: 700;
padding: 0 80px;
text-indent: 15px;
text-align: center;
float: left;
z-index: 1;
border-radius: 5px 5px 0 0;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
border-bottom-right-radius: 0;
border-bottom-left-radius: 0;
pointer-events: none
}
.hljs {
display: block;
overflow-x: auto;
padding: .5em;
color: #abb2bf;
background: rgba(254, 250, 199, .5);
border-radius: 10px
}
.hljs-comment,
.hljs-quote {
color: #888f96;
font-style: italic
}
.hljs-doctag,
.hljs-formula,
.hljs-keyword {
color: #c678dd
}
.hljs-deletion,
.hljs-name,
.hljs-section,
.hljs-selector-tag,
.hljs-subst {
color: #e06c75
}
.hljs-literal {
color: #56b6c2
}
.hljs-addition,
.hljs-attribute,
.hljs-meta-string,
.hljs-regexp,
.hljs-string {
color: #98c379
}
.hljs-built_in,
.hljs-class .hljs-title {
color: #e6c07b
}
.hljs-attr,
.hljs-number,
.hljs-selector-attr,
.hljs-selector-class,
.hljs-selector-pseudo,
.hljs-template-variable,
.hljs-type,
.hljs-variable {
color: #d19a66
}
.hljs-bullet,
.hljs-link,
.hljs-meta,
.hljs-selector-id,
.hljs-symbol,
.hljs-title {
color: #61aeee
}
.hljs-emphasis {
font-style: italic
}
.hljs-strong {
font-weight: 700
}
.hljs-link {
text-decoration: underline
}
.hljs-ln {
margin: 6px 0 0 0 !important
}
td.hljs-ln-numbers {
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
text-align: center;
color: #888f96;
background: #1d1f21;
font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif;
vertical-align: top;
position: absolute;
left: 0;
width: 30px
}
.hljs-ln-code .hljs-ln-line {
margin-left: 25px;
padding-left: 5px
}
.hljs-ln-code .hljs-ln-line:hover {
background-color: rgba(255, 255, 255, .1)
}
.code-block-fullscreen {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
min-width: 100%;
z-index: 9999999;
margin: 0;
animation: elastic 1s
}
.code-block-fullscreen code {
--widthA: 100%;
--widthB: calc(var(--widthA) - 30px);
height: var(--widthB);
min-height: 99%;
overflow-y: hidden;
overflow-x: auto;
height: auto
}
.code-block-fullscreen-html-scroll {
overflow: hidden
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 694 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 805 KiB

View File

Before

Width:  |  Height:  |  Size: 486 KiB

After

Width:  |  Height:  |  Size: 486 KiB

View File

Before

Width:  |  Height:  |  Size: 732 KiB

After

Width:  |  Height:  |  Size: 732 KiB

View File

@ -7,7 +7,8 @@
* @package Sakura
*/
define( 'SAKURA_VERSION', '3.1.0' );
define( 'SAKURA_VERSION', '3.1.3' );
define( 'JSDELIVR_VERSION', '3.6.7' );
//ini_set('display_errors', true);
//error_reporting(E_ALL);
@ -169,14 +170,19 @@ add_action( 'after_setup_theme', 'akina_content_width', 0 );
* Enqueue scripts and styles.
*/
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')){
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 {
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/mashirozx/Sakura@' . SAKURA_VERSION . '/cdn/js/lib.min.js', array(), SAKURA_VERSION, true );
}
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 );
if (akina_option('app_no_jsdelivr_cdn')) {
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 );
} else {
wp_enqueue_style( 'saukra_css', 'https://cdn.jsdelivr.net/gh/mashirozx/Sakura@' . SAKURA_VERSION . '/style.min.css', array(), SAKURA_VERSION );
wp_enqueue_script( 'app', 'https://cdn.jsdelivr.net/gh/mashirozx/Sakura@' . SAKURA_VERSION . '/js/sakura-app.min.js', array(), SAKURA_VERSION, true );
}
if ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {
wp_enqueue_script( 'comment-reply' );
}
@ -223,7 +229,7 @@ require get_template_directory() . '/inc/categories-images.php';
//Comment Location Start
function convertip($ip) {
$dat_path = dirname(__FILE__).'/QQWry.Dat';
$dat_path = dirname(__FILE__).'/inc/QQWry.Dat';
if(!$fd = @fopen($dat_path, 'rb')){
return 'IP date file not exists or access denied';
}
@ -1382,22 +1388,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.'));
}
// lazyload images in atricles
function lazyload_img($content) {
// html 标签处理器
function html_tag_parser($content) {
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;
}
add_filter('the_content', 'lazyload_img'); //替换文章关键词
//add_filter( 'comment_text', 'lazyload_img' );//替换评论关键词
add_filter('the_content', 'html_tag_parser'); //替换文章关键词
//add_filter( 'comment_text', 'html_tag_parser' );//替换评论关键词
/*
* QQ 评论
*/
// 数据库插入评论表单的qq字段
add_action('wp_insert_comment','inlojv_sql_insert_qq_field',10,2);
function inlojv_sql_insert_qq_field($comment_ID,$commmentdata) {
add_action('wp_insert_comment','sql_insert_qq_field',10,2);
function sql_insert_qq_field($comment_ID,$commmentdata) {
$qq = isset($_POST['new_field_qq']) ? $_POST['new_field_qq'] : false;
update_comment_meta($comment_ID,'new_field_qq',$qq); // new_field_qq 是表单name值也是存储在数据库里的字段名字
}
@ -1419,8 +1459,8 @@ function output_comments_qq_columns( $column_name, $comment_id ){
/**
* 头像调用路径
*/
add_filter( 'get_avatar', 'inlojv_change_avatar', 10, 3 );
function inlojv_change_avatar($avatar){
add_filter( 'get_avatar', 'change_avatar', 10, 3 );
function change_avatar($avatar){
global $comment;
if( get_comment_meta( $comment->comment_ID, 'new_field_qq', true ) ){
$qq_number = get_comment_meta( $comment->comment_ID, 'new_field_qq', true );
@ -1430,4 +1470,14 @@ function inlojv_change_avatar($avatar){
}
}
// default feature image
function DEFAULT_FEATURE_IMAGE() {
if ( empty( akina_option('default_feature_image' )) ) {
return get_template_directory_uri().'/feature/index.php?'.rand(1,1000);
//return 'https://api.mashiro.top/feature/?'.rand(1,1000);
} else {
return akina_option('default_feature_image').'?'.rand(1,1000);
}
}
//code end

View File

@ -119,5 +119,11 @@ window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}
</div>
</div>
</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">

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -11,7 +11,9 @@ if ( akina_option('theme_skin') ) { ?>
.feature i , /*.feature-title span ,*/ .download , .navigator i:hover , .links ul li:before , .ar-time i , span.ar-circle , .object , .comment .comment-reply-link , .siren-checkbox-radio:checked + .siren-checkbox-radioInput:after { background: <?php echo akina_option('theme_skin'); ?> }
::-webkit-scrollbar-thumb { background: <?php echo akina_option('theme_skin'); ?> }
.download , .navigator i:hover , .link-title , .links ul li:hover , #pagination a:hover , .comment-respond input[type='submit']:hover { border-color: <?php echo akina_option('theme_skin'); ?> }
.entry-content a:hover , .site-info a:hover , .comment h4 a , #comments-navi a.prev , #comments-navi a.next , .comment h4 a:hover , .site-top ul li a:hover , .entry-title a:hover , #archives-temp h3 , span.page-numbers.current , .sorry li a:hover , .site-title a:hover , i.iconfont.js-toggle-search.iconsearch:hover , .comment-respond input[type='submit']:hover, blockquote:before, blockquote:after,#aplayer-float .aplayer-lrc-current { color: <?php echo akina_option('theme_skin'); ?> }
.entry-content a:hover , .site-info a:hover , .comment h4 a , #comments-navi a.prev , #comments-navi a.next , .comment h4 a:hover , .site-top ul li a:hover , .entry-title a:hover , #archives-temp h3 , span.page-numbers.current , .sorry li a:hover , .site-title a:hover , i.iconfont.js-toggle-search.iconsearch:hover , .comment-respond input[type='submit']:hover, blockquote:before, blockquote:after { color: <?php echo akina_option('theme_skin'); ?> }
#aplayer-float .aplayer-lrc-current { color: <?php echo akina_option('theme_skin'); ?> !important}
.is-active-link::before {
background-color: <?php echo akina_option('theme_skin'); ?> !important
@ -23,11 +25,11 @@ if ( akina_option('theme_skin') ) { ?>
}
.site-top ul li a:after {
background-color: <?php echo akina_option('theme_skin'); ?>
background-color: <?php echo akina_option('theme_skin'); ?>
}
.scrollbar,.butterBar-message {
background: <?php echo akina_option('theme_skin'); ?>
background: <?php echo akina_option('theme_skin'); ?> !important
}
#nprogress .spinner-icon{
@ -39,6 +41,12 @@ if ( akina_option('theme_skin') ) { ?>
background: <?php echo akina_option('theme_skin'); ?>
}
<?php if(akina_option('entry_content_theme') == "sakura"){ ?>
.entry-content th {
background-color: <?php echo akina_option('theme_skin'); ?>
}
<?php } ?>
<?php } // theme-skin ?>
<?php // Custom style
if ( akina_option('site_custom_style') ) {

View File

@ -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 ( 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' );
function optionsframework_rolescheck () {
@ -179,8 +194,8 @@ function optionsframework_setdefaults() {
function optionsframework_menu_settings() {
$menu = array(
'page_title' => __( 'Sakura Options', 'optionsframework'),
'menu_title' => __('Sakura Options', 'optionsframework'),
'page_title' => __( SAKURA_OPTIONS, 'optionsframework'),
'menu_title' => __( SAKURA_OPTIONS, 'optionsframework'),
'capability' => 'edit_theme_options',
'menu_slug' => 'options-framework',
'callback' => 'optionsframework_page'
@ -410,7 +425,7 @@ function optionsframework_adminbar() {
$wp_admin_bar->add_menu( array(
'parent' => 'appearance',
'id' => 'of_theme_options',
'title' => __( 'Sakura Options', 'options_framework_theme' ),
'title' => __( SAKURA_OPTIONS, 'options_framework_theme' ),
'href' => admin_url( 'themes.php?page=options-framework' )
));
}

View File

@ -13,19 +13,50 @@ mashiro_option.site_name = "<?php echo akina_option('site_name', ''); ?>";
mashiro_option.author_name = "<?php echo akina_option('author_name', ''); ?>";
mashiro_option.template_url = "<?php echo get_template_directory_uri(); ?>";
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.mashiro.top/qqinfo/";
mashiro_option.qq_avatar_api_url = "https://api.mashiro.top/qqinfo/";
mashiro_option.qq_api_url = "https://api.2heng.xin/qqinfo/";
mashiro_option.qq_avatar_api_url = "https://api.2heng.xin/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('entry_content_theme') == "sakura"){ ?>
mashiro_option.entry_content_theme_src = "<?php echo get_template_directory_uri() ?>/cdn/theme/sakura.css?<?php echo SAKURA_VERSION.akina_option('cookie_version', ''); ?>";
<?php }elseif(akina_option('entry_content_theme') == "github") {?>
mashiro_option.entry_content_theme_src = "<?php echo get_template_directory_uri() ?>/cdn/theme/github.css?<?php echo SAKURA_VERSION.akina_option('cookie_version', ''); ?>";
<?php } ?>
<?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 { ?>
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/mashirozx/Sakura@<?php echo SAKURA_VERSION; ?>/cdn/css/lib.min.css";
<?php } ?>
<?php if (akina_option('playlist_id', '')): ?>
mashiro_option.float_player_on = true;
<?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*/
</script>
<?php }

View File

@ -320,6 +320,143 @@ function the_headPattern(){
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;
}
/*
* 导航栏用户菜单

View File

@ -14,11 +14,15 @@ mashiro_global.ini = new function () {
lazyload();
social_share();
mashiro_global.post_list_show_animation.ini();
copy_code_block();
coverVideoIni();
}
this.pjax = function () {
pjaxInit();
social_share();
mashiro_global.post_list_show_animation.ini();
copy_code_block();
coverVideoIni();
}
}
@ -58,7 +62,8 @@ function imgError(ele, type) {
default:
ele.src = 'https://view.moezx.cc/images/2018/05/13/image-404.png';
}
}
}
mashiro_global.post_list_show_animation = new function () {
this.ini = function (ajax) {
$("article.post-list-thumb").each(function (i) {
@ -68,7 +73,11 @@ mashiro_global.post_list_show_animation = new function () {
if ($(".headertop").hasClass("headertop-bar")) {
var window_height = 0;
} else {
var window_height = $(window).height() - 300;
if (mashiro_option.land_at_home) {
var window_height = $(window).height() - 300;
} else {
var window_height = $(window).height();
}
}
}
var article_height = $("article.post-list-thumb").eq(i).offset().top;
@ -492,6 +501,70 @@ function timeSeriesReload(flag) {
}
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) {
if (document.body.clientWidth <= 1200) {
return;
@ -536,7 +609,7 @@ var pjaxInit = function () {
code_highlight_style();
} catch (e) {};
try {
inlojv_js_getqqinfo();
getqqinfo();
} catch (e) {};
lazyload();
$("#to-load-aplayer").click(function () {
@ -696,19 +769,19 @@ $("bot-ui").click(function () {
function add_copyright() {
document.body.addEventListener("copy", function (e) {
if (window.getSelection().toString().length > 30) {
if (window.getSelection().toString().length > 30 && mashiro_option.clipboardCopyright) {
setClipboardText(e);
}
addComment.createButterbar("复制成功!<br>Copied to clipboard successfully!", 1000);
});
function setClipboardText(event) {
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 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 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" + "# 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) {
event.clipboardData.setData("text/html", htmlData);
event.clipboardData.setData("text/plain", textData);
addComment.createButterbar("复制成功!<br>Copied to clipboard successfully!", 1000);
} else if (window.clipboardData) {
return window.clipboardData.setData("text", textData);
}
@ -716,7 +789,7 @@ function add_copyright() {
}
add_copyright();
$(function () {
inlojv_js_getqqinfo();
getqqinfo();
});
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;
if (!getCookie('user_qq') && !getCookie('user_qq_email') && !getCookie('user_author')) {
$('input#qq,input#author,input#email,input#url').val('');
@ -959,6 +1032,8 @@ function mail_me() {
var mail = "mailto:" + mashiro_option.email_name + "@" + mashiro_option.email_domain;
window.open(mail);
}
/*
var currentFontIsUbuntu = true;
function changeFont() {
@ -983,12 +1058,14 @@ function convertChinese(zh) {
loadCSS("https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.8/css/cn.css");
}
}
*/
mashiro_global.ini.normalize();
loadCSS(mashiro_option.jsdelivr_css_src);
loadCSS(mashiro_option.entry_content_theme_src);
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://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) {
if (typeof exports === "object" && typeof module === "object") {
module.exports = a()
@ -1200,200 +1277,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 : "&lt;", b.appendChild(w), C = y("button"), C.id = "next-button", C.innerHTML = H.svg ? x : "&gt;", 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,
s = $('#bgvideo')[0],
Siren = {
@ -1558,11 +1442,14 @@ var home = location.href,
$(this).next().slideToggle('fast');
return false;
});
baguetteBox.run('.entry-content', {
captions: function (element) {
return element.getElementsByTagName('img')[0].alt;
}
});
if (mashiro_option.baguetteBoxON) {
baguetteBox.run('.entry-content', {
captions: function (element) {
return element.getElementsByTagName('img')[0].alt;
},
ignoreClass: 'fancybox',
});
}
$('.js-toggle-search').on('click', function () {
$('.js-toggle-search').toggleClass('is-active');
$('.js-search').toggleClass('is-visible');
@ -1790,10 +1677,10 @@ var home = location.href,
if ($(this).scrollTop() > offset) {
$back_to_top.addClass('cd-is-visible');
$(".changeSkin-gear").css("bottom", "0");
if (screen.height > 650) {
$(".cd-top.cd-is-visible").css("top", "-326px");
if ($(window).height() > 950) {
$(".cd-top.cd-is-visible").css("top", "0");
} 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 {
$(".changeSkin-gear").css("bottom", "-999px");
@ -1804,6 +1691,7 @@ var home = location.href,
$back_to_top.addClass('cd-fade-out');
}
});
//smooth scroll to top
$back_to_top.on('click', function (event) {
event.preventDefault();
$('body,html').animate({
@ -1828,6 +1716,12 @@ $(function () {
$(document).pjax('a[target!=_top]', '#page', {
fragment: '#page',
timeout: 8000,
}).on('pjax:beforeSend', () => { //离开页面停止播放
$('.normal-cover-video').each(function() {
this.pause();
this.src = '';
this.load = '';
});
}).on('pjax:send', function () {
$("#bar").css("width", "0%");
if (mashiro_option.NProgressON) NProgress.start();

View File

@ -43,11 +43,11 @@ function optionsframework_options() {
// 复选框数组
$multicheck_array = array(
'one' => __('椎名真白', 'options_framework_theme'),
'two' => __('时崎狂三', 'options_framework_theme'),
'three' => __('西木野真姬', 'options_framework_theme'),
'four' => __('黑泽露比', 'options_framework_theme'),
'five' => __('渡边曜', 'options_framework_theme')
'one' => __('1', 'options_framework_theme'),
'two' => __('2', 'options_framework_theme'),
'three' => __('3', 'options_framework_theme'),
'four' => __('4', 'options_framework_theme'),
'five' => __('5', 'options_framework_theme')
);
// 复选框默认值
@ -59,7 +59,7 @@ function optionsframework_options() {
// 背景默认值
$background_defaults = array(
'color' => '',
'image' => '',
'image' => 'https://view.moezx.cc/images/2018/12/23/knights-of-the-frozen-throne-8k-qa.jpg',
'repeat' => 'repeat',
'position' => 'top center',
'attachment'=>'scroll' );
@ -130,7 +130,7 @@ function optionsframework_options() {
'name' => __("主题风格", 'akina'),
'id' => 'theme_skin',
'std' => "#FE9600",
'desc' => __('自定义主题颜色(此功能没有优化,建议使用#FE9600', ''),
'desc' => __('自定义主题颜色', ''),
'type' => "color"
);
@ -217,6 +217,13 @@ function optionsframework_options() {
'round' => __('圆形', ''),
'square' => __('方形', '')
));
$options[] = array(
'name' => __('默认文章特色图', 'options_framework_theme'),
'desc' => __('在未设置文章特色图的情况下展示的默认图像,留空则调用本地随机封面(要展示的图片放入 /wp-content/themes/Sakura/feature/gallery/ 目录)', 'options_framework_theme'),
'id' => 'default_feature_image',
'std' => 'https://api.mashiro.top/feature/',
'type' => 'text');
$options[] = array(
'name' => __('评论收缩', 'akina'),
@ -263,7 +270,7 @@ function optionsframework_options() {
'name' => __('页脚信息', 'options_framework_theme'),
'desc' => __('页脚说明文字支持HTML代码', 'options_framework_theme'),
'id' => 'footer_info',
'std' => '&copy; 2018',
'std' => 'Copyright &copy; by Mashiro All Rights Reserved.',
'type' => 'textarea');
$options[] = array(
@ -275,7 +282,7 @@ function optionsframework_options() {
$options[] = array(
'name' => __('站长统计(不建议使用)', 'options_framework_theme'),
'desc' => __('填写统计代码,将被隐藏,如需要在下方填写链接地址', 'options_framework_theme'),
'desc' => __('填写统计代码,将被隐藏', 'options_framework_theme'),
'id' => 'site_statistics',
'std' => '',
'type' => 'textarea');
@ -357,7 +364,7 @@ function optionsframework_options() {
'desc' => __('此处留空则使用内置API将需要随机展示的图片放入 /cover/gallery/ 目录)', 'options_framework_theme'),
'id' => 'cover_img',
'std' => '',
'type' => 'upload');
'type' => 'text');
$options[] = array(
'name' => __('背景图滤镜', 'akina'),
@ -372,7 +379,7 @@ function optionsframework_options() {
'filter-dot' => __('点点', '')
));
$options[] = array(
$options[] = array(
'name' => __('是否开启聚焦', 'options_framework_theme'),
'desc' => __('默认开启', 'options_framework_theme'),
'id' => 'top_feature',
@ -486,6 +493,16 @@ function optionsframework_options() {
$options[] = array(
'name' => __('文章页', 'options_framework_theme'),
'type' => 'heading');
$options[] = array(
'name' => __('文章样式', 'akina'),
'id' => 'entry_content_theme',
'std' => "sakura",
'type' => "radio",
'options' => array(
'sakura' => __('默认样式', ''),
'github' => __('GitHub 样式', ''),
));
$options[] = array(
'name' => __('文章点赞', 'akina'),
@ -723,18 +740,18 @@ function optionsframework_options() {
'type' => 'text');
$options[] = array(
'name' => __('开启 jsDelivr 测试?', 'options_framework_theme'),
'desc' => __('如不清楚什么意思切勿勾选!', 'options_framework_theme'),
'name' => __('本地调用前端库lib.js、lib.css', 'options_framework_theme'),
'desc' => __('前端库不走 jsDelivr不建议启用', 'options_framework_theme'),
'id' => 'jsdelivr_cdn_test',
'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');
'name' => __('本地调用主题 js、css 文件sakura-app.js、style.css', 'options_framework_theme'),
'desc' => __('主题的 js、css 文件不走 jsDelivrDIY 时请开启', 'options_framework_theme'),
'id' => 'app_no_jsdelivr_cdn',
'std' => '0',
'type' => 'checkbox');
//其他
$options[] = array(
@ -743,10 +760,22 @@ function optionsframework_options() {
$options[] = array(
'name' => __('关于', 'options_framework_theme'),
'desc' => __('Theme Sakura v'.SAKURA_VERSION.' | <a href="https://2heng.xin/theme-sakura/">主题说明</a> | <a href="https://github.com/mashirozx/Sakura/">源码</a>', 'options_framework_theme'),
'desc' => __('Theme Sakura v'.SAKURA_VERSION.' | <a href="https://2heng.xin/theme-sakura/">主题说明</a> | <a href="https://github.com/mashirozx/Sakura/">源码</a><a href="https://github.com/mashirozx/Sakura/releases/latest"><img src="https://img.shields.io/github/release/mashirozx/Sakura.svg?style=flat-square" alt="GitHub release"></a>', 'options_framework_theme'),
'id' => 'theme_intro',
'std' => '',
'type' => 'typography ');
$options[] = array(
'name' => "检查更新",
'desc' => '<a href="https://github.com/mashirozx/Sakura/releases/latest">下载最新版</a>',
'id' => "release_info",
'std' => "tag",
'type' => "images",
'options' => array(
'tag' => 'https://img.shields.io/github/release/mashirozx/Sakura.svg?style=flat-square',
'tag2' => 'https://img.shields.io/github/commits-since/mashirozx/Sakura/v'.SAKURA_VERSION.'.svg?style=flat-square'
)
);
$options[] = array(
'name' => __('页脚悬浮播放器', 'options_framework_theme'),
@ -756,8 +785,8 @@ function optionsframework_options() {
'type' => 'text');
$options[] = array(
'name' => __('Cookie 版本控制', 'options_framework_theme'),
'desc' => __('用于更新前端 cookie,可使用任意字符串,比如日期:---2018/5/16', 'options_framework_theme'),
'name' => __('版本控制', 'options_framework_theme'),
'desc' => __('用于更新前端 cookie 及浏览器缓存,可使用任意字符串', 'options_framework_theme'),
'id' => 'cookie_version',
'std' => '',
'type' => 'text');
@ -803,12 +832,26 @@ function optionsframework_options() {
'id' => 'image_category',
'std' => '',
'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(
'name' => __('发件地址前缀', 'options_framework_theme'),
'desc' => __('用于发送系统邮件,在用户的邮箱中显示的发件人地址,不要使用中文,默认系统邮件地址为 poi@你的域名.com', 'options_framework_theme'),
'desc' => __('用于发送系统邮件,在用户的邮箱中显示的发件人地址,不要使用中文,默认系统邮件地址为 bibi@你的域名', 'options_framework_theme'),
'id' => 'mail_user_name',
'std' => 'poi',
'std' => 'bibi',
'type' => 'text');
$options[] = array(
@ -834,7 +877,7 @@ function optionsframework_options() {
$options[] = array(
'name' => __('开启多说插件支持', 'options_framework_theme'),
'desc' => __('如果使用多说插件,请勾选此项', 'options_framework_theme'),
'desc' => __('多说已经凉了', 'options_framework_theme'),
'id' => 'general_disqus_plugin_support',
'std' => '0',
'type' => 'checkbox');
@ -858,6 +901,7 @@ function optionsframework_options() {
'id' => 'time_zone_fix',
'std' => '0',
'type' => 'text');
return $options;
}

171
style.css
View File

@ -5,7 +5,7 @@ Theme URI: https://2heng.xin/theme-sakura/
Author: Mashiro, Louie, Fuzzz
Author URI: http://2heng.xin
Description: Akina http://www.akina.pw/themeakina
Version: 3.1.0
Version: 3.1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: akina
@ -514,7 +514,7 @@ input[type=button]:hover,
input[type=reset]:hover,
input[type=submit]:hover {
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,
@ -1771,126 +1771,7 @@ i.iconfont.hotpost {
display: none
}
.entry-content .begin,
.single-begin {
float: left;
font-size: 3.6em;
line-height: 1em;
margin-right: 3px;
margin-top: 2px;
font-weight: 700
}
@media screen and (max-width:860px) {
.entry-content .begin,
.single-begin {
margin-top: 6px
}
}
.entry-content ul {
list-style: disc;
border: 1px dashed #E4E4E4;
padding: 15px 10px 15px 50px;
color: #616161;
margin-left: 0;
border-radius: 10px
}
.entry-content ol {
list-style: decimal;
border: 1px dashed #E4E4E4;
padding: 15px 10px 15px 50px;
color: #616161;
margin-left: 0;
border-radius: 10px
}
.entry-content ol li,
.entry-content ul li {
padding: 8px 0
}
.entry-content {
position: relative
}
.entry-content h3 {
padding-bottom: 8px;
border-bottom: 1px dashed #ddd;
color: #737373
}
.entry-content h3:before {
content: "#";
margin-right: 5px;
color: #FF6D6D
}
.entry-content h4:before {
content: ">";
margin-right: 5px;
color: #FF6D6D
}
.entry-content h5:before {
content: "•";
margin-right: 5px;
color: #FF6D6D
}
.entry-content code {
background: rgba(254, 250, 199, 1);
color: #E67474;
word-break: break-word;
font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif;
padding: 2px;
text-shadow: none;
border-radius: 5px
}
.entry-content a {
color: #e67474;
text-decoration: underline dotted rgba(0, 0, 0, .1)
}
.entry-content a:hover {
color: orange;
text-decoration: underline orange
}
h1.entry-title {
font-size: 24px;
font-weight: 300
}
.entry-content p {
color: #797979
}
.entry-content p {
line-height: 30px
}
.entry-content hr {
margin-top: 40px;
margin-bottom: 40px;
display: block;
border: 0;
text-align: center;
background: 0 0
}
.entry-content hr:before {
content: '...';
display: inline-block;
margin-left: .6em;
color: rgba(0, 0, 0, .8);
position: relative;
top: -30px;
font-size: 28px;
letter-spacing: .6em
}
.entry-content .post-password-form {
text-align: center
@ -7986,14 +7867,15 @@ a.toc-link {
background: #fc625d;
width: 12px;
height: 12px;
left: 20px;
margin-top: -20px;
left: 12px;
margin-top: -18px;
-webkit-box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
z-index: 2
}
.highlight-wrap {
position: relative;
background: #21252b;
border-radius: 5px;
font: 15px/22px "Microsoft YaHei", Arial, Sans-Serif;
@ -8007,6 +7889,22 @@ a.toc-link {
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::-moz-selection {
background: #fff;
@ -8051,12 +7949,12 @@ a.toc-link {
.highlight-wrap code[data-rel]:before {
color: #fff;
content: attr(data-rel);
height: 38px;
line-height: 38px;
height: 30px;
line-height: 30px;
background: #21252b;
font-size: 16px;
position: absolute;
margin-top: -35px;
margin-top: -30px;
left: 0;
width: 100%;
font-family: Ubuntu, sans-serif;
@ -8421,4 +8319,25 @@ td.hljs-ln-numbers {
.aplayer-lrc {
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;
}

View File

@ -16,7 +16,7 @@
<?php if ( has_post_thumbnail() ) { ?>
<a href="<?php the_permalink();?>"><?php the_post_thumbnail('large'); ?></a>
<?php } else {?>
<a href="<?php the_permalink();?>"><img src="<?php bloginfo('template_url'); ?>/feature/index.php" /></a>
<a href="<?php the_permalink();?>"><img src="<?php echo DEFAULT_FEATURE_IMAGE(); ?>" /></a>
<?php } ?>
</div>

View File

@ -27,7 +27,7 @@
) );
?>
<!--<div class="oshimai"></div>-->
<h2 style="opacity:0;max-height:0;margin:0">Comments</h2><!-- 评论跳转标记 -->
<!--<h2 style="opacity:0;max-height:0;margin:0">Comments</h2>--><!-- 评论跳转标记 -->
</div><!-- .entry-content -->
<?php the_reward(); ?>
<footer class="post-footer">

View File

@ -16,7 +16,7 @@ if(has_post_thumbnail()){
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large');
$post_img = $large_image_url[0];
}else{
$post_img = get_bloginfo('template_url') . '/feature/index.php';
$post_img = DEFAULT_FEATURE_IMAGE();
}
$the_cat = get_the_category();
// 摘要字数限制