✨feature: Post cards built
This commit is contained in:
@@ -23,13 +23,13 @@ get_header();
|
||||
<?php if ( have_posts() ) : ?>
|
||||
<div class="blog-posts <?php echo esc_attr( $clsEntry ); ?>">
|
||||
<div class="post-list">
|
||||
<div class="post-list__posts grid grid-cols-[repeat(auto-fit,minmax(20rem,1fr))] gap-6">
|
||||
<div class="post-list__posts grid grid-cols-[repeat(auto-fit,minmax(26rem,1fr))] gap-12">
|
||||
<?php
|
||||
while ( have_posts() ) :
|
||||
the_post();
|
||||
?>
|
||||
<div class="post-list__post flex flex-col border border-secondary rounded-md shadow-lg hover:prose-img:scale-110 hover:prose-img:origin-center hover:prose-img:duration-500">
|
||||
<figure class="post-list__img aspect-video border-b border-secondary rounded-t-md block h-auto w-full overflow-hidden m-0 p-0">
|
||||
<div class="post-list__post flex flex-col rounded-md shadow-lg hover:prose-img:scale-110 hover:prose-img:origin-center hover:prose-img:duration-500">
|
||||
<figure class="post-list__img aspect-video rounded-t-md block h-auto w-full overflow-hidden m-0! p-0!">
|
||||
<?php if ( has_post_thumbnail() ) : ?>
|
||||
<?php
|
||||
$featImg = get_the_post_thumbnail_url();
|
||||
@@ -41,17 +41,19 @@ get_header();
|
||||
<?php endif; ?>
|
||||
</figure>
|
||||
|
||||
<div class="post-list__details px-4 py-6 flex flex-col grow">
|
||||
<a href="<?php the_permalink(); ?>" class="">
|
||||
<h2 class="post-list__title font-normal text-25px text-balance line-clamp-4 truncate mt-0 mb-5 mx-0"><?php the_title(); ?></h2>
|
||||
</a>
|
||||
<div class="post-list__details p-8 pb-10 flex flex-col justify-between grow">
|
||||
<h2 class="post-list__title font-normal text-32px mt-0 mx-0">
|
||||
<a href="<?php the_permalink(); ?>" class=""><?php the_title(); ?></a>
|
||||
</h2>
|
||||
|
||||
<div class="post-list__byline mt-auto">
|
||||
<span class="post-list__author"><?php echo esc_html( ucfirst( get_the_author() ) ); ?> —</span>
|
||||
<span class="post-list__date"><?php echo get_the_date(); ?></span>
|
||||
</div>
|
||||
<div class="post-list__excerpt line-clamp-5 mb-4">
|
||||
<?php the_excerpt(); ?>
|
||||
</div>
|
||||
|
||||
<a class="post-list__read-more" href="<?php the_permalink(); ?>">Read more →</a>
|
||||
<?php /* translators: %s: Post title. */ ?>
|
||||
<a class="post-list__read-more border-b-2 border-b-secondary w-fit" href="<?php echo esc_url( $post_permalink ); ?>" aria-label="<?php echo esc_attr( sprintf( __( 'Continue reading %s', 'cwc' ), $post_title ) ); ?>">
|
||||
<?php echo esc_html__( 'Read More', 'cwc' ); ?>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<?php endwhile; ?>
|
||||
|
||||
Reference in New Issue
Block a user