Bläddra i källkod

bug

pull/16/head
Zisbusy 2 år sedan
förälder
incheckning
8270499163
4 ändrade filer med 43 tillägg och 21 borttagningar
  1. +8
    -2
      Akina/footer.php
  2. +3
    -2
      Akina/header.php
  3. +32
    -16
      Akina/js/global.js
  4. +0
    -1
      Akina/page.php

+ 8
- 2
Akina/footer.php Visa fil

@ -59,8 +59,14 @@
if (!!window.ActiveXObject || "ActiveXObject" in window) { //is IE?
alert('请抛弃万恶的IE系列浏览器吧。');
}
//判断下拉加载
<?php if (!empty($this->options->menu) && in_array('xl', $this->options->menu)): ?>var xl = "1";<?php else: ?> var xl = "0";<?php endif; ?>
<?php
//判断下拉加载
if (!empty($this->options->menu) && in_array('xl', $this->options->menu)) {$xl = 1;} else {$xl = 0;}
// 判断导航栏是否透明
if (!empty($this->options->menu) && in_array('transparent', $this->options->menu)) {$transparent = 1;} else {$transparent = 0;}
?>
var xl = <?php echo $xl ?>;
var transparent = <?php echo $transparent ?>;
</script>
<?php echo '
<script type="text/javascript" src="'.theurl.'js/jquery.min.js"></script>

+ 3
- 2
Akina/header.php Visa fil

@ -9,8 +9,9 @@ define("theurl",$theurl);
define("theprofile", authorProfile($this->options->profile,theurl));
?>
<!DOCTYPE HTML>
<html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="renderer" content="webkit">
@ -21,7 +22,7 @@ define("theprofile", authorProfile($this->options->profile,theurl));
<?php $this->header('generator=&template=&pingback=&xmlrpc=&wlw='); ?>
<link rel='dns-prefetch' href="<?php $this->options->DNS();?>" />
<?php echo '
<link rel="shortcut icon" href="'.theurl.'images/favicon.ico">
<link rel="shortcut icon" href="'.theurl.'images/favicon.ico" type="image/x-icon">
<link rel="stylesheet" href="'.theurl.'css/style.css" type="text/css" />
<link rel="stylesheet" href="'.theurl.'css/OwO.css" type="text/css" />';
if (!empty($this->options->menu) && in_array('dark', $this->options->menu)) {

+ 32
- 16
Akina/js/global.js Visa fil

@ -439,25 +439,41 @@ if (tables.length != 0) {
// 获取目录主体
let doc = document.getElementById('toc-container');
if (doc != null) {
// 检测有无文章头图
let postbgBox = document.getElementsByClassName('pattern-center');
// 默认值
let uptoTop = 660;
let fixtoTop = 460;
let postbgBox = document.getElementsByClassName('pattern-center');
// 默认数据
let uptoTop = 0;
let fixtoTop = 0;
// 判断导航栏有没有透明
if (transparent == 1) {
// 透明-判断有无文章头图
if ( postbgBox.length == 0 ) {
uptoTop = 160;
fixtoTop = -40;
uptoTop = 100;
fixtoTop = -100;
} else {
uptoTop = 600;
fixtoTop = 400;
}
window.onscroll = function () {
// 获取距离页面顶部的距离
let toTop = document.documentElement.scrollTop || document.body.scrollTop;
if ( toTop > uptoTop ) {
let boxtoTop = toTop - fixtoTop;
doc.style.cssText = 'top: '+ boxtoTop +'px;';
} else {
doc.style.cssText = '';
}
} else {
// 不透明-判断有无文章头图
if ( postbgBox.length == 0 ) {
uptoTop = 160;
fixtoTop = -40;
} else {
// 默认数据
uptoTop = 660;
fixtoTop = 460;
}
}
window.onscroll = function () {
// 获取距离页面顶部的距离
let toTop = document.documentElement.scrollTop || document.body.scrollTop;
if ( toTop > uptoTop ) {
let boxtoTop = toTop - fixtoTop;
doc.style.cssText = 'top: '+ boxtoTop +'px;';
} else {
doc.style.cssText = '';
}
}
}
//版本显示
console.log("%cAkina for Typecho 4.1.0","background:#A0DAD0;color:#fff;margin:10px;padding:6px;border-radius:3px;","https://zhebk.cn");

+ 0
- 1
Akina/page.php Visa fil

@ -31,7 +31,6 @@
}
?>
<!-- 透明导航栏后调整间距 -->
<!-- 透明导航栏后调整间距 -->
<?php if (strlen($bgImgUrl) <= 4 && !empty($this->options->menu) && in_array('transparent', $this->options->menu) ): ?>
<style>
.site-main {

Laddar…
Avbryt
Spara