Pagination

ul.uk-pagination.uk-flex-center(uk-margin="")
  li
    a(href="#")
      span(uk-pagination-previous="")
  li
    a(href="#") 1
  li
    a(href="#") 2
  li
    a(href="#") 3
  li.uk-disabled
    span ...
  li
    a(href="#") 5
  li
    a(href="#") 6
  li.uk-active
    span 7
  li
    a(href="#") 8
  li
    a(href="#")
      span(uk-pagination-next="")
.uk-pagination {
  margin-top: rem(62px);
}
.uk-pagination>* {
  width: rem(40px);
  height: rem(40px);
  text-align: center;
  color: #222;
  margin-left: 10px;
  padding-left: 0;
  @include mq(640px){
    margin-left: 0;
  }
  a {
    padding: .5rem;
    color: #4D4D4D;
    &:hover {
      color: $global-secondary-background;
    }
  }
}

.uk-pagination>.uk-disabled>* {
  color: #4D4D4D;
  line-height: 30px;
}

.uk-pagination>.uk-active>* {
  width: 40px;
  background-color: rgba(225, 49, 51,.8);
  padding: 12px 0;
  margin-top: -3px;
  color: #fff;
}

.uk-pagination-previous,
.uk-pagination-next {
  color: #ccc;
  transform: scale(1.8);
  &:hover,
  &:focus {
    color: $global-secondary-background;
  }
}
<?php 

global $wp_query;
  $cats = $wp_query->get_queried_object();
  if ( $wp_query->max_num_pages <= 1 ) return; 
  $big = 999999999; // need an unlikely integer
  $pages = paginate_links( array(
    'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
    'format' => '?paged=%#%',
    'current' => max( 1, get_query_var('paged') ),
    'total' => $wp_query->max_num_pages,
    // 'total' => ceil(wp_count_posts('post')->publish / get_option('posts_per_page')), // for static page
    'type'  => 'array',
    'prev_text' =>'<span uk-pagination-previous></span>',
    'next_text' =>'<span uk-pagination-next></span>',
  ));
  if( is_array( $pages ) ) {
    echo '<ul class="uk-pagination uk-flex-center">';
    foreach ( $pages as $page ) {
        echo "<li>$page</li>";
    }
    echo '</ul>';
    echo '<script>jQuery(".page-numbers.current").wrap("<a href></a>");jQuery(".page-numbers.current").parent().parent().addClass("uk-active")</script>';
  }