Skip to content

Commit

Permalink
update1.7.6
Browse files Browse the repository at this point in the history
  • Loading branch information
wehaox committed Jul 2, 2023
1 parent 6f46c36 commit cd36fe7
Show file tree
Hide file tree
Showing 9 changed files with 201 additions and 68 deletions.
44 changes: 24 additions & 20 deletions archive.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php if (!defined('__TYPECHO_ROOT_DIR__')) {
exit;
} ?>
<?php $this->need('page_header.php'); ?>
<main class="layout" id="content-inner">
<div class="recent-posts category_ui" id="recent-posts">
<?php if ($this->have()): ?>
<?php while($this->next()): ?>
<?php while ($this->next()): ?>
<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='<?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>
<?php if(noCover($this)): ?>
<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>
</wehao>
<?php endif ?>
<div class="recent-post-info<?php echo noCover($this) ? '' : ' no-cover'; ?>">
<a class="article-title" href="<?php $this->permalink(); ?>"><?php $this->title(); ?></a>
<div class="article-meta-wrap">
<?php $this->sticky();?>
<?php $this->sticky(); ?>
<span class="post-meta-date" style="display:none;">
<i class="far fa-calendar-alt"></i>
<?php _e('发表于 '); ?> <?php $this->date(); ?>
Expand All @@ -21,8 +25,8 @@
</span>
<i class="fas fa-history"></i>
<span class="article-meta-label">更新于</span>
<?php echo date('Y-m-d' , $this->modified);?>
<time class="post-meta-date-updated" datetime="<?php echo date('Y-m-d' , $this->modified);?>" title="更新于 ">
<?php echo date('Y-m-d', $this->modified); ?>
<time class="post-meta-date-updated" datetime="<?php echo date('Y-m-d', $this->modified); ?>" title="更新于 ">
</time>
<span class="article-meta">
<span class="article-meta__separator">|</span>
Expand All @@ -41,20 +45,20 @@
<span class="article-meta__separator">|</span>
<i class="fas fa-comments"></i>
<span class="post-meta-date" itemprop="interactionCount">
<a itemprop="discussionUrl" href="<?php $this->permalink() ?>#comments">
<a itemprop="discussionUrl" href="<?php $this->permalink(); ?>#comments">
<?php $this->commentsNum('0条评论', '1 条评论', '%d 条评论'); ?>
</a>
</span>
</span>
</div>
<div class="content">
<?php if($this->fields->excerpt && $this->fields->excerpt!='') {
echo $this->fields->excerpt;
}else{
echo $this->excerpt(130);
}
echo '<br><br><a href="',$this->permalink(),'" title="',$this->title(),'">阅读全文...</a>';
?>
<?php if ($this->fields->excerpt && $this->fields->excerpt != '') {
echo $this->fields->excerpt;
} else {
echo $this->excerpt(130);
}
echo '<br><br><a href="',$this->permalink(),'" title="',$this->title(),'">阅读全文...</a>';
?>
</div>
</div>
</div>
Expand All @@ -65,7 +69,7 @@
</article>
<?php endif; ?>
<nav id="pagination">
<?php $this->pageNav('<i class="fas fa-chevron-left fa-fw"></i>', '<i class="fas fa-chevron-right fa-fw"></i>', 1, '...', array('wrapTag' => 'div', 'wrapClass' => 'pagination', 'itemTag' => '', 'prevClass' => 'extend prev', 'nextClass' => 'extend next', 'currentClass' => 'page-number current' )); ?>
<?php $this->pageNav('<i class="fas fa-chevron-left fa-fw"></i>', '<i class="fas fa-chevron-right fa-fw"></i>', 1, '...', ['wrapTag' => 'div', 'wrapClass' => 'pagination', 'itemTag' => '', 'prevClass' => 'extend prev', 'nextClass' => 'extend next', 'currentClass' => 'page-number current']); ?>
</nav>
</div><!-- end #main -->
<?php $this->need('sidebar.php'); ?>
Expand Down
1 change: 0 additions & 1 deletion comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
<button class="submit" type="submit" ><?php _e('评论'); ?></button>
</div>
<?php if($this->options->siteKey !== "" && $this->options->siteKey !== ""){RecapOutPut($this->user->hasLogin()) ;?><script>$(document).ready(function(){if($("#comment_keys").length == 0){$(".g-recaptcha").css({"position":"relative","top":"-40px"})}})</script> <?php }?>

<?php if($this->options->hcaptchaSecretKey !== "" && $this->options->hcaptchaAPIKey !== ""){
RecapOutPut($this->user->hasLogin());?>
<script>$(document).ready(function(){if($("#comment_keys").length == 0){$(".h-captcha").css({"position":"relative","top":"-40px"})}})</script>
Expand Down
2 changes: 1 addition & 1 deletion edit/extend.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ $("#ui-datepicker-div").after(`
<div class="wmd-prompt-dialog" style="top: 38%;" role="dialog">
<div><p><b>插入代码块(语言版)</b></p></div>
<form>
<p>代码语言:<select id="select-code"><option selected="selected" value="other">请选择代码语言</option><option value="asp" mode="vbscript">ASP</option><option value="actionscript" mode="clike">ActionScript(3.0)/Flash/Flex</option><option value="bash" mode="shell">Bash/Bat</option><option value="css" mode="css">CSS</option><option value="c" mode="clike">C</option><option value="cpp" mode="clike">C++</option><option value="csharp" mode="clike">C#</option><option value="coffeescript" mode="coffeescript">CoffeeScript</option><option value="d" mode="d">D</option><option value="dart" mode="dart">Dart</option><option value="delphi" mode="pascal">Delphi/Pascal</option><option value="erlang" mode="erlang">Erlang</option><option value="go" mode="go">Golang</option><option value="groovy" mode="groovy">Groovy</option><option value="html" mode="text/html">HTML</option><option value="java" mode="clike">Java</option><option value="json" mode="text/json">JSON</option><option value="javascript" mode="javascript">Javascript</option><option value="lua" mode="lua">Lua</option><option value="less" mode="css">LESS</option><option value="markdown" mode="gfm">Markdown</option><option value="objective-c" mode="clike">Objective-C</option><option value="php" mode="php">PHP</option><option value="perl" mode="perl">Perl</option><option value="python" mode="python">Python</option><option value="r" mode="r">R</option><option value="rst" mode="rst">reStructedText</option><option value="ruby" mode="ruby">Ruby</option><option value="sql" mode="sql">SQL</option><option value="sass" mode="sass">SASS/SCSS</option><option value="shell" mode="shell">Shell</option><option value="scala" mode="clike">Scala</option><option value="swift" mode="clike">Swift</option><option value="vb" mode="vb">VB/VBScript</option><option value="xml" mode="text/xml">XML</option><option value="yaml" mode="yaml">YAML</option><option value="other">其他语言</option></select></p>
<p>代码语言:<select id="select-code"><option selected="selected" value="other">请选择代码语言</option><option value="asp" mode="vbscript">ASP</option><option value="actionscript" mode="clike">ActionScript(3.0)/Flash/Flex</option><option value="bash" mode="shell">Bash/Bat</option><option value="css" mode="css">CSS</option><option value="c" mode="clike">C</option><option value="cpp" mode="clike">C++</option><option value="csharp" mode="clike">C#</option><option value="coffeescript" mode="coffeescript">CoffeeScript</option><option value="d" mode="d">D</option><option value="dart" mode="dart">Dart</option><option value="delphi" mode="pascal">Delphi/Pascal</option><option value="erlang" mode="erlang">Erlang</option><option value="go" mode="go">Golang</option><option value="groovy" mode="groovy">Groovy</option><option value="html" mode="text/html">HTML</option><option value="java" mode="clike">Java</option><option value="json" mode="text/json">JSON</option><option value="javascript" mode="javascript">Javascript</option><option value="lua" mode="lua">Lua</option><option value="less" mode="css">LESS</option><option value="markdown" mode="gfm">Markdown</option><option value="objective-c" mode="clike">Objective-C</option><option value="php" mode="php">PHP</option><option value="perl" mode="perl">Perl</option><option value="python" mode="python">Python</option><option value="r" mode="r">R</option><option value="rst" mode="rst">reStructedText</option><option value="ruby" mode="ruby">Ruby</option><option value="sql" mode="sql">SQL</option><option value="sass" mode="sass">SASS/SCSS</option><option value="shell" mode="shell">Shell</option><option value="scala" mode="clike">Scala</option><option value="swift" mode="clike">Swift</option><option value="vb" mode="vb">VB/VBScript</option><option value="xml" mode="text/xml">XML</option><option value="yaml" mode="yaml">YAML</option><option value="yml" mode="yml">YML</option><option value="other">其他语言</option></select></p>
<textarea rows="10" cols="40" name="insert-codeblock" placeholder="这里填入代码块"></textarea>
<button type="button" class="btn btn-s primary btn-ok">确定</button>
<button type="button" class="btn btn-s btn-cancel">取消</button></form>
Expand Down
11 changes: 10 additions & 1 deletion footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@
</div>
<!--搜索end -->
<div class="js-pjax">
<?php if ($this->options->hcaptchaSecretKey !== "" && $this->options->hcaptchaAPIKey !== ""): ?>
<script src="https://hcaptcha.com/1/api.js" async defer></script>
<?php endif ?>
<?php if ($this->is('post') || $this->is('page')): ?>
<script src="<?php $this->options->themeUrl('js/comjs.js?v1.4.3'); ?>"></script>
<?php endif ?>
Expand All @@ -115,7 +118,7 @@
<script>$(document).ready(function(){var a=document.getElementsByTagName("a");for(let i=0;i<a.length;i++){let domain=document.domain;let url=a[i].href;if(typeof(url)!="undefined"&&url.length!=0&&url.match(domain)==null&&url!="javascript:void(0);"){a[i].setAttribute("target","_BLANK")}}});</script>
<?php endif; ?>
<?php if($this->is('index')): ?>
<script type="text/javascript" src="<?php $this->options->themeUrl('js/wehao.js?v1.7.0'); ?>"></script>
<script type="text/javascript" src="<?php $this->options->themeUrl('js/wehao.js?v1.7.6'); ?>"></script>
<style>#page-header:not(.not-top-img):before {background-color: rgba(0,0,0,0);}</style>
<!--打字-->
<?php if (is_array($this->options->beautifyBlock) && in_array('ShowTopimg',$this->options->beautifyBlock)): ?>
Expand Down Expand Up @@ -262,6 +265,11 @@ function butterfly_swiper_injector_config() {
NProgress.start();
})),
document.addEventListener("pjax:complete", (function() {
<?php if ($this->options->hcaptchaSecretKey !== "" && $this->options->hcaptchaAPIKey !== ""): ?>
hcaptcha.render('h-captcha', {
sitekey: '<?php $this->options->hcaptchaSecretKey() ?>'
});
<?php endif ?>
<?php $this->options->PjaxCallBack() ?>
NProgress.done();
window.refreshFn(),
Expand All @@ -274,6 +282,7 @@ function butterfly_swiper_injector_config() {
"object" == typeof _hmt && _hmt.push(["_trackPageview", window.location.pathname]),
"function" == typeof loadMeting && document.getElementsByClassName("aplayer").length && loadMeting(),
"object" == typeof Prism && Prism.highlightAll(), "object" == typeof preloader && preloader.endLoading()
coverShow()
})),
document.addEventListener("pjax:error", e => {
// 404 === e.request.status && pjax.loadUrl("/404");
Expand Down
Loading

0 comments on commit cd36fe7

Please sign in to comment.