-
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
18 changed files
with
185 additions
and
89 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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,11 +1,16 @@ | ||
.header{ | ||
position: relative; | ||
z-index: 10; | ||
padding: 1.2em 0; | ||
padding: .9em 0; | ||
color: var(--primary-color); | ||
} | ||
.items{ | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
column-gap: 10px; | ||
@media (max-width: 529px) { | ||
flex-wrap: wrap; | ||
row-gap: .6em; | ||
} | ||
} |
42 changes: 42 additions & 0 deletions
42
src/components/hourlyForecastItem/HourlyForecastItem.module.scss
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,42 @@ | ||
.item{ | ||
text-align: center; | ||
padding: 15px; | ||
border-radius: 2em; | ||
box-shadow: 8px 9px 11px 0 rgba(0, 0, 0, 0.50); | ||
width: 15%; | ||
@media (max-width: 1024px) { | ||
width: 23%; | ||
} | ||
@media (max-width: 728px) { | ||
width: 31%; | ||
} | ||
@media (max-width: 529px) { | ||
width: 48%; | ||
} | ||
.icon{ | ||
position: relative; | ||
width: 100%; | ||
img{ | ||
@media (max-width: 1300px) { | ||
width: 6.4em; | ||
height: 6.4em; | ||
} | ||
margin: 0 auto; | ||
width: 7em; | ||
height: 7em; | ||
-webkit-filter: drop-shadow(3px 5px 5px #363535); | ||
filter: drop-shadow(3px 5px 5px #363535); | ||
} | ||
} | ||
.time{ | ||
font-size: 1.33em; | ||
font-weight: 700; | ||
} | ||
p{ | ||
font-weight: 700; | ||
font-size: 1.1em; | ||
& + p{ | ||
margin-top: 5px; | ||
} | ||
} | ||
} |
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,23 @@ | ||
import React from 'react'; | ||
import s from './HourlyForecastItem.module.scss' | ||
import Icon from "../imageIcon/Icon"; | ||
import {HourlyForecastInfo} from "../../models/hourlyForecast.models"; | ||
|
||
interface IHourlyForecastItem{ | ||
item: HourlyForecastInfo | ||
} | ||
|
||
const HourlyForecastItem: React.FC<IHourlyForecastItem> = ({item}) => { | ||
return ( | ||
<div className={s.item}> | ||
<div className={s.time}>{item.dt_txt && item.dt_txt.slice(10,16)}</div> | ||
<div className={s.icon}> | ||
<Icon icon={item.weather[0].icon} /> | ||
</div> | ||
<p className={s.temp}>{item.main.temp && Math.round(item.main.temp - 273.15)}°C</p> | ||
<p className={s.speed}>{item.wind.speed && Math.round(item.wind.speed)}km/h</p> | ||
</div> | ||
); | ||
}; | ||
|
||
export default HourlyForecastItem; |
Oops, something went wrong.