-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
made an about page with a list of hobbies #117
base: master
Are you sure you want to change the base?
Changes from all commits
e24045c
d1f0eb9
9a7e5b1
4bccbb8
35dce59
82a29f9
f5f1cbe
ccb98d8
3166155
a467420
8b5943b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,64 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Document</title> | ||
<title>About LP</title> | ||
<link href="../styles/about_style.css" rel="stylesheet" /> | ||
|
||
</head> | ||
|
||
|
||
<body> | ||
|
||
<div> | ||
<header> | ||
<h1> | ||
LP's Awesome Site | ||
</h1> | ||
</header> | ||
<main> | ||
<h1>About LP</h1> | ||
<section> | ||
<img src="../assets/me and booker.jpeg" alt="LP and their cat Booker relaxing at home"> | ||
|
||
<h2> Hobbies:</h2> | ||
<ul class = "list"> | ||
<li>3D Printing Resin Miniatures</li> | ||
<li>Reading non-fiction books to educate myself</li> | ||
<li>Knitting</li> | ||
<li>Playing and DMing Dungeons and Dragons</li> | ||
<li>Making leather goods</li> | ||
<li>Playing Age of Sigmar</li> | ||
<li>Walking and running with my dog</li> | ||
<li>Biking</li> | ||
</ul> | ||
|
||
</section> | ||
</main> | ||
<aside> | ||
<h2> | ||
Menu | ||
</h2> | ||
<p> | ||
<!--this is how you link to associated pages.--> | ||
<a href = "books.html"> Books</a> | ||
</p> | ||
|
||
<p> | ||
<a href = "https://www.etsy.com/shop/theKnotStopLP"> Check out my Etsy!</a> | ||
</p> | ||
<p> | ||
<!--this is how you link to associated pages.--> | ||
<a href = "portfolio.html"> Portfolio</a> | ||
</p> | ||
</aside> | ||
|
||
</div> | ||
</body> | ||
|
||
|
||
|
||
|
||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Books</title> | ||
<link href="../styles/about_style.css" rel="stylesheet" /> | ||
</head> | ||
<body> | ||
<div> | ||
<header> | ||
<h1> | ||
Books | ||
</h1> | ||
</header> | ||
<aside> | ||
<h2> | ||
Menu | ||
</h2> | ||
<p> | ||
<!--this is how you link to associated pages.--> | ||
<a href = "about.html"> About</a> | ||
</p> | ||
|
||
|
||
<p> | ||
<a href = "https://www.etsy.com/shop/theKnotStopLP"> Check out my Etsy!</a> | ||
</p> | ||
<p> | ||
<!--this is how you link to associated pages.--> | ||
<a href = "portfolio.html"> Portfolio</a> | ||
</p> | ||
</aside> | ||
|
||
<main> | ||
Here are some books I recommend: | ||
<ul class = "list" id="bookList"></ul> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is a |
||
<li>The Shame Machine, by Cathy O'Neill</li> | ||
<li>Weapons of Math Destruction, by Cathy O'Neill</li> | ||
<li>The New Jim Crow, by Michelle Alexander</li> | ||
<li>The Color of Law, by Richard Rothstein</li> | ||
<li>Mediocre - the Dangerous Legacy of White Male America, by Igeoma Oluo</li> | ||
</ul> | ||
<br> | ||
<section> | ||
<button id="addBookButton">Add Book</button> | ||
</section> | ||
<section id="bookContainer"> | ||
<h2 id = "bookCount">Book Count: 0</h2> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like this is not intended to be a heading, but instead a counter for books. Consider using a different tag. Screen readers will get confused and think this is the heading for a new section of the page. |
||
</section> | ||
|
||
</main> | ||
</div> | ||
<script src="../src/books.js" type="text/javascript"></script> | ||
</body> | ||
</html> |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
const state = { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Great start to using JS on your page! |
||
bookCount: 0, | ||
}; | ||
|
||
//function to add books | ||
const addBook = (event) => { | ||
console.log("in addBook:", event); | ||
const newBook = document.createElement("span"); | ||
const bookContainer = document.querySelector("#bookContainer"); | ||
newBook.textContent = "📖"; | ||
bookContainer.appendChild(newBook); | ||
|
||
//Book Count Behavior | ||
state.bookCount += 1; | ||
const bookCountContainer = document.querySelector("#bookCount"); | ||
bookCountContainer.textContent = `Book Count: ${state.bookCount}`; | ||
}; | ||
|
||
//registering event handler | ||
const registerEventHandlers = (event) => { | ||
console.log("in registerEventHandelers:", event); | ||
const bookButton = document.querySelector("#addBookButton"); | ||
bookButton.addEventListener("click", addBook); | ||
}; | ||
|
||
document.addEventListener("DOMContentLoaded", registerEventHandlers); | ||
|
||
//this is my first javascript file in a webpage! | ||
|
||
console.log("Hello, World!"); | ||
|
||
const getRandomNumber = (max) => { | ||
return Math.floor(Math.random() * (max + 1)); | ||
}; | ||
|
||
console.log(getRandomNumber(10)); | ||
console.log(getRandomNumber(100)); | ||
|
||
const getCurrentTime = () => { | ||
const currentDate = new Date(); | ||
return ( | ||
currentDate.getHours() + | ||
":" + | ||
currentDate.getMinutes() + | ||
":" + | ||
currentDate.getSeconds() | ||
); | ||
}; | ||
|
||
console.log(`The Current Time is ${getCurrentTime()}.`); | ||
|
||
const bookListElement = document.getElementById("bookList"); | ||
//now you can change something about booklist if you want to. this doesn't do anything at the moment. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
body { | ||
color: darkblue; | ||
font-family: Arial, Helvetica, sans-serif; | ||
background: lightblue | ||
} | ||
|
||
h1, h2 { | ||
color: deeppink; | ||
} | ||
|
||
div{ | ||
margin: auto; | ||
width: 80vw; | ||
height: 80vh; | ||
display: grid; | ||
grid-template-columns: repeat(5, 20%); | ||
grid-template-rows: repeat(5, 20%); | ||
margin: auto; | ||
} | ||
|
||
aside { | ||
background-color: lightpink; | ||
grid-row: 2/6; | ||
grid-column: 1/2; | ||
} | ||
|
||
main { | ||
background-color: cyan; | ||
grid-column: 2 / span 4; | ||
grid-row: 2/6; | ||
} | ||
|
||
header { | ||
grid-column: 1 / -1; | ||
background-color: white; | ||
} | ||
|
||
img { | ||
display: grid; | ||
height: 400px; | ||
grid-row-start: 1; | ||
grid-column-start: 4; | ||
} | ||
|
||
section { | ||
display: grid; | ||
grid-row-start: 1; | ||
grid-column: 1/4; | ||
|
||
} | ||
|
||
#specialheader { | ||
color: purple; | ||
font-size: 200; | ||
|
||
} | ||
|
||
.list { | ||
color: blue; | ||
} | ||
|
||
#bookContainer{ | ||
white-space: nowrap; | ||
display: inline-block; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spaces in links causes issues! This line threw an in an HTML validator