diff --git a/css/cursor.css b/css/cursor.css index b791917..6d94ec7 100644 --- a/css/cursor.css +++ b/css/cursor.css @@ -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; diff --git a/css/style.css b/css/style.css index 0bd4b7c..87f0673 100644 --- a/css/style.css +++ b/css/style.css @@ -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; diff --git a/js/cursor.js b/js/cursor.js index 1b347e7..0d5c55f 100644 --- a/js/cursor.js +++ b/js/cursor.js @@ -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; diff --git a/js/main.js b/js/main.js index ca47e29..3adc31a 100644 --- a/js/main.js +++ b/js/main.js @@ -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/ 申请(免费)