<!--FansPaysite/template-parts/content-post.php-->
<article id="post-<?php the_ID(); ?>" <?php post_class( 'fps-post-card' ); ?>>
	<div class="fps-post-thumbnail">
		<?php
		if ( has_post_thumbnail() ) {
			the_post_thumbnail( 'medium', array( 'class' => 'ui image rounded', 'loading' => 'lazy' ) );
		} else {
			$default_thumbnail = get_theme_mod( 'default_post_thumbnail', get_template_directory_uri() . '/default.png' );
			echo '<img src="' . esc_url( $default_thumbnail ) . '" class="ui image rounded" alt="' . esc_attr( get_the_title() ) . '" loading="lazy">';
		}
		?>
	</div>
	<div class="fps-post-body">
		<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
		<div class="post-excerpt">
			<?php the_excerpt(); ?>
		</div>
		<footer class="post-footer">
			<a href="<?php the_permalink(); ?>" class="ui button secondary"><?php esc_html_e( 'Read More', 'fanspaysite' ); ?></a>
			<?php if ( get_theme_mod( 'show_post_tags', true ) ) : ?>
				<?php the_tags( '<div class="post-tags"><span class="ui label">', '</span> <span class="ui label">', '</span></div>' ); ?>
			<?php endif; ?>
		</footer>
	</div>
</article>
