<?php if (rt_get_option('single_element_authorbox', true)) : ?>
  <?php
  $author_id = get_the_author_meta('ID');
  $author_avatar     = get_avatar($author_id, 70, '', '', ['class' => 'rounded-full']);
  $author_avatar_url = get_user_meta($author_id, 'avatar', true);;
  $first_name        = get_the_author_meta('first_name');
  $last_name         = get_the_author_meta('last_name');
  $author_desc       = get_the_author_meta('description');
  $author_blog       = get_the_author_meta('blog_title');
  $author_url        = get_the_author_meta('url');
  $author_posts      = get_author_posts_url($author_id);
  $author_website    = get_the_author_meta('url');
  ?>


  <div class="wp-block-post-author border rounded-md px-40 py-40 mt-60">

    <div class="wp-block-columns is-layout-flex">
      <div class="wp-block-column" style="flex-basis:70px">
        <div class="wp-block-post-author__avatar mr-0">
          <?php
          if ($author_avatar_url) {
            echo wp_get_attachment_image($author_avatar_url, 'thumbnail', "", ['class' => 'rounded-full']);
          } else {
            echo $author_avatar;
          }
          ?>
        </div>
      </div>
      <div class="wp-block-column">
        <div class="wp-block-post-author__content">

          <h4 class="wp-block-post-author__name has-link-heading-color">
            <a href="<?php echo get_author_posts_url(get_the_author_meta('ID')) ?>">
              <?php echo "{$first_name} {$last_name}" ?>
            </a>
          </h4>

          <div class="wp-block-post-author__bio has-small-font-size mt-20 mb-0">
            <?php echo $author_desc ?>
          </div>

        </div>
      </div>
    </div>

  </div>

<?php endif ?>