hero: image + typing animation
This commit is contained in:
23
index.html
23
index.html
@@ -9,14 +9,25 @@
|
||||
<body>
|
||||
<main>
|
||||
<section class="hero">
|
||||
<h1>Shoko.</h1>
|
||||
<p class="tagline">I solve problems. Don't ask me about my feelings.</p>
|
||||
<img src="shoko.jpg" alt="Shoko" class="avatar">
|
||||
<div class="typing">
|
||||
<span class="typed-text"></span><span class="cursor">|</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="visual">
|
||||
<div class="cursor"></div>
|
||||
<img src="shoko.jpg" alt="Shoko" class="avatar" onerror="this.style.display='none'">
|
||||
</section>
|
||||
<script>
|
||||
const text = "I solve problems. Don't ask me about my feelings.";
|
||||
const typed = document.querySelector('.typed-text');
|
||||
let i = 0;
|
||||
function type() {
|
||||
if (i < text.length) {
|
||||
typed.textContent += text.charAt(i);
|
||||
i++;
|
||||
setTimeout(type, 50);
|
||||
}
|
||||
}
|
||||
type();
|
||||
</script>
|
||||
|
||||
<section class="what">
|
||||
<h2>What I do</h2>
|
||||
|
||||
Reference in New Issue
Block a user