-
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
1 parent
d91aef7
commit 47eaa1a
Showing
8 changed files
with
154 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,34 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<link | ||
rel="icon" | ||
type="image/x-icon" | ||
href="../../assets/svg/logo-speak-comigo.svg" | ||
/> | ||
<meta charset="utf-8" /> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | ||
<title>Speak Comigo</title> | ||
<meta name="description" content="Welcome page" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="stylesheet" href="./style.css" /> | ||
<link rel="stylesheet" href="../../styles/global.css" /> | ||
</head> | ||
<body> | ||
<main class="main-layout"> | ||
<section class="welcome"> | ||
<img | ||
src="../../assets/svg/logo-speak-comigo.svg" | ||
alt="Speak comigo logo" | ||
/> | ||
<h1> | ||
Welcome to | ||
<p>Speak Comigo</p> | ||
</h1> | ||
<span id="animated-text"> </span> | ||
<button id="get-started-button">Get Started</button> | ||
</section> | ||
</main> | ||
<script src="script.js"></script> | ||
</body> | ||
</html> |
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,68 @@ | ||
const texts = [ | ||
'Developing your ears to understand any English Accent around the world using personas created by AI.', | ||
'Desenvolva seus ouvidos para\n entender qualquer sotaque em\n inglês ao redor do mundo, usando\n personas criadas por IA.', | ||
'Desarrolla tus oídos para\n comprender cualquier acento\n inglés en todo el mundo utilizando\n personajes creados por IA.', | ||
]; | ||
function animatedTextTransition() { | ||
let currentIndex = 0; | ||
const textElement = document.getElementById('animated-text'); | ||
|
||
function typeText(text, callback) { | ||
let i = 0; | ||
textElement.innerText = ''; | ||
|
||
function type() { | ||
if (i < text.length) { | ||
textElement.innerHTML += | ||
text.charAt(i) === ' ' ? ' ' : text.charAt(i); | ||
i++; | ||
setTimeout(type, 50); | ||
} else if (callback) { | ||
setTimeout(callback, 3500); | ||
} | ||
} | ||
|
||
type(); | ||
} | ||
|
||
function eraseText(callback) { | ||
let text = textElement.innerText; | ||
let i = text.length; | ||
|
||
function erase() { | ||
if (i > 0) { | ||
textElement.innerText = text.substring(0, i - 1); | ||
i--; | ||
setTimeout(erase, 25); | ||
} else if (callback) { | ||
callback(); | ||
} | ||
} | ||
|
||
erase(); | ||
} | ||
|
||
function changeText() { | ||
eraseText(() => { | ||
currentIndex = (currentIndex + 1) % texts.length; | ||
typeText(texts[currentIndex], changeText); | ||
}); | ||
} | ||
|
||
typeText(texts[currentIndex], changeText); | ||
} | ||
|
||
function handleCleanWelcomePage() { | ||
const button = document.getElementById('get-started-button'); | ||
|
||
button.addEventListener('click', function () { | ||
document.querySelector('main').innerHTML = ''; | ||
}); | ||
} | ||
|
||
function addFirstStepSection() {} | ||
|
||
(function main() { | ||
animatedTextTransition(); | ||
handleCleanWelcomePage(); | ||
})(); |
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,44 @@ | ||
.welcome { | ||
width: 100%; | ||
height: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: space-evenly; | ||
} | ||
|
||
.welcome > h1 { | ||
font-weight: bold; | ||
font-size: 40px; | ||
text-align: center; | ||
color: #141718; | ||
} | ||
|
||
.welcome > span { | ||
width: 100%; | ||
text-align: center; | ||
max-width: 296px; | ||
font-weight: 400; | ||
color: #616161; | ||
font-family: 'Poppins', sans-serif; | ||
font-size: 16px; | ||
min-height: 100px; | ||
line-height: 1.5; | ||
white-space: normal; | ||
word-break: break-word; | ||
overflow-wrap: break-word; | ||
display: inline-block; | ||
} | ||
|
||
.welcome > button { | ||
width: 100%; | ||
max-width: 320px; | ||
font-family: 'Poppins', sans-serif; | ||
font-weight: 500; | ||
border: none; | ||
background-color: #141718; | ||
border-radius: 20px; | ||
height: 63px; | ||
color: white; | ||
font-size: 16px; | ||
} |
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