Skip to content

Commit

Permalink
Update: Update profile information
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangsonww committed Oct 4, 2024
1 parent d8a1600 commit 4614301
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 22 deletions.
9 changes: 2 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -149,16 +149,11 @@

<!--==================== MAIN ====================-->
<main class="main">

<!--==================== WELCOME ====================-->
<section class="welcome section" id="welcome">
<div class="welcome__content">
<h1 class="welcome__title" style="font-size: 5rem">
<span id="typed-text"></span><span class="cursor" id="cursor"></span>
</h1>
<h3 class="welcome__subtitle">
<span id="typed-subtitle"></span><span class="cursor" id="cursor-subtitle"></span>
</h3>
<h1 class="welcome__title" style="font-size: 5rem"><span id="typed-text"></span><span class="cursor" id="cursor"></span></h1>
<h3 class="welcome__subtitle"><span id="typed-subtitle"></span><span class="cursor" id="cursor-subtitle"></span></h3>
<a href="#home" class="button button--flex welcome__button scroll-animation" id="scroll-button" style="display: none; margin-top: 3rem">
<i class="uil uil-arrow-down button__icon" style="margin-left: 0"></i>
Explore My Work
Expand Down
7 changes: 4 additions & 3 deletions packages/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap');

@media (max-width: 768px) {
html, body {
html,
body {
margin: 0;
padding: 0;
overflow-x: hidden;
Expand Down Expand Up @@ -879,7 +880,6 @@ img {
margin-right: var(--mb-0-25);
}


/* Active Modal */
.active-modal {
opacity: 1;
Expand Down Expand Up @@ -1685,7 +1685,8 @@ body.dark-theme .welcome {
animation: blink 1s step-end infinite;
}

#cursor, #cursor-subtitle {
#cursor,
#cursor-subtitle {
position: relative;
left: 0;
}
Expand Down
23 changes: 11 additions & 12 deletions packages/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,17 +221,17 @@ function scrollActive() {
});
}

const textArray = ["Welcome!"];
const subtitleArray = ["Explore my portfolio and see my journey as a software engineer."];
const textArray = ['Welcome!'];
const subtitleArray = ['Explore my portfolio and see my journey as a software engineer.'];
let charIndex = 0;
let subtitleIndex = 0;
let typingDelay = 150;
let newTextDelay = 1000; // Delay between current and next text
let typedTextSpan = document.getElementById("typed-text");
let typedSubtitleSpan = document.getElementById("typed-subtitle");
let cursor = document.getElementById("cursor");
let cursorSubtitle = document.getElementById("cursor-subtitle");
let scrollButton = document.getElementById("scroll-button");
let typedTextSpan = document.getElementById('typed-text');
let typedSubtitleSpan = document.getElementById('typed-subtitle');
let cursor = document.getElementById('cursor');
let cursorSubtitle = document.getElementById('cursor-subtitle');
let scrollButton = document.getElementById('scroll-button');

// Type the title
function typeTitle() {
Expand All @@ -258,17 +258,17 @@ function typeSubtitle() {
cursorSubtitle.style.display = 'none';
// Show the button once all typing is complete
scrollButton.style.display = 'inline-block';
scrollButton.classList.add("drop-down"); // Optional fade-in animation
scrollButton.classList.add('drop-down'); // Optional fade-in animation
}
}

document.addEventListener("DOMContentLoaded", function () {
document.addEventListener('DOMContentLoaded', function () {
setTimeout(typeTitle, newTextDelay);
});

document.getElementById("scroll-button").addEventListener("click", function (event) {
document.getElementById('scroll-button').addEventListener('click', function (event) {
event.preventDefault();
document.getElementById("home").scrollIntoView({ behavior: "smooth" });
document.getElementById('home').scrollIntoView({ behavior: 'smooth' });
});

window.addEventListener('scroll', scrollActive);
Expand Down Expand Up @@ -438,7 +438,6 @@ const backToTopButton = document.getElementById('back-to-top');

backToTopButton.addEventListener('click', function () {
document.getElementById('home').scrollIntoView({ behavior: 'smooth' });

});

window.addEventListener('scroll', function () {
Expand Down

0 comments on commit 4614301

Please sign in to comment.