2018-05-14 15:04:53 +03:00
|
|
|
import {helper} from '@ember/component/helper';
|
2021-05-12 14:33:36 +03:00
|
|
|
import {htmlSafe} from '@ember/template';
|
2018-05-14 15:04:53 +03:00
|
|
|
|
|
|
|
export function backgroundImageStyle([url]/*, hash*/) {
|
|
|
|
if (url) {
|
|
|
|
let safeUrl = encodeURI(decodeURI(url));
|
|
|
|
return htmlSafe(`background-image: url(${safeUrl});`);
|
|
|
|
}
|
|
|
|
|
|
|
|
return '';
|
|
|
|
}
|
|
|
|
|
|
|
|
export default helper(backgroundImageStyle);
|