106 lines
4.2 KiB
PHP
106 lines
4.2 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 text-white d-flex align-items-center position-relative"
|
|
style="background-image: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.6)), url('<?php echo esc_url($hero_bg); ?>'); background-size: cover; background-position: center; min-height: 80vh;">
|
|
<div class="container text-center py-5">
|
|
<h1 class="display-3 fw-bold mb-4 font-serif">
|
|
<?php echo get_theme_mod('hero_headline', 'Ancient Wisdom for a Modern World.'); ?></h1>
|
|
<p class="lead fw-normal mb-5 w-75 mx-auto font-sans">
|
|
<?php echo get_theme_mod('hero_subheadline', 'A collection of biblical insights curated for the thoughtful leader.'); ?>
|
|
</p>
|
|
<a href="#primary"
|
|
class="btn btn-primary btn-lg px-5 py-3 rounded-pill text-uppercase fw-bold shadow-sm"><?php echo get_theme_mod('hero_cta_text', 'Start Reading'); ?></a>
|
|
</div>
|
|
</section>
|
|
|
|
<div class="container my-5 py-4">
|
|
<main id="primary" class="site-main">
|
|
<header class="text-center mb-5">
|
|
<h2 class="display-5 fw-bold font-serif mb-3">Seek Truth. Lead with Grace.</h2>
|
|
<p class="lead text-muted font-sans font-italic">Explorations into the heart of the Kingdom.</p>
|
|
</header>
|
|
|
|
<div class="row g-4 mb-5">
|
|
<?php
|
|
if (have_posts()):
|
|
while (have_posts()):
|
|
the_post();
|
|
?>
|
|
<div class="col-md-6 col-lg-4 d-flex align-items-stretch">
|
|
<article id="post-<?php the_ID(); ?>" <?php post_class('card w-100 border-0 shadow-sm overflow-hidden h-100'); ?>>
|
|
<?php if (has_post_thumbnail()): ?>
|
|
<a href="<?php the_permalink(); ?>">
|
|
<?php the_post_thumbnail('large', array('class' => 'card-img-top img-fluid w-100', 'style' => 'height: 200px; object-fit: cover;')); ?>
|
|
</a>
|
|
<?php endif; ?>
|
|
|
|
<div class="card-body d-flex flex-column p-4">
|
|
<header class="entry-header mb-3">
|
|
<div class="mb-2 text-uppercase small fw-bold text-muted tracking-wider">
|
|
<?php echo get_the_category_list(', '); ?>
|
|
</div>
|
|
|
|
<?php the_title('<h3 class="card-title h5 fw-bold lh-base"><a href="' . esc_url(get_permalink()) . '" class="text-dark text-decoration-none stretched-link">', '</a></h3>'); ?>
|
|
|
|
<div class="text-muted small mt-2 d-flex align-items-center flex-wrap gap-2">
|
|
<span><?php echo get_the_date(); ?></span>
|
|
<span>•</span>
|
|
<span><?php echo wisdom1_reading_time(); ?></span>
|
|
<span>•</span>
|
|
<span><?php comments_number('0 comments', '1 comment', '% comments'); ?></span>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="card-text text-muted flex-grow-1">
|
|
<?php the_excerpt(); ?>
|
|
</div>
|
|
</div>
|
|
</article>
|
|
</div>
|
|
<?php
|
|
endwhile;
|
|
|
|
echo '</div>'; // close row
|
|
|
|
the_posts_navigation(array(
|
|
'screen_reader_text' => 'Posts navigation',
|
|
'prev_text' => '<span class="btn btn-outline-primary">← Older Posts</span>',
|
|
'next_text' => '<span class="btn btn-outline-primary">Newer Posts →</span>',
|
|
'class' => 'd-flex justify-content-between my-5'
|
|
));
|
|
else:
|
|
echo '<div class="col-12"><div class="alert alert-info text-center">' . esc_html__('No posts found.', 'wisdom1') . '</div></div></div>';
|
|
endif;
|
|
?>
|
|
</main><!-- #main -->
|
|
</div><!-- .container -->
|
|
|
|
<section class="bg-primary text-white py-5">
|
|
<div class="container text-center py-3">
|
|
<h3 class="h4 mb-4 font-serif">Receive weekly insights directly in your inbox.</h3>
|
|
<form class="d-flex justify-content-center mx-auto" style="max-width: 500px;">
|
|
<div class="input-group input-group-lg shadow-sm">
|
|
<input type="email" placeholder="Email address" class="form-control border-0 px-4" required>
|
|
<button type="submit" class="btn btn-dark px-4 border-0">
|
|
<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>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</section>
|
|
|
|
<?php
|
|
get_footer();
|