调整图片

This commit is contained in:
hehh
2024-08-19 10:43:39 +08:00
parent 87916daf9b
commit 233a4bd1bf
7 changed files with 23 additions and 11 deletions

BIN
images/bj/10.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

BIN
images/bj/8.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

BIN
images/bj/9.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 47 KiB

View File

@@ -121,7 +121,7 @@
</p>
</div>
</header>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/listener-He/Home/assets/js/main.js"></script>
<script type="text/javascript" src="./assets/js/main.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/listener-He/Home/assets/json/images.json?cb=getBingImages"></script>
<script async src="https://analyse.hehouhui.cn/tracker.js" data-ackee-server="https://analyse.hehouhui.cn" data-ackee-domain-id="7887135f-a413-46e2-a98c-52d4f18d9973"></script>
<script>

View File

@@ -15,7 +15,7 @@
<title>Honesty的主页</title>
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/listener-He/Home/css/style.css">
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/listener-He/Home/css/iconfont.css">
<link rel="apple-touch-icon" href="https://cdn.jsdelivr.net/gh/listener-He/Home/images/apple-touch-icon.png">
<link rel="apple-touch-icon" href="https://blog-file.hehouhui.cn/bj/logo.png">
<link rel="icon" href="https://cdn.jsdelivr.net/gh/listener-He/Home/favicon.ico">
<script src="https://cdn.jsdelivr.net/gh/listener-He/Home/js/bj.js"></script>
<!--引入SweetAlert
@@ -43,7 +43,7 @@
<i class="social iconfont icon-ngleup btn-mobile-close__icon hidden"></i>
</span>-->
<header id="panel" class="panel-cover"
style="background: url(https://cdn.jsdelivr.net/gh/listener-He/Home/images/bj/1.jpg) center center / cover no-repeat rgb(102, 102, 102);">
style="background: url(https://blog-file.hehouhui.cn/bj/1.jpg) center center / cover no-repeat rgb(102, 102, 102);">
<!--星空背景-->
<div id="stars"></div>
<div id="stars2"></div>
@@ -216,4 +216,14 @@ var _hmt = _hmt || [];
s.parentNode.insertBefore(hm, s);
})();
</script>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-DYWDEVKDP0"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-DYWDEVKDP0');
</script>
</body>

View File

@@ -44,23 +44,25 @@ $(document).ready(function () {
var imgUrls = JSON.parse(sessionStorage.getItem("imgUrls"));
var index = sessionStorage.getItem("index");
var $panel = $('#panel');
var date = new Date();
var dayOfWeek = date.getDay() + 1;
if (imgUrls == null) {
imgUrls = new Array();
index = 0;
for (let i = 1; i < 8; i++) {
imgUrls.push("https://cdn.jsdelivr.net/gh/listener-He/Home/images/bj/"+i+".jpg");
imgUrls.push("https://blog-file.hehouhui.cn/bj/"+i+".jpg");
}
sessionStorage.setItem("imgUrls", JSON.stringify(imgUrls));
sessionStorage.setItem("index", index);
// sessionStorage.setItem("index", index);
} else {
if (index == 7)
index = 0;
else
index++;
sessionStorage.setItem("index", index);
// if (index == imgUrls.length)
// index = 0;
// else
// index++;
// sessionStorage.setItem("index", index);
}
var imgUrl = imgUrls[index];
var imgUrl = imgUrls[dayOfWeek];
$panel.css("background", "url('" + imgUrl + "') center center no-repeat #666");
$panel.css("background-size", "cover");