-
Notifications
You must be signed in to change notification settings - Fork 0
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
78 changed files
with
14,735 additions
and
5,416 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
document.addEventListener("DOMContentLoaded", function() { | ||
function typeWriter(element, text, speed, callback) { | ||
let i = 0; | ||
function type() { | ||
if (i < text.length) { | ||
element.innerHTML += text.charAt(i).replace('\n', '<br>'); // Replace newline with <br> for line breaks | ||
i++; | ||
setTimeout(type, speed); | ||
} else { | ||
console.log('Typing complete, pausing cursor animation for', element); // Debug output | ||
if (callback) callback(); | ||
} | ||
} | ||
type(); | ||
} | ||
|
||
const headerElement = document.querySelector('.hero_header'); | ||
const taglineElement = document.querySelector('.tagline'); | ||
|
||
const headerText = 'JY-HF Learning Site___'; | ||
const headerHTML = 'JY-HF <span class="light">Learning Site___</span>'; | ||
const taglineText = 'Share the knowledge to you and Us'; | ||
const taglineHTML = 'Share the knowledge to you and <span class="blue">Us</span>'; | ||
|
||
headerElement.textContent = ''; | ||
taglineElement.textContent = ''; | ||
|
||
typeWriter(headerElement, headerText, 300, () => { | ||
headerElement.innerHTML = headerHTML; | ||
headerElement.style.animationPlayState = 'paused'; // Pause the cursor animation | ||
headerElement.style.borderRightColor = 'transparent'; // Make the cursor transparent | ||
typeWriter(taglineElement, taglineText, 300, () => { | ||
taglineElement.innerHTML = taglineHTML; | ||
|
||
}); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* Hero Section */ | ||
.hero { | ||
background-color: #CBE3F7; | ||
padding-top: 150px; | ||
padding-bottom: 150px; | ||
text-align: center; | ||
} | ||
|
||
.pink { | ||
color: #3693CD; | ||
} | ||
|
||
.light { | ||
font-weight: bold; | ||
color: #0B3ADC; | ||
} | ||
|
||
.tagline { | ||
color: #16273d; | ||
margin-top: 4px; | ||
font-weight: lighter; | ||
text-transform: uppercase; | ||
letter-spacing: 1px; | ||
} | ||
|
||
.typewriter { | ||
display: inline-block; | ||
overflow: hidden; | ||
border-right: solid black; /* Cursor effect */ | ||
animation: blink-caret 0.75s step-end infinite; | ||
word-wrap: break-word; /* Ensure words break and wrap correctly */ | ||
} | ||
|
||
@keyframes blink-caret { | ||
from, to { border-color: transparent; } | ||
50% { border-color: black; } | ||
} |
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
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
Oops, something went wrong.