Skip to content

Commit

Permalink
update 1.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
wehaox committed Feb 21, 2023
1 parent 775f00c commit 01d2062
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<div class="recent-posts category_ui" id="recent-posts">
<?php if ($this->have()): ?>
<?php while($this->next()): ?>
<div class="recent-post-item" >
<div class="recent-post-item">
<wehao class="post_cover">
<a class="article-title" href="<?php $this->permalink() ?>">
<img class="post_bg" data-lazy-src="<?php echo get_ArticleThumbnail($this);?>" src="<?php echo GetLazyLoad() ?>" onerror="this.onerror=null;this.src='https://tva1.sinaimg.cn/large/007X0Rdyly1gpaaf55n1rj30ic09u0sw.jpg'"></a>
<img class="post-bg" data-lazy-src="<?php echo get_ArticleThumbnail($this);?>" src="<?php echo GetLazyLoad() ?>" onerror="this.onerror=null;this.src='<?php $this->options->themeUrl('img/404.jpg'); ?>'"></a>
</wehao>
<div class="recent-post-info">
<a class="article-title" href="<?php $this->permalink() ?>"><?php $this->title() ?></a>
Expand Down
4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -1165,8 +1165,8 @@ function ArtPlayer($text)
// 重写文章图片加载
function PostImage($text)
{
$text = preg_replace_callback('/<img src=\"(.*?)\".*?alt\=\"(.*?)\".*?>/ism', function ($text) {
return '<img class="" title="'.$text[2].'" alt="'.$text[2].'" data-lazy-src="'.$text[1].'" src="'.GetLazyLoad().'" />';
$text = preg_replace_callback('/<img src=\"(.*?)"\ alt=\"(.*?)"\>/ism', function ($text) {
return '<img title="'.$text[2].'" alt="'.$text[2].'" data-lazy-src="'.$text[1].'" src="'.GetLazyLoad().'" />';
}, $text);
return $text;
}
Expand Down
6 changes: 3 additions & 3 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* <a href="https://www.wehaox.com">个人网站</a> | <a href="https://blog.wehaox.com/archives/typecho-butterfly.html">主题使用文档</a>
* @package Typecho-Butterfly
* @author b站:wehao-
* @version 1.7.3
* @version 1.7.4
* @link https://space.bilibili.com/34174433
*/
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
Expand Down Expand Up @@ -45,7 +45,7 @@
<main class="layout" id="content-inner">
<div class="recent-posts" id="recent-posts">
<?php while($this->next()): ?>
<div class="recent-post-item" >
<div class="recent-post-item">
<wehao class="post_cover">
<a href="<?php $this->permalink() ?>">
<img class="post-bg" data-lazy-src="<?php echo get_ArticleThumbnail($this);?>" src="<?php echo GetLazyLoad() ?>" onerror="this.onerror=null;this.src='<?php $this->options->themeUrl('img/404.jpg'); ?>'"></a>
Expand Down Expand Up @@ -112,7 +112,7 @@ function ver() {console.log(`
# # # # # # # # # # # #
##### #### # # ###### # # # ###### #

1.7.3
1.7.4
===================================================================
`);}
</script>
2 changes: 2 additions & 0 deletions post_sidebar.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@
<?php elseif(!$this->options->author_bottom) : ?>
<?php endif; ?>
</div>
<?php if (!empty($this->options->sidebarBlock) && in_array('ShowAnnounce', $this->options->sidebarBlock)): ?>
<div class="card-widget card-announcement"><div class="item-headline">
<i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div>
<div class="announcement_content"><?php $this->options->announcement() ?></div></div>
<?php endif; ?>
<?php if (!empty($this->options->AD)): ?>
<div class="card-widget">
<div class="item-headline"><i class="fa-solid fa-rectangle-ad"></i><span>广告</span></div>
Expand Down

0 comments on commit 01d2062

Please sign in to comment.