-
Notifications
You must be signed in to change notification settings - Fork 2
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
6 changed files
with
111 additions
and
14 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -11,8 +11,8 @@ | |
/> | ||
</g-link> | ||
|
||
<h1 v-if="showTitle" class="author__site-title"> | ||
{{ $static.metadata.siteName }} | ||
<h1 v-if="showTitle" class="author__site-title" id="author-title"> | ||
<!-- {{ $static.metadata.siteName }} --> | ||
</h1> | ||
|
||
<p class="author__intro">你终于来啦👻</p> | ||
|
@@ -65,6 +65,40 @@ query { | |
<script> | ||
export default { | ||
props: ["showTitle"], | ||
methods: { | ||
initializeVara(selector, text, yPosition, duration) { | ||
const fontSize = | ||
window.screen.width < 700 ? 32 : window.screen.width < 1200 ? 56 : 72; | ||
new this.$vara( | ||
selector, | ||
"https://cdn.jsdelivr.net/npm/[email protected]/fonts/Satisfy/SatisfySL.json", | ||
[ | ||
{ | ||
text: text, | ||
y: yPosition, | ||
fromCurrentPosition: { y: false }, | ||
duration: duration, | ||
id: "blog", | ||
}, | ||
], | ||
{ | ||
strokeWidth: 2, | ||
color: "#000000", | ||
fontSize: fontSize, | ||
textAlign: "center", | ||
} | ||
); | ||
}, | ||
}, | ||
mounted() { | ||
this.$nextTick(() => { | ||
// 查找 id 为 author-title 的元素 | ||
if (document.getElementById("author-title")) { | ||
this.initializeVara("#author-title", "Hi, I'm Jalen", 10, 3000); | ||
} | ||
}); | ||
}, | ||
}; | ||
</script> | ||
|
||
|
@@ -186,4 +220,17 @@ export default { | |
visibility visible | ||
opacity 1 | ||
transition opacity 0.15s | ||
#author-title | ||
width 80% | ||
margin 20px auto | ||
* | ||
margin 0 | ||
padding 0 | ||
.hidden | ||
width 0 | ||
opacity 0 | ||
overflow hidden | ||
</style> |
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 @@ | ||
<template> | ||
<div> | ||
<div class="about-title"> | ||
<h1 class="about-title__text">About</h1> | ||
<div class="about-title" id="about-title"> | ||
<!-- <h1 class="about-title__text">About</h1> --> | ||
</div> | ||
|
||
<div class="about content-box"> | ||
|
@@ -24,22 +24,18 @@ | |
><font-awesome :icon="['fab', 'github']" /> jalenzz</a | ||
> | ||
/ | ||
<a | ||
target="_blank" | ||
class="about-me" | ||
style="color: #efa371;"> | ||
<a target="_blank" class="about-me" style="color: #efa371"> | ||
<font-awesome :icon="['fas', 'envelope']" /> | ||
[email protected]</a | ||
> | ||
|
||
</p> | ||
|
||
<p> | ||
🫠 Ctrl CV Engineer <br /> | ||
😍 坚定的括号不换行党!<br /> | ||
🥳 最喜欢去陌生的城市走走看看<br /> | ||
😶🌫️ 信奉好看就是生产力!<br /> | ||
😆 like Emoji | ||
😆 like Emoji | ||
</p> | ||
|
||
<h3 id="关于博客"><a href="#关于博客"></a>关于博客</h3> | ||
|
@@ -121,7 +117,7 @@ | |
</div> | ||
</transition> | ||
|
||
<Author class="post-author" /> | ||
<Author class="post-author" ref="authorComponent" /> | ||
</div> | ||
</template> | ||
|
||
|
@@ -144,7 +140,7 @@ export default { | |
}, | ||
data() { | ||
return { | ||
themeUrl: '', | ||
themeUrl: "", | ||
scrolledDist: 0, | ||
}; | ||
}, | ||
|
@@ -155,6 +151,14 @@ export default { | |
} | ||
}, | ||
}, | ||
mounted() { | ||
this.$refs.authorComponent.initializeVara( | ||
"#about-title", | ||
"About", | ||
50, | ||
2000 | ||
); | ||
}, | ||
created() { | ||
if (process.isClient) { | ||
window.addEventListener("scroll", this.handleScroll); | ||
|
@@ -258,4 +262,17 @@ query { | |
.v[data-class=v] .vaction | ||
display none !important | ||
#about-title | ||
width 80% | ||
margin 20px auto | ||
* | ||
margin 0 | ||
padding 0 | ||
.hidden | ||
width 0 | ||
opacity 0 | ||
overflow hidden | ||
</style> |
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