-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
178 additions
and
31 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>被雪覆盖的长城,中国 (© View Stock/Alamy Stock Photo)|2025-01-08|必应壁纸|Bing Wallpaper</title> | ||
<meta charset="UTF-8"> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<meta name="description" content="每日必应超清壁纸(4K)"> | ||
<meta name="keywords" content="bing wallpaper, 必应壁纸, 必应4k壁纸, 必应超清壁纸, 壁纸"> | ||
<link rel="stylesheet" href="/css/w3.css"> | ||
<link rel="icon" href="/img/fav.jpg"> | ||
<style> | ||
body, | ||
html { | ||
height: 100%; | ||
margin: 0; | ||
} | ||
.bgimg { | ||
background-image: url("https://cn.bing.com/th?id=OHR.GreatWallStairs_ZH-CN4045949792_UHD.jpg&pid=hp&w=1920"); | ||
height: 100%; | ||
position: relative; | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
display: none; /* 最初隐藏大图 */ | ||
} | ||
.smallImg { | ||
filter: blur(15px); | ||
-webkit-filter: blur(15px); | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
height: 100%; | ||
width: 100%; | ||
background-image: url("https://cn.bing.com/th?id=OHR.GreatWallStairs_ZH-CN4045949792_UHD.jpg&pid=hp&w=480"); /* 使用小图 */ | ||
background-position: center; | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
transition: opacity 2s; /* 平滑过渡效果 */ | ||
} | ||
</style> | ||
<script> | ||
var _hmt = _hmt || []; | ||
(function() { | ||
var hm = document.createElement("script"); | ||
hm.src = "https://hm.baidu.com/hm.js?b59b4b29843942e412b704c39cc7363a"; | ||
var s = document.getElementsByTagName("script")[0]; | ||
s.parentNode.insertBefore(hm, s); | ||
})(); | ||
|
||
function imgloading() { | ||
var bgImg = document.querySelector('.bgimg'); | ||
var smallImg = document.querySelector('.smallImg'); | ||
// 创建一个新的图片对象以监控加载状态 | ||
var img = new Image(); | ||
img.src = 'https://cn.bing.com/th?id=OHR.GreatWallStairs_ZH-CN4045949792_UHD.jpg&pid=hp&w=1920'; // 从背景图中提取URL | ||
img.onload = function() { | ||
// 当大图加载完成时,首先显示大图 | ||
bgImg.style.display = "block"; | ||
// 小图逐渐变透明 | ||
smallImg.style.opacity = 0; | ||
// 在小图完全透明后,隐藏它 | ||
setTimeout(function() { | ||
smallImg.style.display = "none"; | ||
}, 2000); // 与过渡时长匹配 | ||
}; | ||
} | ||
window.onload = imgloading; // 页面加载时执行 | ||
</script> | ||
</head> | ||
<body> | ||
<div class="smallImg"></div> <!-- 模糊的小图 --> | ||
<div class="bgimg w3-text-white"> | ||
<a href="/"> | ||
<div class="w3-display-topleft w3-padding-large w3-xlarge"> | ||
Bing Wallpaper | ||
</div> | ||
</a> | ||
<div class="w3-display-bottomleft w3-padding-large"> | ||
<h1 class="w3-xlarge">2025-01-08</h1> | ||
<p class="w3-large" style="margin-top: 0px;">被雪覆盖的长城,中国 (© View Stock/Alamy Stock Photo)</p> | ||
</div> | ||
<div class="w3-display-topright w3-padding-large"> | ||
<div class="w3-large w3-padding-large"> | ||
<svg t="1723548427433" style="margin-bottom: -3px;" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4583" width="20" height="20"><path d="M1024 896v128H0v-320h128v192h768v-192h128v192zM576 554.688L810.688 320 896 405.312l-384 384-384-384L213.312 320 448 554.688V0h128v554.688z" fill="#e6e6e6" p-id="4584"></path></svg> | ||
<a target="_blank" href="https://cn.bing.com/th?id=OHR.GreatWallStairs_ZH-CN4045949792_UHD.jpg">4K</a> | ||
<a target="_blank" href="https://cn.bing.com/th?id=OHR.GreatWallStairs_ZH-CN4045949792_UHD.jpg&pid=hp&w=1920">1080P</a> | ||
<!-- <svg style="margin-bottom: -5px;cursor: pointer;" t="1732533547175" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6028" width="24" height="24"><path d="M533.504 268.288q33.792-41.984 71.68-75.776 32.768-27.648 74.24-50.176t86.528-19.456q63.488 5.12 105.984 30.208t67.584 63.488 34.304 87.04 6.144 99.84-17.92 97.792-36.864 87.04-48.64 74.752-53.248 61.952q-40.96 41.984-85.504 78.336t-84.992 62.464-73.728 41.472-51.712 15.36q-20.48 1.024-52.224-14.336t-69.632-41.472-79.872-61.952-82.944-75.776q-26.624-25.6-57.344-59.392t-57.856-74.24-46.592-87.552-21.504-100.352 11.264-99.84 39.936-83.456 65.536-61.952 88.064-35.328q24.576-5.12 49.152-1.536t48.128 12.288 45.056 22.016 40.96 27.648q45.056 33.792 86.016 80.896z" p-id="6029" fill="white"></path></svg>--> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
|
||
<script> | ||
document.addEventListener('DOMContentLoaded', function() { | ||
// 获取当前URL | ||
const currentUrl = new URL(window.location.href); | ||
// 解析日期部分 | ||
const datePart = currentUrl.pathname.match(/\/(\d{4}\d{2})\/(\d{2})(?:\.html)?$/); | ||
if (!datePart) { | ||
console.error("Invalid URL format"); | ||
return; | ||
} | ||
|
||
var year = parseInt(datePart[1].slice(0, 4), 10); | ||
var month = parseInt(datePart[1].slice(4, 6), 10); | ||
var day = parseInt(datePart[2], 10); | ||
|
||
document.addEventListener('keydown', function(event) { | ||
if (event.key === 'ArrowLeft') { | ||
// 向左箭头,跳转到前一天 | ||
day -= 1; | ||
if (day <= 0) { | ||
month -= 1; | ||
if (month <= 0) { | ||
year -= 1; | ||
month = 12; | ||
} | ||
day = new Date(year, month, 0).getDate(); | ||
} | ||
} else if (event.key === 'ArrowRight') { | ||
// 向右箭头,跳转到后一天 | ||
day += 1; | ||
const lastDayOfMonth = new Date(year, month, 0).getDate(); | ||
if (day > lastDayOfMonth) { | ||
month += 1; | ||
if (month > 12) { | ||
year += 1; | ||
month = 1; | ||
} | ||
day = 1; | ||
} | ||
} | ||
|
||
const newDateStr = `${year.toString().padStart(4, '0')}${month.toString().padStart(2, '0')}/${day.toString().padStart(2, '0')}.html`; | ||
const region = currentUrl.pathname.includes("zh-cn")? "/zh-cn" : ""; | ||
const newUrl = new URL(currentUrl.origin + region+ '/day/' + newDateStr); | ||
window.location.href = newUrl.toString(); | ||
}); | ||
}); | ||
</script> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"file_name":"zh-cn_2025-01-07.jpg", | ||
"url":"https://cn.bing.com/th?id=OHR.BouldersNZ_ZH-CN6750253580_UHD.jpg&rf=LaDigue_UHD.jpg&pid=hp&w=3840&h=2160&rs=1&c=4", | ||
"date":"2025-01-07", | ||
"file_name":"zh-cn_2025-01-08.jpg", | ||
"url":"https://cn.bing.com/th?id=OHR.GreatWallStairs_ZH-CN4045949792_UHD.jpg&rf=LaDigue_UHD.jpg&pid=hp&w=3840&h=2160&rs=1&c=4", | ||
"date":"2025-01-08", | ||
"region":"zh-cn", | ||
"desc":"日落时的摩拉基大圆石,南岛,新西兰 (© Douglas Pearson/eStock Photo)" | ||
"desc":"被雪覆盖的长城,中国 (© View Stock/Alamy Stock Photo)" | ||
} |
Oops, something went wrong.