| 1 |
<div class="httemplates-templates-area"> |
| 2 |
<div class="httemplate-row"> |
| 3 |
|
| 4 |
<!-- PopUp Content Start --> |
| 5 |
<div id="httemplate-popup-area" style="display: none;"> |
| 6 |
<div class="httemplate-popupcontent"> |
| 7 |
<div class='htspinner'></div> |
| 8 |
<div class="htmessage" style="display: none;"> |
| 9 |
<p></p> |
| 10 |
<span class="httemplate-edit"></span> |
| 11 |
</div> |
| 12 |
<div class="htpopupcontent"> |
| 13 |
<p><?php esc_html_e( 'Import template to your Library', 'ht-builder' );?></p> |
| 14 |
<span class="htimport-button-dynamic"></span> |
| 15 |
<div class="htpageimportarea"> |
| 16 |
<p> <?php esc_html_e( 'Create a new page from this template', 'ht-builder' ); ?></p> |
| 17 |
<input id="htpagetitle" type="text" name="htpagetitle" placeholder="<?php echo esc_attr_x( 'Enter a Page Name', 'placeholder', 'ht-builder' ); ?>"> |
| 18 |
<span class="htimport-button-dynamic-page"></span> |
| 19 |
</div> |
| 20 |
</div> |
| 21 |
</div> |
| 22 |
</div> |
| 23 |
<!-- PopUp Content End --> |
| 24 |
|
| 25 |
<!-- Top banner area Start --> |
| 26 |
<div class="httemplate-top-banner-area"> |
| 27 |
<div class="htbanner-content"> |
| 28 |
<div class="htbanner-desc"> |
| 29 |
<h3><?php esc_html_e( 'HT Builder Templates Library', 'ht-builder' ); ?></h3> |
| 30 |
<?php if( is_plugin_active('ht-builder-pro/ht-builder.php') ): ?> |
| 31 |
<p><?php esc_html_e( '10 Headers and 10 footers & 3 blog layout', 'ht-builder' ); ?></p> |
| 32 |
<?php else:?> |
| 33 |
<p><?php esc_html_e( '2 Templates are Free and 18 Templates are Premium.', 'ht-builder' ); ?></p> |
| 34 |
<?php endif; ?> |
| 35 |
</div> |
| 36 |
<?php if( !is_plugin_active('ht-builder-pro/ht-builder.php') ){ ?> |
| 37 |
<a href="https://hasthemes.com/plugins/ht-builder-wordpress-theme-builder-for-elementor/" target="_blank"><?php esc_html_e( 'Buy HT Builder Pro Version', 'ht-builder' );?></a> |
| 38 |
<?php } ?> |
| 39 |
</div> |
| 40 |
</div> |
| 41 |
<!-- Top banner area end --> |
| 42 |
|
| 43 |
<?php if( HTBuilder_Template_Library::instance()->get_templates_info()['templates'] ): ?> |
| 44 |
|
| 45 |
<div class="htbuilder-topbar"> |
| 46 |
<span id="htbuilderclose">← <?php esc_html_e( 'Back to Library', 'ht-builder' ); ?></span> |
| 47 |
<h3 id="htbuilder-tmp-name"></h3> |
| 48 |
</div> |
| 49 |
|
| 50 |
<ul id="tp-grid" class="tp-grid"> |
| 51 |
|
| 52 |
<?php foreach ( HTBuilder_Template_Library::instance()->get_templates_info()['templates'] as $httemplate ): |
| 53 |
|
| 54 |
$allcat = explode( ' ', $httemplate['category'] ); |
| 55 |
|
| 56 |
$htimp_btn_atr = [ |
| 57 |
'templpateid' => $httemplate['id'], |
| 58 |
'templpattitle' => $httemplate['title'], |
| 59 |
'message' => esc_html__( 'Successfully '.$httemplate['title'].' has been imported.', 'ht-builder' ), |
| 60 |
'htbtnlibrary' => esc_html__( 'Import to Library', 'ht-builder' ), |
| 61 |
'htbtnpage' => esc_html__( 'Import to Page', 'ht-builder' ), |
| 62 |
]; |
| 63 |
|
| 64 |
?> |
| 65 |
|
| 66 |
<li data-pile="<?php echo esc_attr( implode(' ', $allcat ) ); ?>"> |
| 67 |
<div class="htsingle-templates-laibrary"> |
| 68 |
<div class="httemplate-thumbnails"> |
| 69 |
<img src="<?php echo esc_url( $httemplate['thumbnail'] ); ?>" alt="<?php echo esc_attr( $httemplate['title'] ); ?>"> |
| 70 |
<div class="httemplate-action"> |
| 71 |
<?php if( $httemplate['is_pro'] == 1 ):?> |
| 72 |
<a href="https://hasthemes.com/plugins/ht-builder-wordpress-theme-builder-for-elementor/" target="_blank"> |
| 73 |
<?php esc_html_e( 'Buy Now', 'ht-builder' ); ?> |
| 74 |
</a> |
| 75 |
<?php else:?> |
| 76 |
<a href="#" class="httemplateimp" data-templpateopt='<?php echo wp_json_encode( $htimp_btn_atr );?>' > |
| 77 |
<?php esc_html_e( 'Import', 'ht-builder' ); ?> |
| 78 |
</a> |
| 79 |
<?php endif; ?> |
| 80 |
</div> |
| 81 |
</div> |
| 82 |
<div class="httemplate-content"> |
| 83 |
<h3><?php echo esc_html__( $httemplate['title'], 'ht-builder' ); if( $httemplate['is_pro'] == 1 ){ echo ' <span>( '.esc_html__('Pro','ht-builder').' )</span>'; } ?></h3> |
| 84 |
<div class="httemplate-tags"> |
| 85 |
<?php echo implode( ' / ', explode( ',', $httemplate['tags'] ) ); ?> |
| 86 |
</div> |
| 87 |
</div> |
| 88 |
</div> |
| 89 |
</li> |
| 90 |
|
| 91 |
<?php endforeach; ?> |
| 92 |
|
| 93 |
</ul> |
| 94 |
|
| 95 |
<script type="text/javascript"> |
| 96 |
jQuery(document).ready(function($) { |
| 97 |
|
| 98 |
$(function() { |
| 99 |
var $grid = $( '#tp-grid' ), |
| 100 |
$name = $( '#htbuilder-tmp-name' ), |
| 101 |
$close = $( '#htbuilderclose' ), |
| 102 |
$loaderimg = '<?php echo HTBUILDER_PL_URL . 'includes/admin/assets/images/ajax-loader.gif'; ?>', |
| 103 |
$loader = $( '<div class="htbuilder-loader"><span><img src="'+$loaderimg+'" alt="" /></span></div>' ).insertBefore( $grid ), |
| 104 |
stapel = $grid.stapel( { |
| 105 |
onLoad : function() { |
| 106 |
$loader.remove(); |
| 107 |
}, |
| 108 |
onBeforeOpen : function( pileName ) { |
| 109 |
$( '.htbuilder-topbar,.httemplate-action' ).css('display','block'); |
| 110 |
$( '.httemplate-content span' ).css('display','inline-block'); |
| 111 |
$close.show(); |
| 112 |
$name.html( pileName ); |
| 113 |
}, |
| 114 |
onAfterOpen : function( pileName ) { |
| 115 |
$close.show(); |
| 116 |
} |
| 117 |
} ); |
| 118 |
$close.on( 'click', function() { |
| 119 |
$close.hide(); |
| 120 |
$name.empty(); |
| 121 |
$( '.htbuilder-topbar,.httemplate-action,.httemplate-content span' ).css('display','none'); |
| 122 |
stapel.closePile(); |
| 123 |
} ); |
| 124 |
} ); |
| 125 |
|
| 126 |
}); |
| 127 |
</script> |
| 128 |
<?php endif; ?> |
| 129 |
|
| 130 |
</div> |
| 131 |
</div> |