Browse Source

Archives: title above the card + clean pagination markup

- category.php/tag.php now mirror page-archive.php: white heading above the
  #dadada card (was buried inside via header.page-header), like the other pages
- category page shows the excerpt + date to match tag
- dw_paging_nav: drop the Bootstrap <ul>/justify-content-center wrapper and the
  &nbsp; padding around the arrows; emit a plain <nav class=pagination>
windhamdavid 5 days ago
parent
commit
1c1355bb93
3 changed files with 33 additions and 32 deletions
  1. 18 15
      category.php
  2. 4 6
      inc/template.php
  3. 11 11
      tag.php

+ 18 - 15
category.php

@@ -1,23 +1,26 @@
 <?php get_header(); ?>
-	<div class="container">
+
+	<div class="container leader">
+		<div class="row">
+			<div class="col-md-12">
+				<h1 class="cm-sans fs-2 archive-heading animate__animated animate__fadeInLeft">Topic: <?php single_cat_title(); ?></h1>
+			</div>
+		</div>
 		<article id="content" class="single" role="main">
-			<div class="entry-content archive wow fadeIn">
+			<div class="entry-content archive">
 				<?php if ( have_posts() ) : ?>
-				<header class="page-header">
-					<h1 class="super cm-sans">Topic: <?php single_cat_title(); ?></h1>
-				</header>
-				<?php while ( have_posts() ) : the_post();?>
-          <div class="col-sm-6 offset-lg-1">
-            <div class="entry-meta">
-              <div class="date">
-                <?php the_date(); ?>
-              </div>
-            </div>
-            <h4><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'dw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h4>
-          </div>
+				<?php while ( have_posts() ) : the_post(); ?>
+				<div class="col-sm-6">
+					<div class="entry-meta">
+						<div class="date">
+							<?php the_date(); ?>
+						</div>
+					</div>
+					<h4><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'dw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h4>
+					<?php the_excerpt(); ?>
+				</div>
 				<?php endwhile; ?>
 				<div class="clear">&nbsp;</div>
-				<hr>
 				<?php dw_paging_nav();
 				else :
 					printf( __( 'Nothing Found', 'dw' ));

+ 4 - 6
inc/template.php

@@ -141,18 +141,16 @@ function dw_paging_nav() {
 		'current'  => $paged,
 		'mid_size' => 1,
 		'add_args' => array_map( 'urlencode', $query_args ),
-		'prev_text' => __( '&larr; &nbsp;', 'dw' ),
-		'next_text' => __( '&nbsp; &rarr;', 'dw' ),
+		'prev_text' => __( '&larr;', 'dw' ),
+		'next_text' => __( '&rarr;', 'dw' ),
 	) );
 
 	if ( $links ) :
 
 	?>
-	<nav class="navigation pagination paging-navigation" role="navigation">
-		<ul class="pagination loop-pagination justify-content-center">
+	<nav class="pagination" role="navigation" aria-label="Posts">
 			<?php echo $links; ?>
-  </ul>
-	</nav>
+		</nav>
 	<?php
 	endif;
 }

+ 11 - 11
tag.php

@@ -1,12 +1,15 @@
 <?php get_header(); ?>
-	<div class="container">
+
+	<div class="container leader">
+		<div class="row">
+			<div class="col-md-12">
+				<h1 class="cm-sans fs-2 archive-heading animate__animated animate__fadeInLeft">Tag: <?php single_cat_title(); ?></h1>
+			</div>
+		</div>
 		<article id="content" class="single" role="main">
-			<div class="entry-content archive wow fadeIn">
+			<div class="entry-content archive">
 				<?php if ( have_posts() ) : ?>
-				<header class="page-header">
-					<h1 class="super cm-sans">Tag: <?php single_cat_title(); ?></h1>
-				</header>
-				<?php while ( have_posts() ) : the_post();?>
+				<?php while ( have_posts() ) : the_post(); ?>
 				<div class="col-sm-6">
 					<div class="entry-meta">
 						<div class="date">
@@ -15,19 +18,16 @@
 					</div>
 					<h4><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'dw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h4>
 					<?php the_excerpt(); ?>
-
 				</div>
 				<?php endwhile; ?>
-				
 				<div class="clear">&nbsp;</div>
-				<hr>
 				<?php dw_paging_nav();
 				else :
-					printf( __( 'Nothing Found', 'dw' ));		
+					printf( __( 'Nothing Found', 'dw' ));
 					get_search_form();
 				endif;
 				?>
 			</div>
 		</article>
 	</div>
-<?php get_footer('full'); ?>
+<?php get_footer('full'); ?>