Skip to content

Commit

Permalink
fix spacing when no title
Browse files Browse the repository at this point in the history
  • Loading branch information
dimagoltsman authored May 21, 2020
1 parent f55611d commit af9e75f
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions dist/refreshable-picture-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,31 @@ class ResfeshablePictureCard extends HTMLElement {

let picture = config.static_picture;
let title = config.title || ""
let br = "<br>"
if(title){
br = ""
}
try{

const html = `
<p class="center txt">${title}</p>
<p class="center txt">${title}</p>${br}
<img id="thePic" class="center thePic" src="${picture}" ></img>
<br>
`;
const css = `
.center{
display: block;
margin-left: auto;
margin-right: auto;
width: 90%;
margin-top: auto;
margin-left: auto;
margin-right: auto;
width: 90%;
}
.txt{
color: var(--ha-card-header-color, --primary-text-color);
font-family: var(--ha-card-header-font-family, inherit);
font-size: var(--ha-card-header-font-size, 24px);
letter-spacing: -0.012em;
line-height: 32px;
font-family: var(--ha-card-header-font-family, inherit);
font-size: var(--ha-card-header-font-size, 24px);
letter-spacing: -0.012em;
line-height: 32px;
}
`;
Expand Down

0 comments on commit af9e75f

Please sign in to comment.