parent
7690aa2bd3
commit
1e27dd42f5
6 changed files with 38 additions and 3 deletions
|
@ -4,7 +4,7 @@
|
|||
$category = get_category( get_query_var( 'cat' ) );
|
||||
$cat_id = $category->cat_ID; ?>
|
||||
|
||||
<?php include(TEMPLATEPATH . '/components/posts-list.php'); ?>
|
||||
<?php include(TEMPLATEPATH . '/components/preview-list.php'); ?>
|
||||
|
||||
</main>
|
||||
|
||||
|
|
27
components/preview-list.php
Normal file
27
components/preview-list.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php if(have_posts()) : ?>
|
||||
<div class="previews-section">
|
||||
<?php while(have_posts()) : the_post(); ?>
|
||||
<article class="card card-preview card-primary">
|
||||
<a href="<?php the_permalink(); ?>" class="preview-link">
|
||||
<div class="preview-item">
|
||||
<div class="preview-content"><?php the_excerpt(); ?></div>
|
||||
<div class="preview-overlay">
|
||||
<h1 class="card-header"><?php the_title(); ?></h1>
|
||||
<div class="preview-metadata">
|
||||
<div class="metadata-pills">
|
||||
<div><?php $category = get_the_category();
|
||||
echo"<span class='btn-small btn-info small-text'>" . $category[0]->cat_name . "</span>"; ?></div>
|
||||
<div><time><span class="btn-small btn-info small-text"><?php the_time('d/m/Y') ?></span></time></div>
|
||||
</div>
|
||||
<div class="comment-text"><?php comments_number('Pas de commentaire', 'Un commentaire', '% commentaires' );?></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</article>
|
||||
<?php endwhile; ?>
|
||||
</div>
|
||||
<div class="navigation">
|
||||
<?php the_posts_pagination(); ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
|
@ -244,6 +244,9 @@ code {
|
|||
margin-bottom: 3rem;
|
||||
}
|
||||
|
||||
.small-text {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
|
||||
/* 2.6 - Special styling */
|
||||
|
|
|
@ -156,6 +156,7 @@ $preview-height: 8*$lineheight;
|
|||
justify-content:space-between;
|
||||
padding-left: $lineheight/2;
|
||||
padding-right: $lineheight/2;
|
||||
font-size:0.9em;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -497,6 +497,9 @@ code {
|
|||
margin: auto;
|
||||
margin-bottom: 3rem; }
|
||||
|
||||
.small-text {
|
||||
font-size: 0.9em; }
|
||||
|
||||
/* 2.6 - Special styling */
|
||||
mark {
|
||||
border-radius: 0.2em;
|
||||
|
@ -1841,7 +1844,8 @@ ul.breadcrumb, ol.breadcrumb, .breadcrumb {
|
|||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-left: 0.75rem;
|
||||
padding-right: 0.75rem; }
|
||||
padding-right: 0.75rem;
|
||||
font-size: 0.9em; }
|
||||
|
||||
.card-preview.card-info .comment-text {
|
||||
position: relative;
|
||||
|
|
2
tag.php
2
tag.php
|
@ -3,7 +3,7 @@
|
|||
<?php $tag = get_category( get_query_var( 'tag' ) );
|
||||
$tag_id = $tag->ID;?>
|
||||
|
||||
<?php include(TEMPLATEPATH . '/components/posts-list.php'); ?>
|
||||
<?php include(TEMPLATEPATH . '/components/preview-list.php'); ?>
|
||||
</main>
|
||||
<!-- Sidebar custom pour contenir la description -->
|
||||
<aside class="sidebar">
|
||||
|
|
Reference in a new issue