mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
14 lines
344 B
JavaScript
14 lines
344 B
JavaScript
import {helper} from '@ember/component/helper';
|
|
import {htmlSafe} from '@ember/template';
|
|
|
|
export function backgroundImageStyle([url]/*, hash*/) {
|
|
if (url) {
|
|
let safeUrl = encodeURI(decodeURI(url));
|
|
return htmlSafe(`background-image: url(${safeUrl});`);
|
|
}
|
|
|
|
return '';
|
|
}
|
|
|
|
export default helper(backgroundImageStyle);
|