-
-
-
-
-
- {item.forecast}
-
-
- High:
- {item.high}°
-
-
- Low:
- {item.low}°
-
-
+
+
+
+
+
+
+
+ {weather.description}
+
+ { weather.temps.length === 2 ? (
+
+
+ High:
+ {weather.temps[0]}°
+
+ Low:
+ {weather.temps[1]}°
+
+
+ ) : (
+
+ Temp:
+ {weather.temps[0]}°
- )
- })
- }
+ )}
+
+ Humidity:
+ {weather.humidity}
+
+
+
)
}
@@ -81,8 +73,14 @@ class Weather extends Widget {
const data = this.getWidgetData()
return data && (
- { this.renderCurrentWeather(data) }
- { this.renderForecast(data) }
+
+ { data.map((weather, index) => this.renderWeather(weather, index)) }
+
+
+ { data.map((weather, index) => {
+ return ()
+ }) }
+
)
}
diff --git a/src/ui/widgets/Weather.scss b/src/ui/widgets/Weather.scss
index d0e361a..14416d2 100644
--- a/src/ui/widgets/Weather.scss
+++ b/src/ui/widgets/Weather.scss
@@ -1,83 +1,162 @@
@import '../vars_mixins.scss';
-.widget-weather .widget-body {
+.weather-forecasts {
position: absolute;
top: 3em;
right: 0;
- bottom: 0;
left: 0;
-}
-
-// .weather-wrapper {
-// position: relative;
-// padding-right: 0.5em;
-// }
-
-.weather-now {
- // flex: 0 0 150px;
- width: 30%;
- float: left;
+ bottom: 3em;
+ overflow: hidden;
}
.weather-forecast {
- // flex: 0 0 auto;
- width: 70%;
- height: 100%;
position: absolute;
+ width: 100%;
top: 0;
- right: 0;
bottom: 0;
- overflow: scroll;
+ transition: all 0.5s linear;
}
-.weather-now .weather-icon {
- width: 70%;
- height: auto;
- display: block;
+.weather-content {
+ max-width: 300px;
margin: auto;
+ position: absolute;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ .weather-icon-wrapper {
+ position: absolute;
+ width: 45%;
+ left: 0;
+ top: 0;
+ bottom: 0;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ height: 100%;
+ }
+ .weather-text {
+ width: 55%;
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ padding-left: 1em;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ }
+ .weather-description {
+ font-weight: 700;
+ font-size: 2em;
+ padding-bottom: 0.25em;
+ }
+ .weather-key-value {
+ font-size: 1.25em;
+ padding: 0.25em 0;
+ .weather-key {
+ font-weight: 600;
+ }
+ }
}
-.weather-now-content {
+.weather-nav-labels {
+ position: absolute;
+ right: 0;
+ left: 0;
+ bottom: 0;
text-align: center;
- line-height: 1.25em;
- font-size: 1.25em;
- padding: 0.25rem;
+ .weather-nav-label {
+ border: none;
+ outline: none;
+ padding: 1em;
+ margin: 0;
+ text-transform: uppercase;
+ &.active {
+ font-weight: 600;
+ }
+ }
}
-.weather-label {
- padding: 3px;
- color: $widget_body_strong_text_color;
- @include heading_font_styles;
-}
+// .widget-weather .widget-body {
+// position: absolute;
+// top: 3em;
+// right: 0;
+// bottom: 0;
+// left: 0;
+// }
-.weather-forecast-item {
- clear: both;
- line-height: 1.25em;
-}
+// // .weather-wrapper {
+// // position: relative;
+// // padding-right: 0.5em;
+// // }
-.weather-forecast-item .weather-content {
- display: flex;
- flex-direction: row;
- align-items: stretch;
- justify-content: space-between;
- margin-top: 0;
-}
+// .weather-now {
+// // flex: 0 0 150px;
+// width: 30%;
+// float: left;
+// }
-.weather-forecast-item .weather-text {
- flex-grow: 1;
- margin-left: 0.5em;
- padding-bottom: 0.5em;
-}
+// .weather-forecast {
+// // flex: 0 0 auto;
+// width: 70%;
+// height: 100%;
+// position: absolute;
+// top: 0;
+// right: 0;
+// bottom: 0;
+// overflow: scroll;
+// }
-.weather-forecast-item .weather-high,
-.weather-forecast-item .weather-low {
- float: left;
- margin-right: 0.5em;
- font-size: 0.9em;
- color: $deemphasized_text;
-}
+// .weather-now .weather-icon {
+// width: 70%;
+// height: auto;
+// display: block;
+// margin: auto;
+// }
-.weather-forecast-item .weather-icon {
- width: 50px;
- height: auto;
-}
+// .weather-now-content {
+// text-align: center;
+// line-height: 1.25em;
+// font-size: 1.25em;
+// padding: 0.25rem;
+// }
+
+// .weather-label {
+// padding: 3px;
+// color: $widget_body_strong_text_color;
+// @include heading_font_styles;
+// }
+
+// .weather-forecast-item {
+// clear: both;
+// line-height: 1.25em;
+// }
+
+// .weather-forecast-item .weather-content {
+// display: flex;
+// flex-direction: row;
+// align-items: stretch;
+// justify-content: space-between;
+// margin-top: 0;
+// }
+
+// .weather-forecast-item .weather-text {
+// flex-grow: 1;
+// margin-left: 0.5em;
+// padding-bottom: 0.5em;
+// }
+
+// .weather-forecast-item .weather-high,
+// .weather-forecast-item .weather-low {
+// float: left;
+// margin-right: 0.5em;
+// font-size: 0.9em;
+// color: $deemphasized_text;
+// }
+
+// .weather-forecast-item .weather-icon {
+// width: 50px;
+// height: auto;
+// }
diff --git a/src/ui/widgets/Widget.scss b/src/ui/widgets/Widget.scss
index 66b4c97..018c822 100644
--- a/src/ui/widgets/Widget.scss
+++ b/src/ui/widgets/Widget.scss
@@ -3,7 +3,8 @@
.widget {
background: $widget_background;
border: solid 1px transparent;
- border-left: solid 4px $widget_stripe;
+ border-radius: 15px;
+ box-shadow: 0 0 10px 3px rgba(0, 0, 0, .05);
position: absolute;
top: 0;
left: 0;
@@ -23,7 +24,7 @@
}
.widget-title {
- padding: 0.5rem;
+ padding: 1rem;
font-size: 16px;
background: $widget_title_background;
@include heading_font_styles;
@@ -41,7 +42,6 @@
padding: 0;
margin: 2px 0 0 0;
background: none;
- color: white;
font-size: 0.6em;
float: right;
cursor: pointer;
@@ -51,7 +51,7 @@
}
.widget-body {
- padding: 0.25rem 0.25rem 0.25rem 0.5rem;
+ padding: 1rem;
color: $widget_body_text_color;
backface-visibility: hidden;
}
diff --git a/src/ui/widgets/WidgetBigNumbers.scss b/src/ui/widgets/WidgetBigNumbers.scss
index 485354e..44af661 100644
--- a/src/ui/widgets/WidgetBigNumbers.scss
+++ b/src/ui/widgets/WidgetBigNumbers.scss
@@ -10,30 +10,28 @@
top: 3em;
left: 0;
right: 0;
- bottom: 3em;
+ bottom: 1em;
align-items: center;
}
.widget-big-numbers-group {
flex-grow: 0;
text-align: center;
- border-right: solid 3px $foreground_highlight_color;
- border-left: solid 3px $foreground_highlight_color;
display: flex;
flex-direction: column;
justify-content: center;
- border-radius: 100%;
height: 100%;
}
.widget-big-numbers-number {
font-size: 5em;
line-height: 0.9em;
+ font-weight: 600;
color: $widget_body_strong_text_color;
}
.widget-big-numbers-label {
line-height: 2em;
- @include heading_font_styles;
+ text-transform: uppercase;
color: $deemphasized_text;
}