调整图片
This commit is contained in:
BIN
images/bj/10.jpg
Normal file
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
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
BIN
images/bj/9.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 MiB |
BIN
images/logo.png
BIN
images/logo.png
Binary file not shown.
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 47 KiB |
@@ -121,7 +121,7 @@
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</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 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 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>
|
<script>
|
||||||
|
|||||||
14
index.html
14
index.html
@@ -15,7 +15,7 @@
|
|||||||
<title>Honesty的主页</title>
|
<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/style.css">
|
||||||
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/listener-He/Home/css/iconfont.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">
|
<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>
|
<script src="https://cdn.jsdelivr.net/gh/listener-He/Home/js/bj.js"></script>
|
||||||
<!--引入SweetAlert
|
<!--引入SweetAlert
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
<i class="social iconfont icon-ngleup btn-mobile-close__icon hidden"></i>
|
<i class="social iconfont icon-ngleup btn-mobile-close__icon hidden"></i>
|
||||||
</span>-->
|
</span>-->
|
||||||
<header id="panel" class="panel-cover"
|
<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="stars"></div>
|
||||||
<div id="stars2"></div>
|
<div id="stars2"></div>
|
||||||
@@ -216,4 +216,14 @@ var _hmt = _hmt || [];
|
|||||||
s.parentNode.insertBefore(hm, s);
|
s.parentNode.insertBefore(hm, s);
|
||||||
})();
|
})();
|
||||||
</script>
|
</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>
|
</body>
|
||||||
|
|||||||
18
js/main.js
18
js/main.js
@@ -44,23 +44,25 @@ $(document).ready(function () {
|
|||||||
var imgUrls = JSON.parse(sessionStorage.getItem("imgUrls"));
|
var imgUrls = JSON.parse(sessionStorage.getItem("imgUrls"));
|
||||||
var index = sessionStorage.getItem("index");
|
var index = sessionStorage.getItem("index");
|
||||||
var $panel = $('#panel');
|
var $panel = $('#panel');
|
||||||
|
var date = new Date();
|
||||||
|
var dayOfWeek = date.getDay() + 1;
|
||||||
if (imgUrls == null) {
|
if (imgUrls == null) {
|
||||||
imgUrls = new Array();
|
imgUrls = new Array();
|
||||||
index = 0;
|
index = 0;
|
||||||
for (let i = 1; i < 8; i++) {
|
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("imgUrls", JSON.stringify(imgUrls));
|
||||||
sessionStorage.setItem("index", index);
|
// sessionStorage.setItem("index", index);
|
||||||
} else {
|
} else {
|
||||||
if (index == 7)
|
// if (index == imgUrls.length)
|
||||||
index = 0;
|
// index = 0;
|
||||||
else
|
// else
|
||||||
index++;
|
// index++;
|
||||||
sessionStorage.setItem("index", 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", "url('" + imgUrl + "') center center no-repeat #666");
|
||||||
$panel.css("background-size", "cover");
|
$panel.css("background-size", "cover");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user