pagination styles

This commit is contained in:
Evan Mullins 2022-11-07 12:42:16 -05:00
parent d9ab04484f
commit 18d94e0df5
2 changed files with 45 additions and 10 deletions

View file

@ -5,7 +5,7 @@
Author: Evan Mullins
Author URI: https://circlecube.com
Template: twentynineteen
Version: 1.10.4
Version: 1.10.5
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wasmo
@ -272,16 +272,51 @@ body.logged-in .menu-item.logged-in {
.the-directory .directory-pagination {
max-width: 100%;
width: 300px;
margin: 1rem auto;
}
.directory-pagination .page-numbers {
.directory-pagination > .page-numbers {
list-style: none;
display: flex;
justify-content: space-between;
justify-content: center;
}
.directory-pagination .page-numbers a {
/* border: 1px solid var(--color-blue); */
.directory-pagination .page-numbers .page-numbers {
background-color: var(--color-blue-2);
color: var(--color-gray0);
display: block;
height: 2rem;
margin: 0 0.5rem;
min-width: 2rem;
padding: 0 0.75rem;
text-align: center;
text-decoration: none;
transition: all .2s ease;
}
.directory-pagination .page-numbers .page-numbers:hover {
background-color: var(--color-blue-3);
}
.directory-pagination .page-numbers .page-numbers.current {
background-color: transparent;
color: var(--color-blue);
}
.directory-pagination .page-numbers .page-numbers.current:hover {
color: var(--color-blue-2);
}
.directory-pagination .page-numbers .page-numbers.prev,
.directory-pagination .page-numbers .page-numbers.next {
background-color: var(--color-gray0);
color: var(--color-blue-2);
}
.directory-pagination .page-numbers .page-numbers.prev:hover,
.directory-pagination .page-numbers .page-numbers.next:hover {
background-color: var(--color-gray1);
color: var(--color-blue-3);
}
.widget-area.sidebar {

View file

@ -199,17 +199,17 @@ if ( false === ( $the_directory = get_transient( $transient_name ) ) ) {
$pl_args = array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '',
'total' => ceil($total_users / $max_profiles),
'current' => max(1, $paged),
'total' => ceil( $total_users / $max_profiles ),
'current' => max( 1, $paged ),
'show_all' => true,
'type' => 'list',
);
$the_directory .= '<div class="directory-pagination">' . paginate_links($pl_args) . '</div>';
$the_directory .= '<div class="directory-pagination">' . paginate_links( $pl_args ) . '</div>';
}
$the_directory .= '</section>';
if ( !current_user_can('administrator') ) { // only save transient if non admin user
if ( !current_user_can( 'administrator' ) ) { // only save transient if non admin user
set_transient( $transient_name, $the_directory, $transient_exp );
}
}