Skip to content

Commit

Permalink
Update refreshable-picture-card.js
Browse files Browse the repository at this point in the history
  • Loading branch information
dimagoltsman authored Sep 9, 2020
1 parent 6a4546f commit f99b413
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions dist/refreshable-picture-card.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,24 @@ class ResfeshablePictureCard extends HTMLElement {

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

let html = ""
if(!title){
html = "<br>"
}else{
html = `<p class="center txt">${title}</p><br>`
}
try{

const html = `
<p class="center txt">${title}</p>${br}
html += `
<img id="thePic" class="center thePic" src="${picture}" ></img>
<br>
`;
const css = `
.center{
display: block;
margin-top: auto;
margin-bottom: auto;
margin-left: auto;
margin-right: auto;
width: 90%;
Expand Down

0 comments on commit f99b413

Please sign in to comment.