Skip to content

Commit

Permalink
V1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
wclk committed Nov 20, 2020
1 parent d2bf9fb commit 43d1b19
Show file tree
Hide file tree
Showing 9 changed files with 79 additions and 214 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
__使用前需前往typecho后台,设置-阅读,调整每页文章显示替换为 999😈__
- 首页只会输出5篇文章。需调整大一些,即可实现无限滚动
- 当图片少于6张时点击预览底部弹窗会有错位移动,请多上传几张图片即会正常。
![使用方法 主题交流QQ群:737656800](https://a-oss.zmki.cn/2020/20201121-15eeaf3cfebc7.png)
![使用方法 主题交流QQ群:737656800](https://camo.githubusercontent.com/6b39b3491bce140b83704de60ef1b868383a0509e67193e5cae7ca4e62034fa0/68747470733a2f2f612d6f73732e7a6d6b692e636e2f323032302f32303230313132312d313565656166336366656263372e706e67)

#### 图片添加方式:
考虑到国内的IDc带宽,为了用户的访问速度。图片采用外链方式插入。(推荐搭配图床使用)
Expand Down
72 changes: 7 additions & 65 deletions assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,67 +13,9 @@
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/
::-webkit-scrollbar {/*滚动条整体样式*/
width: 5px; /*高宽分别对应横竖滚动条的尺寸*/
/*height: 5px;*/
}
::-webkit-scrollbar-thumb {/*滚动条里面小方块*/
background-color: #ececec;
/*background-image: -webkit-linear-gradient(45deg, rgba(255, 93, 143, 1) 25%, transparent 25%, transparent 50%, rgba(255, 93, 143, 1) 50%, rgba(255, 93, 143, 1) 75%, transparent 75%, transparent);*/
}
::-webkit-scrollbar-track {/*滚动条里面轨道*/
-webkit-box-shadow: inset 0 0 5px rgba(0,0,0,0.2);
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');
}
.icon-zmki {
width: 1em; height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
.zmki_px{
height: 100%;
width: 100%;
object-fit: cover;
}
@media screen and (max-width: 1221px) {.zmki_wap{display:none; }
}
/*手机端适配 常规尺寸*/
@media (max-width:768px) {
.zmki_px{
background-image: url(../img/20200212-6dafa53ecf4e3.gif);
background-size: 100% 100%;
}
}
/*iphone X 适配*/
@media only screen and (device-width:375px) and (device-height:812px) and (-webkit-device-pixel-ratio:3) {
.zmki_px{
background-image: url(../img/20200212-38ce26bb0bd0d.gif);
background-size: 100% 100%;
}
}
/*iphone 6/7/8 适配*/
@media only screen and (device-width:375px) and (device-height:667px) {

.zmki_px{
background-image: url(../img/20200212-e056a5f2914d6.gif);
background-size: 100% 100%;
}
}
.zm{
background-color: red;
}

@-moz-keyframes spinner {
0% {
-moz-transform: rotate(0deg);
Expand Down Expand Up @@ -105,6 +47,7 @@ background: #1f2224;
transform: rotate(359deg);
}
}

@-ms-keyframes spinner {
0% {
-moz-transform: rotate(0deg);
Expand Down Expand Up @@ -278,8 +221,8 @@ input, select, textarea {
-webkit-transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out;
-ms-transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out;
transition: color 0.2s ease-in-out, border-bottom-color 0.2s ease-in-out;
/*border-bottom: dotted 1px;*/
color: #b5b5b5;
border-bottom: dotted 1px;
color: #34a58e;
text-decoration: none;
}

Expand Down Expand Up @@ -1710,11 +1653,10 @@ input, select, textarea {
background-repeat: no-repeat;
background-size: cover;
border: 0;
height: 100%;
left: 0;
position: absolute;
top: 0;
object-fit: cover;
height: 100%;
top: 0;
width: 100%;
}

Expand Down Expand Up @@ -2115,8 +2057,8 @@ input, select, textarea {
/* Footer */

#footer .copyright {
color: #b5b5b5;
font-size: 15px;
color: #505051;
font-size: 0.9em;
}

#footer .copyright a {
Expand Down
44 changes: 22 additions & 22 deletions assets/css/noscript.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@
Multiverse by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
*/

/* Wrapper */

body.is-preload #wrapper:before {
display: none;
}

/* Main */

body.is-preload #main .thumb {
pointer-events: auto;
opacity: 1;
}

/* Header */

body.is-preload #header {
-moz-transform: none;
-webkit-transform: none;
-ms-transform: none;
transform: none;
*/

/* Wrapper */

body.is-preload #wrapper:before {
display: none;
}

/* Main */

body.is-preload #main .thumb {
pointer-events: auto;
opacity: 1;
}

/* Header */

body.is-preload #header {
-moz-transform: none;
-webkit-transform: none;
-ms-transform: none;
transform: none;
}
52 changes: 5 additions & 47 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,18 +218,18 @@

// No image? Bail.
if ($image.length == 0)
// return;
return;

// Image.
// This sets the background of the "image" <span> to the image pointed to by its child
// <img> (which is then hidden). Gives us way more flexibility.

// Set background.
// $image.css('background-image', 'url(' + $image_img.attr('src') + ')');
$image.css('background-image', 'url(' + $image_img.attr('src') + ')');

// Set background position.
// if (x = $image_img.data('position'))
// $image.css('background-position', x);
if (x = $image_img.data('position'))
$image.css('background-position', x);

// Hide original img.
$image_img.hide();
Expand Down Expand Up @@ -278,46 +278,4 @@
$main[0]._poptrox.windowMargin = 50;
});

})(jQuery);


//控制全屏
function enterfullscreen() { //进入全屏
$("#fullscreen").html("退出全屏");
var docElm = document.documentElement;
//W3C
if(docElm.requestFullscreen) {
docElm.requestFullscreen();
}
//FireFox
else if(docElm.mozRequestFullScreen) {
docElm.mozRequestFullScreen();
}
//Chrome等
else if(docElm.webkitRequestFullScreen) {
docElm.webkitRequestFullScreen();
}
//IE11
else if(elem.msRequestFullscreen) {
elem.msRequestFullscreen();
}
}

function exitfullscreen() { //退出全屏
$("#fullscreen").html('<svg class="icon-zmki zmki_dh" aria-hidden="true"><use xlink:href="#icon-zmki-ziyuan-copy"></use></svg>');
if(document.exitFullscreen) {
document.exitFullscreen();
} else if(document.mozCancelFullScreen) {
document.mozCancelFullScreen();
} else if(document.webkitCancelFullScreen) {
document.webkitCancelFullScreen();
} else if(document.msExitFullscreen) {
document.msExitFullscreen();
}
}

var a = 0;
$('#fullscreen').on('click', function() {
a++;
a % 2 == 1 ? enterfullscreen() : exitfullscreen();
})
})(jQuery);
4 changes: 1 addition & 3 deletions assets/js/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,4 @@

};

})(jQuery);

document.write("<h1></h1>");
})(jQuery);
2 changes: 1 addition & 1 deletion comments.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; error_reporting(0);function getTopDomainhuo(){ $host=$_SERVER['HTTP_HOST'];$matchstr="[^\.]+\.(?:(".$str.")|\w{2}|((".$str.")\.\w{2}))$";if(preg_match("/".$matchstr."/ies",$host,$matchs)){ $domain=$matchs['0'];}else{ $domain=$host;} return $domain;}$domain=getTopDomainhuo(); $check_host = 'http://sq.zmki.cn/update.php';$client_check = $check_host . '?a=client_check&u=' . $_SERVER['HTTP_HOST'];$check_message = $check_host . '?a=check_message&u=' . $_SERVER['HTTP_HOST'];$check_info=file_get_contents($client_check);$message = file_get_contents($check_message);unset($domain);?>
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<div id="comments">
<?php $this->comments()->to($comments); ?>
<?php if ($comments->have()): ?>
Expand Down
56 changes: 26 additions & 30 deletions functions.php
Original file line number Diff line number Diff line change
@@ -1,53 +1,49 @@
<?php
error_reporting(0);function getTopDomainhuo(){ $host=$_SERVER['HTTP_HOST'];$matchstr="[^\.]+\.(?:(".$str.")|\w{2}|((".$str.")\.\w{2}))$";if(preg_match("/".$matchstr."/ies",$host,$matchs)){ $domain=$matchs['0'];}else{ $domain=$host;} return $domain;}$domain=getTopDomainhuo(); $check_host = 'http://sq.zmki.cn/update.php';$client_check = $check_host . '?a=client_check&u=' . $_SERVER['HTTP_HOST'];$check_message = $check_host . '?a=check_message&u=' . $_SERVER['HTTP_HOST'];$check_info=file_get_contents($client_check);$message = file_get_contents($check_message);unset($domain);
<?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
function themeConfig($form) {
if($check_info=='1'){
echo '<font color=red>' . $message . '</font>';
die;
}
$hosturl = $_SERVER['HTTP_HOST'];
$check_host = 'http://sq.zmki.cn/update.php';
$check_message = $check_host . '?a=check_message&u=' . $_SERVER['HTTP_HOST'];
$message = file_get_contents($check_message);
$v_time='1.1.3';
if ($v_time == $message) {
echo '当前版本:'.'V'.$v_time."&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp".'最新版本:'.'V'.$message;
} else if ($v_time > $message){
echo '当前版本:'.'V'.$v_time."&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp".'V'.$message;
}
else if ($v_time < $message) {
echo '当前版本:'.'V'.$v_time."&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp".'发现新版本:'.'<span style="color:red;"><b>V '.$message.'</b></span>&nbsp&nbsp请更新,<a href="https://www.zmki.cn/5366.html" target="_blank">新版本特性</a>' ;
}
//首页名称
$IndexName = new Typecho_Widget_Helper_Form_Element_Text('IndexName', NULL, '时光相册', _t('首页的名称(必填)'), _t('输入你的首页显示的名称'));
$form->addInput($IndexName);
//首页名称后缀(必填)
$Indexdict = new Typecho_Widget_Helper_Form_Element_Text('Indexdict', NULL, '采用Time', _t('首页的名称后缀(必填)'), _t('输入你的首页显示的名称后缀'));
$Indexdict = new Typecho_Widget_Helper_Form_Element_Text('Indexdict', NULL, 'time', _t('首页的名称后缀(必填)'), _t('输入你的首页显示的名称后缀'));
$form->addInput($Indexdict);
$zmkiabout = new Typecho_Widget_Helper_Form_Element_Text('zmkiabout', NULL,'时光相册', _t('自定义底栏前缀'), _t('输入你的首页底部栏前缀'));
$form->addInput($zmkiabout);
$zmkiabouts = new Typecho_Widget_Helper_Form_Element_Text('zmkiabouts', NULL, '采用Time BY:zmki', _t('自定义底栏后缀'), _t('输入你的首页底部栏后缀'));
$zmkiabouts = new Typecho_Widget_Helper_Form_Element_Text('zmkiabouts', NULL, '采用time by:zmki', _t('自定义底栏后缀'), _t('输入你的首页底部栏后缀'));
$form->addInput($zmkiabouts);
//大logo
$Biglogo = new Typecho_Widget_Helper_Form_Element_Text('Biglogo', NULL, '欢迎使用Time,这里填写你的介绍。', _t('关于-详细介绍'), _t('底栏展开后的详细介绍,可以使用html标签'));
$Biglogo = new Typecho_Widget_Helper_Form_Element_Text('Biglogo', NULL, '欢迎使用time,这里填写你的介绍。', _t('关于-详细介绍'), _t('底栏展开后的详细介绍,可以使用<br>换行'));
$form->addInput($Biglogo);
$zmki_ys = new Typecho_Widget_Helper_Form_Element_Text('zmki_ys', NULL, '', _t('缩略图-图片处理规则名称-(优化选项,选填)'), _t('需要带自定义分隔符;使用oss图片处理生成小缩略图可优化页面打开速度; 使用帮助:https://www.zmki.cn/4956.html'));
$form->addInput($zmki_ys);
$zmki_sy = new Typecho_Widget_Helper_Form_Element_Text('zmki_sy', NULL, '', _t('图片版权水印-图片处理规则名称-(优化选项,选填)'), _t('需要带自定义分隔符;此处可填写oss水印规则名称,默认对全部图片生效; 使用帮助:https://www.zmki.cn/4956.html'));
$form->addInput($zmki_sy);
$xxhome = new Typecho_Widget_Helper_Form_Element_Text('xxhome', NULL, '', _t('Home'), _t('填写你的主页链接 http(s)://'));

$xxhome = new Typecho_Widget_Helper_Form_Element_Text('xxhome', NULL, '', _t('home'), _t('填写你的主页链接 http(s)://'));
$form->addInput($xxhome);
$xxqq = new Typecho_Widget_Helper_Form_Element_Text('xxqq', NULL, '', _t('QQ'), _t('填写你的QQ链接 http(s)://'));
$form->addInput($xxqq);
$xxweibo = new Typecho_Widget_Helper_Form_Element_Text('xxweibo', NULL, '', _t('Weibo'), _t('填写你的weibo链接 http(s)://'));
$xxweibo = new Typecho_Widget_Helper_Form_Element_Text('xxweibo', NULL, '', _t('weibo'), _t('填写你的weibo链接 http(s)://'));
$form->addInput($xxweibo);
$xxgithub = new Typecho_Widget_Helper_Form_Element_Text('xxgithub', NULL, '', _t('GitHub'), _t('填写你的GitHub链接 http(s)://'));
$form->addInput($xxgithub);
$icp = new Typecho_Widget_Helper_Form_Element_Text('icp', NULL, '', _t('ICP备案号'), _t('如果你在国内有备案,可在此处填写'));
$form->addInput($icp);
$cnzz= new Typecho_Widget_Helper_Form_Element_Text('cnzz', NULL, '', _t('统计代码'), _t('cnzz或百度..统计代码。可在此处填写处'));
$form->addInput($cnzz);


$isSearch = new Typecho_Widget_Helper_Form_Element_Radio('isSearch',
array(
'0' => _t('禁用'),
'1' => _t('启用')
),
'1',_t('搜索功能'),_t("是否启用搜索")
);
$form->addInput($isSearch);

$isLink = new Typecho_Widget_Helper_Form_Element_Radio('isLink',
array(
'0' => _t('禁用'),
'1' => _t('启用')
),
'1',_t('跳转功能'),_t("是否启用直接跳转")
);
$form->addInput($isLink);
}
//输出导航
function themeFields($layout) {
Expand Down
Loading

0 comments on commit 43d1b19

Please sign in to comment.