Skip to content

Commit

Permalink
fix(layout): Bugfixing responsivnes
Browse files Browse the repository at this point in the history
  • Loading branch information
krzysztofsaja committed Jul 24, 2017
1 parent 7615af3 commit 703829d
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 11 deletions.
6 changes: 3 additions & 3 deletions demo/demo.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ export class DemoComponent {
scale: TemperatureScale.CELCIUS,
backgroundColor: '#ffffff',
color: '#222222',
width: 'auto',
width: '400px',
height: 'auto',
showWind: false,
showDetails: false,
showWind: true,
showDetails: true,
showForecast: true,
forecastMode: ForecastMode.DETAILED,
language: 'en',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@ import {
@Component({
selector: 'weather-current-description',
changeDetection: ChangeDetectionStrategy.OnPush,
styles: [``],
styles: [
`
:host {
display: block;
text-align: center;
}
`
],
template: `
{{ descripion | uppercase}}
`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
text-align: center;
margin-top: 1em;
}
.row {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
}
.row span {
margin: 0 0.3em;
}
Expand All @@ -21,8 +27,11 @@ import { Component, ChangeDetectionStrategy, Input } from '@angular/core';
template: `
<div class="row">
<i class="wi wi-thermometer"></i>
<span>Min: {{minTemp}}&deg;</span>
<span>Max: {{maxTemp}}&deg;</span>
<span>
<span>Min: {{minTemp}}&deg;</span>
<span>Max: {{maxTemp}}&deg;</span>
</span>
</div>
<div class="row">
<span><i class="wi wi-barometer"></i>Pressure: {{pressure}}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
`
:host {
display: block;
line-height: 1.1em;
}
.deg {
letter-spacing: -0.13em;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { WeatherSettings } from '../../weather.interfaces';
justify-content: space-around;
align-items: center;
font-size: 0.8em;
min-height: 1.3em;
}
i {
margin-left: 0.3em;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,24 @@ import { WeatherSettings } from '../../../weather.interfaces';
`
:host {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.1em 0;
font-size: 1em;
box-sizing: border-box;
}
justify-content: flex-start;
width: 100%;
}
:host > * {
padding: 0 0.4em;
}
.left {
flex-grow: 0;
}
weather-chart {
height: 80px;
width: 80%;
flex: 1 1;
}
weather-icon {
Expand Down
1 change: 0 additions & 1 deletion src/services/api/weather.api.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import 'rxjs/add/operator/map';
import 'rxjs/add/operator/filter';
import 'rxjs/add/operator/catch';
import 'rxjs/add/operator/first';
import { TemperatureScale } from '../../components/weather-current-temperature/current-temperature.component';
import { WeatherQueryParams } from '../../weather.interfaces';

@Injectable()
Expand Down
3 changes: 2 additions & 1 deletion src/weather.container.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ import {
flex-direction: column;
align-items: center;
justify-content: center;
min-width: 130px;
min-width: 140px;
}
.forecast {
min-width: 200px;
width: 100%;
}
.current, .forecast {
padding: 0.5em;
Expand Down

0 comments on commit 703829d

Please sign in to comment.