Compare commits
270 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
9a7a597ac1 | ||
|
233d0356c9 | ||
|
8bea22e9da | ||
0128ba483b | |||
|
8842caf739 | ||
|
a0950f1a5c | ||
6e56d0ba42 | |||
|
b73c45f022 | ||
|
8a46b8545f | ||
77722ed4d7 | |||
|
a831ae70e1 | ||
|
34fdb5d215 | ||
|
a063060ad9 | ||
|
69b68c00c0 | ||
|
00e2a2f390 | ||
|
fad1d9f30f | ||
|
a0d8f8a6cf | ||
|
f829ab4b60 | ||
|
c9a041eee3 | ||
|
9d5e0a598b | ||
|
e15bbeb896 | ||
|
7a96dd7549 | ||
|
663768b37a | ||
|
467818c5f6 | ||
7a1ec65a9a | |||
|
85f010d6aa | ||
|
6b919d0157 | ||
|
0ddfcad236 | ||
|
6dff427071 | ||
|
777b91817c | ||
|
9abded81ec | ||
|
689fc6319d | ||
|
a90e961e7b | ||
|
499e7eb1cc | ||
|
a4bd04fc9f | ||
|
7437bfa456 | ||
|
df1c5bac14 | ||
31e08ee6f3 | |||
|
5c415480fa | ||
|
a62d42d372 | ||
|
7d5ff98f87 | ||
|
57c541e6db | ||
|
164a977f02 | ||
|
130c8802dd | ||
|
499d2c324e | ||
2e5b6ac6a0 | |||
|
67dffdbfa4 | ||
211bea9ab6 | |||
3f1bf942f0 | |||
3cb08284cf | |||
|
aa221716b1 | ||
|
c0f0990ff0 | ||
|
b17576867f | ||
|
3b8cb19294 | ||
be6a6e76c3 | |||
376efe91a2 | |||
93eb457c33 | |||
ccb0b6f5da | |||
|
a6e42f14c2 | ||
|
d9a6895d0d | ||
|
baaabaa394 | ||
|
978937bb90 | ||
|
680d3b515f | ||
|
742f5680e3 | ||
b419dcc8ca | |||
2100ccd708 | |||
9ddaad79b1 | |||
|
8b77fbd380 | ||
|
5157540319 | ||
|
15e7f3b57a | ||
ad63468e4e | |||
|
0575e6a0e3 | ||
|
3e34024bd9 | ||
|
6b8e7b0ede | ||
|
443894d488 | ||
|
a99102fdac | ||
5608a0d5fe | |||
|
d91e1ad885 | ||
|
15a6ab525b | ||
dedda7185a | |||
77aeb4301c | |||
|
c1f315e50c | ||
|
14055ede78 | ||
|
e8e5630907 | ||
|
116d039743 | ||
|
d7e5af113f | ||
|
f2a96c3f71 | ||
|
0d39a81fe4 | ||
|
6bab1a43d0 | ||
0a17ab966d | |||
eda14ef175 | |||
63fb8372b0 | |||
3aa254d017 | |||
a1d513bcc6 | |||
f301cdcde1 | |||
a82f353b36 | |||
b6f7964560 | |||
8f34a4bfd6 | |||
8d0bbcd56a | |||
|
84d722feb5 | ||
|
c26c98b653 | ||
|
d78d8dd12a | ||
|
4cc44b9dd0 | ||
4e4d28fcd0 | |||
24f46913ad | |||
c205072216 | |||
|
19a337ed17 | ||
af8c81315b | |||
c0b0e81b38 | |||
0f50f2587e | |||
87c5029439 | |||
|
c8349d33e9 | ||
|
b770426ce1 | ||
|
5197e50c2e | ||
|
79ea6a20e3 | ||
|
236d263a26 | ||
8ffa252dcd | |||
|
90c6ff19d8 | ||
|
13c5b996e7 | ||
|
19779aa407 | ||
|
db7bb49397 | ||
|
ae7f444584 | ||
|
ceeeeacf05 | ||
|
23088bfc2b | ||
c9a029d775 | |||
|
65e9fe3ab8 | ||
|
ee31581644 | ||
|
199cd29188 | ||
329bd0bc0a | |||
|
6c6aab900b | ||
|
8f648d6819 | ||
|
c025d6b6ff | ||
|
b31953cecb | ||
|
f02fd4e6c1 | ||
|
e4f38f958a | ||
|
4212feeccd | ||
e01ff461c2 | |||
|
78c135ff30 | ||
|
de636d1d08 | ||
|
ae4d65abd5 | ||
|
07f32152d5 | ||
83498e1685 | |||
3ac9b3a8f5 | |||
df2c829496 | |||
8e74d661f6 | |||
5ee344bc37 | |||
5d72358e6f | |||
141fae238f | |||
53bdfb9c3e | |||
89656306f4 | |||
c3a0d671ed | |||
cacd4efc13 | |||
|
25122ce99f | ||
6f6cf39b80 | |||
|
dd40809adf | ||
|
425685fdf5 | ||
|
81cd85f0ea | ||
|
3901fe9687 | ||
|
ba52f5806b | ||
|
bcdcba96ea | ||
|
0fed673d5c | ||
|
7070bbf424 | ||
|
b92a55b5b6 | ||
|
cc92606327 | ||
f02595bf5c | |||
|
c7f97d2349 | ||
|
3e79761fc6 | ||
|
75046c75cc | ||
|
e3361060ef | ||
|
ff23013144 | ||
|
f39ed3d821 | ||
|
c21c2b3e0d | ||
|
a89a652234 | ||
|
32d2297128 | ||
|
bfca98e339 | ||
|
e64a80c610 | ||
|
a1f8da8569 | ||
|
8d5e6a8fa5 | ||
|
3a82a1b90f | ||
|
f4742c7e62 | ||
|
d10a957567 | ||
|
2b4612493c | ||
|
55250f8e28 | ||
|
911ddefb3d | ||
|
cd60df83ff | ||
|
425348bb8f | ||
|
a6444a35c1 | ||
|
894d63ad42 | ||
|
59a4303e1d | ||
|
6136ea68b4 | ||
|
a74e1c8ec7 | ||
|
a51ef9077e | ||
|
5948f527c4 | ||
|
0133c1a266 | ||
|
5d86c1342c | ||
|
c1fcf73a1a | ||
|
82ce5b80d6 | ||
|
6e1fece53a | ||
|
6f6923bf89 | ||
|
d6fd57480e | ||
|
b8d52760da | ||
|
a7dd54f97c | ||
|
b5872cf4ba | ||
|
326f3e1f3f | ||
|
c3381bcc8a | ||
|
67452bcb56 | ||
|
66379fd944 | ||
|
13c95549d7 | ||
|
f43721035c | ||
|
ee05e92db0 | ||
|
f01bb76760 | ||
|
4b8297a460 | ||
|
fa16cd1794 | ||
|
3692370876 | ||
|
d6c7b42613 | ||
|
e778d03f56 | ||
|
9a0840bc93 | ||
|
bf1acd30cb | ||
|
ea8fdad501 | ||
|
8d0a24d35c | ||
|
b1c3c76fa6 | ||
|
b3bab414e6 | ||
|
0e52e37046 | ||
|
3f30e88768 | ||
|
31242004c5 | ||
|
7918e830a2 | ||
|
ce31befb4e | ||
|
e8820e8d00 | ||
|
544b251624 | ||
|
a1b2a90ddf | ||
|
9a8dbf8eb2 | ||
eab11690e4 | |||
|
8bde25ae5a | ||
|
734b8d079a | ||
|
2ae87f4075 | ||
47afa016b1 | |||
|
0f12d96e09 | ||
|
5679530453 | ||
|
1b75eab6f8 | ||
|
8fcd256aa3 | ||
|
14f99f9c9b | ||
|
919f3812df | ||
|
c36e1bc9b9 | ||
|
a78456c595 | ||
|
66e58793ae | ||
|
84f206ca83 | ||
|
5fca4bd4ae | ||
|
71dd36a3b2 | ||
|
a0f479a334 | ||
da1304cfde | |||
|
2466276a8e | ||
ef31136d22 | |||
002ace49f6 | |||
33c4519c89 | |||
30b54196b5 | |||
a6d212e20c | |||
23570d7004 | |||
36c0e88b20 | |||
14b9217d83 | |||
32794e20c0 | |||
|
b4d7b91b4a | ||
e05ee03152 | |||
0b3257b174 | |||
47ab81c4d6 | |||
7f912b2776 | |||
32f2f71fd1 | |||
0daaa7551e | |||
29a62c7f04 | |||
b23dcc24d7 | |||
451d35cc07 |
27
.github/ISSUE_TEMPLATE/---bug.md
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
---
|
||||
name: 报告 bug
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
如果这是您第一次在GitHub上发 issue,请阅读【提问的智慧】:https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way/blob/master/README-zh_CN.md
|
||||
-->
|
||||
|
||||
**描述问题**
|
||||
|
||||
**bug 重现步骤**
|
||||
|
||||
**截图(如有)**
|
||||
|
||||
**系统信息**
|
||||
- (前端)操作系统: [e.g. Windows 10, Android 9.0]
|
||||
- 浏览器: [e.g. chrome, safari]
|
||||
- PHP 版本
|
||||
- WordPress 版本
|
||||
- Sakura 主题版本
|
||||
|
||||
**补充信息**
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: ''
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
10
404.php
@ -12,9 +12,10 @@
|
||||
<head>
|
||||
<meta charset="<?php bloginfo( 'charset' ); ?>">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="shortcut icon" href="<?php echo akina_option('favicon_link', ''); ?>"/>
|
||||
<title itemprop="name"><?php global $page, $paged;wp_title( '-', true, 'right' );
|
||||
bloginfo( 'name' );$site_description = get_bloginfo( 'description', 'display' );
|
||||
if ( $site_description && ( is_home() || is_front_page() ) ) echo " - $site_description";if ( $paged >= 2 || $page >= 2 ) echo ' - ' . sprintf( __( '第 %s 页'), max( $paged, $page ) );?>
|
||||
if ( $site_description && ( is_home() || is_front_page() ) ) echo " - $site_description";if ( $paged >= 2 || $page >= 2 ) echo ' - ' . sprintf( __( 'page %s'), max( $paged, $page ) );/*第 %s 页*/?>
|
||||
</title>
|
||||
<link type="text/css" media="all" href="https://cdn.jsdelivr.net/gh/moezx/cdn@3.2.2/css/lib.css" rel="stylesheet" />
|
||||
<?php wp_head(); ?>
|
||||
@ -43,12 +44,11 @@ if (!no_report) httpGet(report_url);
|
||||
<div class="anim-icon" id="404" style="height: 66%;"></div>
|
||||
</div>
|
||||
<div class="err-button back">
|
||||
<a id="golast" href=javascript:history.go(-1);>返回上一页</a>
|
||||
<a id="gohome" href="<?php bloginfo('url');?>">返回主页</a>
|
||||
<a id="golast" href=javascript:history.go(-1);><?php _e('return to previous page','sakura');/*返回上一页*/?></a>
|
||||
<a id="gohome" href="<?php bloginfo('url');?>"><?php _e('return to home page','sakura');/*返回主页*/?></a>
|
||||
</div>
|
||||
<div style="display:block; width:284px;margin: auto;">
|
||||
<p style="margin-bottom: 1em;margin-top: 1.5em;text-align: center;font-size: 15px;">别急,试试站内搜索?</p>
|
||||
<p style="margin-bottom: 1em;text-align: center;font-size: 15px;">Don't worry, search in site?</p>
|
||||
<p style="margin-bottom: 1em;margin-top: 1.5em;text-align: center;font-size: 15px;"><?php _e('Don\'t worry, search in site?','sakura');/*别急,试试站内搜索?*/?></p>
|
||||
<form class="s-search" method="get" action="/" role="search">
|
||||
<i class="iconfont icon-search" style="bottom: 8px;left: 12px;"></i>
|
||||
<input class="text-input" style="padding: 8px 20px 8px 46px;" type="search" name="s" placeholder="<?php _e('Search...', 'akina') ?>" required>
|
||||
|
47
README-en.md
Normal file
@ -0,0 +1,47 @@
|
||||
Sakura🌸: A Wonderful WordPress Theme
|
||||
===
|
||||
|
||||
[中文](README.md) | English
|
||||
|
||||

|
||||
|
||||

|
||||

|
||||
[](https://github.com/mashirozx/Sakura/releases/latest)
|
||||
[](https://github.com/mashirozx/Sakura/commits/dev)
|
||||
[](https://www.jsdelivr.com/package/gh/moezx/cdn)
|
||||
|
||||
Modified based on theme [Akina (by Fuzzz)](http://www.akina.pw/themeakina) and [Siren (by Louie)](https://github.com/louie-senpai/Siren).
|
||||
|
||||
The rebuild version is on the way :)
|
||||
|
||||
### Install
|
||||
|
||||
#### By GIT
|
||||
```bash
|
||||
cd /wp-content/themes/
|
||||
git clone https://github.com/mashirozx/Sakura.git
|
||||
```
|
||||
|
||||
#### By FTP
|
||||
**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/`.
|
||||
|
||||
### Configuration
|
||||
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.
|
||||
|
||||
### Update
|
||||
```bash
|
||||
cd /wp-content/themes/Sakura
|
||||
git fetch
|
||||
git pull
|
||||
```
|
||||
|
||||
[Learn more info about the theme (Chinese)](https://2heng.xin/theme-sakura/)
|
||||
|
||||
Enjoy it!
|
||||
|
||||
### Donate
|
||||
[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)
|
||||
|
||||
### Need a server?
|
||||
[](https://www.vultr.com/?ref=7674346)
|
23
README.md
@ -1,25 +1,34 @@
|
||||
Sakura🌸: A Wonderful WordPress Theme
|
||||
Sakura🌸: 樱花庄的白猫博客主题
|
||||
===
|
||||
|
||||

|
||||
中文 | [English](README-en.md)
|
||||
|
||||

|
||||
[](https://github.com/mashirozx/Sakura/releases/latest)
|
||||
[](https://github.com/mashirozx/Sakura/commits/)
|
||||

|
||||
|
||||

|
||||

|
||||
[](https://github.com/mashirozx/Sakura/releases/latest)
|
||||
[](https://github.com/mashirozx/Sakura/commits/dev)
|
||||
[](https://www.jsdelivr.com/package/gh/moezx/cdn)
|
||||
|
||||
在 Louie 基于 Fuzzz 的 [Akina](http://www.akina.pw/themeakina) 主题修改的主题 [Siren](https://github.com/louie-senpai/Siren) 基础上三次修改 =.=
|
||||
|
||||
两位前辈做得已经很棒了,或许我所做的只是把他们的代码弄得凌乱不堪吧 :)
|
||||
|
||||
注意:建议 `git clone` 下载;如果选择下载压缩包,解压后记得把文件夹名改回 `Sakura`,也即保证主题路径为 `/wp-content/themes/Sakura/`;请留意主题说明里的其他注意事项。
|
||||
特别感谢 [@Spirit](https://github.com/spirit1431007) 对本项目的贡献!
|
||||
|
||||
注意:建议 `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 文件`;请留意主题说明里的其他注意事项。
|
||||
|
||||
主题使用说明见:<https://2heng.xin/theme-sakura/>
|
||||
|
||||
本仓库国内镜像:<https://git.moezx.cc/mirrors/sakura>
|
||||
|
||||
主题交流群:860262481
|
||||
|
||||
希望你喜欢!
|
||||
|
||||
### 打赏支持~
|
||||
[微信支付](https://view.moezx.cc/images/2018/05/28/WeChanQR.png) | [支付宝](https://view.moezx.cc/images/2018/05/28/AliPayQR.jpg) | [PayPal](https://paypal.me/mashirozx)
|
||||
|
||||
### 需要服务器吗?
|
||||
<a href="https://www.vultr.com/?ref=7674346"><img src="https://www.vultr.com/media/banner_3.png" width="300" height="250"></a>
|
||||
[](https://www.vultr.com/?ref=7674346)
|
||||
|
@ -52,7 +52,8 @@ get_header(); ?>
|
||||
|
||||
</main><!-- #main -->
|
||||
<?php if ( akina_option('pagenav_style') == 'ajax') { ?>
|
||||
<div id="pagination" <?php if(akina_option('image_category') && is_category(explode(',',akina_option('image_category')))) echo 'class="pagination-archive"'; ?>><?php next_posts_link(__('Previous')); ?></div>
|
||||
<div id="pagination" <?php if(akina_option('image_category') && is_category(explode(',',akina_option('image_category')))) echo 'class="pagination-archive"'; ?>><?php next_posts_link(' Previous'); ?></div>
|
||||
<div id="add_post"><span id="add_post_time" style="visibility: hidden;" title="<?php echo akina_option('auto_load_post',''); ?>" ></span></div>
|
||||
<?php }else{ ?>
|
||||
<nav class="navigator">
|
||||
<?php previous_posts_link('<i class="iconfont icon-back"></i>') ?><?php next_posts_link('<i class="iconfont icon-right"></i>') ?>
|
||||
@ -61,5 +62,4 @@ get_header(); ?>
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
@ -73,7 +73,8 @@ get_header();
|
||||
|
||||
</main><!-- #main -->
|
||||
<?php if ( akina_option('pagenav_style') == 'ajax') { ?>
|
||||
<div id="pagination"><?php next_posts_link(__('Previous')); ?></div>
|
||||
<div id="pagination"><?php next_posts_link(' Previous'); ?></div>
|
||||
<div id="add_post"><span id="add_post_time" style="visibility: hidden;" title="<?php echo akina_option('auto_load_post',''); ?>" ></span></div>
|
||||
<?php }else{ ?>
|
||||
<nav class="navigator">
|
||||
<?php previous_posts_link('<i class="iconfont icon-back"></i>') ?><?php next_posts_link('<i class="iconfont icon-right"></i>') ?>
|
||||
@ -82,5 +83,4 @@ get_header();
|
||||
</div><!-- #primary -->
|
||||
|
||||
<?php
|
||||
get_sidebar();
|
||||
get_footer();
|
||||
|
4
cdn/css/lib.css
Normal file → Executable file
@ -1,36 +0,0 @@
|
||||
@font-face {
|
||||
font-family: 'Material Icons';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: url(MaterialIcons-Regular.eot); /* For IE6-8 */
|
||||
src: local('Material Icons'),
|
||||
local('MaterialIcons-Regular'),
|
||||
url(../iconfont/MaterialIcons-Regular.woff2) format('woff2'),
|
||||
url(../iconfont/MaterialIcons-Regular.woff) format('woff'),
|
||||
url(../iconfont/MaterialIcons-Regular.ttf) format('truetype');
|
||||
}
|
||||
|
||||
.material-icons {
|
||||
font-family: 'Material Icons';
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-size: 24px; /* Preferred icon size */
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
text-transform: none;
|
||||
letter-spacing: normal;
|
||||
word-wrap: normal;
|
||||
white-space: nowrap;
|
||||
direction: ltr;
|
||||
|
||||
/* Support for all WebKit browsers. */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
/* Support for Safari and Chrome. */
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
/* Support for Firefox. */
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
|
||||
/* Support for IE. */
|
||||
font-feature-settings: 'liga';
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
@font-face {
|
||||
@font-face {
|
||||
font-family:"socialshare";src:url("https://cdn.jsdelivr.net/gh/moezx/share.js@1.0.3/src/fonts/iconfont.eot");
|
||||
src:url("https://cdn.jsdelivr.net/gh/moezx/share.js@1.0.3/src/fonts/iconfont.eot?#iefix") format("embedded-opentype"),url("https://cdn.jsdelivr.net/gh/moezx/share.js@1.0.3/src/fonts/iconfont.woff") format("woff"),url("https://cdn.jsdelivr.net/gh/moezx/share.js@1.0.3/src/fonts/iconfont.ttf") format("truetype"),url("https://cdn.jsdelivr.net/gh/moezx/share.js@1.0.3/src/fonts/iconfont.svg#iconfont") format("svg")
|
||||
}
|
||||
|
15
cdn/js/lib.js
Normal file → Executable file
4
cdn/js/src/01.jquery.min.js
vendored
Normal file → Executable file
2
cdn/js/src/08.lazyload.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! Lazy Load 2.0.0-beta.2 - MIT license - Copyright 2007-2017 Mika Tuupola */
|
||||
!function(t,e){"object"==typeof exports?module.exports=e(t):"function"==typeof define&&define.amd?define([],e(t)):t.LazyLoad=e(t)}("undefined"!=typeof global?global:this.window||this.global,function(t){"use strict";function e(t,e){this.settings=r(s,e||{}),this.images=t||document.querySelectorAll(this.settings.selector),this.observer=null,this.init()}const s={src:"data-src",srcset:"data-srcset",selector:".lazyload"},r=function(){let t={},e=!1,s=0,o=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],s++);for(;s<o;s++)!function(s){for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e&&"[object Object]"===Object.prototype.toString.call(s[o])?t[o]=r(!0,t[o],s[o]):t[o]=s[o])}(arguments[s]);return t};if(e.prototype={init:function(){if(!t.IntersectionObserver)return void this.loadImages();let e=this,s={root:null,rootMargin:"0px",threshold:[0]};this.observer=new IntersectionObserver(function(t){t.forEach(function(t){if(t.intersectionRatio>0){e.observer.unobserve(t.target);let s=t.target.getAttribute(e.settings.src),r=t.target.getAttribute(e.settings.srcset);"img"===t.target.tagName.toLowerCase()?(s&&(t.target.src=s),r&&(t.target.srcset=r)):t.target.style.backgroundImage="url("+s+")"}})},s),this.images.forEach(function(t){e.observer.observe(t)})},loadAndDestroy:function(){this.settings&&(this.loadImages(),this.destroy())},loadImages:function(){if(!this.settings)return;let t=this;this.images.forEach(function(e){let s=e.getAttribute(t.settings.src),r=e.getAttribute(t.settings.srcset);"img"===e.tagName.toLowerCase()?(s&&(e.src=s),r&&(e.srcset=r)):e.style.backgroundImage="url("+s+")"})},destroy:function(){this.settings&&(this.observer.disconnect(),this.settings=null)}},t.lazyload=function(t,s){return new e(t,s)},t.jQuery){const s=t.jQuery;s.fn.lazyload=function(t){return t=t||{},t.attribute=t.attribute||"data-src",new e(s.makeArray(this),t),this}}return e});
|
||||
!function(t,e){"object"==typeof exports?module.exports=e(t):"function"==typeof define&&define.amd?define([],e(t)):t.LazyLoad=e(t)}("undefined"!=typeof global?global:this.window||this.global,function(t){"use strict";function e(t,e){this.settings=r(s,e||{}),this.images=t||document.querySelectorAll(this.settings.selector),this.observer=null,this.init()}const s={src:"data-src",srcset:"data-srcset",selector:".lazyload"},r=function(){let t={},e=!1,s=0,o=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],s++);for(;s<o;s++)!function(s){for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e&&"[object Object]"===Object.prototype.toString.call(s[o])?t[o]=r(!0,t[o],s[o]):t[o]=s[o])}(arguments[s]);return t};if(e.prototype={init:function(){if(!t.IntersectionObserver)return void this.loadImages();let e=this,s={root:null,rootMargin:"0px",threshold:[0]};this.observer=new IntersectionObserver(function(t){t.forEach(function(t){if(t.isIntersecting){e.observer.unobserve(t.target);let s=t.target.getAttribute(e.settings.src),r=t.target.getAttribute(e.settings.srcset);"img"===t.target.tagName.toLowerCase()?(s&&(t.target.src=s),r&&(t.target.srcset=r)):t.target.style.backgroundImage="url("+s+")"}})},s),this.images.forEach(function(t){e.observer.observe(t)})},loadAndDestroy:function(){this.settings&&(this.loadImages(),this.destroy())},loadImages:function(){if(!this.settings)return;let t=this;this.images.forEach(function(e){let s=e.getAttribute(t.settings.src),r=e.getAttribute(t.settings.srcset);"img"===e.tagName.toLowerCase()?(s&&(e.src=s),r&&(e.srcset=r)):e.style.backgroundImage="url("+s+")"})},destroy:function(){this.settings&&(this.observer.disconnect(),this.settings=null)}},t.lazyload=function(t,s){return new e(t,s)},t.jQuery){const s=t.jQuery;s.fn.lazyload=function(t){return t=t||{},t.attribute=t.attribute||"data-src",new e(s.makeArray(this),t),this}}return e});
|
||||
|
6
cdn/js/src/10.materialize.min.js
vendored
2
cdn/js/src/11.third-part-functions.js
Normal file → Executable file
@ -8,7 +8,7 @@ function get_gravatar(email, size) {
|
||||
|
||||
var size = size || 80;
|
||||
|
||||
return 'https://gravatar.shino.cc/avatar/' + MD5(email) + '.jpg?s=' + size + '&d=mm';
|
||||
return 'https://' + Poi.gravatar_url + '/' + MD5(email) + '.jpg?s=' + size + '&d=mm';
|
||||
}
|
||||
|
||||
// sync css
|
||||
|
929
cdn/theme/github.css
Normal file
@ -0,0 +1,929 @@
|
||||
.entry-content blockquote:before,.entry-content blockquote:after {
|
||||
display: none
|
||||
}
|
||||
|
||||
.entry-content {
|
||||
-ms-text-size-adjust: 100%;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
line-height: 1.5;
|
||||
color: #24292e;
|
||||
/*font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";*/
|
||||
font-size: 16px;
|
||||
line-height: 1.5;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
|
||||
.entry-content .pl-c {
|
||||
color: #6a737d;
|
||||
}
|
||||
|
||||
.entry-content .pl-c1,
|
||||
.entry-content .pl-s .pl-v {
|
||||
color: #005cc5;
|
||||
}
|
||||
|
||||
.entry-content .pl-e,
|
||||
.entry-content .pl-en {
|
||||
color: #6f42c1;
|
||||
}
|
||||
|
||||
.entry-content .pl-smi,
|
||||
.entry-content .pl-s .pl-s1 {
|
||||
color: #24292e;
|
||||
}
|
||||
|
||||
.entry-content .pl-ent {
|
||||
color: #22863a;
|
||||
}
|
||||
|
||||
.entry-content .pl-k {
|
||||
color: #d73a49;
|
||||
}
|
||||
|
||||
.entry-content .pl-s,
|
||||
.entry-content .pl-pds,
|
||||
.entry-content .pl-s .pl-pse .pl-s1,
|
||||
.entry-content .pl-sr,
|
||||
.entry-content .pl-sr .pl-cce,
|
||||
.entry-content .pl-sr .pl-sre,
|
||||
.entry-content .pl-sr .pl-sra {
|
||||
color: #032f62;
|
||||
}
|
||||
|
||||
.entry-content .pl-v,
|
||||
.entry-content .pl-smw {
|
||||
color: #e36209;
|
||||
}
|
||||
|
||||
.entry-content .pl-bu {
|
||||
color: #b31d28;
|
||||
}
|
||||
|
||||
.entry-content .pl-ii {
|
||||
color: #fafbfc;
|
||||
background-color: #b31d28;
|
||||
}
|
||||
|
||||
.entry-content .pl-c2 {
|
||||
color: #fafbfc;
|
||||
background-color: #d73a49;
|
||||
}
|
||||
|
||||
.entry-content .pl-c2::before {
|
||||
content: "^M";
|
||||
}
|
||||
|
||||
.entry-content .pl-sr .pl-cce {
|
||||
font-weight: bold;
|
||||
color: #22863a;
|
||||
}
|
||||
|
||||
.entry-content .pl-ml {
|
||||
color: #735c0f;
|
||||
}
|
||||
|
||||
.entry-content .pl-mh,
|
||||
.entry-content .pl-mh .pl-en,
|
||||
.entry-content .pl-ms {
|
||||
font-weight: bold;
|
||||
color: #005cc5;
|
||||
}
|
||||
|
||||
.entry-content .pl-mi {
|
||||
font-style: italic;
|
||||
color: #24292e;
|
||||
}
|
||||
|
||||
.entry-content .pl-mb {
|
||||
font-weight: bold;
|
||||
color: #24292e;
|
||||
}
|
||||
|
||||
.entry-content .pl-md {
|
||||
color: #b31d28;
|
||||
background-color: #ffeef0;
|
||||
}
|
||||
|
||||
.entry-content .pl-mi1 {
|
||||
color: #22863a;
|
||||
background-color: #f0fff4;
|
||||
}
|
||||
|
||||
.entry-content .pl-mc {
|
||||
color: #e36209;
|
||||
background-color: #ffebda;
|
||||
}
|
||||
|
||||
.entry-content .pl-mi2 {
|
||||
color: #f6f8fa;
|
||||
background-color: #005cc5;
|
||||
}
|
||||
|
||||
.entry-content .pl-mdr {
|
||||
font-weight: bold;
|
||||
color: #6f42c1;
|
||||
}
|
||||
|
||||
.entry-content .pl-ba {
|
||||
color: #586069;
|
||||
}
|
||||
|
||||
.entry-content .pl-sg {
|
||||
color: #959da5;
|
||||
}
|
||||
|
||||
.entry-content .pl-corl {
|
||||
text-decoration: underline;
|
||||
color: #032f62;
|
||||
}
|
||||
|
||||
.entry-content .octicon {
|
||||
display: inline-block;
|
||||
vertical-align: text-top;
|
||||
fill: currentColor;
|
||||
}
|
||||
|
||||
.entry-content a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.entry-content a:active,
|
||||
.entry-content a:hover {
|
||||
outline-width: 0;
|
||||
}
|
||||
|
||||
.entry-content strong {
|
||||
font-weight: inherit;
|
||||
}
|
||||
|
||||
.entry-content strong {
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
.entry-content h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
.entry-content img {
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
.entry-content code,
|
||||
.entry-content kbd {
|
||||
font-family: monospace, monospace;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.entry-content hr {
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.entry-content input {
|
||||
font: inherit;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.entry-content input {
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.entry-content [type="checkbox"] {
|
||||
box-sizing: border-box;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.entry-content * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.entry-content input {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
.entry-content a {
|
||||
color: #0366d6;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.entry-content a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.entry-content strong {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.entry-content hr {
|
||||
height: 0;
|
||||
margin: 15px 0;
|
||||
overflow: hidden;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
border-bottom: 1px solid #dfe2e5;
|
||||
}
|
||||
|
||||
.entry-content hr::before {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.entry-content hr::after {
|
||||
display: table;
|
||||
clear: both;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.entry-content table {
|
||||
border-spacing: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.entry-content td,
|
||||
.entry-content th {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.entry-content h1,
|
||||
.entry-content h2,
|
||||
.entry-content h3,
|
||||
.entry-content h4,
|
||||
.entry-content h5,
|
||||
.entry-content h6 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.entry-content h1 {
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.entry-content h2 {
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.entry-content h3 {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.entry-content h4 {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.entry-content h5 {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.entry-content h6 {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.entry-content p {
|
||||
margin-top: 0;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.entry-content blockquote {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.entry-content ul,
|
||||
.entry-content ol {
|
||||
padding-left: 0;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.entry-content ol ol,
|
||||
.entry-content ul ol {
|
||||
list-style-type: lower-roman;
|
||||
}
|
||||
|
||||
.entry-content ul ul ol,
|
||||
.entry-content ul ol ol,
|
||||
.entry-content ol ul ol,
|
||||
.entry-content ol ol ol {
|
||||
list-style-type: lower-alpha;
|
||||
}
|
||||
|
||||
.entry-content dd {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.entry-content code {
|
||||
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.entry-content .octicon {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
.entry-content .pl-0 {
|
||||
padding-left: 0 !important;
|
||||
}
|
||||
|
||||
.entry-content .pl-1 {
|
||||
padding-left: 4px !important;
|
||||
}
|
||||
|
||||
.entry-content .pl-2 {
|
||||
padding-left: 8px !important;
|
||||
}
|
||||
|
||||
.entry-content .pl-3 {
|
||||
padding-left: 16px !important;
|
||||
}
|
||||
|
||||
.entry-content .pl-4 {
|
||||
padding-left: 24px !important;
|
||||
}
|
||||
|
||||
.entry-content .pl-5 {
|
||||
padding-left: 32px !important;
|
||||
}
|
||||
|
||||
.entry-content .pl-6 {
|
||||
padding-left: 40px !important;
|
||||
}
|
||||
|
||||
.entry-content::before {
|
||||
display: table;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.entry-content::after {
|
||||
display: table;
|
||||
clear: both;
|
||||
content: "";
|
||||
}
|
||||
|
||||
.entry-content>*:first-child {
|
||||
margin-top: 0 !important;
|
||||
}
|
||||
|
||||
.entry-content>*:last-child {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.entry-content a:not([href]) {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.entry-content .anchor {
|
||||
float: left;
|
||||
padding-right: 4px;
|
||||
margin-left: -20px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.entry-content .anchor:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.entry-content p,
|
||||
.entry-content blockquote,
|
||||
.entry-content ul,
|
||||
.entry-content ol,
|
||||
.entry-content dl,
|
||||
.entry-content table {
|
||||
margin-top: 0;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.entry-content hr {
|
||||
height: 0.25em;
|
||||
padding: 0;
|
||||
margin: 24px 0;
|
||||
background-color: #e1e4e8;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.entry-content blockquote {
|
||||
padding: 0 1em;
|
||||
color: #6a737d;
|
||||
border-left: 0.25em solid #dfe2e5;
|
||||
}
|
||||
|
||||
.entry-content blockquote>:first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.entry-content blockquote>:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.entry-content kbd {
|
||||
display: inline-block;
|
||||
padding: 3px 5px;
|
||||
font-size: 11px;
|
||||
line-height: 10px;
|
||||
color: #444d56;
|
||||
vertical-align: middle;
|
||||
background-color: #fafbfc;
|
||||
border: solid 1px #c6cbd1;
|
||||
border-bottom-color: #959da5;
|
||||
border-radius: 3px;
|
||||
box-shadow: inset 0 -1px 0 #959da5;
|
||||
}
|
||||
|
||||
.entry-content h1,
|
||||
.entry-content h2,
|
||||
.entry-content h3,
|
||||
.entry-content h4,
|
||||
.entry-content h5,
|
||||
.entry-content h6 {
|
||||
margin-top: 24px;
|
||||
margin-bottom: 16px;
|
||||
font-weight: 600;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.entry-content h1 .octicon-link,
|
||||
.entry-content h2 .octicon-link,
|
||||
.entry-content h3 .octicon-link,
|
||||
.entry-content h4 .octicon-link,
|
||||
.entry-content h5 .octicon-link,
|
||||
.entry-content h6 .octicon-link {
|
||||
color: #1b1f23;
|
||||
vertical-align: middle;
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.entry-content h1:hover .anchor,
|
||||
.entry-content h2:hover .anchor,
|
||||
.entry-content h3:hover .anchor,
|
||||
.entry-content h4:hover .anchor,
|
||||
.entry-content h5:hover .anchor,
|
||||
.entry-content h6:hover .anchor {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.entry-content h1:hover .anchor .octicon-link,
|
||||
.entry-content h2:hover .anchor .octicon-link,
|
||||
.entry-content h3:hover .anchor .octicon-link,
|
||||
.entry-content h4:hover .anchor .octicon-link,
|
||||
.entry-content h5:hover .anchor .octicon-link,
|
||||
.entry-content h6:hover .anchor .octicon-link {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
.entry-content h1 {
|
||||
padding-bottom: 0.3em;
|
||||
font-size: 2em;
|
||||
border-bottom: 1px solid #eaecef;
|
||||
}
|
||||
|
||||
.entry-content h2 {
|
||||
padding-bottom: 0.3em;
|
||||
font-size: 1.5em;
|
||||
border-bottom: 1px solid #eaecef;
|
||||
}
|
||||
|
||||
.entry-content h3 {
|
||||
font-size: 1.25em;
|
||||
}
|
||||
|
||||
.entry-content h4 {
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
.entry-content h5 {
|
||||
font-size: 0.875em;
|
||||
}
|
||||
|
||||
.entry-content h6 {
|
||||
font-size: 0.85em;
|
||||
color: #6a737d;
|
||||
}
|
||||
|
||||
.entry-content ul,
|
||||
.entry-content ol {
|
||||
padding-left: 2em;
|
||||
}
|
||||
|
||||
.entry-content ul ul,
|
||||
.entry-content ul ol,
|
||||
.entry-content ol ol,
|
||||
.entry-content ol ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.entry-content li {
|
||||
word-wrap: break-all;
|
||||
}
|
||||
|
||||
.entry-content li>p {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.entry-content li+li {
|
||||
margin-top: 0.25em;
|
||||
}
|
||||
|
||||
.entry-content dl {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.entry-content dl dt {
|
||||
padding: 0;
|
||||
margin-top: 16px;
|
||||
font-size: 1em;
|
||||
font-style: italic;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.entry-content dl dd {
|
||||
padding: 0 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.entry-content table {
|
||||
display: block;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.entry-content table th {
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.entry-content table th,
|
||||
.entry-content table td {
|
||||
padding: 6px 13px;
|
||||
border: 1px solid #dfe2e5;
|
||||
}
|
||||
|
||||
.entry-content table tr {
|
||||
background-color: #fff;
|
||||
border-top: 1px solid #c6cbd1;
|
||||
}
|
||||
|
||||
.entry-content table tr:nth-child(2n) {
|
||||
background-color: #f6f8fa;
|
||||
}
|
||||
|
||||
.entry-content img {
|
||||
max-width: 100%;
|
||||
box-sizing: content-box;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.entry-content img[align=right] {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.entry-content img[align=left] {
|
||||
padding-right: 20px;
|
||||
}
|
||||
|
||||
.entry-content code {
|
||||
padding: 0.2em 0.4em;
|
||||
margin: 0;
|
||||
font-size: 85%;
|
||||
background-color: rgba(27,31,35,0.05);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.entry-content .full-commit .btn-outline:not(:disabled):hover {
|
||||
color: #005cc5;
|
||||
border-color: #005cc5;
|
||||
}
|
||||
|
||||
.entry-content kbd {
|
||||
display: inline-block;
|
||||
padding: 3px 5px;
|
||||
font: 11px "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
||||
line-height: 10px;
|
||||
color: #444d56;
|
||||
vertical-align: middle;
|
||||
background-color: #fafbfc;
|
||||
border: solid 1px #d1d5da;
|
||||
border-bottom-color: #c6cbd1;
|
||||
border-radius: 3px;
|
||||
box-shadow: inset 0 -1px 0 #c6cbd1;
|
||||
}
|
||||
|
||||
.entry-content :checked+.radio-label {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
border-color: #0366d6;
|
||||
}
|
||||
|
||||
.entry-content .task-list-item {
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.entry-content .task-list-item+.task-list-item {
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
||||
.entry-content .task-list-item input {
|
||||
margin: 0 0.2em 0.25em -1.6em;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.entry-content hr {
|
||||
border-bottom-color: #eee;
|
||||
}
|
||||
|
||||
/*fix mac code*/
|
||||
.entry-content pre.highlight-wrap {
|
||||
position: relative;
|
||||
background: #21252b;
|
||||
border-radius: 5px;
|
||||
font: 15px/22px "Microsoft YaHei", Arial, Sans-Serif;
|
||||
line-height: 1.6;
|
||||
margin-bottom: 1.6em;
|
||||
max-width: 100%;
|
||||
overflow: auto;
|
||||
text-shadow: none;
|
||||
color: #000;
|
||||
padding-top: 30px;
|
||||
box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4)
|
||||
}
|
||||
|
||||
.entry-content pre.highlight-wrap:before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
-webkit-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
background: #fc625d;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
left: 12px;
|
||||
margin-top: -18px;
|
||||
-webkit-box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
|
||||
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
|
||||
z-index: 2
|
||||
}
|
||||
|
||||
.entry-content pre.highlight-wrap .copy-code {
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
float: right;
|
||||
right: 10px;
|
||||
top: 0;
|
||||
padding-top: 4px;
|
||||
padding-right: 2px;
|
||||
z-index: 2;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.entry-content pre.highlight-wrap .copy-code:hover {
|
||||
color: rgba(255,255,255,.5);
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-ln-line span::-moz-selection,
|
||||
.entry-content pre .hljs-ln-line::-moz-selection {
|
||||
background: #fff;
|
||||
color: #21252b
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-ln-line span::selection,
|
||||
.entry-content pre .hljs-ln-line::selection {
|
||||
background: #fff;
|
||||
color: #21252b
|
||||
}
|
||||
|
||||
.entry-content pre.highlight-wrap code::-webkit-scrollbar {
|
||||
height: 10x !important;
|
||||
width: 10x !important;
|
||||
background-color: #1d1f21 !important
|
||||
}
|
||||
|
||||
.entry-content pre.highlight-wrap code::-webkit-scrollbar-track {
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3) !important;
|
||||
border-radius: 10px !important;
|
||||
background-color: #21252b !important
|
||||
}
|
||||
|
||||
.entry-content pre.highlight-wrap code::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px !important;
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .5) !important;
|
||||
background-color: #21252b !important
|
||||
}
|
||||
|
||||
.entry-content pre table.hljs-ln::-webkit-scrollbar {
|
||||
height: 10x !important;
|
||||
width: 10x !important;
|
||||
background-color: #1d1f21 !important;
|
||||
}
|
||||
.entry-content pre table.hljs-ln::-webkit-scrollbar-track {
|
||||
background-color: #41454a;
|
||||
}
|
||||
.entry-content pre table.hljs-ln::-webkit-scrollbar-thumb {
|
||||
border-radius: 10px !important;
|
||||
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .5) !important;
|
||||
background-color: #21252b !important;
|
||||
}
|
||||
|
||||
.entry-content pre.highlight-wrap code {
|
||||
background: #1d1f21;
|
||||
color: #fff;
|
||||
word-break: break-word;
|
||||
font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif;
|
||||
padding: 2px;
|
||||
text-shadow: none;
|
||||
border-radius: 0 0 5px 5px;
|
||||
cursor: url(https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/cursor/texto.cur), auto
|
||||
}
|
||||
|
||||
.entry-content pre.highlight-wrap code[data-rel]:before {
|
||||
color: #fff;
|
||||
content: attr(data-rel);
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
background: #21252b;
|
||||
font-size: 16px;
|
||||
position: absolute;
|
||||
margin-top: -30px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
font-family: Ubuntu, sans-serif;
|
||||
font-weight: 700;
|
||||
padding: 0 80px;
|
||||
text-indent: 15px;
|
||||
text-align: center;
|
||||
float: left;
|
||||
z-index: 1;
|
||||
border-radius: 5px 5px 0 0;
|
||||
border-top-left-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.entry-content pre .hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: .5em;
|
||||
color: #abb2bf;
|
||||
background: rgba(254, 250, 199, .5);
|
||||
border-radius: 10px
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-comment,
|
||||
.entry-content pre .hljs-quote {
|
||||
color: #888f96;
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-doctag,
|
||||
.entry-content pre .hljs-formula,
|
||||
.entry-content pre .hljs-keyword {
|
||||
color: #c678dd
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-deletion,
|
||||
.entry-content pre .hljs-name,
|
||||
.entry-content pre .hljs-section,
|
||||
.entry-content pre .hljs-selector-tag,
|
||||
.entry-content pre .hljs-subst {
|
||||
color: #e06c75
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-literal {
|
||||
color: #56b6c2
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-addition,
|
||||
.entry-content pre .hljs-attribute,
|
||||
.entry-content pre .hljs-meta-string,
|
||||
.entry-content pre .hljs-regexp,
|
||||
.entry-content pre .hljs-string {
|
||||
color: #98c379
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-built_in,
|
||||
.entry-content pre .hljs-class .hljs-title {
|
||||
color: #e6c07b
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-attr,
|
||||
.entry-content pre .hljs-number,
|
||||
.entry-content pre .hljs-selector-attr,
|
||||
.entry-content pre .hljs-selector-class,
|
||||
.entry-content pre .hljs-selector-pseudo,
|
||||
.entry-content pre .hljs-template-variable,
|
||||
.entry-content pre .hljs-type,
|
||||
.entry-content pre .hljs-variable {
|
||||
color: #d19a66
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-bullet,
|
||||
.entry-content pre .hljs-link,
|
||||
.entry-content pre .hljs-meta,
|
||||
.entry-content pre .hljs-selector-id,
|
||||
.entry-content pre .hljs-symbol,
|
||||
.entry-content pre .hljs-title {
|
||||
color: #61aeee
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-emphasis {
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-strong {
|
||||
font-weight: 700
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-link {
|
||||
text-decoration: underline
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-ln {
|
||||
margin: 6px 0 0 0 !important
|
||||
}
|
||||
|
||||
.entry-content pre td .hljs-ln-numbers {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
text-align: center;
|
||||
color: #888f96;
|
||||
background: #1d1f21;
|
||||
font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif;
|
||||
vertical-align: top;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 30px
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-ln-code .hljs-ln-line {
|
||||
margin-left: 22px;
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-ln-code .hljs-ln-line:hover {
|
||||
background-color: rgba(255, 255, 255, .1)
|
||||
}
|
||||
|
||||
.entry-content pre .hljs-ln{border-collapse:collapse}
|
||||
.entry-content pre .hljs-ln td{padding:0}
|
||||
.entry-content pre .hljs-ln-n:before{content:attr(data-line-number)}
|
||||
|
||||
/*fix*/
|
||||
.entry-content pre table tr {
|
||||
background-color: transparent;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.entry-content pre table th, .entry-content pre table td {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.entry-content pre table tr {
|
||||
background-color: transparent;
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
.entry-content pre table tr:nth-child(2n) {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.code-block-fullscreen {
|
||||
position: fixed !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
min-width: 100% !important;
|
||||
z-index: 9999999 !important;
|
||||
margin: 0 !important;
|
||||
animation: elastic 1s !important
|
||||
}
|
||||
|
||||
.code-block-fullscreen code {
|
||||
--widthA: 100%;
|
||||
--widthB: calc(var(--widthA) - 30px);
|
||||
height: var(--widthB) !important;
|
||||
min-height: 99% !important;
|
||||
overflow-y: hidden !important;
|
||||
overflow-x: auto !important;
|
||||
height: auto !important
|
||||
}
|
||||
|
||||
.code-block-fullscreen-html-scroll {
|
||||
overflow: hidden !important
|
||||
}
|
||||
|
||||
/*other fix*/
|
||||
.entry-content ol,.entry-content ul {
|
||||
margin: auto !important;
|
||||
}
|
399
cdn/theme/sakura.css
Normal file
@ -0,0 +1,399 @@
|
||||
.entry-content blockquote:before,.entry-content blockquote:after {
|
||||
display: block
|
||||
}
|
||||
|
||||
.entry-content blockquote blockquote:before,.entry-content blockquote blockquote:after {
|
||||
display: none
|
||||
}
|
||||
|
||||
.entry-content .begin,
|
||||
.single-begin {
|
||||
float: left;
|
||||
font-size: 3.6em;
|
||||
line-height: 1em;
|
||||
margin-right: 3px;
|
||||
margin-top: 2px;
|
||||
font-weight: 700
|
||||
}
|
||||
|
||||
@media screen and (max-width:860px) {
|
||||
.entry-content .begin,
|
||||
.single-begin {
|
||||
margin-top: 6px
|
||||
}
|
||||
}
|
||||
|
||||
.entry-content ul {
|
||||
list-style: disc;
|
||||
border: 1px dashed #E4E4E4;
|
||||
padding: 15px 10px 15px 50px;
|
||||
color: #616161;
|
||||
margin-left: 0;
|
||||
border-radius: 10px
|
||||
}
|
||||
|
||||
.entry-content ul ul {
|
||||
border: none;
|
||||
padding: 15px 10px 15px 30px;
|
||||
}
|
||||
|
||||
.entry-content ol {
|
||||
list-style: decimal;
|
||||
border: 1px dashed #E4E4E4;
|
||||
padding: 15px 10px 15px 50px;
|
||||
color: #616161;
|
||||
margin-left: 0;
|
||||
border-radius: 10px
|
||||
}
|
||||
|
||||
.entry-content ol li,
|
||||
.entry-content ul li {
|
||||
padding: 8px 0
|
||||
}
|
||||
|
||||
.entry-content {
|
||||
position: relative
|
||||
}
|
||||
|
||||
.entry-content h3, .entry-content h4, .entry-content h5 {
|
||||
padding-left: 16px;
|
||||
}
|
||||
|
||||
.entry-content h3 {
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px dashed #ddd;
|
||||
color: #737373
|
||||
}
|
||||
|
||||
.entry-content h3:after {
|
||||
content: "#";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
color: #FF6D6D
|
||||
}
|
||||
|
||||
.entry-content h4:after {
|
||||
content: ">";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
color: #FF6D6D
|
||||
}
|
||||
|
||||
.entry-content h5:after {
|
||||
content: "?";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
color: #FF6D6D
|
||||
}
|
||||
|
||||
.entry-content code {
|
||||
background: rgba(254, 250, 199, 1);
|
||||
color: #E67474;
|
||||
word-break: break-word;
|
||||
font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif;
|
||||
padding: 2px;
|
||||
text-shadow: none;
|
||||
border-radius: 5px
|
||||
}
|
||||
|
||||
.entry-content a {
|
||||
color: #e67474;
|
||||
text-decoration: underline dotted rgba(0, 0, 0, .1)
|
||||
}
|
||||
|
||||
.entry-content a:hover {
|
||||
color: orange;
|
||||
text-decoration: underline orange
|
||||
}
|
||||
|
||||
h1.entry-title {
|
||||
font-size: 24px;
|
||||
font-weight: 300
|
||||
}
|
||||
|
||||
.entry-content p {
|
||||
color: #797979
|
||||
}
|
||||
|
||||
.entry-content p {
|
||||
line-height: 30px
|
||||
}
|
||||
|
||||
.entry-content hr {
|
||||
margin-top: 40px;
|
||||
margin-bottom: 40px;
|
||||
display: block;
|
||||
border: 0;
|
||||
text-align: center;
|
||||
background: 0 0
|
||||
}
|
||||
|
||||
.entry-content hr:before {
|
||||
content: '...';
|
||||
display: inline-block;
|
||||
margin-left: .6em;
|
||||
color: rgba(0, 0, 0, .8);
|
||||
position: relative;
|
||||
top: -30px;
|
||||
font-size: 28px;
|
||||
letter-spacing: .6em
|
||||
}
|
||||
|
||||
.entry-content table {
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
border-radius: 5px
|
||||
}
|
||||
|
||||
.entry-content th, .entry-content td {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.entry-content tr:nth-child(even){background-color: #f2f2f2}
|
||||
body.dark .entry-content tr:nth-child(even){background-color: unset}
|
||||
|
||||
.entry-content th {
|
||||
color: white;
|
||||
}
|
||||
|
||||
/*fix code block*/
|
||||
.entry-content pre th, .entry-content pre td {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.entry-content pre tr:nth-child(even){
|
||||
background-color: transparent
|
||||
}
|
||||
|
||||
.entry-content pre th {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
|
||||
.highlight-wrap:before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
-webkit-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
background: #fc625d;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
left: 12px;
|
||||
margin-top: -18px;
|
||||
-webkit-box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
|
||||
box-shadow: 20px 0 #fdbc40, 40px 0 #35cd4b;
|
||||
z-index: 2
|
||||
}
|
||||
|
||||
.highlight-wrap {
|
||||
position: relative;
|
||||
background: #21252b;
|
||||
border-radius: 5px;
|
||||
font: 15px/22px "Microsoft YaHei", Arial, Sans-Serif;
|
||||
line-height: 1.6;
|
||||
margin-bottom: 1.6em;
|
||||
max-width: 100%;
|
||||
overflow: auto;
|
||||
text-shadow: none;
|
||||
color: #000;
|
||||
padding-top: 30px;
|
||||
box-shadow: 0 10px 30px 0 rgba(0, 0, 0, .4)
|
||||
}
|
||||
|
||||
.highlight-wrap .copy-code {
|
||||
color: #fff;
|
||||
position: absolute;
|
||||
float: right;
|
||||
right: 10px;
|
||||
top: 0;
|
||||
padding-top: 4px;
|
||||
padding-right: 2px;
|
||||
z-index: 2;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.highlight-wrap .copy-code:hover {
|
||||
color: rgba(255,255,255,.5);
|
||||
}
|
||||
|
||||
.hljs-ln-line span::-moz-selection,
|
||||
.hljs-ln-line::-moz-selection {
|
||||
background: #fff;
|
||||
color: #21252b
|
||||
}
|
||||
|
||||
.hljs-ln-line span::selection,
|
||||
.hljs-ln-line::selection {
|
||||
background: #fff;
|
||||
color: #21252b
|
||||
}
|
||||
|
||||
.highlight-wrap code {
|
||||
background: #1d1f21;
|
||||
color: #fff;
|
||||
word-break: break-word;
|
||||
font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif;
|
||||
padding: 2px;
|
||||
text-shadow: none;
|
||||
border-radius: 0 0 5px 5px;
|
||||
cursor: url(https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/cursor/texto.cur), auto
|
||||
}
|
||||
|
||||
.highlight-wrap code[data-rel]:before {
|
||||
color: #fff;
|
||||
content: attr(data-rel);
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
background: #21252b;
|
||||
font-size: 16px;
|
||||
position: absolute;
|
||||
margin-top: -30px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
font-family: Ubuntu, sans-serif;
|
||||
font-weight: 700;
|
||||
padding: 0 80px;
|
||||
text-indent: 15px;
|
||||
text-align: center;
|
||||
float: left;
|
||||
z-index: 1;
|
||||
border-radius: 5px 5px 0 0;
|
||||
border-top-left-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
border-bottom-right-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
pointer-events: none
|
||||
}
|
||||
|
||||
.hljs {
|
||||
display: block;
|
||||
overflow-x: auto;
|
||||
padding: .5em;
|
||||
color: #abb2bf;
|
||||
background: rgba(254, 250, 199, .5);
|
||||
border-radius: 10px
|
||||
}
|
||||
|
||||
.hljs-comment,
|
||||
.hljs-quote {
|
||||
color: #888f96;
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
.hljs-doctag,
|
||||
.hljs-formula,
|
||||
.hljs-keyword {
|
||||
color: #c678dd
|
||||
}
|
||||
|
||||
.hljs-deletion,
|
||||
.hljs-name,
|
||||
.hljs-section,
|
||||
.hljs-selector-tag,
|
||||
.hljs-subst {
|
||||
color: #e06c75
|
||||
}
|
||||
|
||||
.hljs-literal {
|
||||
color: #56b6c2
|
||||
}
|
||||
|
||||
.hljs-addition,
|
||||
.hljs-attribute,
|
||||
.hljs-meta-string,
|
||||
.hljs-regexp,
|
||||
.hljs-string {
|
||||
color: #98c379
|
||||
}
|
||||
|
||||
.hljs-built_in,
|
||||
.hljs-class .hljs-title {
|
||||
color: #e6c07b
|
||||
}
|
||||
|
||||
.hljs-attr,
|
||||
.hljs-number,
|
||||
.hljs-selector-attr,
|
||||
.hljs-selector-class,
|
||||
.hljs-selector-pseudo,
|
||||
.hljs-template-variable,
|
||||
.hljs-type,
|
||||
.hljs-variable {
|
||||
color: #d19a66
|
||||
}
|
||||
|
||||
.hljs-bullet,
|
||||
.hljs-link,
|
||||
.hljs-meta,
|
||||
.hljs-selector-id,
|
||||
.hljs-symbol,
|
||||
.hljs-title {
|
||||
color: #61aeee
|
||||
}
|
||||
|
||||
.hljs-emphasis {
|
||||
font-style: italic
|
||||
}
|
||||
|
||||
.hljs-strong {
|
||||
font-weight: 700
|
||||
}
|
||||
|
||||
.hljs-link {
|
||||
text-decoration: underline
|
||||
}
|
||||
|
||||
.hljs-ln {
|
||||
margin: 6px 0 0 0 !important
|
||||
}
|
||||
|
||||
td.hljs-ln-numbers {
|
||||
-webkit-touch-callout: none;
|
||||
-webkit-user-select: none;
|
||||
-khtml-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
text-align: center;
|
||||
color: #888f96;
|
||||
background: #1d1f21;
|
||||
font-family: 'Source Code Pro', monospace, Helvetica, Tahoma, Arial, STXihei, "STHeiti Light", "Microsoft YaHei", sans-serif;
|
||||
vertical-align: top;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 30px
|
||||
}
|
||||
|
||||
.hljs-ln-code .hljs-ln-line {
|
||||
margin-left: 25px;
|
||||
padding-left: 5px
|
||||
}
|
||||
|
||||
.hljs-ln-code .hljs-ln-line:hover {
|
||||
background-color: rgba(255, 255, 255, .1)
|
||||
}
|
||||
|
||||
.code-block-fullscreen {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-width: 100%;
|
||||
z-index: 9999999;
|
||||
margin: 0;
|
||||
animation: elastic 1s
|
||||
}
|
||||
|
||||
.code-block-fullscreen code {
|
||||
--widthA: 100%;
|
||||
--widthB: calc(var(--widthA) - 30px);
|
||||
height: var(--widthB);
|
||||
min-height: 99%;
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
height: auto
|
||||
}
|
||||
|
||||
.code-block-fullscreen-html-scroll {
|
||||
overflow: hidden
|
||||
}
|
43
comments.php
@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
/*if('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
|
||||
die(esc_html__('Please do not load this page directly.', 'akina'));*/
|
||||
die(__('Please do not load this page directly.', 'akina'));*/
|
||||
|
||||
if(post_password_required()){
|
||||
return;
|
||||
@ -18,13 +18,13 @@
|
||||
<section id="comments" class="comments">
|
||||
|
||||
<div class="commentwrap comments-hidden">
|
||||
<div class="notification"><i class="iconfont icon-mark"></i><?php esc_html_e('查看评论', 'akina'); ?> -
|
||||
<span class="noticom"><?php comments_number('NOTHING', '1 条评论', '% 条评论'); ?> </span>
|
||||
<div class="notification"><i class="iconfont icon-mark"></i><?php _e('view comments', 'sakura'); /*查看评论*/?> -
|
||||
<span class="noticom"><?php comments_number('NOTHING', '1'.__(" comment","sakura"), '%'.__(" comments","sakura")); ?> </span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="comments-main">
|
||||
<h3 id="comments-list-title">Comments | <span class="noticom"><?php comments_number('NOTHING', '1 条评论', '% 条评论'); ?> </span></h3>
|
||||
<h3 id="comments-list-title">Comments | <span class="noticom"><?php comments_number('NOTHING', '1'.__(" comment","sakura"), '%'.__(" comments","sakura")); ?> </span></h3>
|
||||
<div id="loading-comments"><span></span></div>
|
||||
<?php if(have_comments()): ?>
|
||||
|
||||
@ -40,7 +40,7 @@
|
||||
|
||||
<?php if(comments_open()): ?>
|
||||
<div class="commentwrap">
|
||||
<div class="notification-hidden"><i class="iconfont icon-mark"></i> <?php esc_html_e('暂无评论', 'akina'); ?></div>
|
||||
<div class="notification-hidden"><i class="iconfont icon-mark"></i> <?php _e('no comment', 'sakura'); /*暂无评论*/?></div>
|
||||
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
@ -48,23 +48,24 @@
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
|
||||
$robot_comments = '';
|
||||
if(comments_open()){
|
||||
if(akina_option('norobot')) $robot_comments = '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="no-robot"><span class="siren-no-robot-checkbox siren-checkbox-radioInput"></span>滴,学生卡 | I\'m not a robot</label>';
|
||||
$private_ms = akina_option('open_private_message') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="is-private"><span class="siren-is-private-checkbox siren-checkbox-radioInput"></span>悄悄话 | Comment in private</label>' : '';
|
||||
if(akina_option('norobot')) $robot_comments = '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="no-robot"><span class="siren-no-robot-checkbox siren-checkbox-radioInput"></span>'.__('I\'m not a robot', 'sakura').'</label>';
|
||||
$private_ms = akina_option('open_private_message') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="is-private"><span class="siren-is-private-checkbox siren-checkbox-radioInput"></span>'.__('Comment in private', 'sakura').'</label>' : '';
|
||||
$mail_notify = akina_option('mail_notify') ? '<label class="siren-checkbox-label"><input class="siren-checkbox-radio" type="checkbox" name="mail-notify"><span class="siren-mail-notify-checkbox siren-checkbox-radioInput"></span>'.__('Comment reply notify', 'sakura').'</label>' : '';
|
||||
$args = array(
|
||||
'id_form' => 'commentform',
|
||||
'id_submit' => 'submit',
|
||||
'title_reply' => '',
|
||||
'title_reply_to' => '<div class="graybar"><i class="fa fa-comments-o"></i>' . esc_html__('Leave a Reply to', 'akina') . ' %s' . '</div>',
|
||||
'cancel_reply_link' => esc_html__('Cancel Reply', 'akina'),
|
||||
'label_submit' => esc_html__('BiuBiuBiu~', 'akina'),
|
||||
'comment_field' => '<p><i class="iconfont icon-markdown"></i> Markdown Supported while <i class="fa fa-code" aria-hidden="true"></i> Forbidden</p><textarea placeholder="' . esc_attr__('你是我一生只会遇见一次的惊喜', 'akina') . ' ..." name="comment" class="commentbody" id="comment" rows="5" tabindex="4"></textarea>
|
||||
'title_reply_to' => '<div class="graybar"><i class="fa fa-comments-o"></i>' . __('Leave a Reply to', 'sakura') . ' %s' . '</div>',
|
||||
'cancel_reply_link' => __('Cancel Reply', 'sakura'),
|
||||
'label_submit' => __('BiuBiuBiu~', 'sakura'),
|
||||
'comment_field' => '<p style="font-style:italic"><a href="https://segmentfault.com/markdown" target="_blank"><i class="iconfont icon-markdown" style="color:#000"></i></a> Markdown Supported while <i class="fa fa-code" aria-hidden="true"></i> Forbidden</p><div class="comment-textarea"><textarea placeholder="' . __("You are a surprise that I will only meet once in my life", "sakura") . ' ..." name="comment" class="commentbody" id="comment" rows="5" tabindex="4"></textarea><label class="input-label">' . __("You are a surprise that I will only meet once in my life", "sakura") . ' ...</label></div>
|
||||
<div id="upload-img-show"></div>
|
||||
<!--插入表情面版-->
|
||||
<p id="emotion-toggle" class="no-select">
|
||||
<span class="emotion-toggle-off">戳我试试 OωO</span>
|
||||
<span class="emotion-toggle-on">嘿嘿嘿 ヾ(≧∇≦*)ゝ</span>
|
||||
<span class="emotion-toggle-off">' . __("Click me OωO", "sakura")/*戳我试试 OωO*/ . '</span>
|
||||
<span class="emotion-toggle-on">' . __("Woooooow ヾ(≧∇≦*)ゝ", "sakura")/*嘿嘿嘿 ヾ(≧∇≦*)ゝ*/ . '</span>
|
||||
</p>
|
||||
<div class="emotion-box no-select">
|
||||
<table class="motion-switcher-table">
|
||||
@ -79,10 +80,6 @@
|
||||
</table>
|
||||
<div class="bili-container motion-container">' . push_bili_smilies() . '</div>
|
||||
<div class="menhera-container motion-container" style="display:none;">
|
||||
<!--<img onclick="grin('."'"."https:\/\/cloud.moezx.cc\/Picture\/emotion\/Menhera-chan\/1.jpg"."'".',type = \'Img\')"
|
||||
src="https://cloud.moezx.cc/Picture/emotion/Menhera-chan/1.jpg"
|
||||
style="width: 200px;display: block;margin-left: auto;margin-right: auto;">
|
||||
<p style="text-align: center;">Menhera 酱施工中... 你知道吗?下面可以直接上传图片啦~</p>-->
|
||||
'.push_emoji_panel().'
|
||||
</div>
|
||||
<div class="tieba-container motion-container" style="display:none;">' . push_smilies() . '</div>
|
||||
@ -91,15 +88,15 @@
|
||||
'comment_notes_after' => '',
|
||||
'comment_notes_before' => '',
|
||||
'fields' => apply_filters( 'comment_form_default_fields', array(
|
||||
'avatar' => '<div class="comment-user-avatar"><img src="https://gravatar.shino.cc/avatar/f11f237b3de93c93b24045e71f7f65c6?s=80&d=mm&r=g"><div class="socila-check qq-check"><i class="fa fa-qq" aria-hidden="true"></i></div><div class="socila-check gravatar-check"><i class="fa fa-google" aria-hidden="true"></i></div></div>',
|
||||
'avatar' => '<div class="cmt-info-container"><div class="comment-user-avatar"><img src="' . get_template_directory_uri() . '/images/avatar.jpeg"><div class="socila-check qq-check"><i class="fa fa-qq" aria-hidden="true"></i></div><div class="socila-check gravatar-check"><i class="fa fa-google" aria-hidden="true"></i></div></div>',
|
||||
'author' =>
|
||||
'<div class="popup cmt-popup cmt-author" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -115px;width: 230px;">输入QQ号将自动拉取昵称和头像</span><input type="text" placeholder="' . esc_attr__('昵称或QQ号', 'akina') . ' ' . ( $req ? '(' . esc_attr__('必须 Name* ', 'akina') . ')' : '') . '" name="author" id="author" value="' . esc_attr($comment_author) . '" size="22" autocomplete="off" tabindex="1" ' . ($req ? "aria-required='true'" : '' ). ' /></div>',
|
||||
'<div class="popup cmt-popup cmt-author" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -115px;width: 230px;">' . __("Auto pull nickname and avatar with a QQ num. entered", "sakura")/*输入QQ号将自动拉取昵称和头像*/ . '</span><input type="text" placeholder="' . __("Nickname or QQ number", "sakura") /*昵称或QQ号*/. ' ' . ( $req ? '(' . __("Name* ", "sakura") . ')' : '') . '" name="author" id="author" value="' . esc_attr($comment_author) . '" size="22" autocomplete="off" tabindex="1" ' . ($req ? "aria-required='true'" : '' ). ' /></div>',
|
||||
'email' =>
|
||||
'<div class="popup cmt-popup" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -65px;width: 130px;">你将收到回复通知</span><input type="text" placeholder="' . esc_attr__('邮箱', 'akina') . ' ' . ( $req ? '(' . esc_attr__('必须 Email* ', 'akina') . ')' : '') . '" name="email" id="email" value="' . esc_attr($comment_author_email) . '" size="22" tabindex="1" autocomplete="off" ' . ($req ? "aria-required='true'" : '' ). ' /></div>',
|
||||
'<div class="popup cmt-popup" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -65px;width: 130px;">' . __("You will receive notification by email", "sakura")/*你将收到回复通知*/ . '</span><input type="text" placeholder="' . __("email", "sakura") . ' ' . ( $req ? '(' . __("Must* ", "sakura") . ')' : '') . '" name="email" id="email" value="' . esc_attr($comment_author_email) . '" size="22" tabindex="1" autocomplete="off" ' . ($req ? "aria-required='true'" : '' ). ' /></div>',
|
||||
'url' =>
|
||||
'<div class="popup cmt-popup" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -55px;width: 110px;">禁止小广告😀</span><input type="text" placeholder="' . esc_attr__('网站 (选填 Site)', 'akina') . '" name="url" id="url" value="' . esc_attr($comment_author_url) . '" size="22" autocomplete="off" tabindex="1" /></div>' . $robot_comments . $private_ms ,
|
||||
'<div class="popup cmt-popup" onclick="cmt_showPopup(this)"><span class="popuptext" id="thePopup" style="margin-left: -55px;width: 110px;">' . __("Advertisement is forbidden 😀", "sakura")/*禁止小广告😀*/ . '</span><input type="text" placeholder="' . __("Site", "sakura") . '" name="url" id="url" value="' . esc_attr($comment_author_url) . '" size="22" autocomplete="off" tabindex="1" /></div></div>' . $robot_comments . $private_ms . $mail_notify ,
|
||||
'qq' =>
|
||||
'<input type="text" placeholder="' . esc_attr__('QQ', 'akina') . '" name="new_field_qq" id="qq" value="' . esc_attr($comment_author_url) . '" style="display:none" autocomplete="off"/><!--此栏不可见-->'
|
||||
'<input type="text" placeholder="QQ" name="new_field_qq" id="qq" value="' . esc_attr($comment_author_url) . '" style="display:none" autocomplete="off"/><!--此栏不可见-->'
|
||||
)
|
||||
)
|
||||
);
|
||||
|
Before Width: | Height: | Size: 55 KiB |
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
$img_array = glob("gallery/*.{gif,jpg,png}",GLOB_BRACE);
|
||||
|
||||
$img = array_rand($img_array);
|
||||
|
||||
$imgurl=$img_array[$img];
|
||||
|
||||
if($imgurl) {
|
||||
header("Location: " . $imgurl);
|
||||
exit();
|
||||
} else {
|
||||
exit('error');
|
||||
}
|
||||
?>
|
Before Width: | Height: | Size: 248 KiB |
Before Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 486 KiB |
Before Width: | Height: | Size: 732 KiB |
Before Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 2.0 MiB |
Before Width: | Height: | Size: 2.0 MiB |
Before Width: | Height: | Size: 694 KiB |
Before Width: | Height: | Size: 805 KiB |
@ -1,14 +0,0 @@
|
||||
<?php
|
||||
$img_array = glob("gallery/*.{gif,jpg,png}",GLOB_BRACE);
|
||||
|
||||
$img = array_rand($img_array);
|
||||
|
||||
$imgurl=$img_array[$img];
|
||||
|
||||
if($imgurl) {
|
||||
header("Location: " . $imgurl);
|
||||
exit();
|
||||
} else {
|
||||
exit('error');
|
||||
}
|
||||
?>
|
56
footer.php
@ -20,7 +20,7 @@
|
||||
?>
|
||||
</div><!-- #page Pjax container-->
|
||||
<footer id="colophon" class="site-footer" role="contentinfo">
|
||||
<div class="site-info">
|
||||
<div class="site-info" theme-info="Sakura v<?php echo SAKURA_VERSION; ?>">
|
||||
<div class="footertext">
|
||||
<div class="img-preload">
|
||||
<img src="https://cdn.jsdelivr.net/gh/moezx/cdn@3.1.9/img/Sakura/images/wordpress-rotating-ball-o.svg">
|
||||
@ -59,21 +59,33 @@
|
||||
</div>
|
||||
<div class="m-search">
|
||||
<form class="m-search-form" method="get" action="<?php echo home_url(); ?>" role="search">
|
||||
<input class="m-search-input" type="search" name="s" placeholder="<?php _e('搜索...', 'akina') ?>" required>
|
||||
<input class="m-search-input" type="search" name="s" placeholder="<?php _e('Search...', 'sakura') /*搜索...*/?>" required>
|
||||
</form>
|
||||
</div>
|
||||
<?php wp_nav_menu( array( 'depth' => 2, 'theme_location' => 'primary', 'container' => false ) ); ?>
|
||||
</div><!-- m-nav-center end -->
|
||||
<a href="#" class="cd-top faa-float animated "></a>
|
||||
<button onclick="topFunction()" id="moblieGoTop" title="Go to top"><i class="fa fa-chevron-up" aria-hidden="true"></i></button>
|
||||
<a class="cd-top faa-float animated "></a>
|
||||
<button id="moblieGoTop" title="Go to top"><i class="fa fa-chevron-up" aria-hidden="true"></i></button>
|
||||
<button id="moblieDarkLight"><i class="fa fa-moon-o" aria-hidden="true"></i></button>
|
||||
<!-- search start -->
|
||||
<form class="js-search search-form search-form--modal" method="get" action="<?php echo home_url(); ?>" role="search">
|
||||
<div class="search-form__inner">
|
||||
<div>
|
||||
<p class="micro mb-"><?php _e('想要找点什么呢?', 'akina') ?></p>
|
||||
<?php if(akina_option('live_search')){ ?>
|
||||
<div class="micro">
|
||||
<i class="iconfont icon-search"></i>
|
||||
<input class="text-input" type="search" name="s" placeholder="<?php _e('Search', 'akina') ?>" required>
|
||||
<input id="search-input" class="text-input" type="search" name="s" placeholder="<?php _e('Want to find something?', 'sakura') /*想要找点什么呢*/?>" required>
|
||||
</div>
|
||||
<div class="ins-section-wrapper">
|
||||
<a id="Ty" href="#"></a>
|
||||
<div class="ins-section-container" id="PostlistBox"></div>
|
||||
</div>
|
||||
<?php }else{ ?>
|
||||
<div class="micro">
|
||||
<p class="micro mb-"><?php _e('Want to find something?', 'sakura') /*想要找点什么呢*/?></p>
|
||||
<i class="iconfont icon-search"></i>
|
||||
<input class="text-input" type="search" name="s" placeholder="<?php _e('Search', 'sakura') ?>" required>
|
||||
</div>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<div class="search_close"></div>
|
||||
</form>
|
||||
@ -84,7 +96,7 @@
|
||||
<script type="text/javascript"><?php echo akina_option('site_statistics'); ?></script>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<div class="changeSkin-gear no-select">
|
||||
<div class="changeSkin-gear no-select" style="bottom: -999px;">
|
||||
<div class="keys">
|
||||
<span id="open-skinMenu">
|
||||
<i class="iconfont icon-gear inline-block rotating"></i> 切换主题 | SCHEME TOOL
|
||||
@ -128,16 +140,24 @@
|
||||
</div>
|
||||
</div>
|
||||
<canvas id="night-mode-cover"></canvas>
|
||||
<?php if (akina_option('playlist_id', '')): ?>
|
||||
<div id="aplayer-float" style="z-index: 100;"
|
||||
class="aplayer"
|
||||
data-id="<?php echo akina_option('playlist_id', ''); ?>"
|
||||
data-server="netease"
|
||||
data-type="playlist"
|
||||
data-fixed="true"
|
||||
data-theme="orange">
|
||||
</div>
|
||||
<style>.skin-menu{left:auto;right:10px;}.changeSkin-gear{left:auto;right:5px;}</style>
|
||||
<?php if (akina_option('sakura_widget')) : ?>
|
||||
<aside id="secondary" class="widget-area" role="complementary" style="left: -400px;">
|
||||
<div class="heading"><?php _e('Widgets') /*小工具*/ ?></div>
|
||||
<div class="sakura_widget">
|
||||
<?php if (function_exists('dynamic_sidebar') && dynamic_sidebar('sakura_widget')) : endif; ?>
|
||||
</div>
|
||||
<div class="show-hide-wrap"><button class="show-hide"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><path d="M22 16l-10.105-10.6-1.895 1.987 8.211 8.613-8.211 8.612 1.895 1.988 8.211-8.613z"></path></svg></button></div>
|
||||
</aside>
|
||||
<?php endif; ?>
|
||||
<?php if (akina_option('aplayer_server') != 'off'): ?>
|
||||
<div id="aplayer-float" style="z-index: 100;"
|
||||
class="aplayer"
|
||||
data-id="<?php echo akina_option('aplayer_playlistid', ''); ?>"
|
||||
data-server="<?php echo akina_option('aplayer_server'); ?>"
|
||||
data-type="playlist"
|
||||
data-fixed="true"
|
||||
data-theme="orange">
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</body>
|
||||
</html>
|
||||
|
2143
functions.php
@ -32,7 +32,7 @@ Theme by Mashiro
|
||||
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
|
||||
<title itemprop="name"><?php global $page, $paged;wp_title( '-', true, 'right' );
|
||||
bloginfo( 'name' );$site_description = get_bloginfo( 'description', 'display' );
|
||||
if ( $site_description && ( is_home() || is_front_page() ) ) echo " - $site_description";if ( $paged >= 2 || $page >= 2 ) echo ' - ' . sprintf( __( '第 %s 页'), max( $paged, $page ) );?>
|
||||
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 页*/?>
|
||||
</title>
|
||||
<?php
|
||||
if (akina_option('akina_meta') == true) {
|
||||
@ -62,11 +62,12 @@ if (akina_option('akina_meta') == true) {
|
||||
<meta name="keywords" content="<?php echo $keywords; ?>" />
|
||||
<?php } ?>
|
||||
<link rel="shortcut icon" href="<?php echo akina_option('favicon_link', ''); ?>"/>
|
||||
<meta name="theme-color" content="#31363b">
|
||||
<meta http-equiv="x-dns-prefetch-control" content="on">
|
||||
<?php wp_head(); ?>
|
||||
<script type="text/javascript">
|
||||
if (!!window.ActiveXObject || "ActiveXObject" in window) { //is IE?
|
||||
alert('朋友,IE浏览器未适配哦~');
|
||||
alert('朋友,IE浏览器未适配哦~\n如果是 360、QQ 等双核浏览器,请关闭 IE 模式!');
|
||||
}
|
||||
</script>
|
||||
<?php if(akina_option('google_analytics_id', '')):?>
|
||||
@ -78,7 +79,7 @@ window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}
|
||||
<?php endif; ?>
|
||||
</head>
|
||||
<body <?php body_class(); ?>>
|
||||
<div class="scrollbar" id="bar"></div>
|
||||
<div class="scrollbar" id="bar"></div>
|
||||
<section id="main-container">
|
||||
<?php
|
||||
if(!akina_option('head_focus')){
|
||||
@ -126,4 +127,4 @@ window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments)}
|
||||
}else {
|
||||
the_headPattern();
|
||||
} ?>
|
||||
<div id="content" class="site-content">
|
||||
<div id="content" class="site-content">
|
||||
|
BIN
images/avatar.jpeg
Normal file
After Width: | Height: | Size: 900 B |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
BIN
images/hd.png
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 413 KiB |
BIN
images/logo.png
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 56 KiB |
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 65 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 8.9 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 32 KiB |
BIN
images/temp.jpg
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 30 KiB |
@ -17,7 +17,7 @@ class Parsedown
|
||||
{
|
||||
# ~
|
||||
|
||||
const version = '1.7.1';
|
||||
const version = '1.7.4';
|
||||
|
||||
# ~
|
||||
|
||||
@ -429,7 +429,21 @@ class Parsedown
|
||||
|
||||
if (isset($matches[1]))
|
||||
{
|
||||
$class = 'language-'.$matches[1];
|
||||
/**
|
||||
* https://www.w3.org/TR/2011/WD-html5-20110525/elements.html#classes
|
||||
* Every HTML element may have a class attribute specified.
|
||||
* The attribute, if specified, must have a value that is a set
|
||||
* of space-separated tokens representing the various classes
|
||||
* that the element belongs to.
|
||||
* [...]
|
||||
* The space characters, for the purposes of this specification,
|
||||
* are U+0020 SPACE, U+0009 CHARACTER TABULATION (tab),
|
||||
* U+000A LINE FEED (LF), U+000C FORM FEED (FF), and
|
||||
* U+000D CARRIAGE RETURN (CR).
|
||||
*/
|
||||
$language = substr($matches[1], 0, strcspn($matches[1], " \t\n\f\r"));
|
||||
|
||||
$class = 'language-'.$language;
|
||||
|
||||
$Element['attributes'] = array(
|
||||
'class' => $class,
|
||||
@ -1475,22 +1489,41 @@ class Parsedown
|
||||
}
|
||||
}
|
||||
|
||||
$permitRawHtml = false;
|
||||
|
||||
if (isset($Element['text']))
|
||||
{
|
||||
$text = $Element['text'];
|
||||
}
|
||||
// very strongly consider an alternative if you're writing an
|
||||
// extension
|
||||
elseif (isset($Element['rawHtml']))
|
||||
{
|
||||
$text = $Element['rawHtml'];
|
||||
$allowRawHtmlInSafeMode = isset($Element['allowRawHtmlInSafeMode']) && $Element['allowRawHtmlInSafeMode'];
|
||||
$permitRawHtml = !$this->safeMode || $allowRawHtmlInSafeMode;
|
||||
}
|
||||
|
||||
if (isset($text))
|
||||
{
|
||||
$markup .= '>';
|
||||
|
||||
if (!isset($Element['nonNestables']))
|
||||
if (!isset($Element['nonNestables']))
|
||||
{
|
||||
$Element['nonNestables'] = array();
|
||||
}
|
||||
|
||||
if (isset($Element['handler']))
|
||||
{
|
||||
$markup .= $this->{$Element['handler']}($Element['text'], $Element['nonNestables']);
|
||||
$markup .= $this->{$Element['handler']}($text, $Element['nonNestables']);
|
||||
}
|
||||
elseif (!$permitRawHtml)
|
||||
{
|
||||
$markup .= self::escape($text, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
$markup .= self::escape($Element['text'], true);
|
||||
$markup .= $text;
|
||||
}
|
||||
|
||||
$markup .= '</'.$Element['name'].'>';
|
||||
|
BIN
inc/QQWry.Dat
267
inc/api.php
Executable file
@ -0,0 +1,267 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Classes
|
||||
*/
|
||||
include_once('classes/Aplayer.php');
|
||||
include_once('classes/Bilibili.php');
|
||||
include_once('classes/Cache.php');
|
||||
include_once('classes/Images.php');
|
||||
include_once('classes/QQ.php');
|
||||
|
||||
use Sakura\API\Images;
|
||||
use Sakura\API\QQ;
|
||||
use Sakura\API\Cache;
|
||||
|
||||
/**
|
||||
* Router
|
||||
*/
|
||||
add_action('rest_api_init', function () {
|
||||
register_rest_route('sakura/v1', '/image/upload', array(
|
||||
'methods' => 'POST',
|
||||
'callback' => 'upload_image',
|
||||
));
|
||||
register_rest_route('sakura/v1', '/cache_search/json', array(
|
||||
'methods' => 'GET',
|
||||
'callback' => 'cache_search_json',
|
||||
));
|
||||
register_rest_route('sakura/v1', '/image/cover', array(
|
||||
'methods' => 'GET',
|
||||
'callback' => 'cover_gallery',
|
||||
));
|
||||
register_rest_route('sakura/v1', '/image/feature', array(
|
||||
'methods' => 'GET',
|
||||
'callback' => 'feature_gallery',
|
||||
));
|
||||
register_rest_route('sakura/v1', '/database/update', array(
|
||||
'methods' => 'GET',
|
||||
'callback' => 'update_database',
|
||||
));
|
||||
register_rest_route('sakura/v1', '/qqinfo/json', array(
|
||||
'methods' => 'GET',
|
||||
'callback' => 'get_qq_info',
|
||||
));
|
||||
register_rest_route('sakura/v1', '/qqinfo/avatar', array(
|
||||
'methods' => 'GET',
|
||||
'callback' => 'get_qq_avatar',
|
||||
));
|
||||
register_rest_route('sakura/v1', '/bangumi/bilibili', array(
|
||||
'methods' => 'POST',
|
||||
'callback' => 'bgm_bilibili',
|
||||
));
|
||||
register_rest_route('sakura/v1', '/meting/aplayer', array(
|
||||
'methods' => 'GET',
|
||||
'callback' => 'meting_aplayer',
|
||||
));
|
||||
});
|
||||
|
||||
/**
|
||||
* Image uploader response
|
||||
*/
|
||||
function upload_image(WP_REST_Request $request) {
|
||||
// see: https://developer.wordpress.org/rest-api/requests/
|
||||
|
||||
// handle file params $file === $_FILES
|
||||
/**
|
||||
* curl \
|
||||
* -F "filecomment=This is an img file" \
|
||||
* -F "cmt_img_file=@screenshot.jpg" \
|
||||
* https://dev.2heng.xin/wp-json/sakura/v1/image/upload
|
||||
*/
|
||||
// $file = $request->get_file_params();
|
||||
if (!check_ajax_referer('wp_rest', '_wpnonce', false)) {
|
||||
$output = array('status' => 403,
|
||||
'success' => false,
|
||||
'message' => 'Unauthorized client.',
|
||||
'link' => "https://view.moezx.cc/images/2019/11/14/step04.md.png",
|
||||
'proxy' => akina_option('cmt_image_proxy') . "https://view.moezx.cc/images/2019/11/14/step04.md.png",
|
||||
);
|
||||
$result = new WP_REST_Response($output, 403);
|
||||
$result->set_headers(array('Content-Type' => 'application/json'));
|
||||
return $result;
|
||||
}
|
||||
$images = new \Sakura\API\Images();
|
||||
switch (akina_option("img_upload_api")) {
|
||||
case 'imgur':
|
||||
$image = file_get_contents($_FILES["cmt_img_file"]["tmp_name"]);
|
||||
$API_Request = $images->Imgur_API($image);
|
||||
break;
|
||||
case 'smms':
|
||||
$image = $_FILES;
|
||||
$API_Request = $images->SMMS_API($image);
|
||||
break;
|
||||
case 'chevereto':
|
||||
$image = file_get_contents($_FILES["cmt_img_file"]["tmp_name"]);
|
||||
$API_Request = $images->Chevereto_API($image);
|
||||
break;
|
||||
}
|
||||
|
||||
$result = new WP_REST_Response($API_Request, $API_Request['status']);
|
||||
$result->set_headers(array('Content-Type' => 'application/json'));
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* 随机封面图 rest api
|
||||
* @rest api接口路径:https://sakura.2heng.xin/wp-json/sakura/v1/image/cover
|
||||
*/
|
||||
function cover_gallery() {
|
||||
$imgurl = Images::cover_gallery();
|
||||
$data = array('cover image');
|
||||
$response = new WP_REST_Response($data);
|
||||
$response->set_status(302);
|
||||
$response->header('Location', $imgurl);
|
||||
return $response;
|
||||
}
|
||||
|
||||
/*
|
||||
* 随机文章特色图 rest api
|
||||
* @rest api接口路径:https://sakura.2heng.xin/wp-json/sakura/v1/image/feature
|
||||
*/
|
||||
function feature_gallery() {
|
||||
$imgurl = Images::feature_gallery();
|
||||
$data = array('feature image');
|
||||
$response = new WP_REST_Response($data);
|
||||
$response->set_status(302);
|
||||
$response->header('Location', $imgurl);
|
||||
return $response;
|
||||
}
|
||||
|
||||
/*
|
||||
* update database rest api
|
||||
* @rest api接口路径:https://sakura.2heng.xin/wp-json/sakura/v1/database/update
|
||||
*/
|
||||
function update_database() {
|
||||
if (akina_option('cover_cdn_options') == "type_1") {
|
||||
$output = Cache::update_database();
|
||||
$result = new WP_REST_Response($output, 200);
|
||||
return $result;
|
||||
} else {
|
||||
return new WP_REST_Response("Invalid access", 200);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* 定制实时搜索 rest api
|
||||
* @rest api接口路径:https://sakura.2heng.xin/wp-json/sakura/v1/cache_search/json
|
||||
* @可在cache_search_json()函数末尾通过设置 HTTP header 控制 json 缓存时间
|
||||
*/
|
||||
function cache_search_json() {
|
||||
if (!check_ajax_referer('wp_rest', '_wpnonce', false)) {
|
||||
$output = array(
|
||||
'status' => 403,
|
||||
'success' => false,
|
||||
'message' => 'Unauthorized client.'
|
||||
);
|
||||
$result = new WP_REST_Response($output, 403);
|
||||
} else {
|
||||
$output = Cache::search_json();
|
||||
$result = new WP_REST_Response($output, 200);
|
||||
}
|
||||
$result->set_headers(
|
||||
array(
|
||||
'Content-Type' => 'application/json',
|
||||
'Cache-Control' => 'max-age=3600', // json 缓存控制
|
||||
)
|
||||
);
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* QQ info
|
||||
* https://sakura.2heng.xin/wp-json/sakura/v1/qqinfo/json
|
||||
*/
|
||||
function get_qq_info(WP_REST_Request $request) {
|
||||
if (!check_ajax_referer('wp_rest', '_wpnonce', false)) {
|
||||
$output = array(
|
||||
'status' => 403,
|
||||
'success' => false,
|
||||
'message' => 'Unauthorized client.'
|
||||
);
|
||||
} elseif ($_GET['qq']) {
|
||||
$qq = $_GET['qq'];
|
||||
$output = QQ::get_qq_info($qq);
|
||||
} else {
|
||||
$output = array(
|
||||
'status' => 400,
|
||||
'success' => false,
|
||||
'message' => 'Bad Request'
|
||||
);
|
||||
}
|
||||
|
||||
$result = new WP_REST_Response($output, $output['status']);
|
||||
$result->set_headers(array('Content-Type' => 'application/json'));
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* QQ头像链接解密
|
||||
* https://sakura.2heng.xin/wp-json/sakura/v1/qqinfo/avatar
|
||||
*/
|
||||
function get_qq_avatar() {
|
||||
$encrypted = $_GET["qq"];
|
||||
$imgurl = QQ::get_qq_avatar($encrypted);
|
||||
if (akina_option('qq_avatar_link') == 'type_2') {
|
||||
$imgdata = file_get_contents($imgurl);
|
||||
$response = new WP_REST_Response();
|
||||
$response->set_headers(array(
|
||||
'Content-Type' => 'image/jpeg',
|
||||
'Cache-Control' => 'max-age=86400'
|
||||
));
|
||||
echo $imgdata;
|
||||
} else {
|
||||
$response = new WP_REST_Response();
|
||||
$response->set_status(301);
|
||||
$response->header('Location', $imgurl);
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
function bgm_bilibili() {
|
||||
if (!check_ajax_referer('wp_rest', '_wpnonce', false)) {
|
||||
$output = array(
|
||||
'status' => 403,
|
||||
'success' => false,
|
||||
'message' => 'Unauthorized client.'
|
||||
);
|
||||
$response = new WP_REST_Response($output, 403);
|
||||
} else {
|
||||
$page = $_GET["page"] ?: 2;
|
||||
$bgm = new \Sakura\API\Bilibili();
|
||||
$html = preg_replace("/\s+|\n+|\r/", ' ', $bgm->get_bgm_items($page));
|
||||
$response = new WP_REST_Response($html, 200);
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
function meting_aplayer() {
|
||||
$type = $_GET['type'];
|
||||
$id = $_GET['id'];
|
||||
$wpnonce = $_GET['_wpnonce'];
|
||||
$meting_pnonce = $_GET['meting_pnonce'];
|
||||
if ((isset($wpnonce) && !check_ajax_referer('wp_rest', $wpnonce, false)) || (isset($nonce) && !wp_verify_nonce($nonce, $type . '#:' . $id))) {
|
||||
$output = array(
|
||||
'status' => 403,
|
||||
'success' => false,
|
||||
'message' => 'Unauthorized client.'
|
||||
);
|
||||
$response = new WP_REST_Response($output, 403);
|
||||
} else {
|
||||
$Meting_API = new \Sakura\API\Aplayer();
|
||||
$data = $Meting_API->get_data($type, $id);
|
||||
if ($type === 'playlist') {
|
||||
$response = new WP_REST_Response($data, 200);
|
||||
$response->set_headers(array('cache-control' => 'max-age=3600'));
|
||||
} elseif ($type === 'lyric') {
|
||||
$response = new WP_REST_Response();
|
||||
$response->set_headers(array('cache-control' => 'max-age=3600'));
|
||||
echo $data;
|
||||
} else {
|
||||
$response = new WP_REST_Response();
|
||||
$response->set_status(301);
|
||||
$response->header('Location', $data);
|
||||
}
|
||||
}
|
||||
return $response;
|
||||
}
|
@ -42,10 +42,10 @@ function z_add_texonomy_field() {
|
||||
}
|
||||
|
||||
echo '<div class="form-field">
|
||||
<label for="taxonomy_image">' . __('分类/标签图像', 'categories-images') . '</label>
|
||||
<label for="taxonomy_image">' . __('category/tag image', 'sakura') /*分类/标签图像*/. '</label>
|
||||
<input type="text" name="taxonomy_image" id="taxonomy_image" value="" />
|
||||
<br/>
|
||||
<button class="z_upload_image_button button">' . __('添加图像', 'categories-images') . '</button>
|
||||
<button class="z_upload_image_button button">' . __('add image', 'sakura') /*添加图像*/. '</button>
|
||||
</div>'.z_script();
|
||||
}
|
||||
|
||||
@ -63,10 +63,10 @@ function z_edit_texonomy_field($taxonomy) {
|
||||
else
|
||||
$image_url = z_taxonomy_image_url( $taxonomy->term_id, NULL, TRUE );
|
||||
echo '<tr class="form-field">
|
||||
<th scope="row" valign="top"><label for="taxonomy_image">' . __('分类/标签图像', 'categories-images') . '</label></th>
|
||||
<th scope="row" valign="top"><label for="taxonomy_image">' .__('category/tag image', 'sakura') /*分类/标签图像*/. '</label></th>
|
||||
<td><img class="taxonomy-image" src="' . z_taxonomy_image_url( $taxonomy->term_id, 'medium', TRUE ) . '"/><br/><input type="text" name="taxonomy_image" id="taxonomy_image" value="'.$image_url.'" /><br />
|
||||
<button class="z_upload_image_button button">' . __('添加图像', 'categories-images') . '</button>
|
||||
<button class="z_remove_image_button button">' . __('删除图像', 'categories-images') . '</button>
|
||||
<button class="z_upload_image_button button">' . __('add image', 'sakura') /*添加图像*/. '</button>
|
||||
<button class="z_remove_image_button button">' . __('remove image', 'sakura') /*删除图像*/. '</button>
|
||||
</td>
|
||||
</tr>'.z_script();
|
||||
}
|
||||
@ -194,8 +194,8 @@ function z_quick_edit_custom_box($column_name, $screen, $name) {
|
||||
<span class="title"><img src="" alt="暂无"/></span>
|
||||
<span class="input-text-wrap"><input type="text" name="taxonomy_image" value="" class="tax_list" /></span>
|
||||
<span class="input-text-wrap">
|
||||
<button class="z_upload_image_button button">' . __('添加图像', 'categories-images') . '</button>
|
||||
<button class="z_remove_image_button button">' . __('删除图像', 'categories-images') . '</button>
|
||||
<button class="z_upload_image_button button">' . __('add image', 'sakura') /*添加图像*/. '</button>
|
||||
<button class="z_remove_image_button button">' . __('remove image', 'sakura') /*删除图像*/. '</button>
|
||||
</span>
|
||||
</label>
|
||||
</div>
|
||||
@ -208,7 +208,7 @@ function z_quick_edit_custom_box($column_name, $screen, $name) {
|
||||
function z_taxonomy_columns( $columns ) {
|
||||
$new_columns = array();
|
||||
$new_columns['cb'] = $columns['cb'];
|
||||
$new_columns['thumb'] = __('图像', 'categories-images');
|
||||
$new_columns['thumb'] = __('image', 'sakura')/*图像*/;
|
||||
|
||||
unset( $columns['cb'] );
|
||||
|
||||
@ -220,7 +220,7 @@ function z_taxonomy_columns( $columns ) {
|
||||
*/
|
||||
function z_taxonomy_column( $columns, $column, $id ) {
|
||||
if ( $column == 'thumb' )
|
||||
$columns = '<span><img src="' . z_taxonomy_image_url($id, 'thumbnail', TRUE) . '" alt="' . __('暂无', 'categories-images') . '" class="wp-post-image" /></span>';
|
||||
$columns = '<span><img src="' . z_taxonomy_image_url($id, 'thumbnail', TRUE) . '" alt="' . __('no image', 'sakura') /*暂无*/. '" class="wp-post-image" /></span>';
|
||||
|
||||
return $columns;
|
||||
}
|
||||
|
156
inc/classes/Aplayer.php
Normal file
@ -0,0 +1,156 @@
|
||||
<?php
|
||||
|
||||
namespace Sakura\API;
|
||||
|
||||
class Aplayer
|
||||
{
|
||||
public $server;
|
||||
public $playlist_id;
|
||||
private $cookies;
|
||||
public $api_url;
|
||||
|
||||
public function __construct() {
|
||||
$this->server = akina_option('aplayer_server');
|
||||
$this->playlist_id = akina_option('aplayer_playlistid');
|
||||
$this->cookies = akina_option('aplayer_cookie');
|
||||
$this->api_url = rest_url('sakura/v1/meting/aplayer');
|
||||
require('Meting.php');
|
||||
}
|
||||
|
||||
public function get_data($type, $id) {
|
||||
$server = $this->server;
|
||||
$cookies = $this->cookies;
|
||||
$playlist_id = $this->playlist_id;
|
||||
$api = new \Sakura\API\Meting($server);
|
||||
if (!empty($cookies) && $server === "netease") $api->cookie($cookies);
|
||||
switch ($type) {
|
||||
case 'song':
|
||||
$data = $api->format(true)->song($id);
|
||||
$data = json_decode($data, true)["url"];
|
||||
$data = $this->song_url($data);
|
||||
break;
|
||||
// case 'album':
|
||||
// $data = $api->format(true)->album($id);
|
||||
// $data=json_decode($data, true)["url"];
|
||||
// break;
|
||||
case 'playlist':
|
||||
$data = $api->format(true)->playlist($playlist_id);
|
||||
$data = $this->format_playlist($data);
|
||||
break;
|
||||
case 'lyric':
|
||||
$data = $api->format(true)->lyric($id);
|
||||
$data = $this->format_lyric($data);
|
||||
break;
|
||||
case 'pic':
|
||||
$data = $api->format(true)->pic($id);
|
||||
$data = json_decode($data, true)["url"];
|
||||
break;
|
||||
// case 'search':
|
||||
// $data = $api->format(true)->search($id);
|
||||
// $data=json_decode($data, true);
|
||||
// break;
|
||||
default:
|
||||
$data = $api->format(true)->url($id);
|
||||
$data = json_decode($data, true)["url"];
|
||||
$data = $this->song_url($data);
|
||||
break;
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
private function format_playlist($data) {
|
||||
$server = $this->server;
|
||||
$api_url = $this->api_url;
|
||||
$data = json_decode($data);
|
||||
$playlist = array();
|
||||
foreach ((array)$data as $value) {
|
||||
$name = $value->name;
|
||||
$artists = implode(" / ", (array)$value->artist);
|
||||
$mp3_url = "$api_url?server=$server&type=url&id=" . $value->url_id . '&meting_nonce=' . wp_create_nonce('url#:' . $value->url_id);
|
||||
$cover = "$api_url?server=$server&type=pic&id=" . $value->pic_id . '&meting_nonce=' . wp_create_nonce('pic#:' . $value->url_id);
|
||||
$lyric = "$api_url?server=$server&type=lyric&id=" . $value->lyric_id . '&meting_nonce=' . wp_create_nonce('lyric#:' . $value->url_id);
|
||||
$playlist[] = array(
|
||||
"name" => $name,
|
||||
"artist" => $artists,
|
||||
"url" => $mp3_url,
|
||||
"cover" => $cover,
|
||||
"lrc" => $lyric
|
||||
);
|
||||
}
|
||||
return $playlist;
|
||||
}
|
||||
|
||||
private function song_url($url){
|
||||
$server = $this->server;
|
||||
if ($server == 'netease') {
|
||||
$url = str_replace('://m7c.', '://m7.', $url);
|
||||
$url = str_replace('://m8c.', '://m8.', $url);
|
||||
$url = str_replace('http://m8.', 'https://m9.', $url);
|
||||
$url = str_replace('http://m7.', 'https://m9.', $url);
|
||||
$url = str_replace('http://m10.', 'https://m10.', $url);
|
||||
}elseif ($server == 'xiami') {
|
||||
$url = str_replace('http://', 'https://', $url);
|
||||
}elseif ($server == 'baidu') {
|
||||
$url = str_replace('http://zhangmenshiting.qianqian.com', 'https://gss3.baidu.com/y0s1hSulBw92lNKgpU_Z2jR7b2w6buu', $url);
|
||||
}else{
|
||||
$url = $url;
|
||||
}
|
||||
return $url;
|
||||
}
|
||||
|
||||
private function format_lyric($data) {
|
||||
$server = $this->server;
|
||||
$data = json_decode($data, true);
|
||||
$data = $this->lrctran($data['lyric'], $data['tlyric']);
|
||||
if (empty($data)) {
|
||||
$data = "[00:00.000]此歌曲暂无歌词,请您欣赏";
|
||||
}
|
||||
if ($server === 'tencent') {
|
||||
$data = html_entity_decode($data, ENT_QUOTES | ENT_HTML5);
|
||||
}
|
||||
return $data;
|
||||
}
|
||||
|
||||
private function lrctran($lyric, $tlyric) {
|
||||
$lyric = $this->lrctrim($lyric);
|
||||
$tlyric = $this->lrctrim($tlyric);
|
||||
$len1 = count($lyric);
|
||||
$len2 = count($tlyric);
|
||||
$result = "";
|
||||
for ($i = 0, $j = 0; $i < $len1 && $j < $len2; $i++) {
|
||||
while ($lyric[$i][0] > $tlyric[$j][0] && $j + 1 < $len2) {
|
||||
$j++;
|
||||
}
|
||||
if ($lyric[$i][0] == $tlyric[$j][0]) {
|
||||
$tlyric[$j][2] = str_replace('/', '', $tlyric[$j][2]);
|
||||
if (!empty($tlyric[$j][2])) {
|
||||
$lyric[$i][2] .= " ({$tlyric[$j][2]})";
|
||||
}
|
||||
$j++;
|
||||
}
|
||||
}
|
||||
for ($i = 0; $i < $len1; $i++) {
|
||||
$t = $lyric[$i][0];
|
||||
$result .= sprintf("[%02d:%02d.%03d]%s\n", $t / 60000, $t % 60000 / 1000, $t % 1000, $lyric[$i][2]);
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
private function lrctrim($lyrics) {
|
||||
$lyrics = explode("\n", $lyrics);
|
||||
$data = array();
|
||||
foreach ($lyrics as $key => $lyric) {
|
||||
preg_match('/\[(\d{2}):(\d{2}[\.:]?\d*)]/', $lyric, $lrcTimes);
|
||||
$lrcText = preg_replace('/\[(\d{2}):(\d{2}[\.:]?\d*)]/', '', $lyric);
|
||||
if (empty($lrcTimes)) {
|
||||
continue;
|
||||
}
|
||||
$lrcTimes = intval($lrcTimes[1]) * 60000 + intval(floatval($lrcTimes[2]) * 1000);
|
||||
$lrcText = preg_replace('/\s\s+/', ' ', $lrcText);
|
||||
$lrcText = trim($lrcText);
|
||||
$data[] = array($lrcTimes, $key, $lrcText);
|
||||
}
|
||||
sort($data);
|
||||
return $data;
|
||||
}
|
||||
}
|
68
inc/classes/Bilibili.php
Normal file
@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
namespace Sakura\API;
|
||||
|
||||
class Bilibili
|
||||
{
|
||||
private $uid;
|
||||
private $cookies;
|
||||
|
||||
public function __construct() {
|
||||
$this->uid = akina_option('bilibili_id');
|
||||
$this->cookies = akina_option('bilibili_cookie');
|
||||
}
|
||||
|
||||
public function get_the_bgm_items($page = 1) {
|
||||
$uid = $this->uid;
|
||||
$cookies = $this->cookies;
|
||||
$url = 'https://api.bilibili.com/x/space/bangumi/follow/list?type=1&pn=' . $page . '&ps=15&follow_status=0&vmid=' . $uid;
|
||||
$args = array(
|
||||
'headers' => array(
|
||||
'Cookie' => $cookies,
|
||||
'Host' => 'api.bilibili.com',
|
||||
'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97'
|
||||
)
|
||||
);
|
||||
$response = wp_remote_get($url, $args);
|
||||
$bgmdata = json_decode($response["body"])->data;
|
||||
return json_encode($bgmdata);
|
||||
}
|
||||
|
||||
public function get_bgm_items($page = 1) {
|
||||
$bgm = json_decode($this->get_the_bgm_items($page), true);
|
||||
$totalpage = $bgm["total"] / 15;
|
||||
if ($totalpage - $page < 0) {
|
||||
$next = '<span>共追番' . $bgm["total"] . '部,继续加油吧!٩(ˊᗜˋ*)و</span>';
|
||||
} else {
|
||||
$next = '<a class="bangumi-next" href="' . rest_url('sakura/v1/bangumi/bilibili') . '?page=' . ++$page . '"><i class="fa fa-bolt" aria-hidden="true"></i> NEXT </a>';
|
||||
}
|
||||
$lists = $bgm["list"];
|
||||
$html = "";
|
||||
foreach ((array)$lists as $list) {
|
||||
if (preg_match('/看完/m', $list["progress"], $matches_finish)) {
|
||||
$percent = 100;
|
||||
} else {
|
||||
preg_match('/第(\d+)./m', $list['progress'], $matches_progress);
|
||||
preg_match('/第(\d+)./m', $list["new_ep"]['index_show'], $matches_new);
|
||||
$progress = is_numeric($matches_progress[1]) ? $matches_progress[1] : 0;
|
||||
$total = is_numeric($matches_new[1]) ? $matches_new[1] : $list['total_count'];
|
||||
$percent = $progress / $total * 100;
|
||||
}
|
||||
$html .= '<div class="column">
|
||||
<a class="bangumi-item" href="https://bangumi.bilibili.com/anime/' . $list['season_id'] . '/" target="_blank" rel="nofollow">
|
||||
<img class="bangumi-image" src="' . str_replace('http://', 'https://', $list['cover']) . '"/>
|
||||
<div class="bangumi-info">
|
||||
<h3 class="bangumi-title" title="' . $list['title'] . '">' . $list['title'] . '</h2>
|
||||
<div class="bangumi-summary"> ' . $list['evaluate'] . ' </div>
|
||||
<div class="bangumi-status">
|
||||
<div class="bangumi-status-bar" style="width: ' . $percent . '%"></div>
|
||||
<p>' . $list['new_ep']['index_show'] . '</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>';
|
||||
}
|
||||
$html .= '</div><br><div id="bangumi-pagination">' . $next . '</div>';
|
||||
return $html;
|
||||
}
|
||||
}
|
103
inc/classes/Cache.php
Normal file
@ -0,0 +1,103 @@
|
||||
<?php
|
||||
|
||||
namespace Sakura\API;
|
||||
|
||||
class Cache
|
||||
{
|
||||
public static function search_json() {
|
||||
global $more;
|
||||
$vowels = array("[", "{", "]", "}", "<", ">", "\r\n", "\r", "\n", "-", "'", '"', '`', " ", ":", ";", '\\', " ", "toc");
|
||||
$regex = <<<EOS
|
||||
/<\/?[a-zA-Z]+("[^"]*"|'[^']*'|[^'">])*>|begin[\S\s]*\/begin|hermit[\S\s]*\/hermit|img[\S\s]*\/img|{{.*?}}|:.*?:/m
|
||||
EOS;
|
||||
$more = 1;
|
||||
$output = array();
|
||||
|
||||
$posts = new \WP_Query('posts_per_page=-1&post_status=publish&post_type=post');
|
||||
while ($posts->have_posts()): $posts->the_post();
|
||||
$output[] = array(
|
||||
"type" => "post",
|
||||
"link" => get_permalink(),
|
||||
"title" => get_the_title(),
|
||||
"comments" => get_comments_number('0', '1', '%'),
|
||||
"text" => str_replace($vowels, " ", preg_replace($regex, ' ', apply_filters('the_content', get_the_content())))
|
||||
);
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
|
||||
$pages = new \WP_Query('posts_per_page=-1&post_status=publish&post_type=page');
|
||||
while ($pages->have_posts()): $pages->the_post();
|
||||
$output[] = array(
|
||||
"type" => "page",
|
||||
"link" => get_permalink(),
|
||||
"title" => get_the_title(),
|
||||
"comments" => get_comments_number('0', '1', '%'),
|
||||
"text" => str_replace($vowels, " ", preg_replace($regex, ' ', apply_filters('the_content', get_the_content())))
|
||||
);
|
||||
endwhile;
|
||||
wp_reset_postdata();
|
||||
|
||||
$tags = get_tags();
|
||||
foreach ($tags as $tag) {
|
||||
$output[] = array(
|
||||
"type" => "tag",
|
||||
"link" => get_term_link($tag),
|
||||
"title" => $tag->name,
|
||||
"comments" => "",
|
||||
"text" => ""
|
||||
);
|
||||
}
|
||||
|
||||
$categories = get_categories();
|
||||
foreach ($categories as $category) {
|
||||
$output[] = array(
|
||||
"type" => "category",
|
||||
"link" => get_term_link($category),
|
||||
"title" => $category->name,
|
||||
"comments" => "",
|
||||
"text" => ""
|
||||
);
|
||||
}
|
||||
if (akina_option('live_search_comment')) {
|
||||
$comments = get_comments();
|
||||
foreach ($comments as $comment) {
|
||||
$is_private = get_comment_meta($comment->comment_ID, '_private', true);
|
||||
$output[] = array(
|
||||
"type" => "comment",
|
||||
"link" => get_comment_link($comment),
|
||||
"title" => get_the_title($comment->comment_post_ID),
|
||||
"comments" => "",
|
||||
"text" => $is_private ? ($comment->comment_author . ": " . __('The comment is private', 'sakura')) : str_replace($vowels, ' ', preg_replace($regex, ' ', $comment->comment_author . ":" . $comment->comment_content))
|
||||
);
|
||||
}
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
||||
public static function update_database() {
|
||||
global $wpdb;
|
||||
$sakura_table_name = $wpdb->base_prefix . 'sakura';
|
||||
$img_domain = akina_option('cover_cdn') ? akina_option('cover_cdn') : get_template_directory();
|
||||
$manifest = file_get_contents($img_domain . "/manifest/manifest.json");
|
||||
if ($manifest) {
|
||||
$manifest = array(
|
||||
"mate_key" => "manifest_json",
|
||||
"mate_value" => $manifest
|
||||
);
|
||||
$time = array(
|
||||
"mate_key" => "json_time",
|
||||
"mate_value" => date("Y-m-d H:i:s", time())
|
||||
);
|
||||
|
||||
$wpdb->query("DELETE FROM $sakura_table_name WHERE `mate_key` ='manifest_json'");
|
||||
$wpdb->query("DELETE FROM $sakura_table_name WHERE `mate_key` ='json_time'");
|
||||
$wpdb->insert($sakura_table_name, $manifest);
|
||||
$wpdb->insert($sakura_table_name, $time);
|
||||
$output = "manifest.json has been stored into database.";
|
||||
} else {
|
||||
$output = "manifest.json not found, please ensure your url ($img_domain) is corrent.";
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
}
|
174
inc/classes/Images.php
Normal file
@ -0,0 +1,174 @@
|
||||
<?php
|
||||
|
||||
namespace Sakura\API;
|
||||
|
||||
class Images
|
||||
{
|
||||
private $chevereto_api_key;
|
||||
private $imgur_client_id;
|
||||
private $smms_client_id;
|
||||
|
||||
public function __construct() {
|
||||
$this->chevereto_api_key = akina_option('chevereto_api_key');
|
||||
$this->imgur_client_id = akina_option('imgur_client_id');
|
||||
$this->smms_client_id = akina_option('smms_client_id');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Chevereto upload interface
|
||||
*/
|
||||
public function Chevereto_API($image) {
|
||||
$upload_url = akina_option('cheverto_url') . '/api/1/upload';
|
||||
$args = array(
|
||||
'body' => array(
|
||||
'source' => base64_encode($image),
|
||||
'key' => $this->chevereto_api_key,
|
||||
),
|
||||
);
|
||||
|
||||
$response = wp_remote_post($upload_url, $args);
|
||||
$reply = json_decode($response["body"]);
|
||||
|
||||
if ($reply->status_txt == 'OK' && $reply->status_code == 200) {
|
||||
$status = 200;
|
||||
$success = true;
|
||||
$message = "success";
|
||||
$link = $reply->image->image->url;
|
||||
$proxy = akina_option('cmt_image_proxy') . $link;
|
||||
} else {
|
||||
$status = $reply->status_code;
|
||||
$success = false;
|
||||
$message = $reply->error->message;
|
||||
$link = 'https://view.moezx.cc/images/2019/10/28/default_d_h_large.gif';
|
||||
$proxy = akina_option('cmt_image_proxy') . $link;
|
||||
}
|
||||
$output = array(
|
||||
'status' => $status,
|
||||
'success' => $success,
|
||||
'message' => $message,
|
||||
'link' => $link,
|
||||
'proxy' => $proxy,
|
||||
);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Imgur upload interface
|
||||
*/
|
||||
public function Imgur_API($image) {
|
||||
$upload_url = akina_option('imgur_upload_image_proxy');
|
||||
$args = array(
|
||||
'headers' => array(
|
||||
'Authorization' => 'Client-ID ' . $this->imgur_client_id,
|
||||
),
|
||||
'body' => array(
|
||||
'image' => base64_encode($image),
|
||||
),
|
||||
);
|
||||
|
||||
$response = wp_remote_post($upload_url, $args);
|
||||
$reply = json_decode($response["body"]);
|
||||
|
||||
if ($reply->success && $reply->status == 200) {
|
||||
$status = 200;
|
||||
$success = true;
|
||||
$message = "success";
|
||||
$link = $reply->data->link;
|
||||
$proxy = akina_option('cmt_image_proxy') . $link;
|
||||
} else {
|
||||
$status = $reply->status;
|
||||
$success = false;
|
||||
$message = $reply->data->error;
|
||||
$link = 'https://view.moezx.cc/images/2019/10/28/default_d_h_large.gif';
|
||||
$proxy = akina_option('cmt_image_proxy') . $link;
|
||||
}
|
||||
$output = array(
|
||||
'status' => $status,
|
||||
'success' => $success,
|
||||
'message' => $message,
|
||||
'link' => $link,
|
||||
'proxy' => $proxy,
|
||||
);
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* smms upload interface
|
||||
*/
|
||||
public function SMMS_API($image) {
|
||||
$client_id = $this->smms_client_id;
|
||||
$upload_url = "https://sm.ms/api/v2/upload";
|
||||
$filename = $image['cmt_img_file']['name'];
|
||||
$filedata = $image['cmt_img_file']['tmp_name'];
|
||||
$Boundary = wp_generate_password();
|
||||
$bits = file_get_contents($filedata);
|
||||
|
||||
$args = array(
|
||||
"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",
|
||||
"body" => "--$Boundary\r\nContent-Disposition: form-data; name=\"smfile\"; filename=\"$filename\"\r\n\r\n$bits\r\n\r\n--$Boundary--"
|
||||
);
|
||||
|
||||
$response = wp_remote_post($upload_url, $args);
|
||||
$reply = json_decode($response["body"]);
|
||||
|
||||
if ($reply->success && $reply->code == 'success') {
|
||||
$status = 200;
|
||||
$success = true;
|
||||
$message = $reply->message;
|
||||
$link = $reply->data->url;
|
||||
$proxy = akina_option('cmt_image_proxy') . $link;
|
||||
} else if (preg_match("/Image upload repeated limit/i", $reply->message, $matches)) {
|
||||
$status = 200; // sm.ms 接口不规范,建议检测到重复的情况下返回标准化的 code,并单独把 url 放进一个字段
|
||||
$success = true;
|
||||
$message = $reply->message;
|
||||
$link = str_replace('Image upload repeated limit, this image exists at: ', '', $reply->message);
|
||||
$proxy = akina_option('cmt_image_proxy') . $link;
|
||||
} else {
|
||||
$status = 400;
|
||||
$success = false;
|
||||
$message = $reply->message;
|
||||
$link = 'https://view.moezx.cc/images/2019/10/28/default_d_h_large.gif';
|
||||
$proxy = akina_option('cmt_image_proxy') . $link;
|
||||
}
|
||||
$output = array(
|
||||
'status' => $status,
|
||||
'success' => $success,
|
||||
'message' => $message,
|
||||
'link' => $link,
|
||||
'proxy' => $proxy,
|
||||
);
|
||||
return $output;
|
||||
}
|
||||
|
||||
public static function cover_gallery() {
|
||||
if (akina_option('cover_cdn_options') == "type_2") {
|
||||
$img_array = glob(get_template_directory() . "/manifest/gallary/*.{gif,jpg,png}", GLOB_BRACE);
|
||||
$img = array_rand($img_array);
|
||||
$imgurl = trim($img_array[$img]);
|
||||
$imgurl = str_replace(get_template_directory(), get_template_directory_uri(), $imgurl);
|
||||
} elseif (akina_option('cover_cdn_options') == "type_3") {
|
||||
$imgurl = akina_option('cover_cdn');
|
||||
} else {
|
||||
global $sakura_image_array;
|
||||
$img_array = json_decode($sakura_image_array, true);
|
||||
$img = array_rand($img_array);
|
||||
$img_domain = akina_option('cover_cdn') ? akina_option('cover_cdn') : get_template_directory_uri();
|
||||
if (strpos($_SERVER['HTTP_ACCEPT'], 'image/webp') !== false) {
|
||||
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["webp"][0];
|
||||
} else {
|
||||
$imgurl = $img_domain . "/manifest/" . $img_array[$img]["jpeg"][0];
|
||||
}
|
||||
}
|
||||
return $imgurl;
|
||||
}
|
||||
|
||||
public static function feature_gallery() {
|
||||
if (akina_option('post_cover_options') == "type_2") {
|
||||
$imgurl = akina_option('post_cover');
|
||||
} else {
|
||||
$imgurl = self::cover_gallery();
|
||||
}
|
||||
return $imgurl;
|
||||
}
|
||||
}
|
1365
inc/classes/Meting.php
Executable file
40
inc/classes/QQ.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
namespace Sakura\API;
|
||||
|
||||
class QQ
|
||||
{
|
||||
public static function get_qq_info($qq) {
|
||||
$get_info = file_get_contents('http://r.qzone.qq.com/fcg-bin/cgi_get_portrait.fcg?get_nick=1&uins=' . $qq);
|
||||
$get_info = mb_convert_encoding($get_info, "UTF-8", "GBK");
|
||||
$name = json_decode(substr($get_info, 17, -1), true);
|
||||
if ($name) {
|
||||
$output = array(
|
||||
'status' => 200,
|
||||
'success' => true,
|
||||
'message' => 'success',
|
||||
'avatar' => 'https://q.qlogo.cn/headimg_dl?dst_uin=' . $qq . '&spec=100',
|
||||
'name' => $name[$qq][6],
|
||||
);
|
||||
} else {
|
||||
$output = array(
|
||||
'status' => 404,
|
||||
'success' => false,
|
||||
'message' => 'QQ number not exist.'
|
||||
);
|
||||
}
|
||||
return $output;
|
||||
}
|
||||
|
||||
public static function get_qq_avatar($encrypted) {
|
||||
global $sakura_privkey;
|
||||
if (isset($encrypted)) {
|
||||
$iv = str_repeat($sakura_privkey, 2);
|
||||
$encrypted = base64_decode(urldecode($encrypted));
|
||||
$qq_number = openssl_decrypt($encrypted, 'aes-128-cbc', $sakura_privkey, 0, $iv);
|
||||
preg_match('/^\d{3,}$/', $qq_number, $matches);
|
||||
$imgurl = 'https://q2.qlogo.cn/headimg_dl?dst_uin=' . $matches[0] . '&spec=100';
|
||||
return $imgurl;
|
||||
}
|
||||
}
|
||||
}
|
79
inc/css/dashboard-fix.css
Normal file
@ -0,0 +1,79 @@
|
||||
/* emotion²»ºÍ¾ßÐÞÕý*/
|
||||
/*bilibili񡀂*/
|
||||
.emotion-box {
|
||||
padding-left: 16px;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
display: none;
|
||||
}
|
||||
.emotion-inline {
|
||||
padding-left: 0px !important;
|
||||
padding-right: 0px !important;
|
||||
}
|
||||
.emotion-item {
|
||||
margin: 6px;
|
||||
display: inline-block;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
overflow: hidden;
|
||||
border-radius: 4px;
|
||||
margin-bottom: -8px;
|
||||
}
|
||||
.emotion-secter {
|
||||
margin: 12px 12px 0 0;
|
||||
}
|
||||
@media (max-width: 860px) {
|
||||
.emotion-box {
|
||||
padding-left: 0;
|
||||
}
|
||||
.emotion-item {
|
||||
transform: scale(0.6);
|
||||
margin-bottom: -10px;
|
||||
}
|
||||
.emotion-secter {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.emotion-item .img {
|
||||
-webkit-animation: im-emotion-step 1.08s steps(27) infinite;
|
||||
animation: im-emotion-step 1.08s steps(27) infinite;
|
||||
animation-duration: 1.08s;
|
||||
animation-timing-function: steps(27);
|
||||
}
|
||||
|
||||
.emotion-item .img {
|
||||
width: 32px;
|
||||
height: 864px;
|
||||
max-width: 32px;
|
||||
background: top/32px no-repeat;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
@-webkit-keyframes im-emotion-step {
|
||||
0% {
|
||||
-webkit-transform:translateY(0);
|
||||
transform:translateY(0)
|
||||
}
|
||||
to {
|
||||
-webkit-transform:translateY(-100%);
|
||||
transform:translateY(-100%)
|
||||
}
|
||||
}
|
||||
@keyframes im-emotion-step {
|
||||
0% {
|
||||
-webkit-transform:translateY(0);
|
||||
transform:translateY(0)
|
||||
}
|
||||
to {
|
||||
-webkit-transform:translateY(-100%);
|
||||
transform:translateY(-100%)
|
||||
}
|
||||
}
|
@ -72,84 +72,4 @@ tr {
|
||||
|
||||
.wp-submenu .wp-submenu-wrap {
|
||||
background: #ffffff !important;
|
||||
}
|
||||
|
||||
// emotion²»ºÍ¾ßÐÞÕý
|
||||
/*bilibili񡀂*/
|
||||
.emotion-box {
|
||||
padding-left: 16px;
|
||||
display: -webkit-box;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-orient: horizontal;
|
||||
-webkit-box-direction: normal;
|
||||
-ms-flex-direction: row;
|
||||
flex-direction: row;
|
||||
-ms-flex-wrap: wrap;
|
||||
flex-wrap: wrap;
|
||||
display: none;
|
||||
}
|
||||
.emotion-inline {
|
||||
padding-left: 0px !important;
|
||||
padding-right: 0px !important;
|
||||
}
|
||||
.emotion-item {
|
||||
margin: 6px;
|
||||
display: inline-block;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
overflow: hidden;
|
||||
border-radius: 4px;
|
||||
margin-bottom: -8px;
|
||||
}
|
||||
.emotion-secter {
|
||||
margin: 12px 12px 0 0;
|
||||
}
|
||||
@media (max-width: 860px) {
|
||||
.emotion-box {
|
||||
padding-left: 0;
|
||||
}
|
||||
.emotion-item {
|
||||
transform: scale(0.6);
|
||||
margin-bottom: -10px;
|
||||
}
|
||||
.emotion-secter {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.emotion-item .img {
|
||||
-webkit-animation: im-emotion-step 1.08s steps(27) infinite;
|
||||
animation: im-emotion-step 1.08s steps(27) infinite;
|
||||
animation-duration: 1.08s;
|
||||
animation-timing-function: steps(27);
|
||||
}
|
||||
|
||||
.emotion-item .img {
|
||||
width: 32px;
|
||||
height: 864px;
|
||||
max-width: 32px;
|
||||
background: top/32px no-repeat;
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
@-webkit-keyframes im-emotion-step {
|
||||
0% {
|
||||
-webkit-transform:translateY(0);
|
||||
transform:translateY(0)
|
||||
}
|
||||
to {
|
||||
-webkit-transform:translateY(-100%);
|
||||
transform:translateY(-100%)
|
||||
}
|
||||
}
|
||||
@keyframes im-emotion-step {
|
||||
0% {
|
||||
-webkit-transform:translateY(0);
|
||||
transform:translateY(0)
|
||||
}
|
||||
to {
|
||||
-webkit-transform:translateY(-100%);
|
||||
transform:translateY(-100%)
|
||||
}
|
||||
}
|
@ -8,7 +8,7 @@ body {
|
||||
|
||||
.nav-tab-wrapper {
|
||||
position: relative;
|
||||
max-width: 860px;
|
||||
max-width: 900px;
|
||||
margin: auto !important;
|
||||
}
|
||||
|
||||
@ -37,7 +37,7 @@ body {
|
||||
.nav-tab {
|
||||
background: none;
|
||||
border:none;
|
||||
padding: 10px 20px;
|
||||
padding: 10px 15px;
|
||||
font-weight: 300;
|
||||
font-size: 15px;
|
||||
color: darkgoldenrod;
|
||||
@ -74,17 +74,23 @@ a#options-group-4-tab:before {
|
||||
|
||||
a#options-group-5-tab:before {
|
||||
font-family: "dashicons";
|
||||
content: "\f110";
|
||||
content: "\f101";
|
||||
float: left;
|
||||
}
|
||||
|
||||
a#options-group-6-tab:before {
|
||||
font-family: "dashicons";
|
||||
content: "\f110";
|
||||
float: left;
|
||||
}
|
||||
|
||||
a#options-group-7-tab:before {
|
||||
font-family: "dashicons";
|
||||
content: "\f325";
|
||||
float: left;
|
||||
}
|
||||
|
||||
a#options-group-7-tab:before {
|
||||
a#options-group-8-tab:before {
|
||||
font-family: "dashicons";
|
||||
content: "\f487";
|
||||
float: left;
|
||||
|
52
inc/dash-scheme.php
Normal file
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 7.8 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
@ -66,9 +66,10 @@ color: #676767 !important}
|
||||
background: none;
|
||||
box-shadow: none;
|
||||
margin-top: 10px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#login form p {
|
||||
#login form p,#login form .user-pass-wrap {
|
||||
font-family:"Microsoft Yahei";
|
||||
position:relative;
|
||||
padding:0px 35px;
|
||||
@ -116,6 +117,18 @@ color: #676767 !important}
|
||||
border: 1px solid #FF5656;
|
||||
}
|
||||
|
||||
.login .button.wp-hide-pw{
|
||||
height: 46px;
|
||||
outline: none;
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
.login .button.wp-hide-pw .dashicons{
|
||||
right: 1rem;
|
||||
}
|
||||
|
||||
#login .form-send .bot {
|
||||
width:100%;
|
||||
border-bottom:1px solid #ccc;
|
||||
@ -175,9 +188,7 @@ color: #676767 !important}
|
||||
}
|
||||
|
||||
input[type=checkbox]:checked:before {
|
||||
content: "\f147";
|
||||
margin: -2px 0 0 -2px;
|
||||
color: #FF5656;
|
||||
}
|
||||
|
||||
/* loading */
|
||||
|
@ -25,21 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
/* If the user can't edit theme options, no use running this plugin */
|
||||
|
||||
if ( get_user_locale( get_current_user_id() ) == "zh_CN") {
|
||||
define( 'SAKURA_OPTIONS', 'Sakura主题设置' );
|
||||
}
|
||||
if ( get_user_locale( get_current_user_id() ) == "zh_TW") {
|
||||
define( 'SAKURA_OPTIONS', 'Sakura主題設置' );
|
||||
}
|
||||
if ( get_user_locale( get_current_user_id() ) == "ja") {
|
||||
define( 'SAKURA_OPTIONS', 'さくらテーマの設定' );
|
||||
}
|
||||
if ( get_user_locale( get_current_user_id() ) == "ja-JP") {
|
||||
define( 'SAKURA_OPTIONS', 'さくらテーマの設定' );
|
||||
} else {
|
||||
define( 'SAKURA_OPTIONS', 'Sakura Options' );
|
||||
}
|
||||
|
||||
add_action( 'init', 'optionsframework_rolescheck' );
|
||||
|
||||
function optionsframework_rolescheck () {
|
||||
@ -194,8 +179,8 @@ function optionsframework_setdefaults() {
|
||||
function optionsframework_menu_settings() {
|
||||
|
||||
$menu = array(
|
||||
'page_title' => __( SAKURA_OPTIONS, 'optionsframework'),
|
||||
'menu_title' => __( SAKURA_OPTIONS, 'optionsframework'),
|
||||
'page_title' => __('Sakura Options', 'sakura'),
|
||||
'menu_title' => __('Sakura Options', 'sakura'),
|
||||
'capability' => 'edit_theme_options',
|
||||
'menu_slug' => 'options-framework',
|
||||
'callback' => 'optionsframework_page'
|
||||
@ -275,7 +260,6 @@ if ( !function_exists( 'optionsframework_page' ) ) :
|
||||
function optionsframework_page() { ?>
|
||||
|
||||
<div id="optionsframework-wrap" class="wrap">
|
||||
<?php screen_icon( 'themes' ); ?>
|
||||
<h2 class="nav-tab-wrapper">
|
||||
<?php echo optionsframework_tabs(); ?>
|
||||
</h2>
|
||||
@ -288,8 +272,8 @@ function optionsframework_page() { ?>
|
||||
<?php settings_fields( 'optionsframework' ); ?>
|
||||
<?php optionsframework_fields(); /* Settings */ ?>
|
||||
<div id="optionsframework-submit">
|
||||
<input type="submit" class="button-primary" name="update" value="<?php esc_attr_e( '保存设置', 'options_framework_theme' ); ?>" />
|
||||
<input type="submit" class="reset-button button-secondary" name="reset" value="<?php esc_attr_e( '恢复默认', 'options_framework_theme' ); ?>" onclick="return confirm( '<?php print esc_js( __( '如果单击“确定”会导致之前所有的设置都丢失,确定要这样做吗?', 'options_framework_theme' ) ); ?>' );" />
|
||||
<input type="submit" class="button-primary" name="update" value="<?php _e( 'Save', 'sakura' ); ?>" />
|
||||
<input type="submit" class="reset-button button-secondary" name="reset" value="<?php esc_attr_e( 'Restore default', 'sakura' ); ?>" onclick="return confirm( '<?php print esc_js( __( 'All setting will be lost, sure?', 'sakura' ) ); ?>' );" />
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</form>
|
||||
@ -425,7 +409,7 @@ function optionsframework_adminbar() {
|
||||
$wp_admin_bar->add_menu( array(
|
||||
'parent' => 'appearance',
|
||||
'id' => 'of_theme_options',
|
||||
'title' => __( SAKURA_OPTIONS, 'options_framework_theme' ),
|
||||
'title' => __('Sakura Options', 'sakura'),
|
||||
'href' => admin_url( 'themes.php?page=options-framework' )
|
||||
));
|
||||
}
|
||||
@ -507,4 +491,4 @@ if ( ! function_exists( 'akina_option' ) ) {
|
||||
|
||||
return $default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -48,15 +48,15 @@ function optionsframework_uploader( $_id, $_value, $_desc = '', $_name = '' ) {
|
||||
if ( $value ) {
|
||||
$class = ' has-file';
|
||||
}
|
||||
$output .= '<input id="' . $id . '" class="upload' . $class . '" type="text" name="'.$name.'" value="' . $value . '" placeholder="' . __('未选择文件', 'options_framework_theme') .'" />' . "\n";
|
||||
$output .= '<input id="' . $id . '" class="upload' . $class . '" type="text" name="'.$name.'" value="' . $value . '" placeholder="' . __('Choose file', 'sakura') .'" />' . "\n";
|
||||
if ( function_exists( 'wp_enqueue_media' ) ) {
|
||||
if ( ( $value == '' ) ) {
|
||||
$output .= '<input id="upload-' . $id . '" class="upload-button button" type="button" value="' . __( '上传', 'options_framework_theme' ) . '" />' . "\n";
|
||||
$output .= '<input id="upload-' . $id . '" class="upload-button button" type="button" value="' . __( 'Upload', 'sakura' ) . '" />' . "\n";
|
||||
} else {
|
||||
$output .= '<input id="remove-' . $id . '" class="remove-file button" type="button" value="' . __( '移除', 'options_framework_theme' ) . '" />' . "\n";
|
||||
$output .= '<input id="remove-' . $id . '" class="remove-file button" type="button" value="' . __( 'Remove', 'sakura' ) . '" />' . "\n";
|
||||
}
|
||||
} else {
|
||||
$output .= '<p><i>' . __( 'Upgrade your version of WordPress for full media support.', 'options_framework_theme' ) . '</i></p>';
|
||||
$output .= '<p><i>' . __( 'Upgrade your version of WordPress for full media support.', 'sakura' ) . '</i></p>';
|
||||
}
|
||||
|
||||
if ( $_desc != '' ) {
|
||||
@ -80,7 +80,7 @@ function optionsframework_uploader( $_id, $_value, $_desc = '', $_name = '' ) {
|
||||
$output .= '';
|
||||
|
||||
// Standard generic output if it's not an image.
|
||||
$title = __( 'View File', 'options_framework_theme' );
|
||||
$title = __( 'View File', 'sakura' );
|
||||
$output .= '<div class="no-image"><span class="file_link"><a href="' . $value . '" target="_blank" rel="external">'.$title.'</a></span></div>';
|
||||
}
|
||||
}
|
||||
@ -110,8 +110,8 @@ function optionsframework_media_scripts( $hook ) {
|
||||
wp_register_script( 'of-media-uploader', OPTIONS_FRAMEWORK_DIRECTORY .'js/media-uploader.js', array( 'jquery' ) );
|
||||
wp_enqueue_script( 'of-media-uploader' );
|
||||
wp_localize_script( 'of-media-uploader', 'optionsframework_l10n', array(
|
||||
'upload' => __( '上传', 'options_framework_theme' ),
|
||||
'remove' => __( '移除', 'options_framework_theme' )
|
||||
'upload' => __( 'Upload', 'sakura' ),
|
||||
'remove' => __( 'Remove', 'sakura' )
|
||||
) );
|
||||
}
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
Copyright (c) 2015 Leaf Corcoran, http://leafo.github.io/scssphp
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|