Skip to content

Commit a0a8c3f

Browse files
committed
Update blog
1 parent 54500b1 commit a0a8c3f

3 files changed

Lines changed: 45 additions & 38 deletions

File tree

themes/butterfly/layout/includes/page/about.pug

Lines changed: 34 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,14 @@
1515
| 是一名 在读博士研究生、
1616
span.inline-word 博主
1717
.title1
18-
| 我的GPG Key:
18+
| GPG Key:
1919
span.inline-word
2020
a(href="https://keys.openpgp.org/search?q=B8674F373ACBD2AD") B8674F373ACBD2AD
21+
.title1
22+
| LinkedIn:
23+
span.inline-word
24+
a(href="https://www.linkedin.com/in/yizhanfan") yizhanfan
25+
2126
.aboutsiteTips.author-content-item
2227
.author-content-item-tips 追求
2328
h2
@@ -33,15 +38,15 @@
3338
span(data-up) 代码
3439
|
3540
span(data-show) 程序
36-
37-
.hello-about
38-
.cursor(style='translate:none;rotate:none;scale:none;transform:translate(721px,180px)')
39-
.shapes
40-
.shape.shape-1(style='translate:none;rotate:none;scale:none;transform:translate(721px,180px)')
41-
.shape.shape-2(style='translate:none;rotate:none;scale:none;transform:translate(721px,180px)')
42-
.shape.shape-3(style='translate:none;rotate:none;scale:none;transform:translate(721px,180px)')
43-
.content
44-
h1 Hello there!
41+
.author-content
42+
.author-content-item.hello-about
43+
.cursor(style='position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);')
44+
.shapes
45+
.shape.shape-1(style='position: absolute;top: 50%;left: 50%;')
46+
.shape.shape-2(style='position: absolute;top: 50%;left: 50%;')
47+
.shape.shape-3(style='position: absolute;top: 50%;left: 50%;')
48+
.content
49+
h1 Hello there!
4550

4651
.author-content
4752
.author-content-item.skills
@@ -399,19 +404,25 @@ script.
399404
clearInterval(pursuitInterval);
400405
});
401406

402-
var helloAboutEl = document.querySelector('.hello-about')
403-
helloAboutEl.addEventListener("mousemove", evt => {
404-
const mouseX = evt.offsetX;
405-
const mouseY = evt.offsetY;
406-
gsap.set(".cursor", {
407-
x: mouseX,
408-
y: mouseY,
409-
})
407+
const helloAboutEl = document.querySelector('.hello-about')
410408

411-
gsap.to(".shape", {
412-
x: mouseX,
413-
y: mouseY,
414-
stagger: -0.1
415-
})
409+
helloAboutEl.addEventListener("mousemove", evt => {
410+
const mouseX = evt.offsetX - helloAboutEl.offsetWidth / 2;
411+
const mouseY = evt.offsetY - helloAboutEl.offsetHeight / 2;
412+
413+
gsap.to(".cursor", {
414+
x: mouseX,
415+
y: mouseY,
416+
duration: 0.2,
417+
ease: "power2.out"
416418
})
419+
420+
gsap.to(".shape", {
421+
x: mouseX,
422+
y: mouseY,
423+
stagger: -0.1,
424+
duration: 0.6,
425+
ease: "power3.out"
426+
})
427+
})
417428
})

themes/butterfly/source/css/_custom/about/about.css

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,6 @@ p.p.center, span.p.center {
109109
border: 1px solid var(--fyz-theme);
110110
box-shadow: 0 0 3px var(--fyz-theme) !important;
111111
}
112-
.hello-about{
113-
border: 1px solid var(--fyz-border);
114-
box-shadow: var(--card-box-shadow);
115-
transition: all 0.3s ease-in-out;
116-
}
117-
.hello-about:hover{
118-
border: 1px solid var(--fyz-theme);
119-
box-shadow: 0 0 3px var(--fyz-theme) !important;
120-
}
121112

122113
#about-page .myInfoAndSayHello .title1 {
123114
opacity: 0.8;
@@ -133,7 +124,6 @@ p.p.center, span.p.center {
133124
.inline-word a{
134125
color: #CCFF66;
135126
white-space: nowrap;
136-
display: block;
137127
text-overflow:ellipsis;
138128
overflow:hidden;
139129
font-weight: bolder;
@@ -386,7 +376,6 @@ p.p.center, span.p.center {
386376
.author-content-item.selfInfo div {
387377
display: flex;
388378
flex-direction: column;
389-
/* margin: 0.5rem 2rem 0.5rem 0; */
390379
height: 100%;
391380
width: 33.333%;
392381
}

themes/butterfly/source/css/_custom/about/hello-about.css

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
.hello-about {
2-
margin: 20px auto;
32
border-radius: 24px;
43
background: var(--fyz-card-bg);
5-
border: var(--style-border-always);
6-
box-shadow: var(--fyz-shadow-border);
7-
position: relative;
84
overflow: hidden;
95
user-select: none;
6+
border: 1px solid var(--fyz-border);
7+
box-shadow: var(--card-box-shadow);
8+
transition: all 0.3s ease-in-out;
9+
width: 100%;
10+
position: relative;
11+
padding: 0;
1012
}
13+
14+
.hello-about:hover{
15+
border: 1px solid var(--fyz-theme);
16+
box-shadow: 0 0 3px var(--fyz-theme) !important;
17+
}
1118

1219
.shapes {
1320
position: relative;

0 commit comments

Comments
 (0)