Skip to content

Commit

Permalink
1.2.8-Build22717-2-Dev
Browse files Browse the repository at this point in the history
  • Loading branch information
ouyangyanhuo committed Jul 17, 2022
1 parent ccb1283 commit 445898f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 37 deletions.
2 changes: 1 addition & 1 deletion assets/js/features.js

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

15 changes: 8 additions & 7 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,7 @@
'tag' => _t('标签 %s 下的文章'),
'author' => _t('%s 发布的文章')
), '', ' - '); ?><?php $this->options->title(); ?></title>
<?php if ($this->options->favicon): ?>
<link rel="shortcut icon" type="image/x-icon" href="<?php $this->options->favicon() ?>">
<?php endif; ?>
<?php if ($this->options->cursor): ?>
<link rel="stylesheet" href="<?php $this->options->themeUrl('/assets/css/cursor.css'); ?>">
<?php endif; ?>
<link rel="stylesheet" href="<?php $this->options->themeUrl('/assets/css/style.css'); ?>">

<?php if ($this->is('index')): ?>
<?php if ($this->options->SEOOPEN): ?>
<?php $this->header(); ?>
Expand All @@ -28,6 +22,13 @@
<?php $this->header('xmlrpc=&wlw=&commentReply=&antiSpam=&atom'); ?>
<?php endif; ?>
<?php endif; ?>
<?php if ($this->options->favicon): ?>
<link rel="shortcut icon" type="image/x-icon" href="<?php $this->options->favicon() ?>">
<?php endif; ?>
<?php if ($this->options->cursor): ?>
<link rel="stylesheet" href="<?php $this->options->themeUrl('/assets/css/cursor.css'); ?>">
<?php endif; ?>
<link rel="stylesheet" href="<?php $this->options->themeUrl('/assets/css/style.css'); ?>">
<?php if ($this->options->fancybox): ?>
<link href="https://cdn.bootcdn.net/ajax/libs//fancybox/3.5.7/jquery.fancybox.min.css" rel="stylesheet">
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
Expand Down
32 changes: 3 additions & 29 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
/**
* 移植自<a href="https://limxw.com/" target="_blank">WingLim</a>的<a href="https://github.com/WingLim/hugo-tania" target="_blank">hugo-tania</a>主题,在其基础上进行了深度修改的Smiletheme或许是你在Typecho上最好的选择
* <hr><a style="width:fit-content" id="SmileTheme">版本检测中...&nbsp;</div>
* <script>var simversion="1.2.8-Build22717-1-Dev";function update_detec(){var container=document.getElementById("SmileTheme");if(!container){return}var ajax=new XMLHttpRequest();container.style.display="block";ajax.open("get","https://api.github.com/repos/ouyangyanhuo/SmileTheme/releases/latest");ajax.send();ajax.onreadystatechange=function(){if(ajax.readyState===4&&ajax.status===200){var obj=JSON.parse(ajax.responseText);var newest=obj.tag_name;if(newest>simversion){container.innerHTML="发现新主题版本:"+obj.name+'。下载地址:<a href="'+obj.zipball_url+'">点击下载</a>'+"<br>您目前的版本:"+String(simversion)+"。"+'<a target="_blank" href="'+obj.html_url+'">👉查看新版亮点</a>'}else{container.innerHTML="您目前的版本:"+String(simversion)+"。"+"您目前使用的是最新版。"}}}};update_detec();</script>
* <script>var simversion="1.2.8-Build22717-2-Dev";function update_detec(){var container=document.getElementById("SmileTheme");if(!container){return}var ajax=new XMLHttpRequest();container.style.display="block";ajax.open("get","https://api.github.com/repos/ouyangyanhuo/SmileTheme/releases/latest");ajax.send();ajax.onreadystatechange=function(){if(ajax.readyState===4&&ajax.status===200){var obj=JSON.parse(ajax.responseText);var newest=obj.tag_name;if(newest>simversion){container.innerHTML="发现新主题版本:"+obj.name+'。下载地址:<a href="'+obj.zipball_url+'">点击下载</a>'+"<br>您目前的版本:"+String(simversion)+"。"+'<a target="_blank" href="'+obj.html_url+'">👉查看新版亮点</a>'}else{container.innerHTML="您目前的版本:"+String(simversion)+"。"+"您目前使用的是最新版。"}}}};update_detec();</script>
*
* @package Smile Theme
* @author Magneto
* @version 1.2.8-Build22717-1-Dev
* @version 1.2.8-Build22717-2-Dev
* @link https://www.fmcf.cc
*/

Expand Down Expand Up @@ -54,19 +54,6 @@
<a href="<?php $this->options->Project_1_URL() ?>" target="_blank" rel="noreferrer">
<?php else: ?>
<a href="#" target="_blank" rel="noreferrer">
<a href="<?php $this->options->Project_1_URL() ?>" target="_blank" rel="noreferrer">
<?php else: ?>
<a href="#" target="_blank" rel="noreferrer">
<?php endif; ?>
<?php if ($this->options->Project_1_Icon): ?>
<div class="icon"><img src="<?php $this->options->Project_1_Icon() ?>" height="30px" width="30px"></div>
<?php else: ?>
<div class="icon"></div>
<?php endif; ?>
<?php if ($this->options->Project_1_Name): ?>
<h3><?php $this->options->Project_1_Name() ?></h3>
<?php else: ?>
<h3>Project</h3>
<?php endif; ?>
<?php if ($this->options->Project_1_Icon): ?>
<div class="icon"><img src="<?php $this->options->Project_1_Icon() ?>" height="30px" width="30px"></div>
Expand Down Expand Up @@ -98,19 +85,6 @@
<a href="<?php $this->options->Project_2_URL() ?>" target="_blank" rel="noreferrer">
<?php else: ?>
<a href="#" target="_blank" rel="noreferrer">
<a href="<?php $this->options->Project_2_URL() ?>" target="_blank" rel="noreferrer">
<?php else: ?>
<a href="#" target="_blank" rel="noreferrer">
<?php endif; ?>
<?php if ($this->options->Project_2_Icon): ?>
<div class="icon"><img src="<?php $this->options->Project_2_Icon() ?>" height="30px" width="30px"></div>
<?php else: ?>
<div class="icon"></div>
<?php endif; ?>
<?php if ($this->options->Project_2_Name): ?>
<h3><?php $this->options->Project_2_Name() ?></h3>
<?php else: ?>
<h3>Project</h3>
<?php endif; ?>

<?php if ($this->options->Project_2_Icon): ?>
Expand Down Expand Up @@ -142,4 +116,4 @@
</div>
</main>
<?php $this->need('footer.php'); ?>
<!-- 完成重构 -->
<!-- 完成重构 -->

0 comments on commit 445898f

Please sign in to comment.