-
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
10 changed files
with
118 additions
and
7 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,3 @@ | ||
.hidden { | ||
display: none; | ||
} |
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
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,14 @@ | ||
const loginForm = document.querySelector("#login-form"); | ||
const loginInput = document.querySelector("#login-form input"); | ||
const greeting = document.querySelector("#greeting"); | ||
|
||
function onLoginSubmit(event) { | ||
event.preventDefault(); | ||
loginForm.classList.add("hidden"); | ||
const username = loginInput.value; | ||
console.log(username); | ||
greeting.innerText = "Hello " + username; | ||
greeting.classList.remove("hidden"); | ||
} | ||
|
||
loginForm.addEventListener("submit", onLoginSubmit); |
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,6 @@ | ||
const images = ["0.jpeg", "1.jpeg", "2.jpeg"]; | ||
const chosenImage = images[Math.floor(Math.random() * images.length)]; | ||
|
||
const bgImage = document.createElement("img"); | ||
bgImage.src = `img/${chosenImage}`; | ||
document.body.appendChild(bgImage); |
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
const quotes = [ | ||
{ | ||
quote: | ||
"Without continuous personal development, you are now all that you will ever become and hell starts when the person you are meets the person you could have been.", | ||
author: "Eli Cohen", | ||
}, | ||
{ | ||
quote: | ||
"Working hard for something we don't care about is called stressed, working hard for something we love is called passion.", | ||
author: "Simon Sinek", | ||
}, | ||
{ | ||
quote: | ||
"Move out of your comfort zone. You can only grow if you are willing to feel awkward and uncomfortable when you try something new.", | ||
author: "Brian Tracy", | ||
}, | ||
{ | ||
quote: | ||
"Don't let the fear of losing be greater than the excitement of winning.", | ||
author: "Robert Kiyosaki", | ||
}, | ||
{ | ||
quote: | ||
"Develop success from failures. Discouragement and failure are two of the surest stepping stones to success.", | ||
author: "Dale Carnegie", | ||
}, | ||
{ | ||
quote: "Action is the foundational key to all success.", | ||
author: "Pablo Picasso", | ||
}, | ||
{ | ||
quote: | ||
"The difference between a successful person and others is not a lack of strength, not a lack of knowledge, but rather a lack of will.", | ||
author: "Vince Lombardi", | ||
}, | ||
{ | ||
quote: | ||
"It is your determination and persistence that will make you a successful person.", | ||
author: "Kenneth J Hutchins", | ||
}, | ||
{ | ||
quote: | ||
"You can waste your life drawing lines. Or you can live your life crossing them.", | ||
author: "Shonda Rhimes", | ||
}, | ||
{ | ||
quote: "Be poor, humble and driven. Don't be afraid to shift or pivot.", | ||
author: "Alex Rodriguez", | ||
}, | ||
]; | ||
|
||
const quoteText = document.querySelector("#quote span:first-child"); | ||
const authorText = document.querySelector("#quote span:last-child"); | ||
|
||
const todaysQuote = quotes[Math.floor(Math.random() * quotes.length)]; | ||
|
||
quoteText.innerText = todaysQuote.quote; | ||
authorText.innerText = todaysQuote.author; |
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,11 @@ | ||
const toDoFrom = document.getElementById("todo-form"); | ||
const toDoInput = toDoFrom.querySelector("input"); | ||
const toDoList = document.getElementById("todo-list"); | ||
|
||
function handleToDoSubmit(event) { | ||
event.preventDefault(); | ||
const newTodo = toDoInput.value; | ||
toDoInput.value = ""; | ||
} | ||
|
||
toDoFrom.addEventListener("submit", handleToDoSubmit); |