<?php
/**
 * Template part for displaying page content in page.php
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package blueboxed
 */

?>

<?php $is_front_landing = is_front_page() && ! is_home(); ?>

<article id="post-<?php the_ID(); ?>" <?php post_class( $is_front_landing ? 'blueboxed-frontpage' : '' ); ?>>
	<header class="entry-header">
		<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
	</header><!-- .entry-header -->

	<?php blueboxed_post_thumbnail(); ?>

	<div class="entry-content">
		<?php if ( $is_front_landing ) : ?>
			<div class="blueboxed-frontpage-actions" aria-label="<?php echo esc_attr__( 'Quick actions', 'blueboxed' ); ?>">
				<a class="blueboxed-frontpage-pill" href="<?php echo esc_url( home_url( '/shop' ) ); ?>"><?php esc_html_e( 'Explore Shop', 'blueboxed' ); ?></a>
				<a class="blueboxed-frontpage-pill" href="<?php echo esc_url( home_url( '/blog' ) ); ?>"><?php esc_html_e( 'Read Blog', 'blueboxed' ); ?></a>
				<a class="blueboxed-frontpage-pill" href="<?php echo esc_url( home_url( '/contact' ) ); ?>"><?php esc_html_e( 'Contact Team', 'blueboxed' ); ?></a>
			</div>
			<div class="blueboxed-frontpage-content">
		<?php endif; ?>

		<?php
		the_content();

		wp_link_pages(
			array(
				'before'   => '<nav class="page-links" aria-label="' . esc_attr__( 'Page', 'blueboxed' ) . '">',
				'after'    => '</nav>',
				/* translators: %: Page number. */
				'pagelink' => esc_html__( 'Page %', 'blueboxed' ),
			)
		);
		?>

		<?php if ( $is_front_landing ) : ?>
			</div>
		<?php endif; ?>
	</div><!-- .entry-content -->
</article><!-- #post-<?php the_ID(); ?> -->
