一言点击可更换

This commit is contained in:
底层用户 2022-05-22 13:50:08 +08:00
parent 30c55aaa29
commit 5f79695cef
4 changed files with 30 additions and 3 deletions

View File

@ -5,7 +5,7 @@
background: #ffffffcc;
border-radius: 8px;
opacity: 0.25;
z-index: 10086;
z-index: 99999999;
pointer-events: none;
transition: 0.2s ease-in-out;
transition-property: background, opacity, transform;

View File

@ -771,6 +771,7 @@ input[type="radio"]:checked+label {
/*Aplayer*/
.box-right {
flex: 0 54%;
max-width: 54%;
display: flex;
flex-direction: row;
justify-content: center;

View File

@ -79,8 +79,8 @@ class Cursor {
render() {
if (this.pos.prev) {
this.pos.prev.x = Math.lerp(this.pos.prev.x, this.pos.curr.x, 0.15);
this.pos.prev.y = Math.lerp(this.pos.prev.y, this.pos.curr.y, 0.15);
this.pos.prev.x = Math.lerp(this.pos.prev.x, this.pos.curr.x, 0.45);
this.pos.prev.y = Math.lerp(this.pos.prev.y, this.pos.curr.y, 0.45);
this.move(this.pos.prev.x, this.pos.prev.y);
} else {
this.pos.prev = this.pos.curr;

View File

@ -92,6 +92,32 @@ fetch('https://v1.hitokoto.cn?max_length=24')
})
.catch(console.error)
var time = 0;
$('#hitokoto').click(function () {
if (time == 0) {
time = 1;
var index = setInterval(function () {
time--;
if (time == 0) {
clearInterval(index);
}
}, 1000);
fetch('https://v1.hitokoto.cn?max_length=24')
.then(response => response.json())
.then(data => {
$('#hitokoto_text').html(data.hitokoto)
$('#from_text').html(data.from)
})
.catch(console.error)
} else {
iziToast.show({
timeout: 2000,
iconUrl: './img/icon/warn.png',
message: '你点太快了吧'
});
}
});
//获取天气
//每日限量 100 次
//请前往 https://www.tianqiapi.com/ 申请(免费)