<div class="st-author-profile">
	<?php if ( get_option( 'st_author_profile_header' ) ): ?>
		<div class="st-author-profile-header-card"><img src="<?php echo esc_url( get_option( 'st_author_profile_header' ) ); ?>"></div>
	<?php endif; ?>
	<div class="st-author-profile-avatar">
		<?php if ( get_option( 'st_author_profile_avatar' ) ): ?>
			<img src="<?php echo esc_url( get_option( 'st_author_profile_avatar' ) ); ?>">
		<?php else: ?>
			<?php echo get_avatar( 1, 100 ); ?>
		<?php endif; ?>
	</div>

	<div class="post st-author-profile-content">
		<p class="st-author-nickname"><?php the_author_meta( 'nickname',1 ); ?></p>
		<p class="st-author-description"><?php the_author_meta( 'description',1 ); ?></p>
		<div class="sns">
			<ul class="profile-sns clearfix">

				<?php if(get_the_author_meta('twitter',1)): // Twitter ?>
					<li class="twitter"><a rel="nofollow" href="<?php esc_url( the_author_meta('twitter',1) ); ?>" target="_blank"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>
				<?php endif; ?>

				<?php if(get_the_author_meta('facebook',1)): // Facebook ?>
					<li class="facebook"><a rel="nofollow" href="<?php esc_url( the_author_meta('facebook',1) ); ?>" target="_blank"><i class="fa fa-facebook" aria-hidden="true"></i></a></li>
				<?php endif; ?>

				<?php if(get_the_author_meta('instagram',1)): // instagram ?>
					<li class="instagram"><a rel="nofollow" href="<?php esc_url( the_author_meta('instagram',1) ); ?>" target="_blank"><i class="fa fa-instagram" aria-hidden="true"></i></a></li>
				<?php endif; ?>

				<?php if(get_the_author_meta('youtube',1)): // YouTube ?>
					<li class="author-youtube"><a rel="nofollow" href="<?php esc_url( the_author_meta('youtube',1) ); ?>" target="_blank"><i class="fa fa-youtube" aria-hidden="true"></i></a></li>
				<?php endif; ?>

				<?php if(get_the_author_meta('amazon',1)): // amazon ?>
					<li class="author-amazon"><a rel="nofollow" href="<?php the_author_meta('amazon',1); ?>" target="_blank"><i class="fa fa-amazon" aria-hidden="true"></i></a></li>
				<?php endif; ?>

				<?php if(get_the_author_meta('feed_url',1)): // RSS ?>
					<li class="author-feed"><a rel="nofollow" href="<?php the_author_meta('feed_url',1); ?>" target="_blank"><i class="fa fa-rss" aria-hidden="true"></i></a></li>
				<?php endif; ?>

				<?php if(get_the_author_meta('form_url',1)): // フォーム ?>
					<li class="author-form"><a rel="nofollow" href="<?php the_author_meta('form_url',1); ?>" target="_blank"><i class="fa fa-envelope" aria-hidden="true"></i></a></li>
				<?php endif; ?>

				<?php if(get_the_author_meta('user_url',1)): // HOME ?>
					<li class="author-homepage"><a rel="nofollow" href="<?php the_author_meta('user_url',1); ?>" target="_blank"><i class="fa fa-home" aria-hidden="true"></i></a></li>
				<?php endif; ?>

			</ul>
		</div>
		<?php 
		if ( get_theme_mod( 'st_author_profile_btn_url' ) ): // 「プロフィールカード」のURL入力の有無
			if ( get_theme_mod( 'st_author_profile_btn_text' ) ): // 「プロフィールカード」のテキスト入力の有無
				$btn_text = get_theme_mod( 'st_author_profile_btn_text' );
			else:
				$btn_text = '詳しくはコチラ';
			endif;
		?>
			<div class="rankstlink-r2">
				<p class="no-reflection"><a href="<?php echo esc_url( get_theme_mod( 'st_author_profile_btn_url' ) ); ?>"><?php echo esc_html( $btn_text ); ?></a></p>	
			</div>
		<?php endif; ?>
	</div>
</div>