Skip to content

Commit

Permalink
feat: 0.1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
yanranxiaoxi committed Aug 31, 2024
1 parent 262e49a commit 81e0bee
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 22 deletions.
4 changes: 2 additions & 2 deletions assets/js/lamu-leimu.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
!(function () {

var style = '@media (max-width:860px){.sidebar_wo{display:none}}.sidebar_wo{position:fixed;bottom:0;z-index:1000;line-height:0;cursor:url(https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/images/cursor/leimu.cur),pointer}#lamu:hover{-webkit-transform:translate(0,0);transform:translate(0,0);-ms-transform:translate(0,0)}#lamu{right:0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-transform:translate(7px,7px);transform:translate(7px,7px);-ms-transform:translate(7px,7px)}#leimu:hover{-webkit-transform:translate(0,0);transform:translate(0,0);-ms-transform:translate(0,0)}#leimu{left:0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-transform:translate(-7px,7px);transform:translate(-7px,7px);-ms-transform:translate(-7px,7px)}';
var style = '@media (max-width:860px){.sidebar_wo{display:none}}.sidebar_wo{position:fixed;bottom:0;z-index:1000;line-height:0;cursor:url(https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/images/cursor/leimu.cur),pointer}#lamu:hover{-webkit-transform:translate(0,0);transform:translate(0,0);-ms-transform:translate(0,0)}#lamu{right:0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-transform:translate(7px,7px);transform:translate(7px,7px);-ms-transform:translate(7px,7px)}#leimu:hover{-webkit-transform:translate(0,0);transform:translate(0,0);-ms-transform:translate(0,0)}#leimu{left:0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out;-webkit-transform:translate(-7px,7px);transform:translate(-7px,7px);-ms-transform:translate(-7px,7px)}';

var css = document.createElement('style');
css.type = 'text/css';
css.innerHTML = style;
var head = document.head || document.getElementsByTagName('head')[0];
head.appendChild(css);

var lamuleimuDiv = '<div class="sidebar_wo" id="leimu"><img src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/images/bottom/leimu1.png" alt="雷姆" onmouseover="this.src=\'https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/images/bottom/leimu2.png\'" onmouseout="this.src=\'https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/images/bottom/leimu1.png\'"></div><div class="sidebar_wo" id="lamu"><img src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/images/bottom/lamu1.png" alt="拉姆" onmouseover="this.src=\'https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/images/bottom/lamu2.png\'" onmouseout="this.src=\'https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/images/bottom/lamu1.png\'"></div>';
var lamuleimuDiv = '<div class="sidebar_wo" id="leimu"><img src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/images/bottom/leimu1.png" alt="雷姆" onmouseover="this.src=\'https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/images/bottom/leimu2.png\'" onmouseout="this.src=\'https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/images/bottom/leimu1.png\'"></div><div class="sidebar_wo" id="lamu"><img src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/images/bottom/lamu1.png" alt="拉姆" onmouseover="this.src=\'https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/images/bottom/lamu2.png\'" onmouseout="this.src=\'https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/images/bottom/lamu1.png\'"></div>';

var div = document.createElement('div');
div.innerHTML = lamuleimuDiv;
Expand Down
6 changes: 3 additions & 3 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
</div>
<div class="comment-content">
<b><?php get_comment_at($comments->coid); ?></b>
<?php echo preg_replace('#\@\((.*?)\)#', '<img src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/images/alu/$1.png">', $comments->content); // 替换关键词为表情 ?>
<?php echo preg_replace('#\@\((.*?)\)#', '<img src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/images/alu/$1.png">', $comments->content); // 替换关键词为表情 ?>
</div>
<?php if ($comments->children) { ?>
<div class="comment-children" id="pllc">
Expand Down Expand Up @@ -173,7 +173,7 @@ function okBaidu($url, $baiduPushUrl) {
logo: 'OωO表情',
container: document.getElementsByClassName('OwO')[0],
target: document.getElementsByClassName('OwO-textarea')[0],
api: 'https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/assets/json/OwO.json',
api: 'https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/assets/json/OwO.json',
position: 'down',
width: '100%',
maxHeight: '250px'
Expand Down Expand Up @@ -221,7 +221,7 @@ function okBaidu($url, $baiduPushUrl) {
if(0==el.length)
{$('<ol class="comment-list"></ol>').prependTo($('#comments'));el=$('#comments > .comment-list');}
var html='<li id="comment-{coid}" class="comment-body comment-ajax comment-parent comment-odd"> <div class="comment-author"> <img class="avatar" src="{avatar}" alt="{author}" width="32" height="32"> <div class="comment-info"> <cite class="fn"><a href="{url}" rel="external nofollow" target="_blank">{author}</a></cite> <em class="comment-meta"><a href="{permalink}">{datetime}</a></em> </div> <div class="comment-reply"><a href="{permalink}" rel="nofollow" onclick="return TypechoComment.reply(\'\comment-{coid}\'\, {coid});">回复</a></div> </div> <div class="comment-content">{content}</div> </li>';$.each(comment,function(k,v)
{regExp=new RegExp('{'+k+'}','g');html=html.replace(regExp,v);});var reg1=/@\(([^ ]*)\)/g;html=html.replace(reg1,"<img src=\"https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/images/alu/$1.png\"\>");$(html).prependTo(el);}
{regExp=new RegExp('{'+k+'}','g');html=html.replace(regExp,v);});var reg1=/@\(([^ ]*)\)/g;html=html.replace(reg1,"<img src=\"https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/images/alu/$1.png\"\>");$(html).prependTo(el);}
$.ajax({url:'<?php $this->permalink();?>',type:'POST',data:params,dataType:'json',beforeSend:function()
{$(".loading").css("display","block");},complete:function()
{$(".loading").css("display","none");new NoticeJs({text:'评论成功(//▽//)',position:'middleCenter',animation:{open:'animated bounceInRight',close:'animated bounceOutLeft'}}).show();},success:function(result)
Expand Down
10 changes: 5 additions & 5 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@
<?php endif; ?>

<?php if ($this->options->themeAutoDark === 'enable'): ?>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/assets/js/match-dark-mode.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/assets/js/match-dark-mode.min.js"></script>
<?php endif; ?>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/assets/js/img-lazy.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/assets/js/moment.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/assets/js/img-lazy.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/assets/js/moment.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/mermaid.min.js"></script>
<script>mermaid.init({noteMargin: 10}, ".lang-mermaid");</script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/nprogress.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/assets/css/noticejs.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/assets/css/noticejs.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/animate.min.css" />
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/notice.min.js"></script>
<script type="text/javascript">
Expand All @@ -125,7 +125,7 @@
<script async src="<?php $this->options->umamiUrl(); ?>" data-website-id="<?php $this->options->umamiId(); ?>" data-do-not-track="<?php $this->options->umamiDoNotTrack(); ?>"></script>
<?php endif; ?>
<?php if ($this->options->returnTop === 'enable'): ?>
<script defer type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/assets/js/lamu-leimu.min.js"></script>
<script defer type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/assets/js/lamu-leimu.min.js"></script>
<?php endif; ?>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function parseContent($obj) {
$obj->content = str_ireplace($widgetOptions->src_add,$widgetOptions->cdn_add,$obj->content);
}

$obj->content = preg_replace('/<\s*img[\s\S]+?(?:src=[\'"]([\S\s]*?)[\'"]\s*|alt=[\'"]([\S\s]*?)[\'"]\s*|[a-z]+=[\'"][\S\s]*?[\'"]\s*)+[\s\S]*?>/i','<img src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/images/lazyload.jpg" alt="$2" data-src="$1" />', $obj->content);
$obj->content = preg_replace('/<\s*img[\s\S]+?(?:src=[\'"]([\S\s]*?)[\'"]\s*|alt=[\'"]([\S\s]*?)[\'"]\s*|[a-z]+=[\'"][\S\s]*?[\'"]\s*)+[\s\S]*?>/i','<img src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/images/lazyload.jpg" alt="$2" data-src="$1" />', $obj->content);
$obj->content = preg_replace("/<a href=\"([^\"]*)\">/i", "<a href=\"\\1\" target=\"_blank\">", $obj->content);
echo trim($obj->content);
}
Expand Down
20 changes: 10 additions & 10 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@
<?php if ($this->options->favicon): ?>
<link href="<?php $this->options->favicon(); ?>" rel="shortcut icon" />
<?php else: ?>
<link href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/images/icon.ico" rel="shortcut icon" />
<link href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/images/icon.ico" rel="shortcut icon" />
<?php endif; ?>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/[email protected]/css/all.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/assets/css/main.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/assets/css/main.min.css" />
<?php if ($this->options->themeColor == '0'): ?>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/assets/css/gray.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/assets/css/gray.min.css" />
<?php elseif ($this->options->themeColor == '1'): ?>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/assets/css/white.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/assets/css/white.min.css" />
<?php elseif ($this->options->themeColor == '2'): ?>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/assets/css/green.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/assets/css/green.min.css" />
<?php elseif ($this->options->themeColor == '3'): ?>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/assets/css/black.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/assets/css/black.min.css" />
<?php else: ?>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/assets/css/gray.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/assets/css/gray.min.css" />
<?php endif; ?>
<?php if ($this->options->themeAutoDark === 'enable'): ?>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/assets/css/dark.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/assets/css/dark.min.css" />
<?php endif; ?>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/[email protected]/dist/jquery.fancybox.min.css" />
Expand All @@ -45,7 +45,7 @@
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/@fancyapps/[email protected]/dist/jquery.fancybox.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/assets/js/jQuery.scrollLoad.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/assets/js/jQuery.scrollLoad.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/jquery.pjax.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/OwO.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/console-ban.min.js"></script>
Expand All @@ -59,7 +59,7 @@
<?php if ($this->options->logo): ?>
<img class="user-avatar" src="<?php $this->options->logo(); ?>" alt="头像" />
<?php else: ?>
<img class="user-avatar" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].18/images/avatar.png" alt="头像" />
<img class="user-avatar" src="https://cdn.jsdelivr.net/gh/yanranxiaoxi/[email protected].19/images/avatar.png" alt="头像" />
<?php endif; ?>
<div class="site-name gt-c-content-color-first">
<?php $this->options->title(); ?>
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* @package Simplecho
* @author XiaoXi
* @version 0.1.18
* @version 0.1.19
* @link https://soraharu.com/
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
Expand Down

0 comments on commit 81e0bee

Please sign in to comment.