<?php 
function edify_header_socials(){
	
	$edify_header_social_fb = get_theme_mod('edify_header_social_fb',false); 
	$edify_header_social_twitter = get_theme_mod('edify_header_social_twitter',false); 
	$edify_header_social_linkedin = get_theme_mod('edify_header_social_linkedin',false); 
	$edify_header_social_youtube = get_theme_mod('edify_header_social_youtube',false); 

	$edify_header_fb_btn_link		 = get_theme_mod('edify_header_fb_btn_link',__( '#', 'edify' ));
	$edify_header_twitter_btn_link	 = get_theme_mod('edify_header_twitter_btn_link',__( '#', 'edify' ));
	$edify_header_linkedin_btn_link  = get_theme_mod('edify_header_linkedin_btn_link',__( '#', 'edify' ));
	$edify_header_youtube_btn_link	= get_theme_mod('eedify_header_youtube_btn_link',__( '#', 'edify' ));
	
	
	if ( isset( $edify['edify_header_fb_btn_link'] ) ) {
		$edify_header_fb_btn_link = $edify['edify_header_fb_btn_link'];
	}
	if ( isset( $edify['edify_header_twitter_btn_link'] ) ) {
		$edify_header_twitter_btn_link = $edify['edify_header_twitter_btn_link'];
	}
	if ( isset( $edify['edify_header_linkedin_btn_link'] ) ) {
		$edify_header_linkedin_btn_link = $edify['edify_header_linkedin_btn_link'];
	}
	if ( isset( $edify['edify_header_youtube_btn_link'] ) ) {
		$edify_header_youtube_btn_link = $edify['edify_header_youtube_btn_link'];
	}	
	?>

	<?php if($edify_header_social_fb ){ ?>
		<a target="_blank" href="<?php echo esc_url($edify_header_fb_btn_link);?>"><i class="ri-facebook-line"></i></a>
	<?php } ?>

	<?php if($edify_header_social_twitter ){ ?>
		<a target="_blank" href="<?php echo esc_url($edify_header_twitter_btn_link);?>"><i class="ri-twitter-x-line"></i></a>
	<?php } ?>

	<?php if($edify_header_social_linkedin ){ ?>
		<a target="_blank" href="<?php echo esc_url($edify_header_linkedin_btn_link);?>"><i class="ri-linkedin-line"></i></a>
	<?php }  ?>
	
	<?php if( $edify_header_social_youtube ){ ?>
		<a target="_blank" href="<?php echo esc_url($edify_header_youtube_btn_link);?>"><i class="ri-youtube-line"></i></a>
	<?php }  ?>
	
<?php }

// Header one

function edify_header_one(){
?>

<header class="header-style-1"> 	
    <div class="header-navbar navbar-sticky">
        <div class="container-xl">
            <div class="d-flex align-items-center justify-content-between">
                <div class="site-logo">
					<?php 
						if (has_custom_logo()) {
							the_custom_logo();
						}
						else { ?> 
							<a href="<<?php echo esc_url( home_url( '/' ) ); ?>">
							<img src="<?php echo esc_url(get_template_directory_uri());?>/assets/images/logo.png" alt="<?php bloginfo('name') ?>" class="img-fluid">
						</a>
						<?php 
						}
					
					?>
                </div>

                <div class="offcanvas-icon d-block d-lg-none">
                    <a href="#" class="nav-toggler"><i class="fal fa-bars"></i></a> 
                </div>

                <nav class="site-navbar mx-auto">
					<?php edify_main_menu();?>

                    <a href="#" class="nav-close"><i class="fal fa-times"></i></a>
                </nav>

                <div class="header-btn text-center text-lg-end">

				<?php
					if ( $edify_header_sign_btn_link ) {
						?>
						<a class="header-logout-link btn btn-outline-black btn-sm ms-3"
						href="<?php echo esc_url($edify_header_sign_btn_link);?>"><?php echo esc_html($edify_header_sign_btn_text); ?></a>
					<?php } ?>
					
                </div>
            </div>
        </div>
    </div>
</header>

<!--====== Footer Two ======-->	
<?php 	
}


function edify_footer(){
	
	$show_backtop = get_theme_mod('back_to_top',true); 

	edify_footer_one();		
		
	 if(true === $show_backtop){ ?>
	 
	<!-- Start progress-wrap -->
	<div class="fixed-btm-top">
	    <a href="#page" class="js-scroll-trigger scroll-to-top"><i class="fa fa-angle-up"></i></a>
    </div>
	<!-- End progress-wrap -->
	
	<?php } 	

}


function edify_footer_one(){
	$edify_copyright_text	= get_theme_mod('copyright');
	$edify_copyright_link	= get_theme_mod('copyright_link');
	$edify_copyright_author	= get_theme_mod('copyright_author');

	if ( isset( $edify['edify_copyright_text'] ) ) {
		$edify_copyright_text = $edify['edify_copyright_text'];
	}	
	
	if ( isset( $edify['edify_copyright_link'] ) ) {
		$edify_copyright_link = $edify['edify_copyright_link'];
	}	
	
	if ( isset( $edify['edify_copyright_author'] ) ) {
		$edify_copyright_author = $edify['edify_copyright_author'];
	}	

?>

<!-- Footer section start -->
<section class="footer">
	<div class="footer-btm">
		<div class="container">
			<div class="row align-items-center">
				<div class="col-xl-6 col-sm-12 col-lg-6">
					<p class="mb-0 copyright text-sm-center text-lg-start">
					<?php
						if($edify_copyright_text){
							printf( esc_html__( '%1$s by %2$s', 'edify' ), '© '. date("Y").' '.edify_wp_kses($edify_copyright_text).'', '<a href="'.esc_url($edify_copyright_link).'" rel="nofollow">'.$edify_copyright_author.'</a>' );
						}else{ ?>							
							<?php
							/* translators: 1: Theme name, 2: Theme author. */
							printf( esc_html__( '%1$s by %2$s', 'edify' ), '© '. date("Y").' Edify All rights reserved', '<a href="#" rel="nofollow">example</a>' );
							?>
						<?php } ?>			
					</p>
				</div>

				<div class="col-xl-6 col-sm-12 col-lg-6">
					<div class="footer-btm-links text-start text-sm-center text-lg-end">
						<?php edify_footer_menu();?>
					</div>
				</div>
			</div>
		</div>
	</div>

</section>
<!-- Footer section End -->
<?php } 