-
Notifications
You must be signed in to change notification settings - Fork 78
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
Rock -Brittany #68
base: main
Are you sure you want to change the base?
Rock -Brittany #68
Changes from all commits
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 | ||||
---|---|---|---|---|---|---|
@@ -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" /> | ||||||
<link href="./styles/index.css" rel="stylesheet" /> | ||||||
<script src="./scripts/index.js"></script> | ||||||
<title>Weather Report</title> | ||||||
</head> | ||||||
<body> | ||||||
<!--Wave 2--> | ||||||
<div class="header"> | ||||||
<h1>Weather Report</h1> | ||||||
<h2>For the loveley city of</h2> | ||||||
<p class="city-name">🌊 🌙 Oceanville🌙🌊</p> | ||||||
</div> | ||||||
|
||||||
<div class="horizontal-container"> | ||||||
<div class="container"> | ||||||
<div class="card"> | ||||||
<!--Clickable element that displays the temp--> | ||||||
<h3>Temperature</h3> | ||||||
<!--Clickable element to increase temp--> | ||||||
<div class="horizontal-container"> | ||||||
<div class="button-container"> | ||||||
<button id="upButton" class="temp-button">🔼</button> | ||||||
<button id="downButton" class="temp-button">🔽</button> | ||||||
</div> | ||||||
<div id="value" class="temp-value">32</div> | ||||||
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. let's use something other than a |
||||||
</div> | ||||||
</div> | ||||||
|
||||||
<div class="card"> | ||||||
<h3>Sky</h3> | ||||||
</div> | ||||||
Comment on lines
+34
to
+36
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. not everything needs a parent element. an |
||||||
<div class="card"> | ||||||
<h3>City Name</h3> | ||||||
<!--City Name Form--> | ||||||
<form class="form" action="/action_page.php"> | ||||||
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. in this instance we don't need an action attribute. This is necessary for more traditional websites to trigegr a request to a backend
Suggested change
|
||||||
<input type="text" id="city-name" /><br /><br /> | ||||||
<input type="reset" value="Reset" /> | ||||||
</form> | ||||||
</div> | ||||||
</div> | ||||||
|
||||||
<div class="weather-garden"> | ||||||
<h3>Weather Garden</h3> | ||||||
<div class="grey-card"></div> | ||||||
</div> | ||||||
</div> | ||||||
|
||||||
<!--Clickable element to decrease temp--> | ||||||
|
||||||
<!--Element that displays a landscape (Animal Crossing seasons)--> | ||||||
</body> | ||||||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
function registerEventHandlers() { | ||
const upButton = document.querySelector("#upButton"); | ||
const currentTemp = document.querySelector("#value"); | ||
|
||
upButton.addEventListener("click", function () { | ||
console.log("current value is: " + currentTemp.textContent); | ||
|
||
currentTemp.textContent = parseInt(currentTemp.textContent) + 1; | ||
}); | ||
} | ||
|
||
document.addEventListener("DOMContentLoaded", registerEventHandlers); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
body { | ||
background-color: blue; | ||
color: white; | ||
} | ||
|
||
h1 { | ||
font-size: xx-large; | ||
} | ||
|
||
h2 { | ||
font-size: x-small; | ||
margin-left: 35px; | ||
margin-bottom: 45px; | ||
letter-spacing: 3px; | ||
} | ||
|
||
h3 { | ||
font-size: x-small; | ||
text-indent: 15px; | ||
} | ||
.city-name { | ||
font-size: x-large; | ||
text-indent: 15px; | ||
margin-bottom: 40px; | ||
font-style: italic; | ||
} | ||
|
||
.header { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: flex-end; | ||
justify-content: flex-start; | ||
} | ||
|
||
.container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
justify-content: flex-start; | ||
} | ||
|
||
.horizontal-container { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
justify-content: space-between; | ||
} | ||
|
||
.card { | ||
width: 300px; | ||
height: 150px; | ||
background: white; | ||
color: black; | ||
margin-bottom: 10px; | ||
border-radius: 10px; | ||
} | ||
|
||
.button-container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
margin-left: 20px; | ||
} | ||
|
||
.temp-button { | ||
padding: 0; | ||
margin: 0; | ||
cursor: pointer; | ||
outline: none; | ||
border: none; | ||
background: transparent; | ||
} | ||
|
||
.temp-value{ | ||
margin-left: 20px; | ||
flex: 1; | ||
} | ||
|
||
.weather-garden { | ||
margin-right: 75px; | ||
margin-bottom: 100px; | ||
text-align: center; | ||
} | ||
.grey-card { | ||
width: 375px; | ||
height: 175px; | ||
background: rgb(174, 198, 252); | ||
|
||
color: black; | ||
margin-bottom: 10px; | ||
border-radius: 10px; | ||
} | ||
.form { | ||
margin-left: 10px; | ||
margin-top: 10px; | ||
} |
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.
don't forget to use semantic html, like
header
,section
,main
rather thandiv