Fix single article column structure to center wider images
This commit is contained in:
21
single.php
21
single.php
@@ -11,9 +11,7 @@ get_header(); ?>
|
||||
the_post();
|
||||
?>
|
||||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-8 col-xl-7">
|
||||
<header class="entry-header mb-4">
|
||||
<header class="entry-header mb-4 mx-auto px-3" style="max-width: 680px;">
|
||||
<?php the_title('<h1 class="entry-title display-4 fw-bold font-serif lh-sm mb-4">', '</h1>'); ?>
|
||||
|
||||
<div class="d-flex align-items-center mb-4 pb-4 border-bottom">
|
||||
@@ -22,8 +20,7 @@ get_header(); ?>
|
||||
</div>
|
||||
<div>
|
||||
<div class="fw-bold font-sans text-dark"><?php the_author(); ?></div>
|
||||
<div
|
||||
class="entry-meta text-muted small font-sans d-flex align-items-center flex-wrap gap-2">
|
||||
<div class="entry-meta text-muted small font-sans d-flex align-items-center flex-wrap gap-2">
|
||||
<span><?php echo wisdom1_reading_time(); ?></span>
|
||||
<span>•</span>
|
||||
<span class="entry-date"><?php echo get_the_date('M j, Y'); ?></span>
|
||||
@@ -37,15 +34,15 @@ get_header(); ?>
|
||||
</header>
|
||||
|
||||
<?php if (has_post_thumbnail()): ?>
|
||||
<div class="post-thumbnail-full mb-5">
|
||||
<div class="post-thumbnail-full mb-5 mx-auto" style="max-width: 1000px;">
|
||||
<?php the_post_thumbnail('full', array(
|
||||
'class' => 'img-fluid article-hero-image rounded',
|
||||
'class' => 'img-fluid w-100 rounded',
|
||||
'style' => 'aspect-ratio: 16/9; object-fit: cover;'
|
||||
)); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="entry-content fs-5 lh-lg font-sans text-dark" style="max-width: 680px; margin: 0 auto;">
|
||||
<div class="entry-content fs-5 lh-lg font-sans text-dark mx-auto px-3" style="max-width: 680px;">
|
||||
<?php
|
||||
the_content();
|
||||
|
||||
@@ -58,17 +55,14 @@ get_header(); ?>
|
||||
?>
|
||||
</div><!-- .entry-content -->
|
||||
|
||||
<footer class="entry-footer mt-5 pt-4 border-top">
|
||||
<footer class="entry-footer mt-5 pt-4 border-top mx-auto px-3" style="max-width: 680px;">
|
||||
<div class="entry-tags d-flex flex-wrap gap-2">
|
||||
<?php the_tags('<span class="badge bg-light text-dark text-decoration-none fw-normal p-2">', '</span><span class="badge bg-light text-dark text-decoration-none fw-normal p-2">', '</span>'); ?>
|
||||
</div>
|
||||
</footer><!-- .entry-footer -->
|
||||
</div><!-- .col-lg-7 -->
|
||||
</div><!-- .row -->
|
||||
</article><!-- #post-<?php the_ID(); ?> -->
|
||||
|
||||
<div class="row justify-content-center">
|
||||
<div class="col-lg-8 col-xl-7">
|
||||
<div class="mx-auto px-3" style="max-width: 680px;">
|
||||
<nav class="navigation post-navigation mt-5 border-top border-bottom py-4" aria-label="Posts">
|
||||
<div class="row justify-content-between g-4">
|
||||
<div class="col-md-6 text-start">
|
||||
@@ -117,7 +111,6 @@ get_header(); ?>
|
||||
endif;
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php endwhile; // End of the loop. ?>
|
||||
</main><!-- #main -->
|
||||
|
||||
Reference in New Issue
Block a user