├── .gitattributes ├── .github └── ISSUE_TEMPLATE │ ├── ---bug.md │ └── feature_request.md ├── 404.php ├── LICENSE ├── README-en.md ├── README.md ├── archive.php ├── author.php ├── cdn ├── css │ ├── lib.css │ └── src │ │ ├── baguetteBox.min.css │ │ ├── font-awesome-animation.min.css │ │ ├── font-awesome.min.css │ │ ├── jquery.fancybox.min.css │ │ ├── sharejs.css │ │ └── third-part.css ├── do.py ├── js │ ├── lib.js │ └── src │ │ ├── 01.jquery.min.js │ │ ├── 02.jquery.pjax.min.js │ │ ├── 03.highlight.pack.js │ │ ├── 04.highlightjs-line-numbers.min.js │ │ ├── 05.nprogress.min.js │ │ ├── 06.activate-power-mode.js │ │ ├── 07.APlayer.min.js │ │ ├── 08.lazyload.min.js │ │ ├── 11.third-part-functions.js │ │ ├── 12.tocbot.min.js │ │ ├── 13.social-share.min.js │ │ ├── 14.baguetteBox.min.js │ │ ├── 17.query.fancybox.min.js │ │ └── 18.clipboard.min.js └── theme │ ├── github.css │ └── sakura.css ├── comments.php ├── footer.php ├── functions.php ├── header.php ├── images ├── avatar.jpeg ├── avatar.jpg ├── favicon.ico ├── hd.png ├── login_loading.gif ├── logo.png ├── mashiro-logo-s.png ├── random │ ├── d-1.jpg │ ├── d-10.jpg │ ├── d-2.jpg │ ├── d-3.jpg │ ├── d-4.jpg │ ├── d-5.jpg │ ├── d-6.jpg │ ├── d-7.jpg │ ├── d-8.jpg │ └── d-9.jpg ├── smilies │ ├── bili │ │ ├── baiyan.png │ │ ├── bishi.png │ │ ├── bizui.png │ │ ├── chan.png │ │ ├── daku.png │ │ ├── dalao.png │ │ ├── dalian.png │ │ ├── dianzan.png │ │ ├── doge.png │ │ ├── facai.png │ │ ├── fadai.png │ │ ├── fanu.png │ │ ├── ganga.png │ │ ├── guilian.png │ │ ├── guzhang.png │ │ ├── haixiu.png │ │ ├── heirenwenhao.png │ │ ├── huaixiao.png │ │ ├── jingxia.png │ │ ├── keai.png │ │ ├── koubi.png │ │ ├── kun.png │ │ ├── lengmo.png │ │ ├── liubixue.png │ │ ├── liuhan.png │ │ ├── liulei.png │ │ ├── miantian.png │ │ ├── mudengkoudai.png │ │ ├── nanguo.png │ │ ├── outu.png │ │ ├── qinqin.png │ │ ├── se.png │ │ ├── shengbing.png │ │ ├── shengqi.png │ │ ├── shuizhao.png │ │ ├── sikao.png │ │ ├── tiaokan.png │ │ ├── tiaopi.png │ │ ├── touxiao.png │ │ ├── tuxue.png │ │ ├── weiqu.png │ │ ├── weixiao.png │ │ ├── wunai.png │ │ ├── xiaoku.png │ │ ├── xieyanxiao.png │ │ ├── yiwen.png │ │ ├── yun.png │ │ ├── zaijian.png │ │ ├── zhoumei.png │ │ └── zhuakuang.png │ ├── icon_Grievance.gif │ ├── icon_Happy.gif │ ├── icon_aa.gif │ ├── icon_anger.gif │ ├── icon_awesome.gif │ ├── icon_bbd.gif │ ├── icon_britan.gif │ ├── icon_doubt.gif │ ├── icon_good.gif │ ├── icon_haha.gif │ ├── icon_han.gif │ ├── icon_hu.gif │ ├── icon_huaji.gif │ ├── icon_ku.gif │ ├── icon_naive.gif │ ├── icon_niconiconi.gif │ ├── icon_niconiconi_t.gif │ ├── icon_niconiconit.gif │ ├── icon_rbq.gif │ ├── icon_reluctantly.gif │ ├── icon_rmb.gif │ ├── icon_se.gif │ ├── icon_shame.gif │ ├── icon_shui.gif │ ├── icon_smilingeyes.gif │ ├── icon_spit.gif │ ├── icon_spray.gif │ ├── icon_surprised.gif │ ├── icon_surprised2.gif │ ├── icon_tear.gif │ ├── icon_theblackline.gif │ └── icon_tongue.gif ├── temp.jpg └── temp.png ├── inc ├── Parsedown.php ├── QQWry.Dat ├── api.php ├── categories-images.php ├── classes │ ├── Aplayer.php │ ├── Bilibili.php │ ├── Cache.php │ ├── Images.php │ ├── Meting.php │ └── QQ.php ├── css │ ├── admin.css │ ├── color-picker.min.css │ ├── dashboard-fix.css │ ├── dashboard-light.css │ └── optionsframework.css ├── customizer.php ├── dash-scheme.php ├── decorate.php ├── fonts │ ├── SAKURASO.old │ │ ├── icon.css │ │ ├── sakuraso-symbol.svg │ │ ├── sakuraso.eot │ │ ├── sakuraso.svg │ │ ├── sakuraso.ttf │ │ └── sakuraso.woff │ ├── iconfont.eot │ ├── iconfont.svg │ ├── iconfont.ttf │ └── iconfont.woff ├── images │ └── ico-delete.png ├── js │ ├── addtohomescreen.js │ ├── color-picker.min.js │ ├── iris.min.js │ ├── media-uploader.js │ └── options-custom.js ├── login.css ├── options-framework.php ├── options-interface.php ├── options-media-uploader.php ├── options-sanitize.php ├── swicher.php ├── template-tags.php └── theme_plus.php ├── index.php ├── js ├── customizer.js ├── input.min.js ├── login.js └── sakura-app.js ├── languages ├── en_US.mo ├── en_US.po ├── sakura.pot ├── zh_CN.mo ├── zh_CN.po ├── zh_TW.mo └── zh_TW.po ├── layouts ├── authorprofile.php ├── duoshuo.php ├── feature.php ├── feature_v2.php ├── imgbox.php ├── post-nextprev.php ├── sharelike.php └── sidebox.php ├── manifest ├── .vscode │ └── settings.json ├── README.md ├── __init__.py ├── gallary │ ├── beyond_by_auroralion-dan5njb.jpg │ ├── pixar_up_movie_balloons_desktop_1920x1080_hd-wallpaper-507967.jpg │ └── 海の空(56993195)_by_夏T.jpg ├── icon.ico ├── icon.png ├── jpeg │ ├── 19313b0d62b27c8ba022f60fbfedd5ee.jpeg │ ├── 19313b0d62b27c8ba022f60fbfedd5ee.th.jpeg │ ├── 783bf161f47b32882f0e962fd4064de7.jpeg │ ├── 783bf161f47b32882f0e962fd4064de7.th.jpeg │ ├── e9f33c2c502ab43804964ce7edd431f9.jpeg │ └── e9f33c2c502ab43804964ce7edd431f9.th.jpeg ├── manifest.json ├── manifest.py ├── qt.py └── webp │ ├── 19313b0d62b27c8ba022f60fbfedd5ee.th.webp │ ├── 19313b0d62b27c8ba022f60fbfedd5ee.webp │ ├── 783bf161f47b32882f0e962fd4064de7.th.webp │ ├── 783bf161f47b32882f0e962fd4064de7.webp │ ├── e9f33c2c502ab43804964ce7edd431f9.th.webp │ └── e9f33c2c502ab43804964ce7edd431f9.webp ├── options.php ├── page-archive.php ├── page-links.php ├── page.php ├── screenshot.jpg ├── search.php ├── sidebar.php ├── single.php ├── style.css ├── tpl ├── content-category.php ├── content-image.php ├── content-none.php ├── content-page.php ├── content-search.php ├── content-single.php ├── content-status.php ├── content-thumb.php ├── content.php └── single-image.php └── user ├── page-bangumi.php ├── page-login.php ├── page-register.php ├── page-timeline.php └── verification.js /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/---bug.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: 报告 bug 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 13 | 14 | **描述问题** 15 | 16 | **bug 重现步骤** 17 | 18 | **截图(如有)** 19 | 20 | **系统信息** 21 | - (前端)操作系统: [e.g. Windows 10, Android 9.0] 22 | - 浏览器: [e.g. chrome, safari] 23 | - PHP 版本 24 | - WordPress 版本 25 | - Sakura 主题版本 26 | 27 | **补充信息** 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /404.php: -------------------------------------------------------------------------------- 1 | 11 | > 12 | 13 | 14 | 15 | 16 | <?php global $page, $paged;wp_title( '-', true, 'right' ); 17 | bloginfo( 'name' );$site_description = get_bloginfo( 'description', 'display' ); 18 | if ( $site_description && ( is_home() || is_front_page() ) ) echo " - $site_description";if ( $paged >= 2 || $page >= 2 ) echo ' - ' . sprintf( __( 'page %s'), max( $paged, $page ) );/*第 %s 页*/?> 19 | 20 | 21 | 22 | 40 | 41 | > 42 |
43 |
44 |
45 |
46 |
47 | 48 | 49 |
50 |
51 |

52 | 56 |
57 |
58 | 59 | 60 | -------------------------------------------------------------------------------- /README-en.md: -------------------------------------------------------------------------------- 1 | Sakura🌸: A Wonderful WordPress Theme 2 | === 3 | 4 | [中文](README.md) | English 5 | 6 | ![Sakura](screenshot.jpg) 7 | 8 | ![PHP version](https://img.shields.io/badge/PHP-7.1+-4F5B93.svg?style=flat-square&logo=php) 9 | ![WP version](https://img.shields.io/badge/WordPress-5.3-0073aa.svg?style=flat-square&logo=wordpress) 10 | [![GitHub release](https://img.shields.io/github/release/mashirozx/Sakura.svg?style=flat-square)](https://github.com/mashirozx/Sakura/releases/latest) 11 | [![Github commits (since latest release)](https://img.shields.io/github/commits-since/mashirozx/Sakura/latest/dev.svg?style=flat-square)](https://github.com/mashirozx/Sakura/commits/dev) 12 | [![](https://data.jsdelivr.com/v1/package/gh/moezx/cdn/badge)](https://www.jsdelivr.com/package/gh/moezx/cdn) 13 | 14 | Modified based on theme [Akina (by Fuzzz)](http://www.akina.pw/themeakina) and [Siren (by Louie)](https://github.com/louie-senpai/Siren). 15 | 16 | The rebuild version is on the way :) 17 | 18 | ### Install 19 | 20 | #### By GIT 21 | ```bash 22 | cd /wp-content/themes/ 23 | git clone https://github.com/mashirozx/Sakura.git 24 | ``` 25 | 26 | #### By FTP 27 | **Rename the theme folder name as `Sakura`** if you download form the green [Clone or download] button on this page. Make sure the path to the theme root is /wp-content/themes/Sakura/`. 28 | 29 | ### Configuration 30 | Config your theme at `Mune-Appearance-Sakura Options`. Please turn on `Use js and css file of the theme locally` under CDN tag if you want to modify local SCC an Javascript files. 31 | 32 | ### Update 33 | ```bash 34 | cd /wp-content/themes/Sakura 35 | git fetch 36 | git pull 37 | ``` 38 | 39 | [Learn more info about the theme (Chinese)](https://2heng.xin/theme-sakura/) 40 | 41 | Enjoy it! 42 | 43 | ### Donate 44 | [WeChat Pay](https://view.moezx.cc/images/2018/05/28/WeChanQR.png) | [AliPay](https://view.moezx.cc/images/2018/05/28/AliPayQR.jpg) | [PayPal](https://paypal.me/mashirozx) 45 | 46 | ### Need a server? 47 | [![](https://www.vultr.com/media/banners/banner_728x90.png)](https://www.vultr.com/?ref=7674346) 48 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Sakura🌸: 樱花庄的白猫博客主题 2 | === 3 | 4 | 中文 | [English](README-en.md) 5 | 6 | ![Sakura](screenshot.jpg) 7 | 8 | ![PHP version](https://img.shields.io/badge/PHP-7.1+-4F5B93.svg?style=flat-square&logo=php) 9 | ![WP version](https://img.shields.io/badge/WordPress-5.3-0073aa.svg?style=flat-square&logo=wordpress) 10 | [![GitHub release](https://img.shields.io/github/v/release/mashirozx/Sakura.svg?style=flat-square&logo=github)](https://github.com/mashirozx/Sakura/releases/latest) 11 | [![Github commits (since latest release)](https://img.shields.io/github/commits-since/mashirozx/Sakura/latest/dev.svg?style=flat-square&logo=git&color=important)](https://github.com/mashirozx/Sakura/commits/dev) 12 | [![](https://data.jsdelivr.com/v1/package/gh/moezx/cdn/badge)](https://www.jsdelivr.com/package/gh/moezx/cdn) 13 | 14 | 在 Louie 基于 Fuzzz 的 [Akina](http://www.akina.pw/themeakina) 主题修改的主题 [Siren](https://github.com/louie-senpai/Siren) 基础上三次修改 =.= 15 | 16 | 两位前辈做得已经很棒了,或许我所做的只是把他们的代码弄得凌乱不堪吧 :) 17 | 18 | 特别感谢 [@Spirit](https://github.com/spirit1431007) 对本项目的贡献! 19 | 20 | 注意:建议 `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/`**;主题设置在 `菜单-外观-Sakura 主题设置` 中;DIY 的时候建议采用[子主题](https://github.com/mashirozx/Sakura/tree/child) 并勾选 `Sakura 主题设置-CDN-本地调用主题 js、css 文件`;请留意主题说明里的其他注意事项。 21 | 22 | 主题使用说明见: 23 | 24 | 本仓库国内镜像: 25 | 26 | 主题交流群:860262481 27 | 28 | 希望你喜欢! 29 | 30 | ### 打赏支持~ 31 | [微信支付](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) 32 | 33 | ### 需要服务器吗? 34 | [![](https://www.vultr.com/media/banners/banner_728x90.png)](https://www.vultr.com/?ref=7674346) 35 | -------------------------------------------------------------------------------- /archive.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |
14 | 15 | 17 | 18 | 19 | 29 | 30 | 31 | 45 |
46 | 47 | 52 | 53 |
54 | 55 | 56 |
57 | 58 | 61 | 62 |
63 | 64 | 6 |
7 |
8 | <?php the_author(); ?> 9 |
10 |
11 |

12 |
13 |
14 |
15 | 52 |
53 |
54 | 55 | 67 |
68 | 73 | 74 |
75 | 76 | 77 |
78 | 79 | 82 | 83 |
84 | 85 | e){for(var r="",l=0,i=t.length;l
{6}
',[v,g,m,j,p,l+1,t[l].length>0?t[l]:" "]);return h('{1}
',[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{1}\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); -------------------------------------------------------------------------------- /cdn/js/src/05.nprogress.min.js: -------------------------------------------------------------------------------- 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:'
'};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}); -------------------------------------------------------------------------------- /cdn/js/src/08.lazyload.min.js: -------------------------------------------------------------------------------- 1 | /*! Lazy Load 2.0.0-beta.2 - MIT license - Copyright 2007-2017 Mika Tuupola */ 2 | !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>>(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>>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;F127)&&(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 15 | 16 | 17 | 18 |
19 | 20 |
21 |
- 22 | 23 |
24 |
25 | 26 |
27 |

Comments |

28 |
29 | 30 | 31 |
    32 | 33 |
34 | 35 | 38 | 39 | 40 | 41 | 42 |
43 |
44 | 45 |
46 | 47 | 48 | 49 | 50 | '.__('I\'m not a robot', 'sakura').''; 54 | $private_ms = akina_option('open_private_message') ? '' : ''; 55 | $mail_notify = akina_option('mail_notify') ? '' : ''; 56 | $args = array( 57 | 'id_form' => 'commentform', 58 | 'id_submit' => 'submit', 59 | 'title_reply' => '', 60 | 'title_reply_to' => '
' . __('Leave a Reply to', 'sakura') . ' %s' . '
', 61 | 'cancel_reply_link' => __('Cancel Reply', 'sakura'), 62 | 'label_submit' => __('BiuBiuBiu~', 'sakura'), 63 | 'comment_field' => '

Markdown Supported while Forbidden

64 |
65 | 66 |

67 | ' . __("Click me OωO", "sakura")/*戳我试试 OωO*/ . ' 68 | ' . __("Woooooow ヾ(≧∇≦*)ゝ", "sakura")/*嘿嘿嘿 ヾ(≧∇≦*)ゝ*/ . ' 69 |

70 |
71 | 72 | 73 | 75 | 77 | 79 | 80 |
bilibili~(=・ω・=)Tieba
81 |
' . push_bili_smilies() . '
82 | 85 | 86 |
87 | ', 88 | 'comment_notes_after' => '', 89 | 'comment_notes_before' => '', 90 | 'fields' => apply_filters( 'comment_form_default_fields', array( 91 | 'avatar' => '
', 92 | 'author' => 93 | '', 94 | 'email' => 95 | '', 96 | 'url' => 97 | '
' . $robot_comments . $private_ms . $mail_notify , 98 | 'qq' => 99 | '' 100 | ) 101 | ) 102 | ); 103 | comment_form($args); 104 | } 105 | 106 | ?> 107 | 108 |
109 | 110 | 111 |
112 | 113 | -------------------------------------------------------------------------------- /footer.php: -------------------------------------------------------------------------------- 1 | 13 | 14 | 21 | 22 |
23 |
24 |
25 |
26 | 27 | 28 |
29 |

30 |
31 | 39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 | 47 |
48 | 49 |

50 | 51 |
52 |
53 | 54 | 55 |
56 |
57 | 58 | 59 |
60 | 65 | 2, 'theme_location' => 'primary', 'container' => false ) ); ?> 66 |
67 | 68 | 69 | 70 | 71 | 92 | 93 | 94 | 95 |
96 | 97 |
98 | 99 |
100 |
101 | 102 |   切换主题 | SCHEME TOOL 103 | 104 |
105 |
106 |
107 |
108 | 134 |
135 |
136 | 138 | 140 |
141 |
142 | 143 | 144 | 151 | 152 | 153 |
160 |
161 | 162 | 163 | 164 | -------------------------------------------------------------------------------- /header.php: -------------------------------------------------------------------------------- 1 | section and everything up until
6 | * 7 | * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials 8 | * 9 | * @package Akina 10 | */ 11 | ?> 12 | 13 | 14 | 28 | > 29 | 30 | 31 | 32 | 33 | <?php global $page, $paged;wp_title( '-', true, 'right' ); 34 | bloginfo( 'name' );$site_description = get_bloginfo( 'description', 'display' ); 35 | if ( $site_description && ( is_home() || is_front_page() ) ) echo " - $site_description";if ( $paged >= 2 || $page >= 2 ) echo ' - ' . sprintf( __( 'page %s ','sakura'), max( $paged, $page ) );/*第 %s 页*/?> 36 | 37 | name . ','; 48 | }; 49 | }; 50 | if ($categories) { 51 | foreach($categories as $category) { 52 | $keywords .= $category->name . ','; 53 | }; 54 | }; 55 | $description = mb_strimwidth( str_replace("\r\n", '', strip_tags($post->post_content)), 0, 240, '…'); 56 | } else { 57 | $keywords = akina_option('akina_meta_keywords'); 58 | $description = akina_option('akina_meta_description'); 59 | }; 60 | ?> 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 73 | 74 | 75 | 76 | 79 | 80 | 81 | > 82 |
83 |
84 | 88 |
89 | 90 |
91 | 92 |
93 | 123 | 130 |
131 | -------------------------------------------------------------------------------- /images/avatar.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/avatar.jpeg -------------------------------------------------------------------------------- /images/avatar.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/avatar.jpg -------------------------------------------------------------------------------- /images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/favicon.ico -------------------------------------------------------------------------------- /images/hd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/hd.png -------------------------------------------------------------------------------- /images/login_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/login_loading.gif -------------------------------------------------------------------------------- /images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/logo.png -------------------------------------------------------------------------------- /images/mashiro-logo-s.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/mashiro-logo-s.png -------------------------------------------------------------------------------- /images/random/d-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/random/d-1.jpg -------------------------------------------------------------------------------- /images/random/d-10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/random/d-10.jpg -------------------------------------------------------------------------------- /images/random/d-2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/random/d-2.jpg -------------------------------------------------------------------------------- /images/random/d-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/random/d-3.jpg -------------------------------------------------------------------------------- /images/random/d-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/random/d-4.jpg -------------------------------------------------------------------------------- /images/random/d-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/random/d-5.jpg -------------------------------------------------------------------------------- /images/random/d-6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/random/d-6.jpg -------------------------------------------------------------------------------- /images/random/d-7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/random/d-7.jpg -------------------------------------------------------------------------------- /images/random/d-8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/random/d-8.jpg -------------------------------------------------------------------------------- /images/random/d-9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/random/d-9.jpg -------------------------------------------------------------------------------- /images/smilies/bili/baiyan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/baiyan.png -------------------------------------------------------------------------------- /images/smilies/bili/bishi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/bishi.png -------------------------------------------------------------------------------- /images/smilies/bili/bizui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/bizui.png -------------------------------------------------------------------------------- /images/smilies/bili/chan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/chan.png -------------------------------------------------------------------------------- /images/smilies/bili/daku.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/daku.png -------------------------------------------------------------------------------- /images/smilies/bili/dalao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/dalao.png -------------------------------------------------------------------------------- /images/smilies/bili/dalian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/dalian.png -------------------------------------------------------------------------------- /images/smilies/bili/dianzan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/dianzan.png -------------------------------------------------------------------------------- /images/smilies/bili/doge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/doge.png -------------------------------------------------------------------------------- /images/smilies/bili/facai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/facai.png -------------------------------------------------------------------------------- /images/smilies/bili/fadai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/fadai.png -------------------------------------------------------------------------------- /images/smilies/bili/fanu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/fanu.png -------------------------------------------------------------------------------- /images/smilies/bili/ganga.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/ganga.png -------------------------------------------------------------------------------- /images/smilies/bili/guilian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/guilian.png -------------------------------------------------------------------------------- /images/smilies/bili/guzhang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/guzhang.png -------------------------------------------------------------------------------- /images/smilies/bili/haixiu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/haixiu.png -------------------------------------------------------------------------------- /images/smilies/bili/heirenwenhao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/heirenwenhao.png -------------------------------------------------------------------------------- /images/smilies/bili/huaixiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/huaixiao.png -------------------------------------------------------------------------------- /images/smilies/bili/jingxia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/jingxia.png -------------------------------------------------------------------------------- /images/smilies/bili/keai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/keai.png -------------------------------------------------------------------------------- /images/smilies/bili/koubi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/koubi.png -------------------------------------------------------------------------------- /images/smilies/bili/kun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/kun.png -------------------------------------------------------------------------------- /images/smilies/bili/lengmo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/lengmo.png -------------------------------------------------------------------------------- /images/smilies/bili/liubixue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/liubixue.png -------------------------------------------------------------------------------- /images/smilies/bili/liuhan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/liuhan.png -------------------------------------------------------------------------------- /images/smilies/bili/liulei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/liulei.png -------------------------------------------------------------------------------- /images/smilies/bili/miantian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/miantian.png -------------------------------------------------------------------------------- /images/smilies/bili/mudengkoudai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/mudengkoudai.png -------------------------------------------------------------------------------- /images/smilies/bili/nanguo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/nanguo.png -------------------------------------------------------------------------------- /images/smilies/bili/outu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/outu.png -------------------------------------------------------------------------------- /images/smilies/bili/qinqin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/qinqin.png -------------------------------------------------------------------------------- /images/smilies/bili/se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/se.png -------------------------------------------------------------------------------- /images/smilies/bili/shengbing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/shengbing.png -------------------------------------------------------------------------------- /images/smilies/bili/shengqi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/shengqi.png -------------------------------------------------------------------------------- /images/smilies/bili/shuizhao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/shuizhao.png -------------------------------------------------------------------------------- /images/smilies/bili/sikao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/sikao.png -------------------------------------------------------------------------------- /images/smilies/bili/tiaokan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/tiaokan.png -------------------------------------------------------------------------------- /images/smilies/bili/tiaopi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/tiaopi.png -------------------------------------------------------------------------------- /images/smilies/bili/touxiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/touxiao.png -------------------------------------------------------------------------------- /images/smilies/bili/tuxue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/tuxue.png -------------------------------------------------------------------------------- /images/smilies/bili/weiqu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/weiqu.png -------------------------------------------------------------------------------- /images/smilies/bili/weixiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/weixiao.png -------------------------------------------------------------------------------- /images/smilies/bili/wunai.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/wunai.png -------------------------------------------------------------------------------- /images/smilies/bili/xiaoku.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/xiaoku.png -------------------------------------------------------------------------------- /images/smilies/bili/xieyanxiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/xieyanxiao.png -------------------------------------------------------------------------------- /images/smilies/bili/yiwen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/yiwen.png -------------------------------------------------------------------------------- /images/smilies/bili/yun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/yun.png -------------------------------------------------------------------------------- /images/smilies/bili/zaijian.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/zaijian.png -------------------------------------------------------------------------------- /images/smilies/bili/zhoumei.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/zhoumei.png -------------------------------------------------------------------------------- /images/smilies/bili/zhuakuang.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/bili/zhuakuang.png -------------------------------------------------------------------------------- /images/smilies/icon_Grievance.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_Grievance.gif -------------------------------------------------------------------------------- /images/smilies/icon_Happy.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_Happy.gif -------------------------------------------------------------------------------- /images/smilies/icon_aa.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_aa.gif -------------------------------------------------------------------------------- /images/smilies/icon_anger.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_anger.gif -------------------------------------------------------------------------------- /images/smilies/icon_awesome.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_awesome.gif -------------------------------------------------------------------------------- /images/smilies/icon_bbd.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_bbd.gif -------------------------------------------------------------------------------- /images/smilies/icon_britan.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_britan.gif -------------------------------------------------------------------------------- /images/smilies/icon_doubt.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_doubt.gif -------------------------------------------------------------------------------- /images/smilies/icon_good.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_good.gif -------------------------------------------------------------------------------- /images/smilies/icon_haha.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_haha.gif -------------------------------------------------------------------------------- /images/smilies/icon_han.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_han.gif -------------------------------------------------------------------------------- /images/smilies/icon_hu.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_hu.gif -------------------------------------------------------------------------------- /images/smilies/icon_huaji.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_huaji.gif -------------------------------------------------------------------------------- /images/smilies/icon_ku.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_ku.gif -------------------------------------------------------------------------------- /images/smilies/icon_naive.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_naive.gif -------------------------------------------------------------------------------- /images/smilies/icon_niconiconi.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_niconiconi.gif -------------------------------------------------------------------------------- /images/smilies/icon_niconiconi_t.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_niconiconi_t.gif -------------------------------------------------------------------------------- /images/smilies/icon_niconiconit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_niconiconit.gif -------------------------------------------------------------------------------- /images/smilies/icon_rbq.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_rbq.gif -------------------------------------------------------------------------------- /images/smilies/icon_reluctantly.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_reluctantly.gif -------------------------------------------------------------------------------- /images/smilies/icon_rmb.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_rmb.gif -------------------------------------------------------------------------------- /images/smilies/icon_se.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_se.gif -------------------------------------------------------------------------------- /images/smilies/icon_shame.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_shame.gif -------------------------------------------------------------------------------- /images/smilies/icon_shui.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_shui.gif -------------------------------------------------------------------------------- /images/smilies/icon_smilingeyes.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_smilingeyes.gif -------------------------------------------------------------------------------- /images/smilies/icon_spit.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_spit.gif -------------------------------------------------------------------------------- /images/smilies/icon_spray.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_spray.gif -------------------------------------------------------------------------------- /images/smilies/icon_surprised.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_surprised.gif -------------------------------------------------------------------------------- /images/smilies/icon_surprised2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_surprised2.gif -------------------------------------------------------------------------------- /images/smilies/icon_tear.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_tear.gif -------------------------------------------------------------------------------- /images/smilies/icon_theblackline.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_theblackline.gif -------------------------------------------------------------------------------- /images/smilies/icon_tongue.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/smilies/icon_tongue.gif -------------------------------------------------------------------------------- /images/temp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/temp.jpg -------------------------------------------------------------------------------- /images/temp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/images/temp.png -------------------------------------------------------------------------------- /inc/QQWry.Dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/inc/QQWry.Dat -------------------------------------------------------------------------------- /inc/classes/Aplayer.php: -------------------------------------------------------------------------------- 1 | server = akina_option('aplayer_server'); 14 | $this->playlist_id = akina_option('aplayer_playlistid'); 15 | $this->cookies = akina_option('aplayer_cookie'); 16 | $this->api_url = rest_url('sakura/v1/meting/aplayer'); 17 | require('Meting.php'); 18 | } 19 | 20 | public function get_data($type, $id) { 21 | $server = $this->server; 22 | $cookies = $this->cookies; 23 | $playlist_id = $this->playlist_id; 24 | $api = new \Sakura\API\Meting($server); 25 | if (!empty($cookies) && $server === "netease") $api->cookie($cookies); 26 | switch ($type) { 27 | case 'song': 28 | $data = $api->format(true)->song($id); 29 | $data = json_decode($data, true)["url"]; 30 | $data = $this->song_url($data); 31 | break; 32 | // case 'album': 33 | // $data = $api->format(true)->album($id); 34 | // $data=json_decode($data, true)["url"]; 35 | // break; 36 | case 'playlist': 37 | $data = $api->format(true)->playlist($playlist_id); 38 | $data = $this->format_playlist($data); 39 | break; 40 | case 'lyric': 41 | $data = $api->format(true)->lyric($id); 42 | $data = $this->format_lyric($data); 43 | break; 44 | case 'pic': 45 | $data = $api->format(true)->pic($id); 46 | $data = json_decode($data, true)["url"]; 47 | break; 48 | // case 'search': 49 | // $data = $api->format(true)->search($id); 50 | // $data=json_decode($data, true); 51 | // break; 52 | default: 53 | $data = $api->format(true)->url($id); 54 | $data = json_decode($data, true)["url"]; 55 | $data = $this->song_url($data); 56 | break; 57 | } 58 | return $data; 59 | } 60 | 61 | private function format_playlist($data) { 62 | $server = $this->server; 63 | $api_url = $this->api_url; 64 | $data = json_decode($data); 65 | $playlist = array(); 66 | foreach ((array)$data as $value) { 67 | $name = $value->name; 68 | $artists = implode(" / ", (array)$value->artist); 69 | $mp3_url = "$api_url?server=$server&type=url&id=" . $value->url_id . '&meting_nonce=' . wp_create_nonce('url#:' . $value->url_id); 70 | $cover = "$api_url?server=$server&type=pic&id=" . $value->pic_id . '&meting_nonce=' . wp_create_nonce('pic#:' . $value->url_id); 71 | $lyric = "$api_url?server=$server&type=lyric&id=" . $value->lyric_id . '&meting_nonce=' . wp_create_nonce('lyric#:' . $value->url_id); 72 | $playlist[] = array( 73 | "name" => $name, 74 | "artist" => $artists, 75 | "url" => $mp3_url, 76 | "cover" => $cover, 77 | "lrc" => $lyric 78 | ); 79 | } 80 | return $playlist; 81 | } 82 | 83 | private function song_url($url){ 84 | $server = $this->server; 85 | if ($server == 'netease') { 86 | $url = str_replace('://m7c.', '://m7.', $url); 87 | $url = str_replace('://m8c.', '://m8.', $url); 88 | $url = str_replace('http://m8.', 'https://m9.', $url); 89 | $url = str_replace('http://m7.', 'https://m9.', $url); 90 | $url = str_replace('http://m10.', 'https://m10.', $url); 91 | }elseif ($server == 'xiami') { 92 | $url = str_replace('http://', 'https://', $url); 93 | }elseif ($server == 'baidu') { 94 | $url = str_replace('http://zhangmenshiting.qianqian.com', 'https://gss3.baidu.com/y0s1hSulBw92lNKgpU_Z2jR7b2w6buu', $url); 95 | }else{ 96 | $url = $url; 97 | } 98 | return $url; 99 | } 100 | 101 | private function format_lyric($data) { 102 | $server = $this->server; 103 | $data = json_decode($data, true); 104 | $data = $this->lrctran($data['lyric'], $data['tlyric']); 105 | if (empty($data)) { 106 | $data = "[00:00.000]此歌曲暂无歌词,请您欣赏"; 107 | } 108 | if ($server === 'tencent') { 109 | $data = html_entity_decode($data, ENT_QUOTES | ENT_HTML5); 110 | } 111 | return $data; 112 | } 113 | 114 | private function lrctran($lyric, $tlyric) { 115 | $lyric = $this->lrctrim($lyric); 116 | $tlyric = $this->lrctrim($tlyric); 117 | $len1 = count($lyric); 118 | $len2 = count($tlyric); 119 | $result = ""; 120 | for ($i = 0, $j = 0; $i < $len1 && $j < $len2; $i++) { 121 | while ($lyric[$i][0] > $tlyric[$j][0] && $j + 1 < $len2) { 122 | $j++; 123 | } 124 | if ($lyric[$i][0] == $tlyric[$j][0]) { 125 | $tlyric[$j][2] = str_replace('/', '', $tlyric[$j][2]); 126 | if (!empty($tlyric[$j][2])) { 127 | $lyric[$i][2] .= " ({$tlyric[$j][2]})"; 128 | } 129 | $j++; 130 | } 131 | } 132 | for ($i = 0; $i < $len1; $i++) { 133 | $t = $lyric[$i][0]; 134 | $result .= sprintf("[%02d:%02d.%03d]%s\n", $t / 60000, $t % 60000 / 1000, $t % 1000, $lyric[$i][2]); 135 | } 136 | return $result; 137 | } 138 | 139 | private function lrctrim($lyrics) { 140 | $lyrics = explode("\n", $lyrics); 141 | $data = array(); 142 | foreach ($lyrics as $key => $lyric) { 143 | preg_match('/\[(\d{2}):(\d{2}[\.:]?\d*)]/', $lyric, $lrcTimes); 144 | $lrcText = preg_replace('/\[(\d{2}):(\d{2}[\.:]?\d*)]/', '', $lyric); 145 | if (empty($lrcTimes)) { 146 | continue; 147 | } 148 | $lrcTimes = intval($lrcTimes[1]) * 60000 + intval(floatval($lrcTimes[2]) * 1000); 149 | $lrcText = preg_replace('/\s\s+/', ' ', $lrcText); 150 | $lrcText = trim($lrcText); 151 | $data[] = array($lrcTimes, $key, $lrcText); 152 | } 153 | sort($data); 154 | return $data; 155 | } 156 | } -------------------------------------------------------------------------------- /inc/classes/Bilibili.php: -------------------------------------------------------------------------------- 1 | uid = akina_option('bilibili_id'); 12 | $this->cookies = akina_option('bilibili_cookie'); 13 | } 14 | 15 | public function get_the_bgm_items($page = 1) { 16 | $uid = $this->uid; 17 | $cookies = $this->cookies; 18 | $url = 'https://api.bilibili.com/x/space/bangumi/follow/list?type=1&pn=' . $page . '&ps=15&follow_status=0&vmid=' . $uid; 19 | $args = array( 20 | 'headers' => array( 21 | 'Cookie' => $cookies, 22 | 'Host' => 'api.bilibili.com', 23 | 'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97' 24 | ) 25 | ); 26 | $response = wp_remote_get($url, $args); 27 | $bgmdata = json_decode($response["body"])->data; 28 | return json_encode($bgmdata); 29 | } 30 | 31 | public function get_bgm_items($page = 1) { 32 | $bgm = json_decode($this->get_the_bgm_items($page), true); 33 | $totalpage = $bgm["total"] / 15; 34 | if ($totalpage - $page < 0) { 35 | $next = '共追番' . $bgm["total"] . '部,继续加油吧!٩(ˊᗜˋ*)و'; 36 | } else { 37 | $next = ' NEXT '; 38 | } 39 | $lists = $bgm["list"]; 40 | $html = ""; 41 | foreach ((array)$lists as $list) { 42 | if (preg_match('/看完/m', $list["progress"], $matches_finish)) { 43 | $percent = 100; 44 | } else { 45 | preg_match('/第(\d+)./m', $list['progress'], $matches_progress); 46 | preg_match('/第(\d+)./m', $list["new_ep"]['index_show'], $matches_new); 47 | $progress = is_numeric($matches_progress[1]) ? $matches_progress[1] : 0; 48 | $total = is_numeric($matches_new[1]) ? $matches_new[1] : $list['total_count']; 49 | $percent = $progress / $total * 100; 50 | } 51 | $html .= ''; 64 | } 65 | $html .= '

' . $next . '
'; 66 | return $html; 67 | } 68 | } -------------------------------------------------------------------------------- /inc/classes/Cache.php: -------------------------------------------------------------------------------- 1 | ", "\r\n", "\r", "\n", "-", "'", '"', '`', " ", ":", ";", '\\', " ", "toc"); 10 | $regex = <<])*>|begin[\S\s]*\/begin|hermit[\S\s]*\/hermit|img[\S\s]*\/img|{{.*?}}|:.*?:/m 12 | EOS; 13 | $more = 1; 14 | $output = array(); 15 | 16 | $posts = new \WP_Query('posts_per_page=-1&post_status=publish&post_type=post'); 17 | while ($posts->have_posts()): $posts->the_post(); 18 | $output[] = array( 19 | "type" => "post", 20 | "link" => get_permalink(), 21 | "title" => get_the_title(), 22 | "comments" => get_comments_number('0', '1', '%'), 23 | "text" => str_replace($vowels, " ", preg_replace($regex, ' ', apply_filters('the_content', get_the_content()))) 24 | ); 25 | endwhile; 26 | wp_reset_postdata(); 27 | 28 | $pages = new \WP_Query('posts_per_page=-1&post_status=publish&post_type=page'); 29 | while ($pages->have_posts()): $pages->the_post(); 30 | $output[] = array( 31 | "type" => "page", 32 | "link" => get_permalink(), 33 | "title" => get_the_title(), 34 | "comments" => get_comments_number('0', '1', '%'), 35 | "text" => str_replace($vowels, " ", preg_replace($regex, ' ', apply_filters('the_content', get_the_content()))) 36 | ); 37 | endwhile; 38 | wp_reset_postdata(); 39 | 40 | $tags = get_tags(); 41 | foreach ($tags as $tag) { 42 | $output[] = array( 43 | "type" => "tag", 44 | "link" => get_term_link($tag), 45 | "title" => $tag->name, 46 | "comments" => "", 47 | "text" => "" 48 | ); 49 | } 50 | 51 | $categories = get_categories(); 52 | foreach ($categories as $category) { 53 | $output[] = array( 54 | "type" => "category", 55 | "link" => get_term_link($category), 56 | "title" => $category->name, 57 | "comments" => "", 58 | "text" => "" 59 | ); 60 | } 61 | if (akina_option('live_search_comment')) { 62 | $comments = get_comments(); 63 | foreach ($comments as $comment) { 64 | $is_private = get_comment_meta($comment->comment_ID, '_private', true); 65 | $output[] = array( 66 | "type" => "comment", 67 | "link" => get_comment_link($comment), 68 | "title" => get_the_title($comment->comment_post_ID), 69 | "comments" => "", 70 | "text" => $is_private ? ($comment->comment_author . ": " . __('The comment is private', 'sakura')) : str_replace($vowels, ' ', preg_replace($regex, ' ', $comment->comment_author . ":" . $comment->comment_content)) 71 | ); 72 | } 73 | } 74 | return $output; 75 | } 76 | 77 | 78 | public static function update_database() { 79 | global $wpdb; 80 | $sakura_table_name = $wpdb->base_prefix . 'sakura'; 81 | $img_domain = akina_option('cover_cdn') ? akina_option('cover_cdn') : get_template_directory(); 82 | $manifest = file_get_contents($img_domain . "/manifest/manifest.json"); 83 | if ($manifest) { 84 | $manifest = array( 85 | "mate_key" => "manifest_json", 86 | "mate_value" => $manifest 87 | ); 88 | $time = array( 89 | "mate_key" => "json_time", 90 | "mate_value" => date("Y-m-d H:i:s", time()) 91 | ); 92 | 93 | $wpdb->query("DELETE FROM $sakura_table_name WHERE `mate_key` ='manifest_json'"); 94 | $wpdb->query("DELETE FROM $sakura_table_name WHERE `mate_key` ='json_time'"); 95 | $wpdb->insert($sakura_table_name, $manifest); 96 | $wpdb->insert($sakura_table_name, $time); 97 | $output = "manifest.json has been stored into database."; 98 | } else { 99 | $output = "manifest.json not found, please ensure your url ($img_domain) is corrent."; 100 | } 101 | return $output; 102 | } 103 | } -------------------------------------------------------------------------------- /inc/classes/Images.php: -------------------------------------------------------------------------------- 1 | chevereto_api_key = akina_option('chevereto_api_key'); 13 | $this->imgur_client_id = akina_option('imgur_client_id'); 14 | $this->smms_client_id = akina_option('smms_client_id'); 15 | } 16 | 17 | 18 | /** 19 | * Chevereto upload interface 20 | */ 21 | public function Chevereto_API($image) { 22 | $upload_url = akina_option('cheverto_url') . '/api/1/upload'; 23 | $args = array( 24 | 'body' => array( 25 | 'source' => base64_encode($image), 26 | 'key' => $this->chevereto_api_key, 27 | ), 28 | ); 29 | 30 | $response = wp_remote_post($upload_url, $args); 31 | $reply = json_decode($response["body"]); 32 | 33 | if ($reply->status_txt == 'OK' && $reply->status_code == 200) { 34 | $status = 200; 35 | $success = true; 36 | $message = "success"; 37 | $link = $reply->image->image->url; 38 | $proxy = akina_option('cmt_image_proxy') . $link; 39 | } else { 40 | $status = $reply->status_code; 41 | $success = false; 42 | $message = $reply->error->message; 43 | $link = 'https://view.moezx.cc/images/2019/10/28/default_d_h_large.gif'; 44 | $proxy = akina_option('cmt_image_proxy') . $link; 45 | } 46 | $output = array( 47 | 'status' => $status, 48 | 'success' => $success, 49 | 'message' => $message, 50 | 'link' => $link, 51 | 'proxy' => $proxy, 52 | ); 53 | return $output; 54 | } 55 | 56 | /** 57 | * Imgur upload interface 58 | */ 59 | public function Imgur_API($image) { 60 | $upload_url = akina_option('imgur_upload_image_proxy'); 61 | $args = array( 62 | 'headers' => array( 63 | 'Authorization' => 'Client-ID ' . $this->imgur_client_id, 64 | ), 65 | 'body' => array( 66 | 'image' => base64_encode($image), 67 | ), 68 | ); 69 | 70 | $response = wp_remote_post($upload_url, $args); 71 | $reply = json_decode($response["body"]); 72 | 73 | if ($reply->success && $reply->status == 200) { 74 | $status = 200; 75 | $success = true; 76 | $message = "success"; 77 | $link = $reply->data->link; 78 | $proxy = akina_option('cmt_image_proxy') . $link; 79 | } else { 80 | $status = $reply->status; 81 | $success = false; 82 | $message = $reply->data->error; 83 | $link = 'https://view.moezx.cc/images/2019/10/28/default_d_h_large.gif'; 84 | $proxy = akina_option('cmt_image_proxy') . $link; 85 | } 86 | $output = array( 87 | 'status' => $status, 88 | 'success' => $success, 89 | 'message' => $message, 90 | 'link' => $link, 91 | 'proxy' => $proxy, 92 | ); 93 | return $output; 94 | } 95 | 96 | /** 97 | * smms upload interface 98 | */ 99 | public function SMMS_API($image) { 100 | $client_id = $this->smms_client_id; 101 | $upload_url = "https://sm.ms/api/v2/upload"; 102 | $filename = $image['cmt_img_file']['name']; 103 | $filedata = $image['cmt_img_file']['tmp_name']; 104 | $Boundary = wp_generate_password(); 105 | $bits = file_get_contents($filedata); 106 | 107 | $args = array( 108 | "headers" => "Content-Type: multipart/form-data; boundary=$Boundary\r\n\r\nAuthorization: Basic $client_id\r\n\r\nUser-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97", 109 | "body" => "--$Boundary\r\nContent-Disposition: form-data; name=\"smfile\"; filename=\"$filename\"\r\n\r\n$bits\r\n\r\n--$Boundary--" 110 | ); 111 | 112 | $response = wp_remote_post($upload_url, $args); 113 | $reply = json_decode($response["body"]); 114 | 115 | if ($reply->success && $reply->code == 'success') { 116 | $status = 200; 117 | $success = true; 118 | $message = $reply->message; 119 | $link = $reply->data->url; 120 | $proxy = akina_option('cmt_image_proxy') . $link; 121 | } else if (preg_match("/Image upload repeated limit/i", $reply->message, $matches)) { 122 | $status = 200; // sm.ms 接口不规范,建议检测到重复的情况下返回标准化的 code,并单独把 url 放进一个字段 123 | $success = true; 124 | $message = $reply->message; 125 | $link = str_replace('Image upload repeated limit, this image exists at: ', '', $reply->message); 126 | $proxy = akina_option('cmt_image_proxy') . $link; 127 | } else { 128 | $status = 400; 129 | $success = false; 130 | $message = $reply->message; 131 | $link = 'https://view.moezx.cc/images/2019/10/28/default_d_h_large.gif'; 132 | $proxy = akina_option('cmt_image_proxy') . $link; 133 | } 134 | $output = array( 135 | 'status' => $status, 136 | 'success' => $success, 137 | 'message' => $message, 138 | 'link' => $link, 139 | 'proxy' => $proxy, 140 | ); 141 | return $output; 142 | } 143 | 144 | public static function cover_gallery() { 145 | if (akina_option('cover_cdn_options') == "type_2") { 146 | $img_array = glob(get_template_directory() . "/manifest/gallary/*.{gif,jpg,png}", GLOB_BRACE); 147 | $img = array_rand($img_array); 148 | $imgurl = trim($img_array[$img]); 149 | $imgurl = str_replace(get_template_directory(), get_template_directory_uri(), $imgurl); 150 | } elseif (akina_option('cover_cdn_options') == "type_3") { 151 | $imgurl = akina_option('cover_cdn'); 152 | } else { 153 | global $sakura_image_array; 154 | $img_array = json_decode($sakura_image_array, true); 155 | $img = array_rand($img_array); 156 | $img_domain = akina_option('cover_cdn') ? akina_option('cover_cdn') : get_template_directory_uri(); 157 | if (strpos($_SERVER['HTTP_ACCEPT'], 'image/webp') !== false) { 158 | $imgurl = $img_domain . "/manifest/" . $img_array[$img]["webp"][0]; 159 | } else { 160 | $imgurl = $img_domain . "/manifest/" . $img_array[$img]["jpeg"][0]; 161 | } 162 | } 163 | return $imgurl; 164 | } 165 | 166 | public static function feature_gallery() { 167 | if (akina_option('post_cover_options') == "type_2") { 168 | $imgurl = akina_option('post_cover'); 169 | } else { 170 | $imgurl = self::cover_gallery(); 171 | } 172 | return $imgurl; 173 | } 174 | } -------------------------------------------------------------------------------- /inc/classes/QQ.php: -------------------------------------------------------------------------------- 1 | 200, 14 | 'success' => true, 15 | 'message' => 'success', 16 | 'avatar' => 'https://q.qlogo.cn/headimg_dl?dst_uin=' . $qq . '&spec=100', 17 | 'name' => $name[$qq][6], 18 | ); 19 | } else { 20 | $output = array( 21 | 'status' => 404, 22 | 'success' => false, 23 | 'message' => 'QQ number not exist.' 24 | ); 25 | } 26 | return $output; 27 | } 28 | 29 | public static function get_qq_avatar($encrypted) { 30 | global $sakura_privkey; 31 | if (isset($encrypted)) { 32 | $iv = str_repeat($sakura_privkey, 2); 33 | $encrypted = base64_decode(urldecode($encrypted)); 34 | $qq_number = openssl_decrypt($encrypted, 'aes-128-cbc', $sakura_privkey, 0, $iv); 35 | preg_match('/^\d{3,}$/', $qq_number, $matches); 36 | $imgurl = 'https://q2.qlogo.cn/headimg_dl?dst_uin=' . $matches[0] . '&spec=100'; 37 | return $imgurl; 38 | } 39 | } 40 | } -------------------------------------------------------------------------------- /inc/css/admin.css: -------------------------------------------------------------------------------- 1 | .theme-about { 2 | background: #fff; 3 | max-width:860px; 4 | margin: 0 auto; 5 | box-shadow: 0 2px 6px rgba(0,0,0,.04); 6 | border: 1px solid #ddd; 7 | margin-top:50px 8 | } 9 | .fu-info { 10 | padding:20px 40px 11 | } 12 | .fu-info p { 13 | line-height: 30px; 14 | font-size: 15px; 15 | color: #797979; 16 | letter-spacing: 2px; 17 | } 18 | 19 | .fu-she { 20 | text-align: center; 21 | margin-bottom: 30px; 22 | display: inline-block; 23 | width: 100%; 24 | padding:20px 0 25 | } 26 | .fu-she span { 27 | margin-right:15px 28 | } 29 | .akina img { 30 | width: 50px; 31 | } 32 | .fufooter-info { 33 | height: 70px; 34 | background: #384152; 35 | margin-top:20px 36 | } 37 | span.copyright-fu { 38 | width: 100%; 39 | display: inline-block; 40 | padding: 25px 0; 41 | text-align: center; 42 | color: white; 43 | } 44 | .fufooter-info a{ 45 | color:#fff 46 | } -------------------------------------------------------------------------------- /inc/css/color-picker.min.css: -------------------------------------------------------------------------------- 1 | .wp-color-picker{width:80px}.wp-picker-container .hidden{display:none}.wp-color-result{background-color:#f9f9f9;border:1px solid #bbb;border-radius:2px;cursor:pointer;display:inline-block;height:22px;margin:0 6px 6px 0;position:relative;top:1px;user-select:none;-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;vertical-align:bottom;display:inline-block;padding-left:30px}.wp-color-result:after{background:#f3f3f3;background-image:-webkit-gradient(linear,left top,left bottom,from(#fefefe),to(#f4f4f4));background-image:-webkit-linear-gradient(top,#fefefe,#f4f4f4);background-image:-moz-linear-gradient(top,#fefefe,#f4f4f4);background-image:-o-linear-gradient(top,#fefefe,#f4f4f4);background-image:linear-gradient(to bottom,#fefefe,#f4f4f4);color:#333;text-shadow:0 1px 0 #fff;border-radius:0 1px 1px 0;border-left:1px solid #bbb;content:attr(title);display:block;font-size:11px;line-height:22px;padding:0 6px;position:relative;right:0;text-align:center;top:0}.wp-color-result:hover{border-color:#aaa;box-shadow:0 1px 1px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 1px rgba(0,0,0,0.1);-ms-box-shadow:0 1px 1px rgba(0,0,0,0.1);-o-box-shadow:0 1px 1px rgba(0,0,0,0.1);-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.1)}.wp-color-result:hover:after{color:#222;border-color:#aaa;border-left:1px solid #999}.wp-color-result.wp-picker-open{top:0}.wp-color-result.wp-picker-open:after{content:attr(data-current)}.wp-picker-container,.wp-picker-container:active{display:inline-block;outline:0}.wp-color-result:focus{border-color:#888;-moz-box-shadow:0 1px 2px rgba(0,0,0,0.2);-ms-box-shadow:0 1px 2px rgba(0,0,0,0.2);-o-box-shadow:0 1px 2px rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.2);box-shadow:0 1px 2px rgba(0,0,0,0.2)}.wp-color-result:focus:after{border-color:#888}.wp-picker-open+.wp-picker-input-wrap{display:inline-block;vertical-align:top}.wp-picker-container .button{margin-left:6px}.wp-picker-container .iris-square-slider .ui-slider-handle:focus{background-color:#555}.wp-picker-container .iris-picker{border-color:#dfdfdf;margin-top:6px}input[type="text"].iris-error{background-color:#ffebe8;border-color:#c00;color:#000} -------------------------------------------------------------------------------- /inc/css/dashboard-fix.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/inc/css/dashboard-fix.css -------------------------------------------------------------------------------- /inc/css/dashboard-light.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-image: url(https://view.moezx.cc/images/2018/01/29/FLOWER.jpg) !important; 3 | } 4 | 5 | #adminmenu, #adminmenuback, #adminmenuwrap { 6 | background: #e5e5e590 !important; 7 | } 8 | 9 | #wpadminbar { 10 | background: #e5e5e5 !important; 11 | } 12 | 13 | #adminmenu .wp-has-current-submenu .wp-submenu, #adminmenu .wp-has-current-submenu.opensub .wp-submenu, #adminmenu .wp-submenu, #adminmenu a.wp-has-current-submenu:focus + .wp-submenu, .folded #adminmenu .wp-has-current-submenu .wp-submenu { 14 | background: #ffffff90 !important; 15 | } 16 | 17 | .wp-submenu-wrap { 18 | background: #ffffff99 !important; 19 | } 20 | 21 | .postbox { 22 | min-width: 255px; 23 | border: 1px solid #e5e5e5; 24 | background: #ffffff90 !important; 25 | } 26 | 27 | #contextual-help-link-wrap, #screen-options-link-wrap { 28 | background: #e5e5e5 !important; 29 | } 30 | 31 | table { 32 | background: #ffffff90 !important; 33 | } 34 | 35 | tr { 36 | background-color: #ffffff00 !important; 37 | } 38 | 39 | #screen-meta { 40 | background-color: #ffffff90 !important; 41 | } 42 | 43 | .notice, div.error, div.updated { 44 | background: #ffffff90; 45 | } 46 | 47 | #dolly { 48 | background: rgba(255,255,255,.7); 49 | border-left: 4px solid #fff; 50 | border-left-color: rgb(255, 255, 255); 51 | box-shadow: 0 1px 1px 0 rgba(0,0,0,.1); 52 | border-left-color: #888; 53 | font-size: 13px; 54 | padding: 6px; 55 | padding-right: 15px; 56 | padding-top: 5px; 57 | float: none !important; 58 | width: calc(100% - 46px); 59 | } 60 | 61 | #adminmenu a, #adminmenu .wp-submenu .wp-submenu-head, #adminmenu .wp-has-current-submenu .wp-submenu .wp-submenu-head, #adminmenu .wp-menu-arrow, #adminmenu .wp-menu-arrow div, #adminmenu li.current a.menu-top, #adminmenu li.wp-has-current-submenu a.wp-has-current-submenu, .folded #adminmenu li.current.menu-top, .folded #adminmenu li.wp-has-current-submenu { 62 | color: #333; 63 | } 64 | 65 | .gadwp-pline a { 66 | overflow: hidden; 67 | text-overflow: ellipsis; 68 | white-space: nowrap; 69 | position: absolute; 70 | width: 80%; 71 | } 72 | 73 | .wp-submenu .wp-submenu-wrap { 74 | background: #ffffff !important; 75 | } -------------------------------------------------------------------------------- /inc/customizer.php: -------------------------------------------------------------------------------- 1 | get_setting( 'blogname' )->transport = 'postMessage'; 15 | $wp_customize->get_setting( 'blogdescription' )->transport = 'postMessage'; 16 | $wp_customize->get_setting( 'header_textcolor' )->transport = 'postMessage'; 17 | } 18 | add_action( 'customize_register', 'akina_customize_register' ); 19 | 20 | /** 21 | * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. 22 | */ 23 | function akina_customize_preview_js() { 24 | wp_enqueue_script( 'akina_customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '20151215', true ); 25 | } 26 | add_action( 'customize_preview_init', 'akina_customize_preview_js' ); 27 | -------------------------------------------------------------------------------- /inc/fonts/SAKURASO.old/icon.css: -------------------------------------------------------------------------------- 1 | /** 2 | * @file icon.css 3 | */ 4 | 5 | @font-face { 6 | font-family: "sakuraso"; 7 | src: url("inc/fonts/SAKURASO/sakuraso.eot"); /* IE9 */ 8 | src: url("inc/fonts/SAKURASO/sakuraso.eot?#iefix") format("embedded-opentype"), /* IE6-IE8 */ 9 | url("inc/fonts/SAKURASO/sakuraso.woff") format("woff"), /* chrome、firefox */ 10 | url("inc/fonts/SAKURASO/sakuraso.ttf") format("truetype"), /* chrome、firefox、opera、Safari, Android, iOS 4.2+ */ 11 | url("inc/fonts/SAKURASO/sakuraso.svg#uxfonteditor") format("svg"); /* iOS 4.1- */ 12 | } 13 | 14 | 15 | .icon { 16 | font-family: "sakuraso" !important; 17 | speak: none; 18 | font-style: normal; 19 | font-weight: normal; 20 | font-variant: normal; 21 | text-transform: none; 22 | line-height: 1; 23 | -webkit-font-smoothing: antialiased; 24 | -moz-osx-font-smoothing: grayscale; 25 | } 26 | 27 | 28 | .icon-exclam:before { 29 | content: "\21"; 30 | } 31 | 32 | .icon-uni306E:before { 33 | content: "\306e"; 34 | } 35 | 36 | .icon-uni304F:before { 37 | content: "\304f"; 38 | } 39 | 40 | .icon-uniE001:before { 41 | content: "\e001"; 42 | } 43 | 44 | .icon-uni767D:before { 45 | content: "\767d"; 46 | } 47 | 48 | .icon-uni3055:before { 49 | content: "\3055"; 50 | } 51 | 52 | .icon-uni3089:before { 53 | content: "\3089"; 54 | } 55 | 56 | .icon-uni8358:before { 57 | content: "\8358"; 58 | } 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /inc/fonts/SAKURASO.old/sakuraso-symbol.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inc/fonts/SAKURASO.old/sakuraso.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/inc/fonts/SAKURASO.old/sakuraso.eot -------------------------------------------------------------------------------- /inc/fonts/SAKURASO.old/sakuraso.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /inc/fonts/SAKURASO.old/sakuraso.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/inc/fonts/SAKURASO.old/sakuraso.ttf -------------------------------------------------------------------------------- /inc/fonts/SAKURASO.old/sakuraso.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/inc/fonts/SAKURASO.old/sakuraso.woff -------------------------------------------------------------------------------- /inc/fonts/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/inc/fonts/iconfont.eot -------------------------------------------------------------------------------- /inc/fonts/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/inc/fonts/iconfont.ttf -------------------------------------------------------------------------------- /inc/fonts/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/inc/fonts/iconfont.woff -------------------------------------------------------------------------------- /inc/images/ico-delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/inc/images/ico-delete.png -------------------------------------------------------------------------------- /inc/js/color-picker.min.js: -------------------------------------------------------------------------------- 1 | (function(f,e){var a='',c='
',b='
',g='';var d={options:{defaultColor:false,change:false,clear:false,hide:true,palettes:true},_create:function(){if(f.browser.msie&&parseInt(f.browser.version,10)<8){return}var h=this;var i=h.element;f.extend(h.options,i.data());h.initialValue=i.val();i.addClass("wp-color-picker").hide().wrap(b);h.wrap=i.parent();h.toggler=f(a).insertBefore(i).css({backgroundColor:h.initialValue}).attr("title",wpColorPickerL10n.pick).attr("data-current",wpColorPickerL10n.current);h.pickerContainer=f(c).insertAfter(i);h.button=f(g);if(h.options.defaultColor){h.button.addClass("wp-picker-default").val(wpColorPickerL10n.defaultString)}else{h.button.addClass("wp-picker-clear").val(wpColorPickerL10n.clear)}i.wrap('').after(h.button);i.iris({target:h.pickerContainer,hide:true,width:255,mode:"hsv",palettes:h.options.palettes,change:function(j,k){h.toggler.css({backgroundColor:k.color.toString()});if(f.isFunction(h.options.change)){h.options.change.call(this,j,k)}}});i.val(h.initialValue);h._addListeners();if(!h.options.hide){h.toggler.click()}},_addListeners:function(){var h=this;h.toggler.click(function(i){i.stopPropagation();h.element.toggle().iris("toggle");h.button.toggleClass("hidden");h.toggler.toggleClass("wp-picker-open");if(h.toggler.hasClass("wp-picker-open")){f("body").on("click",{wrap:h.wrap,toggler:h.toggler},h._bodyListener)}else{f("body").off("click",h._bodyListener)}});h.element.change(function(j){var i=f(this),k=i.val();if(k===""||k==="#"){h.toggler.css("backgroundColor","");if(f.isFunction(h.options.clear)){h.options.clear.call(this,j)}}});h.toggler.on("keyup",function(i){if(i.keyCode===13||i.keyCode===32){i.preventDefault();h.toggler.trigger("click").next().focus()}});h.button.click(function(j){var i=f(this);if(i.hasClass("wp-picker-clear")){h.element.val("");h.toggler.css("backgroundColor","");if(f.isFunction(h.options.clear)){h.options.clear.call(this,j)}}else{if(i.hasClass("wp-picker-default")){h.element.val(h.options.defaultColor).change()}}})},_bodyListener:function(h){if(!h.data.wrap.find(h.target).length){h.data.toggler.click()}},color:function(h){if(h===e){return this.element.iris("option","color")}this.element.iris("option","color",h)},defaultColor:function(h){if(h===e){return this.options.defaultColor}this.options.defaultColor=h}};f.widget("wp.wpColorPicker",d)}(jQuery)); -------------------------------------------------------------------------------- /inc/js/media-uploader.js: -------------------------------------------------------------------------------- 1 | jQuery(document).ready(function($){ 2 | 3 | var optionsframework_upload; 4 | var optionsframework_selector; 5 | 6 | function optionsframework_add_file(event, selector) { 7 | 8 | var upload = $(".uploaded-file"), frame; 9 | var $el = $(this); 10 | optionsframework_selector = selector; 11 | 12 | event.preventDefault(); 13 | 14 | // If the media frame already exists, reopen it. 15 | if ( optionsframework_upload ) { 16 | optionsframework_upload.open(); 17 | } else { 18 | // Create the media frame. 19 | optionsframework_upload = wp.media.frames.optionsframework_upload = wp.media({ 20 | // Set the title of the modal. 21 | title: $el.data('choose'), 22 | 23 | // Customize the submit button. 24 | button: { 25 | // Set the text of the button. 26 | text: $el.data('update'), 27 | // Tell the button not to close the modal, since we're 28 | // going to refresh the page when the image is selected. 29 | close: false 30 | } 31 | }); 32 | 33 | // When an image is selected, run a callback. 34 | optionsframework_upload.on( 'select', function() { 35 | // Grab the selected attachment. 36 | var attachment = optionsframework_upload.state().get('selection').first(); 37 | optionsframework_upload.close(); 38 | optionsframework_selector.find('.upload').val(attachment.attributes.url); 39 | if ( attachment.attributes.type == 'image' ) { 40 | optionsframework_selector.find('.screenshot').empty().hide().append('Remove').slideDown('fast'); 41 | } 42 | optionsframework_selector.find('.upload-button').unbind().addClass('remove-file').removeClass('upload-button').val(optionsframework_l10n.remove); 43 | optionsframework_selector.find('.of-background-properties').slideDown(); 44 | optionsframework_selector.find('.remove-image, .remove-file').on('click', function() { 45 | optionsframework_remove_file( $(this).parents('.section') ); 46 | }); 47 | }); 48 | 49 | } 50 | 51 | // Finally, open the modal. 52 | optionsframework_upload.open(); 53 | } 54 | 55 | function optionsframework_remove_file(selector) { 56 | selector.find('.remove-image').hide(); 57 | selector.find('.upload').val(''); 58 | selector.find('.of-background-properties').hide(); 59 | selector.find('.screenshot').slideUp(); 60 | selector.find('.remove-file').unbind().addClass('upload-button').removeClass('remove-file').val(optionsframework_l10n.upload); 61 | // We don't display the upload button if .upload-notice is present 62 | // This means the user doesn't have the WordPress 3.5 Media Library Support 63 | if ( $('.section-upload .upload-notice').length > 0 ) { 64 | $('.upload-button').remove(); 65 | } 66 | selector.find('.upload-button').on('click', function(event) { 67 | optionsframework_add_file(event, $(this).parents('.section')); 68 | }); 69 | } 70 | 71 | $('.remove-image, .remove-file').on('click', function() { 72 | optionsframework_remove_file( $(this).parents('.section') ); 73 | }); 74 | 75 | $('.upload-button').click( function( event ) { 76 | optionsframework_add_file(event, $(this).parents('.section')); 77 | }); 78 | 79 | }); -------------------------------------------------------------------------------- /inc/js/options-custom.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Prints out the inline javascript needed for the colorpicker and choosing 3 | * the tabs in the panel. 4 | */ 5 | 6 | jQuery(document).ready(function($) { 7 | 8 | // Fade out the save message 9 | $('.fade').delay(1000).fadeOut(1000); 10 | 11 | $('.of-color').wpColorPicker(); 12 | 13 | // Switches option sections 14 | $('.group').hide(); 15 | var active_tab = ''; 16 | if (typeof(localStorage) != 'undefined' ) { 17 | active_tab = localStorage.getItem("active_tab"); 18 | } 19 | if (active_tab != '' && $(active_tab).length ) { 20 | $(active_tab).fadeIn(); 21 | } else { 22 | $('.group:first').fadeIn(); 23 | } 24 | $('.group .collapsed').each(function(){ 25 | $(this).find('input:checked').parent().parent().parent().nextAll().each( 26 | function(){ 27 | if ($(this).hasClass('last')) { 28 | $(this).removeClass('hidden'); 29 | return false; 30 | } 31 | $(this).filter('.hidden').removeClass('hidden'); 32 | }); 33 | }); 34 | if (active_tab != '' && $(active_tab + '-tab').length ) { 35 | $(active_tab + '-tab').addClass('nav-tab-active'); 36 | } 37 | else { 38 | $('.nav-tab-wrapper a:first').addClass('nav-tab-active'); 39 | } 40 | 41 | $('.nav-tab-wrapper a').click(function(evt) { 42 | $('.nav-tab-wrapper a').removeClass('nav-tab-active'); 43 | $(this).addClass('nav-tab-active').blur(); 44 | var clicked_group = $(this).attr('href'); 45 | if (typeof(localStorage) != 'undefined' ) { 46 | localStorage.setItem("active_tab", $(this).attr('href')); 47 | } 48 | $('.group').hide(); 49 | $(clicked_group).fadeIn(); 50 | evt.preventDefault(); 51 | 52 | // Editor Height (needs improvement) 53 | $('.wp-editor-wrap').each(function() { 54 | var editor_iframe = $(this).find('iframe'); 55 | if ( editor_iframe.height() < 30 ) { 56 | editor_iframe.css({'height':'auto'}); 57 | } 58 | }); 59 | 60 | }); 61 | 62 | $('.group .collapsed input:checkbox').click(unhideHidden); 63 | 64 | function unhideHidden(){ 65 | if ($(this).attr('checked')) { 66 | $(this).parent().parent().parent().nextAll().removeClass('hidden'); 67 | } 68 | else { 69 | $(this).parent().parent().parent().nextAll().each( 70 | function(){ 71 | if ($(this).filter('.last').length) { 72 | $(this).addClass('hidden'); 73 | return false; 74 | } 75 | $(this).addClass('hidden'); 76 | }); 77 | 78 | } 79 | } 80 | 81 | // Image Options 82 | $('.of-radio-img-img').click(function(){ 83 | $(this).parent().parent().find('.of-radio-img-img').removeClass('of-radio-img-selected'); 84 | $(this).addClass('of-radio-img-selected'); 85 | }); 86 | 87 | $('.of-radio-img-label').hide(); 88 | $('.of-radio-img-img').show(); 89 | $('.of-radio-img-radio').hide(); 90 | 91 | }); -------------------------------------------------------------------------------- /inc/options-media-uploader.php: -------------------------------------------------------------------------------- 1 | ' . "\n"; 52 | if ( function_exists( 'wp_enqueue_media' ) ) { 53 | if ( ( $value == '' ) ) { 54 | $output .= '' . "\n"; 55 | } else { 56 | $output .= '' . "\n"; 57 | } 58 | } else { 59 | $output .= '

' . __( 'Upgrade your version of WordPress for full media support.', 'sakura' ) . '

'; 60 | } 61 | 62 | if ( $_desc != '' ) { 63 | $output .= '' . $_desc . '' . "\n"; 64 | } 65 | 66 | $output .= '
' . "\n"; 67 | 68 | if ( $value != '' ) { 69 | $remove = 'Remove'; 70 | $image = preg_match( '/(^.*\.jpg|jpeg|png|gif|ico*)/i', $value ); 71 | if ( $image ) { 72 | $output .= ''.$remove.''; 73 | } else { 74 | $parts = explode( "/", $value ); 75 | for( $i = 0; $i < sizeof( $parts ); ++$i ) { 76 | $title = $parts[$i]; 77 | } 78 | 79 | // No output preview if it's not an image. 80 | $output .= ''; 81 | 82 | // Standard generic output if it's not an image. 83 | $title = __( 'View File', 'sakura' ); 84 | $output .= ''; 85 | } 86 | } 87 | $output .= '
' . "\n"; 88 | return $output; 89 | } 90 | 91 | endif; 92 | 93 | /** 94 | * Enqueue scripts for file uploader 95 | */ 96 | 97 | if ( ! function_exists( 'optionsframework_media_scripts' ) ) : 98 | 99 | add_action( 'admin_enqueue_scripts', 'optionsframework_media_scripts' ); 100 | 101 | function optionsframework_media_scripts( $hook ) { 102 | 103 | $menu = optionsframework_menu_settings(); 104 | 105 | if ( 'appearance_page_' . $menu['menu_slug'] != $hook ) 106 | return; 107 | 108 | if ( function_exists( 'wp_enqueue_media' ) ) 109 | wp_enqueue_media(); 110 | wp_register_script( 'of-media-uploader', OPTIONS_FRAMEWORK_DIRECTORY .'js/media-uploader.js', array( 'jquery' ) ); 111 | wp_enqueue_script( 'of-media-uploader' ); 112 | wp_localize_script( 'of-media-uploader', 'optionsframework_l10n', array( 113 | 'upload' => __( 'Upload', 'sakura' ), 114 | 'remove' => __( 'Remove', 'sakura' ) 115 | ) ); 116 | } 117 | 118 | endif; 119 | -------------------------------------------------------------------------------- /inc/swicher.php: -------------------------------------------------------------------------------- 1 | 3 | 82 | %2$s'; 16 | if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { 17 | $time_string = ''; 18 | } 19 | 20 | $time_string = sprintf( $time_string, 21 | esc_attr( get_the_date( 'c' ) ), 22 | esc_html( get_the_date() ), 23 | esc_attr( get_the_modified_date( 'c' ) ), 24 | esc_html( get_the_modified_date() ) 25 | ); 26 | 27 | $posted_on = sprintf( 28 | _x( 'Posted on %s', 'post date', 'sakura' ), 29 | '' . $time_string . '' 30 | ); 31 | 32 | $byline = sprintf( 33 | _x( 'by %s', 'post author', 'sakura' ), 34 | '' . esc_html( get_the_author() ) . '' 35 | ); 36 | 37 | echo '' . $posted_on . ''; // WPCS: XSS OK. 38 | 39 | } 40 | endif; 41 | 42 | if ( ! function_exists( 'akina_entry_footer' ) ) : 43 | /** 44 | * Prints HTML with meta information for the categories, tags and comments. 45 | */ 46 | function akina_entry_footer() { 47 | // Hide category and tag text for pages. 48 | if ( 'post' === get_post_type() ) { 49 | /* translators: used between list items, there is a space after the comma */ 50 | $categories_list = get_the_category_list( __( ', ', 'sakura' ) ); 51 | if ( $categories_list && akina_categorized_blog() ) { 52 | printf( '' . __( 'Posted in %1$s', 'sakura' ) . '', $categories_list ); // WPCS: XSS OK. 53 | } 54 | 55 | /* translators: used between list items, there is a space after the comma */ 56 | $tags_list = get_the_tag_list( '', __( ', ', 'sakura' ) ); 57 | if ( $tags_list ) { 58 | printf( '' . __( 'Tagged %1$s', 'sakura' ) . '', $tags_list ); // WPCS: XSS OK. 59 | } 60 | } 61 | 62 | if ( ! is_single() && ! post_password_required() && ( comments_open() || get_comments_number() ) ) { 63 | echo ''; 64 | /* translators: %s: post title */ 65 | comments_popup_link( sprintf( wp_kses( __( 'Leave a Comment on %s', 'sakura' ), array( 'span' => array( 'class' => array() ) ) ), get_the_title() ) ); 66 | echo ''; 67 | } 68 | 69 | edit_post_link( 70 | sprintf( 71 | /* translators: %s: Name of current post */ 72 | __( 'Edit %s', 'sakura' ), 73 | the_title( '"', '"', false ) 74 | ), 75 | '', 76 | '' 77 | ); 78 | } 79 | endif; 80 | 81 | /** 82 | * Returns true if a blog has more than 1 category. 83 | * 84 | * @return bool 85 | */ 86 | function akina_categorized_blog() { 87 | if ( false === ( $all_the_cool_cats = get_transient( 'akina_categories' ) ) ) { 88 | // Create an array of all the categories that are attached to posts. 89 | $all_the_cool_cats = get_categories( array( 90 | 'fields' => 'ids', 91 | 'hide_empty' => 1, 92 | // We only need to know if there is more than one category. 93 | 'number' => 2, 94 | ) ); 95 | 96 | // Count the number of categories that are attached to the posts. 97 | $all_the_cool_cats = count( $all_the_cool_cats ); 98 | 99 | set_transient( 'akina_categories', $all_the_cool_cats ); 100 | } 101 | 102 | if ( $all_the_cool_cats > 1 ) { 103 | // This blog has more than 1 category so akina_categorized_blog should return true. 104 | return true; 105 | } else { 106 | // This blog has only 1 category so akina_categorized_blog should return false. 107 | return false; 108 | } 109 | } 110 | 111 | /** 112 | * Flush out the transients used in akina_categorized_blog. 113 | */ 114 | function akina_category_transient_flusher() { 115 | if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { 116 | return; 117 | } 118 | // Like, beat it. Dig? 119 | delete_transient( 'akina_categories' ); 120 | } 121 | add_action( 'edit_category', 'akina_category_transient_flusher' ); 122 | add_action( 'save_post', 'akina_category_transient_flusher' ); 123 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 16 | 17 | 20 |
21 | 22 | 142 && !wp_is_mobile()){ ?> 23 | 24 |
25 |
26 | 27 |
28 | 29 |
30 | 31 | 32 | 41 | 42 |
43 |
44 |

Discovery

45 | 49 |
50 |

51 |
52 | 53 | 64 | 65 |
66 | 67 | 68 |
69 | 70 | 73 | 74 |
75 | 0.5?-1:1);var r=o*(Math.random()>0.5?-1:1);document.body.style.marginLeft=q+"px";document.body.style.marginTop=r+"px";setTimeout(function(){document.body.style.marginLeft="";document.body.style.marginTop=""},75)}}m.colorful=false;function i(){requestAnimationFrame(i);c.clearRect(0,0,b.width,b.height);for(var n=0;nparseInt(f.height)){o.overflowY="scroll"}}else{o.overflow="hidden"}i.textContent=k.value.substring(0,m);if(k.nodeName==="INPUT"){i.textContent=i.textContent.replace(/\s/g,"\u00a0")}var n=document.createElement("span");n.textContent=k.value.substring(m)||".";i.appendChild(n);var g={top:n.offsetTop+parseInt(f.borderTopWidth),left:n.offsetLeft+parseInt(f.borderLeftWidth)};if(h){n.style.backgroundColor="#aaa"}else{document.body.removeChild(i)}return g}if(typeof b!="undefined"&&typeof b.exports!="undefined"){b.exports=c}else{window.getCaretCoordinates=c}}())}])}); -------------------------------------------------------------------------------- /js/login.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Resize Image 3 | */ 4 | function resizeImage(id) { 5 | jQuery('#' + id).css({ 6 | 'position': 'absolute', 7 | 'top': '0px', 8 | 'left': '0px', 9 | 'width': '100%', 10 | 'height': '100%', 11 | 'z-index': -1, 12 | 'overflow': 'hidden' 13 | }); 14 | var w = jQuery(window).width(), 15 | h = jQuery(window).height(), 16 | o = jQuery('#' + id).children('img'), 17 | iW = o.width(), 18 | iH = o.height(); 19 | o.css({ 20 | 'display': 'block', 21 | 'opacity': 0 22 | }); 23 | if (w > h) { 24 | if (iW > iH) { 25 | o.css({ 26 | 'width': w 27 | }); 28 | o.css({ 29 | 'height': Math.round((iH / iW) * w) 30 | }); 31 | var newIh = Math.round((iH / iW) * w); 32 | if (newIh < h) { 33 | o.css({ 34 | 'height': h 35 | }); 36 | o.css({ 37 | 'width': Math.round((iW / iH) * h) 38 | }) 39 | } 40 | } else { 41 | o.css({ 42 | 'height': h 43 | }); 44 | o.css({ 45 | 'width': Math.round((iW / iH) * h) 46 | }) 47 | } 48 | } else { 49 | o.css({ 50 | 'height': h 51 | }); 52 | o.css({ 53 | 'width': Math.round((iW / iH) * h) 54 | }) 55 | } 56 | var newIW = o.width(), 57 | newIH = o.height(); 58 | if (newIW > w) { 59 | var l = (newIW - w) / 2; 60 | o.css('margin-left', -l) 61 | } else { 62 | o.css('margin-left', 0) 63 | } 64 | if (newIH > h) { 65 | var t = (newIH - h) / 2; 66 | o.css('margin-top', -t) 67 | } else { 68 | o.css('margin-top', 0) 69 | } 70 | o.css({ 71 | 'opacity': '1' 72 | }) 73 | } -------------------------------------------------------------------------------- /languages/en_US.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/languages/en_US.mo -------------------------------------------------------------------------------- /languages/zh_CN.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/languages/zh_CN.mo -------------------------------------------------------------------------------- /languages/zh_TW.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/languages/zh_TW.mo -------------------------------------------------------------------------------- /layouts/authorprofile.php: -------------------------------------------------------------------------------- 1 | 7 |
8 | 17 |
18 |

19 |
20 | 21 | -------------------------------------------------------------------------------- /layouts/duoshuo.php: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 |
11 |
12 |
13 |
14 |
15 |
16 | 17 |
18 |
19 |
20 | 21 | -------------------------------------------------------------------------------- /layouts/feature.php: -------------------------------------------------------------------------------- 1 | 8 |
9 |

10 |
11 |
  • 12 |
    13 |
  • 14 |
  • 15 |
    16 |
  • 17 |
  • 18 |
    19 |
  • 20 |
    21 |
    22 | -------------------------------------------------------------------------------- /layouts/feature_v2.php: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/layouts/feature_v2.php -------------------------------------------------------------------------------- /layouts/post-nextprev.php: -------------------------------------------------------------------------------- 1 | 9 |
    10 | Previous Post

    %title


    ') ?> 12 |
    13 | Next Post

    %title


    ') ?> 15 |
    16 |
    17 | -------------------------------------------------------------------------------- /layouts/sharelike.php: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 |
    11 | 12 | 13 | 18 | 19 |
    20 | 21 | 22 |
    23 | 24 | 25 |
    26 | -------------------------------------------------------------------------------- /layouts/sidebox.php: -------------------------------------------------------------------------------- 1 | 8 |
    9 | -------------------------------------------------------------------------------- /manifest/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "python.pythonPath": "C:\\Users\\Mashiro\\AppData\\Local\\Programs\\Python\\Python38\\python.exe" 3 | } -------------------------------------------------------------------------------- /manifest/README.md: -------------------------------------------------------------------------------- 1 | 封面图生成工具 2 | === 3 | 4 | ### 依赖 5 | Python3 6 | PIL (Pillow) 7 | 8 | ### 安装依赖 9 | 安装 Python: 10 | 11 | 安装 PIL: 12 | 13 | ```bash 14 | # Linix/Mac Terminal 15 | pip install Pillow 16 | # 如果也安装了 Python 2,需要指定 pip 版本: 17 | pip3 install Pillow 18 | 19 | # Windows Powershell 或者 CMD 20 | pip install Pillow 21 | # 如果也安装了 Python 2,需要指定 pip 版本: 22 | pip3 install Pillow 23 | # 如果提示权限不足([WinError 5] Access is denied),请运行: 24 | pip install Pillow --user 25 | ``` 26 | 27 | ### 运行 28 | 把图片文件放到 `gallary` 目录,Windows 可直接双击 manifest.py,或者和其他操作系统一样,在 Terminal、Powershell、CMD 中运行: 29 | 30 | ```bash 31 | # 切换到 manifest.py 所在目录: 32 | cd /path/to/manifest/ 33 | python manifest.py 34 | # 如果也安装了 Python 2,需要指定 Python 版本: 35 | python3 manifest.py 36 | ``` 37 | 38 | GUI 程序开发中,除了以上运行 manifest.py 的方法以外,也可直接运行 qt.py 启动可视化窗口,需要安装 PyQT5: 39 | ```bash 40 | pip3 install PyQt5 41 | python3 qt.py 42 | ``` 43 | 44 | ### TODO 45 | shell/batch 自动安装依赖、自动删除过期文件、压缩图片、GitHub API push、release -------------------------------------------------------------------------------- /manifest/__init__.py: -------------------------------------------------------------------------------- 1 | from .manifest import * -------------------------------------------------------------------------------- /manifest/gallary/beyond_by_auroralion-dan5njb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/gallary/beyond_by_auroralion-dan5njb.jpg -------------------------------------------------------------------------------- /manifest/gallary/pixar_up_movie_balloons_desktop_1920x1080_hd-wallpaper-507967.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/gallary/pixar_up_movie_balloons_desktop_1920x1080_hd-wallpaper-507967.jpg -------------------------------------------------------------------------------- /manifest/gallary/海の空(56993195)_by_夏T.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/gallary/海の空(56993195)_by_夏T.jpg -------------------------------------------------------------------------------- /manifest/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/icon.ico -------------------------------------------------------------------------------- /manifest/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/icon.png -------------------------------------------------------------------------------- /manifest/jpeg/19313b0d62b27c8ba022f60fbfedd5ee.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/jpeg/19313b0d62b27c8ba022f60fbfedd5ee.jpeg -------------------------------------------------------------------------------- /manifest/jpeg/19313b0d62b27c8ba022f60fbfedd5ee.th.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/jpeg/19313b0d62b27c8ba022f60fbfedd5ee.th.jpeg -------------------------------------------------------------------------------- /manifest/jpeg/783bf161f47b32882f0e962fd4064de7.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/jpeg/783bf161f47b32882f0e962fd4064de7.jpeg -------------------------------------------------------------------------------- /manifest/jpeg/783bf161f47b32882f0e962fd4064de7.th.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/jpeg/783bf161f47b32882f0e962fd4064de7.th.jpeg -------------------------------------------------------------------------------- /manifest/jpeg/e9f33c2c502ab43804964ce7edd431f9.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/jpeg/e9f33c2c502ab43804964ce7edd431f9.jpeg -------------------------------------------------------------------------------- /manifest/jpeg/e9f33c2c502ab43804964ce7edd431f9.th.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/jpeg/e9f33c2c502ab43804964ce7edd431f9.th.jpeg -------------------------------------------------------------------------------- /manifest/manifest.json: -------------------------------------------------------------------------------- 1 | {"19313b0d62b27c8ba022f60fbfedd5ee": {"source": "beyond_by_auroralion-dan5njb.jpg", "jpeg": ["jpeg/19313b0d62b27c8ba022f60fbfedd5ee.jpeg", "jpeg/19313b0d62b27c8ba022f60fbfedd5ee.th.jpeg"], "webp": ["webp/19313b0d62b27c8ba022f60fbfedd5ee.webp", "webp/19313b0d62b27c8ba022f60fbfedd5ee.th.webp"]}, "783bf161f47b32882f0e962fd4064de7": {"source": "pixar_up_movie_balloons_desktop_1920x1080_hd-wallpaper-507967.jpg", "jpeg": ["jpeg/783bf161f47b32882f0e962fd4064de7.jpeg", "jpeg/783bf161f47b32882f0e962fd4064de7.th.jpeg"], "webp": ["webp/783bf161f47b32882f0e962fd4064de7.webp", "webp/783bf161f47b32882f0e962fd4064de7.th.webp"]}, "e9f33c2c502ab43804964ce7edd431f9": {"source": "\u6d77\u306e\u7a7a(56993195)_by_\u590fT.jpg", "jpeg": ["jpeg/e9f33c2c502ab43804964ce7edd431f9.jpeg", "jpeg/e9f33c2c502ab43804964ce7edd431f9.th.jpeg"], "webp": ["webp/e9f33c2c502ab43804964ce7edd431f9.webp", "webp/e9f33c2c502ab43804964ce7edd431f9.th.webp"]}} -------------------------------------------------------------------------------- /manifest/manifest.py: -------------------------------------------------------------------------------- 1 | # coding=utf-8 2 | ''' 3 | Created on Apr 23, 2018 4 | Desc: Webp convertor 5 | @author: Mashiro https://2heng.xin 6 | ''' 7 | import os 8 | import sys 9 | import json 10 | import hashlib 11 | from PIL import Image 12 | 13 | class Single(object): 14 | def __init__(self, file, manifest): 15 | self.file = file 16 | self.mani = manifest 17 | 18 | def hash(self): 19 | hasher = hashlib.md5() 20 | with open('gallary/' + self.file, 'rb') as afile: 21 | buf = afile.read() 22 | hasher.update(buf) 23 | self.hash = hasher.hexdigest() 24 | self.jpeg = 'jpeg/' + self.hash + '.jpeg' 25 | self.webp = 'webp/' + self.hash + '.webp' 26 | self.jpeg_th = 'jpeg/' + self.hash + '.th.jpeg' 27 | self.webp_th = 'webp/' + self.hash + '.th.webp' 28 | 29 | def optimize(self): 30 | im = Image.open('gallary/' + self.file).convert('RGB') 31 | im.save(self.jpeg, 'JPEG') # todo: TinyPNG API 32 | im.save(self.webp, 'WEBP') 33 | im.thumbnail((450, 300)) 34 | im.save(self.jpeg_th, 'JPEG') # todo: TinyPNG API 35 | im.save(self.webp_th, 'WEBP') 36 | 37 | def manifest(self): 38 | self.mani[self.hash] = { 39 | 'source': self.file, 40 | 'jpeg': [self.jpeg, self.jpeg_th], 41 | 'webp': [self.webp, self.webp_th] 42 | } 43 | 44 | def main(self): 45 | self.hash() 46 | # if os.path.exists(self.jpeg) and os.path.exists(self.webp): 47 | self.optimize() 48 | self.manifest() 49 | return self.mani 50 | 51 | def gen_manifest_json(): 52 | onlyfiles = [f for f in os.listdir('gallary') if os.path.isfile(os.path.join('gallary', f))] 53 | id = 1 54 | Manifest = {} 55 | for f in onlyfiles: 56 | try: 57 | worker = Single(f, Manifest) 58 | Manifest = worker.main() 59 | print(str(id) + '/' + str(len(onlyfiles))) 60 | id += 1 61 | except OSError: 62 | print("Falied to optimize the picture: " + f) 63 | with open('manifest.json', 'w+') as json_file: 64 | json.dump(Manifest, json_file) 65 | 66 | 67 | def main(): 68 | gen_manifest_json() 69 | 70 | 71 | if __name__ == '__main__': 72 | main() 73 | key = input('`manifest.json` saved. Press any key to quit.') 74 | quit() 75 | -------------------------------------------------------------------------------- /manifest/qt.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python3 2 | # -*- coding: utf-8 -*- 3 | """ 4 | Created on Nov 29, 2019 5 | Desc: Webp convertor QT 6 | @author: Mashiro @ https://2heng.xin 7 | """ 8 | 9 | import sys 10 | import time 11 | from PyQt5.QtWidgets import QMainWindow, QWidget, QApplication, QPushButton, QMessageBox, QDesktopWidget, QGridLayout 12 | from PyQt5.QtCore import QCoreApplication 13 | from PyQt5.QtGui import QIcon 14 | from manifest import main as manifest 15 | 16 | class MainWindow(QMainWindow): 17 | def __init__(self): 18 | super().__init__() 19 | self.initUI() 20 | 21 | def initUI(self): 22 | self.statusBar().showMessage('Ready') 23 | 24 | self.BtnWid = QWidget(self) 25 | self.setCentralWidget(self.BtnWid) 26 | grid = QGridLayout() 27 | self.BtnWid.setLayout(grid) 28 | 29 | names = ['Generate manifest.json', 30 | 'Pull from GitHub', 31 | 'Push to GitHub', 32 | 'Release on GitHub', 33 | 'Push manifest.json to WordPress', 34 | 'About and Turtor'] 35 | 36 | actions = [self.Action_1, 37 | self.Action_0, 38 | self.Action_0, 39 | self.Action_0, 40 | self.Action_0] 41 | 42 | positions = [(i, j) for i in range(6) for j in range(1)] 43 | 44 | for position, name, action in zip(positions, names, actions): 45 | if name == '': 46 | continue 47 | button = QPushButton(name) 48 | button.clicked.connect(action) 49 | grid.addWidget(button, *position) 50 | 51 | # self.resize(500, 500) 52 | self.center() 53 | self.setWindowTitle('Manifest Generator') 54 | self.setWindowIcon(QIcon('icon.png')) 55 | 56 | self.show() 57 | 58 | def Action_0(self): 59 | sender = self.sender() 60 | self.statusBar().showMessage('"' + sender.text() + '" was pressed') 61 | 62 | #Generate manifest.json 63 | def Action_1(self): 64 | # self.statusBar().showMessage('Processing...') 65 | # time.sleep(1) 66 | manifest() 67 | self.statusBar().showMessage('`manifest.json` saved.') 68 | 69 | def center(self): 70 | qr = self.frameGeometry() 71 | cp = QDesktopWidget().availableGeometry().center() 72 | qr.moveCenter(cp) 73 | self.move(qr.topLeft()) 74 | 75 | def closeEvent(self, event): 76 | reply = QMessageBox.question(self, 'Message', 77 | "Are you sure to quit?", QMessageBox.Yes | 78 | QMessageBox.No, QMessageBox.No) 79 | 80 | if reply == QMessageBox.Yes: 81 | event.accept() 82 | else: 83 | event.ignore() 84 | 85 | if __name__ == '__main__': 86 | 87 | app = QApplication(sys.argv) 88 | ex = MainWindow() 89 | sys.exit(app.exec_()) 90 | -------------------------------------------------------------------------------- /manifest/webp/19313b0d62b27c8ba022f60fbfedd5ee.th.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/webp/19313b0d62b27c8ba022f60fbfedd5ee.th.webp -------------------------------------------------------------------------------- /manifest/webp/19313b0d62b27c8ba022f60fbfedd5ee.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/webp/19313b0d62b27c8ba022f60fbfedd5ee.webp -------------------------------------------------------------------------------- /manifest/webp/783bf161f47b32882f0e962fd4064de7.th.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/webp/783bf161f47b32882f0e962fd4064de7.th.webp -------------------------------------------------------------------------------- /manifest/webp/783bf161f47b32882f0e962fd4064de7.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/webp/783bf161f47b32882f0e962fd4064de7.webp -------------------------------------------------------------------------------- /manifest/webp/e9f33c2c502ab43804964ce7edd431f9.th.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/webp/e9f33c2c502ab43804964ce7edd431f9.th.webp -------------------------------------------------------------------------------- /manifest/webp/e9f33c2c502ab43804964ce7edd431f9.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mashirozx/sakura/9a7a597ac18219bf4202b76c150bec6c16664b7c/manifest/webp/e9f33c2c502ab43804964ce7edd431f9.webp -------------------------------------------------------------------------------- /page-archive.php: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 |
    > 14 | 15 |
    16 | 17 |

    18 | 19 |
    20 | have_posts() ) : $the_query->the_post(); 26 | $year_tmp = get_the_time('Y'); 27 | $mon_tmp = get_the_time('n'); 28 | $y=$year; $m=$mon; 29 | if ($mon != $mon_tmp && $mon > 0) $output .= '
    '; 30 | if ($year != $year_tmp) { // 输出年份 31 | $year = $year_tmp; 32 | $all[$year] = array(); 33 | } 34 | if ($mon != $mon_tmp) { // 输出月份 35 | $mon = $mon_tmp; 36 | array_push($all[$year], $mon); 37 | $output .= "

    $year-$mon

    "; 38 | } 39 | $output .= '
    '; 40 | endwhile; 41 | wp_reset_postdata(); 42 | $output .= '
    '; 43 | echo $output; 44 | ?> 45 |
    46 | 47 | 48 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /page-links.php: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 |
    > 15 | 16 | 19 |
    20 |
    21 | 22 | 16 | 17 |
    18 |
    19 | 20 | 27 | 28 |
    29 |
    30 | 31 | 11 | 12 |
    13 |
    14 | 15 | 17 | 18 | 21 | 22 | 38 | 46 | 50 | 51 | 78 | 79 |
    80 |
    81 | 13 | 14 | 17 | -------------------------------------------------------------------------------- /single.php: -------------------------------------------------------------------------------- 1 | 11 |
    12 |
    13 | 23 |
    24 |
    25 | 11 | 12 |
    13 |
    14 |
    15 |
    16 | 17 | 18 | 19 | 20 | 21 |
    22 | 23 |
    24 |

    25 |
    26 | post_date_gmt));//the_time('Y-m-d');?> 27 |
    28 |
    29 |
    30 | 31 |
    32 |
    33 | 34 |
    35 |
    36 | 37 |
    38 | 39 |
    40 |
    41 | 42 |
    43 | -------------------------------------------------------------------------------- /tpl/content-image.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    13 |
    14 |
    15 | 16 |
    17 | 18 |
    19 | 20 |
    21 |

    22 |
    23 | 24 | 25 | 26 | post_date_gmt));//the_time('Y-m-d');?> 27 |
    28 |

    post_content))), 0, 150,"...");?>

    29 |
    30 |
    31 | 32 |
    33 |
    34 |
    35 | 36 |
    37 |
    38 | 39 |
    40 |
    41 |
    42 |
    43 |
    44 |
    45 | 46 | -------------------------------------------------------------------------------- /tpl/content-none.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    13 | 16 | 17 |
    18 | 20 | 21 |

    Click here to start.', 'sakura' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( admin_url( 'post-new.php' ) ) ); /*准备好发布你的第一篇文章了么? 点击这里开始.*/?>

    22 | 23 | 24 |
    25 |

    26 |
    27 |
      28 | get_results("SELECT ID,post_title FROM $wpdb->posts where post_status='publish' and post_type='post' ORDER BY ID DESC LIMIT 0 , 20"); 30 | foreach ($result as $post) { 31 | setup_postdata($post); 32 | $postid = $post->ID; 33 | $title = $post->post_title; 34 | ?> 35 |
    • 36 | 37 |
    38 |
    39 |
    40 | 41 | 42 | 43 |

    44 | 47 |
    48 |
    49 | -------------------------------------------------------------------------------- /tpl/content-page.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    > 13 | 14 |
    15 | ', '' ); ?> 16 |
    17 | 18 | 19 |
    20 | '', 26 | ) ); 27 | ?> 28 |
    29 | 30 |
    31 | "', '"', false ) 37 | ), 38 | '', 39 | '' 40 | ); 41 | ?> 42 |
    43 |
    44 | -------------------------------------------------------------------------------- /tpl/content-search.php: -------------------------------------------------------------------------------- 1 | 11 | 12 | 31 | -------------------------------------------------------------------------------- /tpl/content-single.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    > 13 | 14 |
    15 |

    16 |

    post_date_gmt)); ?>  

    17 |
    18 |
    19 | 20 | 21 |
    22 | 23 | '', 27 | ) ); 28 | ?> 29 | 30 | 31 |
    32 | 33 |
    34 |
    35 | 38 | 39 |
    40 |
    41 | -------------------------------------------------------------------------------- /tpl/content-status.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    13 |
    14 |
    15 | 16 | <?php the_author(); ?> 17 | 18 |
    19 |
    20 |

    post_content))), 0, 150,"...");?>

    21 |
    22 | 23 | 24 | 25 | post_date_gmt));//the_time('Y-m-d');?> 26 |
    27 |
    28 |
    29 |
    30 |
    31 | 32 |
    33 |
    34 | 35 |
    36 |
    37 |
    38 |
    39 |
    40 |
    41 | 42 | -------------------------------------------------------------------------------- /tpl/content-thumb.php: -------------------------------------------------------------------------------- 1 | ID), 'large'); 19 | $post_img = $large_image_url[0]; 20 | }else{ 21 | $post_img = DEFAULT_FEATURE_IMAGE(); 22 | } 23 | $the_cat = get_the_category(); 24 | // 摘要字数限制 25 | 26 | //add_filter( 'excerpt_length', 'custom_excerpt_length', 120 ); 27 | ?> 28 |
    29 |
    30 | 31 |
    32 |
    33 |
    34 | 40 |

    41 | 47 |
    48 | 49 |
    50 | 51 |
    52 |
    53 |
    54 |
    55 |
    56 | 11 |
    12 |
    13 |
    14 | 15 |
    16 | 17 |
    18 | 19 |
    20 |

    21 |
    22 | 23 | 24 | 25 | post_date_gmt)); ?> 26 |
    27 | 28 |
    29 |
    30 | 31 |
    32 |
    33 |
    34 | 35 |
    36 |
    37 | 38 |
    39 |
    40 |
    41 |
    42 |
    43 |
    -------------------------------------------------------------------------------- /tpl/single-image.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
    > 13 | 14 |
    15 | 16 |
    17 |

    18 |

    post_date_gmt)); ?>  

    19 |
    20 |
    21 |
    22 | 23 | 24 |
    25 | 26 | '', 30 | ) ); 31 | ?> 32 |
    33 | 34 |
    35 | 38 | 39 |
    40 |
    41 | -------------------------------------------------------------------------------- /user/page-bangumi.php: -------------------------------------------------------------------------------- 1 | 8 | 9 | 13 | 14 | 15 | 16 | 17 | 18 | 19 |
    > 20 | 21 |
    22 | 23 |
    24 | get_bgm_items(); 27 | ?> 28 | 29 |
    30 |

    31 |
    32 | 33 |
    34 |
    35 | 36 | 37 | 8 |
    9 |
    10 | 11 | 24 | 25 |
    26 |
    27 | 12 |
    13 | 14 |
    15 | 16 |
    17 |
    18 |
    19 | 25 |
    26 |
    27 |
    28 | 29 |
    30 |
    31 | = me.max) { 137 | me.index = me.max - me.labelWidth -2; 138 | //停止 139 | me.swipestart = false; 140 | //解锁 141 | me.isOk = true; 142 | } 143 | if (me.index < 0) { 144 | me.index = me.min; 145 | //未解锁 146 | me.isOk = false; 147 | } 148 | if (me.index+me.labelWidth+2 == me.max && me.max > 0 && me.isOk) { 149 | //解锁默认操作 150 | $('#label').unbind().next('#labelTip'). 151 | text(me.opts.successLabelTip).css({'color': '#fff'}); 152 | 153 | me.success(); 154 | } 155 | me.updateView(); 156 | }; 157 | 158 | 159 | /** 160 | * 更新视图 161 | */ 162 | SliderUnlock.prototype.updateView = function () { 163 | var me = this; 164 | 165 | me.sliderBg.css('width', me.index); 166 | me.elm.find("#label").css("left", me.index + "px") 167 | }; 168 | 169 | /** 170 | * 重置slide的起点 171 | */ 172 | SliderUnlock.prototype.reset = function () { 173 | var me = this; 174 | 175 | startTime = 0; 176 | 177 | me.index = 0; 178 | me.sliderBg .animate({'width':0},me.opts.duration); 179 | me.elm.find("#label").animate({left: me.index}, me.opts.duration) 180 | .next("#lableTip").animate({opacity: 1}, me.opts.duration); 181 | me.updateView(); 182 | }; 183 | 184 | /** 185 | * 检测元素是否存在 186 | * @param elm 187 | * @returns {boolean} 188 | */ 189 | SliderUnlock.prototype.checkElm = function (elm) { 190 | if($(elm).length > 0){ 191 | return true; 192 | }else{ 193 | throw "this element does not exist."; 194 | } 195 | }; 196 | 197 | /** 198 | * 检测传入参数是否是function 199 | * @param fn 200 | * @returns {boolean} 201 | */ 202 | SliderUnlock.prototype.checkFn = function (fn) { 203 | if(typeof fn === "function"){ 204 | return true; 205 | }else{ 206 | throw "the param is not a function."; 207 | } 208 | }; 209 | 210 | 211 | window['SliderUnlock'] = SliderUnlock; 212 | })(jQuery, window, document); --------------------------------------------------------------------------------