Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] dev from imsyy:dev #1

Open
wants to merge 32 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c93d7d2
feat: add Actions
imsyy Dec 2, 2023
1e0fe3e
feat: 添加部署说明
imsyy Dec 2, 2023
b28f92b
feat: Add Docker #107
imsyy Dec 6, 2023
a8b1d66
fix: 修复教书先生API接口调用失败 #224
imsyy Dec 11, 2023
f3dd5b8
fix: fix the logo be cut in small screen #157
nova1751 Dec 16, 2023
78e0d05
Merge pull request #226 from nova1751/dev
imsyy Dec 19, 2023
d085ccc
feat: 替换 vue3-aplayer 插件,并添加播放器设置选项
first19326 Jan 1, 2024
e229004
Merge pull request #229 from first19326/dev
imsyy Jan 2, 2024
f016348
feat: 新增 GitHub 仓库列表
imsyy Jan 2, 2024
27780c6
fix: 修复了播放器未加载完成或加载失败时,键盘控制事件仍旧生效的问题
first19326 Jan 2, 2024
c94b230
feat: 更新 vue-aplayer 版本
first19326 Jan 2, 2024
c068f67
Merge pull request #230 from first19326/dev
imsyy Jan 3, 2024
550545f
fix: 修复备用接口获取天气时显示失败的问题
Libw-I Feb 24, 2024
4b60e7e
Merge pull request #252 from L1bw/dev
imsyy Mar 11, 2024
e8b69c5
feat: 优化部分样式 #259
imsyy Mar 11, 2024
462aab2
🐞 fix: 修复一系列问题
imsyy Apr 24, 2024
70e7fa5
🦄 refactor: 移除 env
imsyy Apr 24, 2024
777979f
🐞 fix: 修正时间统计错误
imsyy Apr 28, 2024
e7a4cf7
🐞 fix: 修复移动端样式异常
imsyy Apr 28, 2024
52602e9
🐞 fix: 更新壁纸接口 #302
imsyy Jun 5, 2024
6b778d3
🐞 fix: author和percentage的修正和部分优化
supine0703 Jun 29, 2024
0ea222c
feat: 解决小屏移动端显示问题 并优化细节
supine0703 Jun 29, 2024
7ecc902
Merge pull request #315 from supine0703/dev
imsyy Jul 10, 2024
f616670
🐞 fix: 修复时间胶囊周计算错误
first19326 Jul 29, 2024
23c59bf
Merge pull request #333 from first19326/dev
imsyy Aug 2, 2024
f355925
📃 docs: 更新说明
imsyy Aug 5, 2024
3d46072
Merge branch 'dev' of github.com:imsyy/home into dev
imsyy Aug 5, 2024
f29aa6c
perf: optimize the performance when the cursor is still
nova1751 Aug 24, 2024
f333797
fix: 修正建站日期统计算法
Libw-I Sep 16, 2024
31bbcc3
Merge pull request #356 from Libw-I/dev
imsyy Sep 30, 2024
29062f2
Merge branch 'dev' into dev
imsyy Sep 30, 2024
081834c
Merge pull request #347 from nova1751/dev
imsyy Sep 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"dayjs": "^1.11.10",
"element-plus": "^2.7.1",
"fetch-jsonp": "^1.3.0",
"lodash-es": "^4.17.21",
"pinia": "^2.1.7",
"pinia-plugin-persistedstate": "^3.2.1",
"swiper": "^11.1.1",
Expand Down
4 changes: 4 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 14 additions & 5 deletions src/utils/cursor.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
import { isEqual } from "lodash-es";

let mainCursor;

Math.lerp = (a, b, n) => (1 - n) * a + n * b;
const lerp = (a, b, n) => {
if (Math.round(a) === b) {
return b;
}
return (1 - n) * a + n * b;
};

const getStyle = (el, attr) => {
try {
Expand Down Expand Up @@ -49,7 +56,6 @@ class Cursor {
document.body.appendChild((this.scr = document.createElement("style")));
this.scr.innerHTML = `* {cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' width='10px' height='10px'><circle cx='4' cy='4' r='4' fill='white' /></svg>") 4 4, auto !important}`;
}

refresh() {
this.scr.remove();
this.cursor.classList.remove("active");
Expand All @@ -72,6 +78,7 @@ class Cursor {
y: e.clientY - 8,
};
this.cursor.classList.remove("hidden");
this.render();
};
document.onmouseenter = () => this.cursor.classList.remove("hidden");
document.onmouseleave = () => this.cursor.classList.add("hidden");
Expand All @@ -81,13 +88,15 @@ class Cursor {

render() {
if (this.pos.prev) {
this.pos.prev.x = Math.lerp(this.pos.prev.x, this.pos.curr.x, 0.35);
this.pos.prev.y = Math.lerp(this.pos.prev.y, this.pos.curr.y, 0.35);
this.pos.prev.x = lerp(this.pos.prev.x, this.pos.curr.x, 0.35);
this.pos.prev.y = lerp(this.pos.prev.y, this.pos.curr.y, 0.35);
this.move(this.pos.prev.x, this.pos.prev.y);
} else {
this.pos.prev = this.pos.curr;
}
requestAnimationFrame(() => this.render());
if (!isEqual(this.pos.curr, this.pos.prev)) {
requestAnimationFrame(() => this.render());
}
}
}

Expand Down