Skip to content

Commit

Permalink
Merge pull request #195 from mashirozx/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
mashirozx authored Mar 13, 2020
2 parents ccb0b6f + c0f0990 commit 3cb0828
Show file tree
Hide file tree
Showing 15 changed files with 85 additions and 70 deletions.
2 changes: 1 addition & 1 deletion cdn/js/lib.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cdn/js/src/11.third-part-functions.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class="tieba-bar">Tieba</th>
'comment_notes_after' => '',
'comment_notes_before' => '',
'fields' => apply_filters( 'comment_form_default_fields', array(
'avatar' => '<div class="cmt-info-container"><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="https://gravatar.2heng.xin/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>',
'author' =>
'<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' =>
Expand Down
4 changes: 3 additions & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,9 @@ function get_link_items()
function gravatar_cn($url)
{
$gravatar_url = array('0.gravatar.com', '1.gravatar.com', '2.gravatar.com', 'secure.gravatar.com');
return str_replace($gravatar_url, 'cn.gravatar.com', $url);
//return str_replace($gravatar_url, 'cn.gravatar.com', $url);
//官方服务器近期大陆访问 429,建议使用镜像
return str_replace( $gravatar_url, 'gravatar.2heng.xin', $url );
}
add_filter('get_avatar_url', 'gravatar_cn', 4);

Expand Down
2 changes: 1 addition & 1 deletion inc/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ function get_qq_avatar(){
$encrypted=$_GET["qq"];
if(isset($encrypted)){
$iv = str_repeat($sakura_privkey, 2);
$encrypted = urldecode(base64_decode($encrypted));
$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';
Expand Down
3 changes: 3 additions & 0 deletions inc/decorate.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ function customizer_css() { ?>
}
<?php } ?>

.post-list-thumb{opacity: 0}
.post-list-show {opacity: 1}

<?php } // theme-skin ?>
<?php // Custom style
if ( akina_option('site_custom_style') ) {
Expand Down
3 changes: 0 additions & 3 deletions inc/theme_plus.php
Original file line number Diff line number Diff line change
Expand Up @@ -791,9 +791,6 @@ function siren_get_browsers($ua){
}elseif (preg_match('#Edge/([a-zA-Z0-9.]+)#i', $ua, $matches)){
$title = 'Edge '. $matches[1];
$icon = 'edge';
}elseif (preg_match('#Edg/([a-zA-Z0-9.]+)#i', $ua, $matches)){
$title = 'Edge Dev (Chromium) '. $matches[1];
$icon = 'edge';
}elseif (preg_match('#360([a-zA-Z0-9.]+)#i', $ua, $matches)) {
$title = '360 Browser '. $matches[1];
$icon = '360se';
Expand Down
44 changes: 27 additions & 17 deletions js/sakura-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* @date 2019.8.3
*/
mashiro_global.variables = new function () {
this.has_hls = false;
this.skinSecter = true;
}
mashiro_global.ini = new function () {
Expand Down Expand Up @@ -523,25 +524,34 @@ function killCoverVideo() {
}
}

function loadHls(){
var video = addComment.I('coverVideo');
var video_src = $('#coverVideo').attr('data-src');
if (Hls.isSupported()) {
var hls = new Hls();
hls.loadSource(video_src);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, function () {
video.play();
});
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
video.src = video_src;
video.addEventListener('loadedmetadata', function () {
video.play();
});
}
}

function coverVideoIni() {
if ($('video').hasClass('hls')) {
$.getScript("https://cdn.jsdelivr.net/gh/mashirozx/[email protected]/cdn/js/src/16.hls.js", function(){
var video = addComment.I('coverVideo');
var video_src = $('#coverVideo').attr('data-src');
if (Hls.isSupported()) {
var hls = new Hls();
hls.loadSource(video_src);
hls.attachMedia(video);
hls.on(Hls.Events.MANIFEST_PARSED, function () {
video.play();
});
} else if (video.canPlayType('application/vnd.apple.mpegurl')) {
video.src = video_src;
video.addEventListener('loadedmetadata', function () {
video.play();
});
}
});
if (mashiro_global.variables.has_hls){
loadHls();
}else{
$.getScript("https://cdn.jsdelivr.net/gh/mashirozx/[email protected]/cdn/js/src/16.hls.js", function(){
loadHls();
mashiro_global.variables.has_hls = true;
});
}
//console.info('ini:coverVideoIni()');
}
}
Expand Down
Binary file modified languages/en_US.mo
Binary file not shown.
30 changes: 15 additions & 15 deletions languages/en_US.po
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2020-01-07 17:27+0800\n"
"PO-Revision-Date: 2020-01-07 17:27+0800\n"
"POT-Creation-Date: 2020-02-13 23:59+0800\n"
"PO-Revision-Date: 2020-02-13 23:59+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: en_US\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.4\n"
"X-Generator: Poedit 2.3\n"
"X-Poedit-Basepath: ..\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
Expand Down Expand Up @@ -181,35 +181,35 @@ msgstr ""
msgid "This guy is so lazy ╮(╯▽╰)╭"
msgstr ""

#: functions.php:1327
#: functions.php:1329
msgid "All expand/collapse"
msgstr ""

#: functions.php:1348 options.php:834
#: functions.php:1350 options.php:834
msgid " "
msgstr ""

#: functions.php:1352
#: functions.php:1354
msgid " post(s)"
msgstr ""

#: functions.php:1375 functions.php:1378 inc/theme_plus.php:478
#: functions.php:1377 functions.php:1380 inc/theme_plus.php:478
msgid "Dashboard"
msgstr ""

#: functions.php:1604
#: functions.php:1606
msgid "<b>ERROR</b>: This email domain (<b>@"
msgstr ""

#: functions.php:1709
#: functions.php:1711
msgid "QQ"
msgstr ""

#: functions.php:1779
#: functions.php:1781
msgid "Sidebar"
msgstr ""

#: functions.php:1891
#: functions.php:1893
msgid ""
"<b> For a better experience, please do not set <a href=\"/wp-admin/options-"
"permalink.php\"> permalink </a> as plain. To do this, you may need to "
Expand Down Expand Up @@ -1710,25 +1710,25 @@ msgstr "Search result: %s"
msgid "NOTHING"
msgstr ""

#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:53
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:56
#: tpl/content.php:34
msgid "Comment"
msgstr ""

#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:53
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:56
#: tpl/content.php:34
msgid "Comments"
msgstr ""

#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content-thumb.php:52
#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content-thumb.php:55
#: tpl/content.php:37
msgid "Hit"
msgid_plural "Hits"
msgstr[0] ""
msgstr[1] ""

#: tpl/content-none.php:14
msgid "There is noyhing here!"
msgid "There is nothing here!"
msgstr ""

#: tpl/content-none.php:21
Expand Down
28 changes: 14 additions & 14 deletions languages/sakura.pot
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ msgid ""
msgstr ""
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2020-01-07 17:27+0800\n"
"POT-Creation-Date: 2020-02-13 23:59+0800\n"
"PO-Revision-Date: 2019-11-01 14:27+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.4\n"
"X-Generator: Poedit 2.3\n"
"X-Poedit-Basepath: ..\n"
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
"X-Poedit-WPHeader: style.css\n"
Expand Down Expand Up @@ -180,35 +180,35 @@ msgstr ""
msgid "This guy is so lazy ╮(╯▽╰)╭"
msgstr ""

#: functions.php:1327
#: functions.php:1329
msgid "All expand/collapse"
msgstr ""

#: functions.php:1348 options.php:834
#: functions.php:1350 options.php:834
msgid " "
msgstr ""

#: functions.php:1352
#: functions.php:1354
msgid " post(s)"
msgstr ""

#: functions.php:1375 functions.php:1378 inc/theme_plus.php:478
#: functions.php:1377 functions.php:1380 inc/theme_plus.php:478
msgid "Dashboard"
msgstr ""

#: functions.php:1604
#: functions.php:1606
msgid "<b>ERROR</b>: This email domain (<b>@"
msgstr ""

#: functions.php:1709
#: functions.php:1711
msgid "QQ"
msgstr ""

#: functions.php:1779
#: functions.php:1781
msgid "Sidebar"
msgstr ""

#: functions.php:1891
#: functions.php:1893
msgid ""
"<b> For a better experience, please do not set <a href=\"/wp-admin/options-permalink.php\"> "
"permalink </a> as plain. To do this, you may need to configure <a href=\"https://www.wpdaxue."
Expand Down Expand Up @@ -1675,22 +1675,22 @@ msgstr ""
msgid "NOTHING"
msgstr ""

#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:53 tpl/content.php:34
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:56 tpl/content.php:34
msgid "Comment"
msgstr ""

#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:53 tpl/content.php:34
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:56 tpl/content.php:34
msgid "Comments"
msgstr ""

#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content-thumb.php:52 tpl/content.php:37
#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content-thumb.php:55 tpl/content.php:37
msgid "Hit"
msgid_plural "Hits"
msgstr[0] ""
msgstr[1] ""

#: tpl/content-none.php:14
msgid "There is noyhing here!"
msgid "There is nothing here!"
msgstr ""

#: tpl/content-none.php:21
Expand Down
Binary file modified languages/zh_CN.mo
Binary file not shown.
30 changes: 15 additions & 15 deletions languages/zh_CN.po
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
msgid ""
msgstr ""
"Project-Id-Version: Sakura\n"
"POT-Creation-Date: 2020-01-07 17:29+0800\n"
"PO-Revision-Date: 2020-01-07 17:32+0800\n"
"POT-Creation-Date: 2020-02-13 23:59+0800\n"
"PO-Revision-Date: 2020-02-13 23:59+0800\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: zh_CN\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.4\n"
"X-Generator: Poedit 2.3\n"
"X-Poedit-Basepath: ..\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Poedit-Flags-xgettext: --add-comments=translators:\n"
Expand Down Expand Up @@ -183,35 +183,35 @@ msgstr ""
msgid "This guy is so lazy ╮(╯▽╰)╭"
msgstr "这家伙好懒╮(╯▽╰)╭"

#: functions.php:1327
#: functions.php:1329
msgid "All expand/collapse"
msgstr "全部展开/收缩"

#: functions.php:1348 options.php:834
#: functions.php:1350 options.php:834
msgid " "
msgstr ""

#: functions.php:1352
#: functions.php:1354
msgid " post(s)"
msgstr " 篇文章"

#: functions.php:1375 functions.php:1378 inc/theme_plus.php:478
#: functions.php:1377 functions.php:1380 inc/theme_plus.php:478
msgid "Dashboard"
msgstr "管理中心"

#: functions.php:1604
#: functions.php:1606
msgid "<b>ERROR</b>: This email domain (<b>@"
msgstr ""

#: functions.php:1709
#: functions.php:1711
msgid "QQ"
msgstr ""

#: functions.php:1779
#: functions.php:1781
msgid "Sidebar"
msgstr "侧栏"

#: functions.php:1891
#: functions.php:1893
msgid ""
"<b> For a better experience, please do not set <a href=\"/wp-admin/options-"
"permalink.php\"> permalink </a> as plain. To do this, you may need to "
Expand Down Expand Up @@ -1764,24 +1764,24 @@ msgstr "关于 %s 的搜索结果:"
msgid "NOTHING"
msgstr "啥也没有呀"

#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:53
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:56
#: tpl/content.php:34
msgid "Comment"
msgstr "条评论"

#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:53
#: tpl/content-image.php:35 tpl/content-status.php:31 tpl/content-thumb.php:56
#: tpl/content.php:34
msgid "Comments"
msgstr "条评论"

#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content-thumb.php:52
#: tpl/content-image.php:38 tpl/content-status.php:34 tpl/content-thumb.php:55
#: tpl/content.php:37
msgid "Hit"
msgid_plural "Hits"
msgstr[0] "热度"

#: tpl/content-none.php:14
msgid "There is noyhing here!"
msgid "There is nothing here!"
msgstr "没有找到任何东西!"

#: tpl/content-none.php:21
Expand Down
2 changes: 1 addition & 1 deletion tpl/content-none.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

<section class="no-results not-found">
<header class="page-header">
<h1 class="page-title"><?php _e( 'There is noyhing here!', 'sakura' ); /*没有找到任何东西*/?></h1>
<h1 class="page-title"><?php _e( 'There is nothing here!', 'sakura' ); /*没有找到任何东西*/?></h1>
</header><!-- .page-header -->

<div class="page-content">
Expand Down
Loading

0 comments on commit 3cb0828

Please sign in to comment.