<?php
$curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author));
$twitter = get_the_author_meta('twitter', $post->post_author);
$facebook = get_the_author_meta('facebook', $post->post_author);
$instagram = get_the_author_meta('instagram', $post->post_author);
$linkedin = get_the_author_meta('linkedin', $post->post_author);
$pinterest = get_the_author_meta('pinterest', $post->post_author);
$dribbble = get_the_author_meta('dribbble', $post->post_author);
$googleplus = get_the_author_meta('googleplus', $post->post_author);
?>
<div class="container p-0">
    <div class="col-12 p-0">
        <div class="single-author-box-container mt-3">
            <div class="single-author-box">
                <div class="single-author-box-avatar">
                    <?php echo get_avatar(get_the_author_meta('ID'), 150); ?>
                </div>
                <div class="single-author-box-desc">
                    <a href="<?php echo the_author_meta('user_url'); ?>" class="more-articles" target="_blank">دنبال کنید</a>
                    <span class="written-by">نوشته شده توسط:</span>
                    <h4><?php echo get_the_author_meta('display_name'); ?></h4>
                    <p class="author-bio mb-3"><?php echo the_author_meta('description'); ?></p>
                    <div class="author-social-links">
                        <ul>
                            <li>
                                <?php echo '<a href="' . $facebook . '" rel="nofollow" target="_blank"><i class="fa fa-facebook" aria-hidden="true"></i></a>'; ?>
                            </li>
                            <li>
                                <?php echo '<a href="https://twitter.com/' . $twitter . '" rel="nofollow" target="_blank"><i class="fa-brands fa-x-twitter" aria-hidden="true"></i></a>'; ?>
                            </li>
                            <li>
                                <?php echo '<a href="https://instagram.com/' . $instagram . '" rel="nofollow" target="_blank"><i class="fa fa-instagram" aria-hidden="true"></i></a>'; ?>
                            </li>
                            <li>
                                <?php echo '<a href="https://linkedin.com/' . $linkedin . '" rel="nofollow" target="_blank"><i class="fa fa-linkedin" aria-hidden="true"></i></a>'; ?>
                            </li>
                            <li>
                                <?php echo '<a href="https://pinterest.com/' . $pinterest . '" rel="nofollow" target="_blank"><i class="fa fa-pinterest-p" aria-hidden="true"></i></a>'; ?>
                            </li>
                            <li>
                                <?php echo '<a href="https://dribbble.com/' . $dribbble . '" rel="nofollow" target="_blank"><i class="fa fa-dribbble" aria-hidden="true"></i></a>'; ?>
                            </li>
                            <li>
                                <?php echo '<a href="https://plus.google.com/' . $googleplus . '" rel="nofollow" target="_blank"><i class="fa fa-google" aria-hidden="true"></i></a>'; ?>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
