<?php
/**
 * @package WordPress
 * @subpackage Campoal
 */

global $campoal_options;

$home_caption_title 		= isset($campoal_options['conikal_home_caption_title_field']) ? $campoal_options['conikal_home_caption_title_field'] : '';
$home_caption_subtitle 		= isset($campoal_options['conikal_home_caption_subtitle_field']) ? $campoal_options['conikal_home_caption_subtitle_field'] : '';
$home_caption_cta 			= isset($campoal_options['conikal_home_caption_cta_field']) ? $campoal_options['conikal_home_caption_cta_field'] : 0;
$home_caption_cta_text 		= isset($campoal_options['conikal_home_caption_cta_text_field']) ? $campoal_options['conikal_home_caption_cta_text_field'] : '';
$home_caption_cta_link 		= isset($campoal_options['conikal_home_caption_cta_link_field']) ? $campoal_options['conikal_home_caption_cta_link_field'] : '';
$home_caption_cta_text_2 	= isset($campoal_options['conikal_home_caption_cta_text_2_field']) ? $campoal_options['conikal_home_caption_cta_text_2_field'] : '';
$home_caption_cta_link_2 	= isset($campoal_options['conikal_home_caption_cta_link_2_field']) ? $campoal_options['conikal_home_caption_cta_link_2_field'] : '';
$home_caption_margin_top 	= isset($campoal_options['conikal_home_caption_top_field']) ? $campoal_options['conikal_home_caption_top_field'] : '225';
$home_caption_cta_size 		= isset($campoal_options['conikal_home_caption_cta_size_field']) ? $campoal_options['conikal_home_caption_cta_size_field'] : 'medium';
$home_caption_cta_type 		= isset($campoal_options['conikal_home_caption_cta_type_field']) ? $campoal_options['conikal_home_caption_cta_type_field'] : 'circular';
$opacity_hero_page_color    = $campoal_options['conikal_opacity_hero_page_color_field'];
$use_inverted_logo 			= isset($campoal_options['conikal_use_inverted_logo_field']) ? $campoal_options['conikal_use_inverted_logo_field'] : 1;
?>
<div class="ui container">
	<div class="home-caption">
		<?php if ($home_caption_title && $home_caption_title != '') { ?>
			<div class="home-title"><?php echo wp_kses_post($home_caption_title); ?></div>
		<?php } ?>
		<?php if ($home_caption_subtitle && $home_caption_subtitle != '') { ?>
			<div class="home-subtitle"><?php echo wp_kses_post($home_caption_subtitle); ?></div>
		<?php } ?>
		<?php if ($home_caption_cta == 1 && $home_caption_cta_text && $home_caption_cta_link) { ?>
			<a href="<?php echo esc_url($home_caption_cta_link); ?>" class="ui <?php echo esc_attr($home_caption_cta_size) ?> <?php echo esc_attr($home_caption_cta_type) ?> button home-cta-button"><?php echo esc_html($home_caption_cta_text); ?></a>
		<?php } ?>
		<?php if ($home_caption_cta == 1 && $home_caption_cta_text_2 && $home_caption_cta_link_2) { ?>
			<a href="<?php echo esc_url($home_caption_cta_link_2); ?>" class="ui <?php echo esc_attr($home_caption_cta_size) ?> <?php echo esc_attr($use_inverted_logo ? 'inverted' : 'primary' ) ?> <?php echo esc_attr($home_caption_cta_type) ?> button"><?php echo esc_html($home_caption_cta_text_2); ?></a>
		<?php } ?>
	</div>
</div>