<?php
defined('ABSPATH') || exit;

get_header();
$prefix = 'prefix_mihancode';
$teacher_image = get_post_meta(get_the_ID() , $prefix . 'teacher_image' , true);
$teacher_job = get_post_meta(get_the_ID() , $prefix . 'teacher_job' , true);
$teacher_bio = get_post_meta(get_the_ID() , $prefix . 'teacher_bio' , true);
///social
$teacher_whatsapp = get_post_meta(get_the_ID() , $prefix . 'teacher_whatsapp' , true);
$teacher_instagram = get_post_meta(get_the_ID() , $prefix . 'teacher_instagram' , true);
$teacher_telegram = get_post_meta(get_the_ID() , $prefix . 'teacher_telegram' , true);
$teacher_youtube = get_post_meta(get_the_ID() , $prefix . 'teacher_youtube' , true);
$teacher_linkedin = get_post_meta(get_the_ID() , $prefix . 'teacher_linkedin' , true);
$teacher_pinterest = get_post_meta(get_the_ID() , $prefix . 'teacher_pinterest' , true);
$teacher_github = get_post_meta(get_the_ID() , $prefix . 'teacher_github' , true);
///statistics
$teacher_count_course = get_post_meta(get_the_ID() , $prefix . 'teacher_count_course' , true);
$teacher_count_student = get_post_meta(get_the_ID() , $prefix . 'teacher_count_student' , true);
$teacher_count_rate = get_post_meta(get_the_ID() , $prefix . 'teacher_count_rate' , true);
$teacher_count_duration = get_post_meta(get_the_ID() , $prefix . 'teacher_count_duration' , true);
?>
    <div class="container">
        <?php if (have_posts()) :
            while (have_posts()) : the_post(); ?>
                <div class="top-box-teacher">
                    <div class="teacher-profile">
                            <div class="top-notch notch-mini"></div>
                            <div class="profile-pattern"></div>
                            <figure style="display: block;float: right;width: 100%;">
                                <img src="<?php echo $teacher_image; ?>">
                            </figure>
                    </div>
                    <div class="box-titles-teacher">
                        <h1>
                            <?php the_title(); ?>
                                <svg xmlns="http://www.w3.org/2000/svg" class="teacher-blue-tik" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="30" height="30" x="0" y="0" viewBox="0 0 496 496.01461" style="enable-background:new 0 0 512 512" xml:space="preserve"><g><path xmlns="http://www.w3.org/2000/svg" d="m455.882812 128.003906-60.800781-27.046875-27.070312-60.824219-66.167969 6.910157-53.832031-39.039063-53.863281 39.039063-66.136719-6.910157-27.050781 60.796876-60.824219 27.074218 6.914062 66.167969-39.039062 53.832031 39.039062 53.863282-6.914062 66.136718 60.800781 27.046875 27.074219 60.824219 66.167969-6.910156 53.832031 39.039062 53.863281-39.039062 66.136719 6.910156 27.046875-60.800781 60.824218-27.070313-6.914062-66.167968 39.042969-53.832032-39.042969-53.863281zm-255.871093 216-67.921875-67.921875 22.640625-22.558593 45.28125 45.199218 135.757812-135.757812 22.640625 22.636718zm0 0" fill="#57A4FF" data-original="#57a4ff"></path><g xmlns="http://www.w3.org/2000/svg" fill="#1E81CE"><path d="m494.492188 243.308594-37.25-51.386719 6.601562-63.109375c.359375-3.449219-1.539062-6.734375-4.707031-8.144531l-57.980469-25.800781-25.800781-57.984376c-1.417969-3.160156-4.699219-5.054687-8.144531-4.710937l-63.121094 6.597656-51.382813-37.246093c-2.800781-2.03125-6.589843-2.03125-9.390625 0l-51.386718 37.246093-63.117188-6.597656c-3.441406-.328125-6.710938 1.5625-8.144531 4.703125l-25.800781 57.984375-57.984376 25.808594c-3.164062 1.40625-5.0625 4.691406-4.703124 8.136719l6.597656 63.117187-37.246094 51.386719c-2.03125 2.800781-2.03125 6.589844 0 9.390625l37.246094 51.382812-6.597656 63.121094c-.363282 3.445313 1.535156 6.734375 4.703124 8.144531l57.984376 25.800782 25.800781 57.984374c1.425781 3.148438 4.699219 5.042969 8.144531 4.710938l63.117188-6.601562 51.386718 37.25c2.800782 2.03125 6.589844 2.03125 9.390625 0l51.382813-37.25 63.121094 6.601562c3.445312.347656 6.722656-1.546875 8.144531-4.703125l25.800781-57.984375 57.980469-25.808594c3.164062-1.410156 5.0625-4.691406 4.707031-8.136718l-6.601562-63.121094 37.25-51.382813c2.035156-2.800781 2.035156-6.597656 0-9.398437zm-52 53.863281c-1.160157 1.597656-1.6875 3.566406-1.480469 5.527344l6.304687 60.382812-55.480468 24.699219c-1.8125.796875-3.265626 2.242188-4.066407 4.054688l-24.679687 55.480468-60.398438-6.3125c-1.960937-.203125-3.925781.328125-5.519531 1.488282l-49.160156 35.632812-49.167969-35.632812c-1.363281-.996094-3.003906-1.53125-4.6875-1.527344-.28125 0-.5625 0-.800781.039062l-60.402344 6.3125-24.679687-55.480468c-.804688-1.8125-2.25-3.261719-4.0625-4.066407l-55.511719-24.6875 6.304687-60.382812c.203125-1.960938-.324218-3.929688-1.480468-5.527344l-35.632813-49.167969 35.632813-49.167968c1.15625-1.597657 1.683593-3.566407 1.480468-5.527344l-6.304687-60.386719 55.480469-24.695313c1.8125-.796874 3.261718-2.242187 4.0625-4.054687l24.679687-55.480469 60.402344 6.3125c1.957031.195313 3.921875-.335937 5.519531-1.488281l49.167969-35.632813 49.167969 35.632813c1.59375 1.15625 3.558593 1.683594 5.519531 1.488281l60.398437-6.3125 24.679688 55.480469c.804687 1.8125 2.253906 3.257813 4.066406 4.0625l55.480469 24.6875-6.304688 60.386719c-.207031 1.960937.320313 3.929687 1.480469 5.527344l35.628906 49.167968zm0 0" fill="#1E81CE" data-original="#1e81ce"></path><path d="m341.425781 157.308594c-3.125-3.125-8.1875-3.125-11.3125 0l-130.101562 130.101562-39.625-39.550781c-3.121094-3.113281-8.175781-3.113281-11.296875 0l-22.679688 22.542969c-1.503906 1.5-2.351562 3.539062-2.351562 5.664062s.847656 4.164063 2.351562 5.664063l67.921875 67.921875c3.121094 3.121094 8.1875 3.121094 11.3125 0l158.398438-158.402344c3.121093-3.121094 3.121093-8.1875 0-11.3125zm-141.414062 175.382812-56.601563-56.601562 11.3125-11.285156 39.640625 39.558593c3.121094 3.117188 8.179688 3.117188 11.304688 0l130.101562-130.089843 11.328125 11.328124zm0 0" fill="#1E81CE" data-original="#1e81ce"></path></g></g></svg>
                        </h1>
                        <span>
                            <?php echo $teacher_job; ?>
                        </span>
                    </div>
                    <div class="box-socials-teacher">
                        <?php if(!empty($teacher_whatsapp)) { ?> <a href="<?php echo $teacher_whatsapp; ?>" target="_blank" rel="nofollow" ><i class="fab fa-whatsapp" aria-hidden="true"></i></a> <?php } ?> 	
                        <?php if(!empty($teacher_pinterest)) { ?> <a href="<?php echo $teacher_pinterest; ?>" target="_blank" rel="nofollow" ><i class="fab fa-pinterest-p" aria-hidden="true"></i></a> <?php } ?> 
                        <?php if(!empty($teacher_instagram)) { ?> <a href="<?php echo $teacher_instagram; ?>" target="_blank" rel="nofollow" ><i class="fab fa-instagram" aria-hidden="true"></i></a> <?php } ?> 
                        <?php if(!empty($teacher_telegram)) { ?> <a href="<?php echo $teacher_telegram; ?>" target="_blank" rel="nofollow" ><i class="fab fa-telegram" aria-hidden="true"></i></a> <?php } ?> 
                        <?php if(!empty($teacher_linkedin)) { ?> <a href="<?php echo $teacher_linkedin; ?>" target="_blank" rel="nofollow" ><i class="fab fa-linkedin" aria-hidden="true"></i></a> <?php } ?> 
                        <?php if(!empty($teacher_github)) { ?> <a href="<?php echo $teacher_github; ?>" target="_blank" rel="nofollow" ><i class="fab fa-github" aria-hidden="true"></i></a> <?php } ?> 
                        <?php if(!empty($teacher_youtube)) { ?> <a href="<?php echo $teacher_youtube; ?>" target="_blank" rel="nofollow" ><i class="fab fa-youtube" aria-hidden="true"></i></a> <?php } ?> 
                    </div>
                    <a href="#about-teacher" class="teacher-rezome"><i aria-hidden="true" class="far fa-user"></i> مشاهده رزومه </a>
                </div>
                <div class="column-flex">
                    <?php if(!empty($teacher_count_course)) { ?>
                        <div class="teacher-score col-item-4">
                        <strong><?php echo $teacher_count_course; ?></strong> 
                        <span>تعداد دوره های فعال</span>
                        </div>
                    <?php } ?>
                    <?php if(!empty($teacher_count_student)) { ?>
                        <div class="teacher-score col-item-4">
                        <strong><?php echo $teacher_count_student; ?></strong> 
                        <span>تعداد دانشجوی مدرس</span>
                        </div>
                    <?php } ?>
                    <?php if(!empty($teacher_count_rate)) { ?>
                        <div class="teacher-score col-item-4">
                        <strong><?php echo $teacher_count_rate; ?></strong> 
                        <span>میانگین امتیاز از ۵</span>
                        </div>
                    <?php } ?>
                    <?php if(!empty($teacher_count_duration)) { ?>
                        <div class="teacher-score col-item-4">
                        <strong><?php echo $teacher_count_duration; ?></strong>  
                        <span>مدت زمان آموزش</span>
                        </div>
                    <?php } ?>
                </div>
                <div id="about-teacher">
                    <div class="teachers-title">
                        <svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-dots-circle-horizontal" width="24" height="24" viewBox="0 0 24 24" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none"></path> <circle cx="12" cy="12" r="9"></circle> <line x1="8" y1="12" x2="8" y2="12.01"></line> <line x1="12" y1="12" x2="12" y2="12.01"></line> <line x1="16" y1="12" x2="16" y2="12.01"></line> </svg>
                    </div>
                    <?php the_content(); ?>
                </div>
                </div>
                </div>
            <?php
            endwhile;
        endif; ?>
    </div>
<?php get_footer();