-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- add styles - update slides - add homework description - update codebase to React-router 6 - add hw-7 video presentation
- Loading branch information
Artem Halas
committed
May 5, 2022
1 parent
a82d6fd
commit ccf6f03
Showing
15 changed files
with
1,018 additions
and
1,808 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,34 @@ | ||
# Homework 7 - The Weather Widget | ||
|
||
**All installation, running, style, and submission requirements from Homework 5 still apply.** | ||
|
||
## Prerequisites | ||
* Server application is running on [https://forecast-ut-88jlk.ondigitalocean.app/](https://forecast-ut-88jlk.ondigitalocean.app/) host | ||
* Please go through [API documentation](https://github.com/artem-galas/forecast-ut#api) | ||
|
||
## Add functionality to Weather Widget ( 10 / 10 points) | ||
|
||
Adding routes to you application | ||
|
||
* `/` route - where is simple display dashboard from previous homework | ||
* `/widgets` routes - displays list of the widgets (just city name) | ||
* `/widgets/:id` - will display **detailed** weather information | ||
* `/history` - display history of used cities | ||
* Not found cases should be covered | ||
|
||
Click on "History" button will navigate to `/history` page | ||
Click on "All Widgets" button will navigate to `/widgets` page | ||
Click on "+ Add Widget" button will navigate to dashboard `/` | ||
|
||
**NOTE:** | ||
For routing [React-Router](https://reactrouter.com/docs/en/v6/getting-started/installation) should be installed | ||
|
||
## Submission | ||
|
||
* Requirements which cannot be validated due to missing dependencies from package.json will be awarded 0 points | ||
|
||
## Sanity check | ||
|
||
* Delete node_modules/ directory and JavaScript and CSS files from the public/ directory | ||
* Run `yarn install && yarn lint && yarn test` and check that your tests pass | ||
* Run `yarn start` and check that your application works as expected |
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,56 @@ | ||
input { | ||
box-shadow: inset 0 0.0625em 0.125em rgb(10 10 10 / 5%); | ||
max-width: 100%; | ||
background-color: #fff; | ||
border-radius: 4px; | ||
color: #363636; | ||
align-items: center; | ||
border: 1px solid #dbdbdb; | ||
display: inline-flex; | ||
font-size: 16px; | ||
justify-content: flex-start; | ||
padding: 7px 11px; | ||
position: relative; | ||
vertical-align: top; | ||
} | ||
|
||
button { | ||
font-size: 16px; | ||
background-color: #485fc7; | ||
border-radius: 4px; | ||
border-color: transparent; | ||
color: #fff; | ||
cursor: pointer; | ||
justify-content: center; | ||
padding: 8px; | ||
text-align: center; | ||
white-space: nowrap; | ||
|
||
&:disabled { | ||
opacity: .5; | ||
cursor: not-allowed; | ||
} | ||
|
||
&.green { | ||
background-color: #48c78e; | ||
} | ||
|
||
&.red { | ||
background-color: #f14668; | ||
} | ||
&.small { | ||
font-size: 12px; | ||
} | ||
} | ||
|
||
.notification { | ||
border-radius: 4px; | ||
position: relative; | ||
padding: 8px 10px; | ||
|
||
&.warning { | ||
background-color: #ffe08a; | ||
color: rgba(0,0,0,.7); | ||
} | ||
} | ||
|
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 @@ | ||
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap'); | ||
@import "elements"; | ||
|
||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
* { | ||
font-family: 'Lato', sans-serif; | ||
box-sizing: border-box; | ||
} | ||
|
||
.app { | ||
width: 500px; | ||
margin: 0 auto; | ||
} | ||
|
||
.comment-form { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 16px; | ||
margin-bottom: 16px; | ||
|
||
h2 { | ||
margin-bottom: 0; | ||
} | ||
} | ||
|
||
.input__container { | ||
width: 100%; | ||
|
||
label { | ||
display: inline-block; | ||
margin-bottom: 8px; | ||
} | ||
|
||
input { | ||
width: 100%; | ||
} | ||
} | ||
|
||
.commentList { | ||
margin: 16px 0; | ||
} | ||
|
||
.comment { | ||
p { | ||
margin: 0; | ||
&.comment-author { | ||
font-weight: bold; | ||
margin-bottom: 8px; | ||
} | ||
} | ||
+.comment { | ||
margin-top: 16px; | ||
} | ||
&__action { | ||
margin-top: 8px; | ||
} | ||
} | ||
|
||
.filter { | ||
display: flex; | ||
align-items: center; | ||
gap: 8px; | ||
margin-bottom: 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
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
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
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
Oops, something went wrong.