| | |
| | | // </div> |
| | | // ) |
| | | } else if (card.eleType === 'picture') { |
| | | let _imagestyle = {} |
| | | let _imagestyle = { |
| | | backgroundSize: card.style.backgroundSize || 'cover', |
| | | backgroundPosition: card.style.backgroundPosition || 'center', |
| | | backgroundRepeat: card.style.backgroundRepeat || 'no-repeat', |
| | | borderRadius: card.style.borderRadius || 0 |
| | | } |
| | | let url = card.url !== '@icon@' ? card.url : sessionStorage.getItem('CloudAvatar') |
| | | |
| | | if (url) { |
| | | url = url.replace(/@mywebsite@\//ig, window.GLOB.baseurl) |
| | | _imagestyle = {backgroundImage: `url('${url}')`} |
| | | _imagestyle.backgroundImage = `url('${url}')` |
| | | } else { |
| | | let index = card.uuid.match(/\d{1}/g) |
| | | index = index.slice(-1)[0] % 5 |
| | | let demos = [demo1, demo2, demo3, demo4, demo5] |
| | | |
| | | _imagestyle = {backgroundImage: `url('${demos[index]}')`} |
| | | } |
| | | |
| | | if (card.style && card.style.borderRadius) { |
| | | _imagestyle.borderRadius = card.style.borderRadius |
| | | _imagestyle.backgroundImage = `url('${demos[index]}')` |
| | | } |
| | | |
| | | if (PicRadio[card.lenWidRadio]) { |
| | | _imagestyle.paddingTop = PicRadio[card.lenWidRadio] |
| | | } else { |
| | | _imagestyle.paddingTop = '100%' |
| | | } |
| | | |
| | | if (card.backgroundSize) { |
| | | _imagestyle.backgroundSize = card.backgroundSize |
| | | } |
| | | |
| | | return ( |