Friday, 27 September 2019

will_paginate-bootstrap

will_paginate-bootstrap 

1. For projects using Bundler, add gem 'will_paginate-bootstrap' to your Gemfile (and  
    then run bundle install).

2. Load the Bootstrap CSS in your template.
3. n your view, use the renderer: BootstrapPagination::Rails option with the 
   will_paginate helper, for example:
     
   <%= will_paginate @collection, renderer: BootstrapPagination::Rails %>
 
   <center class="digg_pagination">
     <%= will_paginate @orders, :renderer=> BootstrapPagination::Rails, previous_label: "Older", next_label: "Newer", inner_window: 1, outer_window: 0 %>
   </center> 
 
Links:- https://github.com/bootstrap-ruby/will_paginate-bootstrap 

Pagination Style

/********* Pagination Style ************/

.digg_pagination {
  margin-left: 45%;
  background: #FFFFFF;
  font-size: 1.2em;
  cursor: default;
  /* self-clearing method: */ }
  .digg_pagination a, .digg_pagination span, .digg_pagination em {
    padding: 0.2em 0.5em;
    display: block;
    float: left;
    margin-right: 1px; }
  .digg_pagination .disabled {
    color: #999999;
    border: 1px solid #dddddd; }
  .digg_pagination .current {
    font-style: normal;
    font-weight: bold;
    background: #2e6ab1;
    color: white;
    border: 1px solid #2e6ab1; }
  .digg_pagination a {
    text-decoration: none;
    color: #105cb6;
    border: 1px solid #9aafe5; }
    .digg_pagination a:hover, .digg_pagination a:focus {
     
      }
  .digg_pagination .page_info {
    background: #2e6ab1;
    color: white;
    padding: 0.4em 0.6em;
    width: 22em;
    margin-bottom: 0.3em;
    text-align: center; }
    .digg_pagination .page_info b {
      color: #000033;
      background: #6aa6ed;
      padding: 0.1em 0.25em; }
  .digg_pagination:after {
    content: ".";
    display: block;
    height: 0;
    clear: both;
    visibility: hidden; }
  * html .digg_pagination {
    height: 1%; }
  *:first-child + html .digg_pagination {
    overflow: hidden;
}

No comments:

Post a Comment

  Common Git Commands   Take clone of a repository git clone <remote-repository-url> ex: git clone  https://github.com/agricor/RegTech...