Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 64 additions & 6 deletions index.html
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider including your wireframes in the repo. If you planned out the site with a quick sketch, even taking a quick picture and including that can be helpful. Or if it's authored in a different (online) tool, consider adding a document with a link to it, or including it in your README.

Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,72 @@
<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>Weather Report</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Rubik&display=swap" rel="stylesheet">
<link rel="stylesheet" href="styles/index.css" />
<title>Weather App</title>

<link rel="stylesheet" href="styles/index.css">

<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="src/index.js" defer></script>
Comment on lines +10 to +11
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that originally, the index.js script link was at the end of the body, and the directions were to include the axios script just above the index.js script. This was fine when the script was at the end of the body, as both scripts will be loaded after the body has been parsed.

Here, you've moved the script to the head. Using defer allows the browser to load index.js concurrently with the rest of the body, while still waiting to run until after the page has been processed. But we should then also defer the axios script, since it will block the browser while it's loading. defer still ensures the relative order execution of scripts, so even if your index.js made use of axios at a global level, this would still be fine.

<!-- <script type="module" src="src/index.js" defer></script> -->
</head>
<body>
<script src="./src/index.js"></script>
<div class="container">
<header>
<h1 id="app-title">Weather App</h1>
</header>
<span>showing the weather for
<!-- <span id="headerCityName" class="header__city-name"> </span></span> -->

<section class="city-section">
<div class="city-display">
<h2 id="city-name"> </h2>
</div>
<div class="city-input">
<input type="text" id="city-input" placeholder="Enter city name">
<!-- <button id="rename-city-btn">Rename City</button> -->
</div>
</section>

<section class="sky-section">
<div id="sky-display" class="sky-display">

</div>
</section>

<section class="controls-section">
<div class="temperature-control">
<h3>Temperature</h3>
<div class="temp-display">
<span id="temperature">72</span>°
</div>
<div class="temp-buttons">
<button id="increase-temp">+</button>
<button id="decrease-temp">-</button>
</div>
</div>

<div class="sky-control">
<h3>Sky Type</h3>
<select id="sky-type">
<option value="sunny">Sunny</option>
<option value="cloudy">Cloudy</option>
<option value="rainy">Rainy</option>
<option value="snowy">Snowy</option>
Comment on lines +53 to +56
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔎 Rather than explicitly coding the sky options here, consider how we might write code to populate the options with values that we know our logic supports. Manually writing the options here introduces the possibility that there could be a mismatch between the options we wrote, and the options our logic is written to handle.

</select>
</div>
</section>

<section class="landscape-section">
<div id="landscape-display" class="landscape-display">

</div>
</section>

<section class="action-buttons">
<button id="get-temp-btn">Get Current Temperature</button>
<button id="reset-city-btn">Reset City Name</button>
</section>
</div>
</body>
</html>
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions package.json
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔎 Weather Report was a plain JS project, so a package.json file isn't necessary, though it could be added as a means of getting eslint checking!

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "weather-report",
"version": "1.0.0",
"description": "## Skills Assessed",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/DanaMJZ/weather-report.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/DanaMJZ/weather-report/issues"
},
"homepage": "https://github.com/DanaMJZ/weather-report#readme"
}
Loading