first commit

This commit is contained in:
2024-07-15 11:28:08 +02:00
commit f52d538ea5
21891 changed files with 6161164 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
<?php
/**
* Animated box action button
*/
$position = $this->get_settings_for_display( 'button_icon_position' );
$use_icon = $this->get_settings_for_display( 'add_button_icon' );
$button_url = $this->get_settings_for_display( 'back_side_button_link' );
if ( empty( $button_url ) ) {
return false;
}
if ( is_array( $button_url ) && empty( $button_url['url'] ) ) {
return false;
}
$this->add_render_attribute( 'url', 'class', array(
'elementor-button',
'elementor-size-md',
'jet-animated-box__button',
'jet-animated-box__button--back',
'jet-animated-box__button--icon-' . $position,
) );
if ( is_array( $button_url ) ) {
$this->add_render_attribute( 'url', 'href', $button_url['url'] );
if ( $button_url['is_external'] ) {
$this->add_render_attribute( 'url', 'target', '_blank' );
}
if ( ! empty( $button_url['nofollow'] ) ) {
$this->add_render_attribute( 'url', 'rel', 'nofollow' );
}
} else {
$this->add_render_attribute( 'url', 'href', $button_url );
}
?>
<a <?php echo $this->get_render_attribute_string( 'url' ); ?>><?php
echo $this->__html( 'back_side_button_text', '<span class="jet-animated-box__button-text">%s</span>' );
if ( filter_var( $use_icon, FILTER_VALIDATE_BOOLEAN ) ) {
echo $this->__icon( 'button_icon', '<span class="jet-animated-box__button-icon jet-elements-icon">%s</span>' );
}
?></a>

View File

@@ -0,0 +1,79 @@
<?php
/**
* Loop item template
*/
$widget_id = $this->get_id();
$settings = $this->get_settings();
$title_tag = $this->__get_html( 'title_html_tag', '%s' );
$sub_title_tag = $this->__get_html( 'sub_title_html_tag', '%s' );
$animation_class = $settings['animation_effect'];
switch ( $settings['switch_event_type'] ) {
case 'scratch':
$animation_class = 'jet-box-scratch-effect back-events-inactive';
break;
case 'fold':
$animation_class = 'jet-box-fold-effect';
break;
case 'peel':
$animation_class = 'jet-box-peel-effect';
break;
case 'slide-out':
$slide_direction = isset( $settings['slide_out_direction'] ) ? $settings['slide_out_direction'] : '';
$animation_class = 'jet-box-slide-out-effect slide-out-' . $slide_direction;
break;
}
?><div id="jet-animated-box-<?php echo $widget_id; ?>" class="jet-animated-box <?php echo $animation_class; ?>" <?php echo $this->generate_setting_json(); ?>>
<div id="jet-animated-box__front-<?php echo $widget_id; ?>" class="jet-animated-box__front">
<div class="jet-animated-box__inner"><?php
if ( 'default' === $settings['front_side_content_type'] ) {
$this->__icon( 'front_side_icon', '<div class="jet-animated-box__icon jet-animated-box__icon--front"><div class="jet-animated-box-icon-inner"><span class="jet-elements-icon">%s</span></div></div>' );
?><div class="jet-animated-box__content"><?php
$this->__html( 'front_side_title', '<' . $title_tag . ' class="jet-animated-box__title jet-animated-box__title--front">%s</' . $title_tag . '>' );
$this->__html( 'front_side_subtitle', '<' . $sub_title_tag . ' class="jet-animated-box__subtitle jet-animated-box__subtitle--front">%s</' . $sub_title_tag . '>' );
$this->__html( 'front_side_description', '<p class="jet-animated-box__description jet-animated-box__description--front">%s</p>' );
?></div><?php
} else {
echo $this->get_template_content( $settings['front_side_template_id'] );
}
?></div>
<div class="jet-animated-box__overlay"></div><?php
if( 'toggle' === $settings['switch_event_type'] ) {
?><div class="jet-animated-box__toggle jet-animated-box__toggle--front"><?php
$this->__icon( 'front_side_toggle_icon', '<div class="jet-animated-box__toggle-icon"><span class="jet-elements-icon">%s</span></div>' );
?></div><?php
}
?></div>
<div id="jet-animated-box__back-<?php echo $widget_id; ?>" class="jet-animated-box__back">
<div class="jet-animated-box__inner"><?php
if ( 'default' === $settings['back_side_content_type'] ) {
$this->__icon( 'back_side_icon', '<div class="jet-animated-box__icon jet-animated-box__icon--back"><div class="jet-animated-box-icon-inner"><span class="jet-elements-icon">%s</span></div></div>' );
?><div class="jet-animated-box__content"><?php
$this->__html( 'back_side_title', '<' . $title_tag . ' class="jet-animated-box__title jet-animated-box__title--back">%s</' . $title_tag . '>' );
$this->__html( 'back_side_subtitle', '<' . $sub_title_tag . ' class="jet-animated-box__subtitle jet-animated-box__subtitle--back">%s</' . $sub_title_tag . '>' );
$this->__html( 'back_side_description', '<p class="jet-animated-box__description jet-animated-box__description--back">%s</p>' );
$this->__glob_inc_if( 'action-button', array( 'back_side_button_link', 'back_side_button_text' ) );
?></div><?php
} else {
echo $this->get_template_content( $settings['back_side_template_id'] );
}
?></div>
<div class="jet-animated-box__overlay"></div><?php
if( 'toggle' === $settings['switch_event_type'] ) {
?><div class="jet-animated-box__toggle jet-animated-box__toggle--back"><?php
$this->__icon( 'back_side_toggle_icon', '<div class="jet-animated-box__toggle-icon"><span class="jet-elements-icon">%s</span></div>' );
?></div><?php
}
?></div>
</div>