Skip to content

Commit

Permalink
Merge pull request #4 from zhheo/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
zhheo authored Jan 29, 2023
2 parents f0d837e + bbd1ba8 commit 99fb0a3
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 60 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ Demo: [立即查看](https://plog.zhheo.com/)

配合图片处理: [查看教程](https://github.com/zhheo/TimePlus/wiki/%E9%98%BF%E9%87%8C%E4%BA%91oss%E3%80%81%E5%8F%88%E6%8B%8D%E4%BA%91%E5%82%A8%E5%AD%98%E7%AD%89%E5%82%A8%E5%AD%98%E6%A1%B6%E5%9B%BE%E7%89%87%E5%A4%84%E7%90%86%E4%BB%8B%E7%BB%8D-%E2%80%93%E9%85%8D%E5%90%88-Time%E6%97%B6%E5%85%89%E7%9B%B8%E5%86%8C%E4%BD%BF%E7%94%A8)

## 最新版本 2.3
## 最新版本 2.4

- 分类菜单过渡效果
- 修改最新版本检测逻辑
- 图标移除fontawesome

## 致谢:

Expand Down
5 changes: 0 additions & 5 deletions assets/css/fontawesome-all.min.css

This file was deleted.

50 changes: 11 additions & 39 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,6 @@ Free for personal and commercial use under the CCA 3.0 license (html5up.net/lice
background: #1f2224;
}

@font-face {
font-family: 'iconfont';
/* project id 1635479 */
src: url('//at.alicdn.com/t/font_1635479_m8o2ir6mitf.eot');
src: url('//at.alicdn.com/t/font_1635479_m8o2ir6mitf.eot?#iefix') format('embedded-opentype'),
url('//at.alicdn.com/t/font_1635479_m8o2ir6mitf.woff2') format('woff2'),
url('//at.alicdn.com/t/font_1635479_m8o2ir6mitf.woff') format('woff'),
url('//at.alicdn.com/t/font_1635479_m8o2ir6mitf.ttf') format('truetype'),
url('//at.alicdn.com/t/font_1635479_m8o2ir6mitf.svg#iconfont') format('svg');
}

li {
list-style-type:none;
}
Expand Down Expand Up @@ -1042,41 +1031,20 @@ input[type="radio"]+label:before {

/* Icon */

.icon {
.iconfont {
text-decoration: none;
border-bottom: none;
position: relative;
}

.icon:before {
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
display: inline-block;
font-style: normal;
font-variant: normal;
text-rendering: auto;
line-height: 1;
text-transform: none !important;
font-family: 'Font Awesome 5 Free';
font-weight: 400;
}

.icon>.label {
.iconfont>.label {
display: none;
}

.icon:before {
.iconfont:before {
line-height: inherit;
}

.icon.solid:before {
font-weight: 900;
}

.icon.brands:before {
font-family: 'Font Awesome 5 Brands';
}

/* List */

ol {
Expand Down Expand Up @@ -1263,12 +1231,16 @@ ul.icons li:last-child {
padding-right: 0;
}

ul.icons li .icon:before {
font-size: 1.2rem;
ul.icons li .iconfont:before {
font-size: 28px;
line-height: 1;
height: 28px;
margin: auto;
display: contents;
}


ul.icons li .icon {
ul.icons li .iconfont {
color: var(--heo-card-bg);
width: 40px;
height: 40px;
Expand All @@ -1280,7 +1252,7 @@ ul.icons li .icon {
transition: 0.3s;
}

ul.icons li:hover .icon {
ul.icons li:hover .iconfont {
color: var(--heo-fontcolor);
background: var(--heo-theme);
}
Expand Down
15 changes: 8 additions & 7 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ function themeConfig($form)
}
$data = json_decode(file_get_contents('https://plog.zhheo.com/usr/themes/time/releases.json'), true);
$message = $data['tag_name'];
$v_time = '2.3';
if ($v_time == $message) {
echo 'TimePlus&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp当前版本:' . 'v' . $v_time . "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp" . '最新版本:' . 'v' . $message;
} else if ($v_time > $message) {
echo 'TimePlus&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp当前版本:' . 'v' . $v_time . "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp" . '最新版本:' . 'v' . $message;
} else if ($v_time < $message) {
echo 'TimePlus&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp当前版本:' . 'v' . $v_time . "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp" . '发现新版本:' . '<span style="color:red;"><b>v ' . $message . '</b></span>&nbsp&nbsp请更新,<a href="https://github.com/zhheo/TimePlus/releases" target="_blank">新版本特性</a>';
//当前版本号
$selfmessage = '2.4';
if ($selfmessage == $message) {
echo 'TimePlus&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp当前版本:' . 'v' . $selfmessage . "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp" . '最新版本:' . 'v' . $message;
} else if ($selfmessage > $message) {
echo 'TimePlus&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp当前版本:' . 'v' . $selfmessage . "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp" . '最新版本:' . 'v' . $message;
} else if ($selfmessage < $message) {
echo 'TimePlus&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp当前版本:' . 'v' . $selfmessage . "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp" . '发现新版本:' . '<span style="color:red;"><b>v ' . $message . '</b></span>&nbsp&nbsp请更新,<a href="https://github.com/zhheo/TimePlus/releases" target="_blank">新版本特性</a>';
}
//首页名称
$IndexName = new Typecho_Widget_Helper_Form_Element_Text('IndexName', NULL, '时光相册', _t('首页的名称(必填)'), _t('输入你的首页显示的名称'));
Expand Down
12 changes: 6 additions & 6 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* 一款相册主题,Plus系列目前由Heo维护
* @package TimePlus
* @author zhheo
* @version 2.2
* @version 2.4
* @link https://zhheo.com/
*/
?>
Expand All @@ -24,7 +24,7 @@
<link rel="stylesheet" type="text/css" href="<?php $this->options->themeUrl('assets/css/noscript.css'); ?>" />
<noscript><link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/noscript.css'); ?>" /></noscript>
<link rel="stylesheet" href="<?php $this->options->themeUrl('assets/css/main.css'); ?>" />
<link rel="stylesheet" href="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/font-awesome/6.0.0/css/all.min.css">
<link rel="stylesheet" href="https://cdn3.codesign.qq.com/icons/dDyopjDLkGjVe1g/latest/iconfont.css">
<link rel="stylesheet" href="//at.alicdn.com/t/font_1635479_m8o2ir6mitf.css">
<script src="https://at.alicdn.com/t/font_1635479_m8o2ir6mitf.js"></script>
</head>
Expand All @@ -37,7 +37,7 @@
<ul>
<li class='nav-item'><a class="icon solid fa-info-circle nav-item-name">分类</a><?php \Widget\Metas\Category\Rows::alloc()->listCategories('wrapClass=nav-item-child'); ?></li>
<li><a type="button" id="fullscreen" class="btn btn-default visible-lg visible-md" alt="切换全屏"><svg class="icon-zmki zmki_dh zmki_wap" aria-hidden="true"><use xlink:href="#icon-zmki-ziyuan-copy"></use></svg></a></li>
<li><a href="#footer" class="icon solid fa-info-circle">关于</a></li>
<li><a href="#footer">关于</a></li>
</ul>
</nav>
</header>
Expand Down Expand Up @@ -71,9 +71,9 @@
<section>
<h2>联系我</h2>
<ul class="icons">
<li><a href="<?php $this->options->xxhome()?>" target="_blank" class="icon solid fa-house" rel="noopener nofollow"><span class="label">HOOME</span></a></li>
<li><a href="<?php $this->options->xxweibo()?>" target="_blank" class="icon brands fa-weibo" rel="noopener nofollow"><span class="label">weibo</span></a></li>
<li><a href="<?php $this->options->xxgithub()?> " target="_blank" class="icon brands fa-github" rel="noopener nofollow"><span class="label">GitHub</span></a></li>
<li><a href="<?php $this->options->xxhome()?>" target="_blank" class="iconfont icon-shouye" rel="noopener nofollow"><span class="label">首页</span></a></li>
<li><a href="<?php $this->options->xxweibo()?>" target="_blank" class="iconfont icon-weibo" rel="noopener nofollow"><span class="label">微博</span></a></li>
<li><a href="<?php $this->options->xxgithub()?> " target="_blank" class="iconfont icon-github" rel="noopener nofollow"><span class="label">GitHub</span></a></li>
</ul>
</section>
<span style="color: #b5b5b5; font-size: 0.8em;">
Expand Down
2 changes: 1 addition & 1 deletion releases.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"tag_name": "2.3"
"tag_name": "2.4"
}

0 comments on commit 99fb0a3

Please sign in to comment.