| 1 |
<?php |
| 2 |
/** |
| 3 |
* Underscore.js template. |
| 4 |
* |
| 5 |
* @package fusion-builder |
| 6 |
*/ |
| 7 |
|
| 8 |
?> |
| 9 |
<script type="text/template" id="fusion-builder-block-module-property-type-preview-template"> |
| 10 |
|
| 11 |
<# |
| 12 |
var text_color = params.text_color, |
| 13 |
text_transform = '' !== params.text_transform ? params.text_transform : '', |
| 14 |
iconHtml = '', |
| 15 |
beforeLabel = '', |
| 16 |
afterLabel = '', |
| 17 |
styleTag = ''; |
| 18 |
|
| 19 |
if ( 'none' !== text_transform ) { |
| 20 |
styleTag += 'text-transform: ' + text_transform + ';'; |
| 21 |
} |
| 22 |
|
| 23 |
if ( text_color && ( -1 !== text_color.indexOf( 'var(--' ) ) ) { |
| 24 |
text_color = getComputedStyle( document.documentElement ).getPropertyValue( text_color.replace( 'var(', '' ).replace( ')', '' ) ); |
| 25 |
} |
| 26 |
|
| 27 |
if ( text_color && ( -1 !== text_color.replace( /\s/g, '' ).indexOf( 'rgba(255,255,255' ) || '#ffffff' === text_color ) ) { |
| 28 |
text_color = '#dddddd'; |
| 29 |
} |
| 30 |
|
| 31 |
if ( params.content_align && '' !== params.content_align ) { |
| 32 |
styleTag += 'text-align: ' + params.content_align + ';'; |
| 33 |
} |
| 34 |
|
| 35 |
if ( params.sep_color && '' !== params.sep_color ) { |
| 36 |
styleTag += 'border-color: ' + params.sep_color + ';'; |
| 37 |
} |
| 38 |
|
| 39 |
if ( text_color ) { |
| 40 |
styleTag += 'color: ' + text_color + ';'; |
| 41 |
} |
| 42 |
|
| 43 |
if ( params.icon && '' !== params.icon ) { |
| 44 |
iconHtml = '<span class="' + params.icon + '"></span> '; |
| 45 |
} |
| 46 |
|
| 47 |
if ( params.before && '' !== params.before ) { |
| 48 |
beforeLabel = params.before + ' '; |
| 49 |
} |
| 50 |
|
| 51 |
if ( params.after && '' !== params.after ) { |
| 52 |
afterLabel = ' ' + params.after; |
| 53 |
} |
| 54 |
#> |
| 55 |
|
| 56 |
<div class="fusion-module-property-type-preview" style="{{{ styleTag }}}"> |
| 57 |
{{{iconHtml}}}{{{beforeLabel}}}Detached House{{{afterLabel}}} |
| 58 |
</div> |
| 59 |
|
| 60 |
</script> |
| 61 |
|