Files
WFK_theme/front-page.php

87 lines
3.1 KiB
PHP

<?php
/**
* The front page template file.
*/
get_header();
$hero_bg = get_theme_mod( 'hero_background_image', get_template_directory_uri() . '/assets/images/hero-default.png' );
?>
<section class="hero-section" style="background-image: url('<?php echo esc_url( $hero_bg ); ?>'); background-size: cover; background-position: center;">
<div class="hero-content">
<h1 class="hero-headline"><?php echo get_theme_mod( 'hero_headline', 'Ancient Wisdom for a Modern World.' ); ?></h1>
<p class="hero-subheadline"><?php echo get_theme_mod( 'hero_subheadline', 'A collection of biblical insights curated for the thoughtful leader.' ); ?></p>
<a href="#primary" class="cta-button"><?php echo get_theme_mod( 'hero_cta_text', 'Start Reading' ); ?></a>
</div>
</section>
<div class="site-container">
<main id="primary" class="site-main">
<header class="section-header">
<h2 class="section-title">Seek Truth. Lead with Grace.</h2>
<p class="section-subtitle">Explorations into the heart of the Kingdom.</p>
</header>
<div class="insights-grid">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class( 'insight-card' ); ?>>
<?php if ( has_post_thumbnail() ) : ?>
<div class="post-thumbnail">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail( 'large' ); ?>
</a>
</div>
<?php endif; ?>
<header class="entry-header">
<div class="entry-meta">
<span class="cat-links"><?php echo get_the_category_list( ', ' ); ?></span>
</div>
<?php the_title( '<h3 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h3>' ); ?>
<div class="post-card-info">
<span class="post-date"><?php echo get_the_date(); ?></span>
<span class="dot-separator">•</span>
<span class="reading-time"><?php echo wisdom1_reading_time(); ?></span>
<span class="dot-separator">•</span>
<span class="comments-count"><?php comments_number( '0 comments', '1 comment', '% comments' ); ?></span>
</div>
</header>
<div class="entry-summary">
<?php the_excerpt(); ?>
</div>
</article>
<?php
endwhile;
the_posts_navigation();
else :
echo '<p>' . esc_html__( 'No posts found.', 'wisdom1' ) . '</p>';
endif;
?>
</div><!-- .insights-grid -->
</main><!-- #main -->
</div><!-- .site-container -->
<section class="newsletter-strip">
<div class="newsletter-content">
<p class="newsletter-text">Receive weekly insights directly in your inbox.</p>
<form class="newsletter-form">
<input type="email" placeholder="Email address" class="newsletter-input">
<button type="submit" class="newsletter-submit">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"></line><polyline points="12 5 19 12 12 19"></polyline></svg>
</button>
</form>
</div>
</section>
<?php
get_footer();