<?php
/**
 * Generic page template.
 *
 * @package HaPantheon
 */

get_header();
while ( have_posts() ) :
	the_post();
	?>
	<article id="post-<?php the_ID(); ?>" <?php post_class( 'generic-page' ); ?>>
		<header class="page-hero">
			<div class="wrap">
				<span class="eyebrow"><?php echo esc_html( strtoupper( sanitize_title( get_the_title() ) ) ); ?></span>
				<h1><?php the_title(); ?></h1>
				<?php if ( has_excerpt() ) : ?>
					<p><?php echo esc_html( get_the_excerpt() ); ?></p>
				<?php endif; ?>
				<div class="meander" aria-hidden="true"></div>
			</div>
		</header>
		<div class="wrap page-content art-body">
			<?php the_content(); ?>
			<?php
			wp_link_pages(
				array(
					'before' => '<nav class="page-links">' . esc_html__( 'עמודים:', 'hapantheon' ),
					'after'  => '</nav>',
				)
			);
			?>
		</div>
	</article>
	<?php
	if ( comments_open() || get_comments_number() ) {
		comments_template();
	}
endwhile;
get_footer();
