Skip to content

Commit

Permalink
Lovelace - Weather Card: Adjust margins and move text (#1880)
Browse files Browse the repository at this point in the history
* Thermostat fix (#1867)

* Thermostat fix

* Fix for unknown operation mode

* No title for you

* I suck at removing unnecessary things

* Fixing pointless Ternary operator

* Add version bump script

* Fix hass setting on stack (#1868)

* Fix hass setting on stack

* Don't set hass on pic elements if undefined

* Don't set hass on entity rows if undefined

* prefix config prop

* Pic elements set hass yoooo

* Remove interface

* Make stack config private

* Fix import

* Lint

* Bumped version to 20181026.1

* 🔨 move not text to header and name to secondary text

* 🔨 reduce some other margins
  • Loading branch information
timmo001 authored and balloob committed Oct 29, 2018
1 parent d47c2a6 commit c347be6
Showing 1 changed file with 28 additions and 10 deletions.
38 changes: 28 additions & 10 deletions src/cards/ha-weather-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,25 @@ class HaWeatherCard extends LocalizeMixin(EventsMixin(PolymerElement)) {
color: var(--paper-item-icon-color);
}
.header {
font-family: var(--paper-font-headline_-_font-family);
-webkit-font-smoothing: var(--paper-font-headline_-_-webkit-font-smoothing);
font-size: var(--paper-font-headline_-_font-size);
font-weight: var(--paper-font-headline_-_font-weight);
letter-spacing: var(--paper-font-headline_-_letter-spacing);
line-height: var(--paper-font-headline_-_line-height);
text-rendering: var(--paper-font-common-expensive-kerning_-_text-rendering);
opacity: var(--dark-primary-opacity);
padding: 24px 16px 16px;
display: flex;
}
.name {
margin-left: 16px;
font-size: 16px;
color: var(--secondary-text-color);
}
.now {
display: flex;
justify-content: space-between;
Expand Down Expand Up @@ -58,12 +77,8 @@ class HaWeatherCard extends LocalizeMixin(EventsMixin(PolymerElement)) {
top: 4px;
}
.now-text {
font-size: 24px;
}
.forecast {
margin-top: 24px;
margin-top: 16px;
display: flex;
justify-content: space-between;
}
Expand All @@ -74,7 +89,7 @@ class HaWeatherCard extends LocalizeMixin(EventsMixin(PolymerElement)) {
}
.forecast .icon {
margin: 8px 0;
margin: 4px 0;
text-align: center;
}
Expand All @@ -88,7 +103,13 @@ class HaWeatherCard extends LocalizeMixin(EventsMixin(PolymerElement)) {
color: var(--secondary-text-color);
}
</style>
<ha-card header="[[stateObj.attributes.friendly_name]]">
<ha-card>
<div class="header">
[[computeState(stateObj.state, localize)]]
<div class="name">
[[stateObj.attributes.friendly_name]]
</div>
</div>
<div class="content">
<div class="now">
<div class="main">
Expand Down Expand Up @@ -120,9 +141,6 @@ class HaWeatherCard extends LocalizeMixin(EventsMixin(PolymerElement)) {
</template>
</div>
</div>
<div class="now-text">
[[computeState(stateObj.state, localize)]]
</div>
<template is="dom-if" if="[[forecast]]">
<div class="forecast">
<template is="dom-repeat" items="[[forecast]]">
Expand Down

0 comments on commit c347be6

Please sign in to comment.