Skip to content

Commit

Permalink
Rename foundation => foundation5 & foundation6 => foundation
Browse files Browse the repository at this point in the history
  • Loading branch information
niels committed Mar 3, 2016
1 parent 24435dc commit 39b1df4
Show file tree
Hide file tree
Showing 50 changed files with 148 additions and 148 deletions.
19 changes: 15 additions & 4 deletions foundation/README.md
@@ -1,6 +1,17 @@
# Pagination theme for [Zurb Foundation](http://foundation.zurb.com)
# Pagination theme for [Zurb Foundation 6.2.0](http://foundation.zurb.com)

With support for:
This theme follows [the documented mark-up](http://foundation.zurb.com/sites/docs/pagination.html)
for version 6.2.0.

- erb
- haml
## Supported template engines:

- erb (untested)
- [haml](http://haml.info)
- [hamlit](https://github.com/k0kubun/hamlit)
- [slim](http://slim-lang.com/) (untested)

## Tips

- The pagination is not centered by default. To render the pagination centered,
simply add the `text-centered` class to the `ul` or a wrapping container, or
apply a `text-align: center` style as per [the documentation](http://foundation.zurb.com/sites/docs/pagination.html#centered).
3 changes: 1 addition & 2 deletions foundation/app/views/kaminari/_first_page.html.slim
@@ -1,3 +1,2 @@
li
= link_to_unless(current_page.first?,
raw(t 'views.pagination.first'), url, :remote => remote)
= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, :remote => remote
4 changes: 1 addition & 3 deletions foundation/app/views/kaminari/_gap.html.erb
@@ -1,3 +1 @@
<li class="unavailable">
<%= link_to raw(t 'views.pagination.truncate'), '#' %>
</li>
<li aria-hidden="true" class="ellipsis"></li>
3 changes: 1 addition & 2 deletions foundation/app/views/kaminari/_gap.html.haml
@@ -1,2 +1 @@
%li.unavailable
= link_to raw(t 'views.pagination.truncate'), '#'
%li.ellipsis{ :"aria-hidden" => "true" }
3 changes: 1 addition & 2 deletions foundation/app/views/kaminari/_gap.html.slim
@@ -1,2 +1 @@
li.unavailable
= link_to raw(t 'views.pagination.truncate'), '#'
li.ellipsis aria-hidden=("true" )
3 changes: 1 addition & 2 deletions foundation/app/views/kaminari/_last_page.html.slim
@@ -1,3 +1,2 @@
li
= link_to_unless(current_page.last?,
raw(t 'views.pagination.last'), url, { :remote => remote })
= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, {:remote => remote}
4 changes: 1 addition & 3 deletions foundation/app/views/kaminari/_next_page.html.slim
@@ -1,4 +1,2 @@
li
= link_to_unless(current_page.last?,
raw(t 'views.pagination.next'),
url, :rel => 'next', :remote => remote)
= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, :rel => 'next', :remote => remote
6 changes: 5 additions & 1 deletion foundation/app/views/kaminari/_page.html.erb
@@ -1,3 +1,7 @@
<li class="<%= 'current' if page.current? %>">
<%= link_to page, page.current? ? '#' : url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
<% if page.current? %>
<%= page %>
<% else %>
<%= link_to page, url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
<% end %>
</li>
5 changes: 4 additions & 1 deletion foundation/app/views/kaminari/_page.html.haml
@@ -1,2 +1,5 @@
%li{class: "#{'current' if page.current?}"}
= link_to page, page.current? ? '#' : url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil}
- if page.current?
= page
- else
= link_to page, url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil}
9 changes: 5 additions & 4 deletions foundation/app/views/kaminari/_page.html.slim
@@ -1,4 +1,5 @@
li{class="#{'current' if page.current?}"}
= link_to(page, page.current? ? '#' : url,
{ :remote => remote,
:rel => page.next? ? 'next' : page.prev? ? 'prev' : nil })
li class: "#{'current' if page.current?}"
- if page.current?
= page
- else
= link_to page, url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil}
32 changes: 15 additions & 17 deletions foundation/app/views/kaminari/_paginator.html.erb
@@ -1,17 +1,15 @@
<%= paginator.render do -%>
<div class="pagination-centered">
<ul class="pagination">
<%= first_page_tag unless current_page.first? %>
<%= prev_page_tag unless current_page.first? %>
<% each_page do |page| -%>
<% if page.left_outer? || page.right_outer? || page.inside_window? -%>
<%= page_tag page %>
<% elsif !page.was_truncated? -%>
<%= gap_tag %>
<% end -%>
<% end -%>
<%= next_page_tag unless current_page.last? %>
<%= last_page_tag unless current_page.last? %>
</ul>
</div>
<% end -%>
<%= paginator.render do %>
<ul aria-label="Pagination" class="pagination" role="pagination">
<%= first_page_tag unless current_page.first? %>
<%= prev_page_tag unless current_page.first? %>
<% each_page do |page| %>
<% if page.left_outer? || page.right_outer? || page.inside_window? %>
<%= page_tag page %>
<% elsif !page.was_truncated? %>
<%= gap_tag %>
<% end %>
<% end %>
<%= next_page_tag unless current_page.last? %>
<%= last_page_tag unless current_page.last? %>
</ul>
<% end %>
21 changes: 10 additions & 11 deletions foundation/app/views/kaminari/_paginator.html.haml
@@ -1,12 +1,11 @@
= paginator.render do
.pagination-centered
%ul.pagination
= first_page_tag unless current_page.first?
= prev_page_tag unless current_page.first?
- each_page do |page|
- if page.left_outer? || page.right_outer? || page.inside_window?
= page_tag page
- elsif !page.was_truncated?
= gap_tag
= next_page_tag unless current_page.last?
= last_page_tag unless current_page.last?
%ul.pagination{ :role => "pagination", :"aria-label" => "Pagination" }
= first_page_tag unless current_page.first?
= prev_page_tag unless current_page.first?
- each_page do |page|
- if page.left_outer? || page.right_outer? || page.inside_window?
= page_tag page
- elsif !page.was_truncated?
= gap_tag
= next_page_tag unless current_page.last?
= last_page_tag unless current_page.last?
21 changes: 10 additions & 11 deletions foundation/app/views/kaminari/_paginator.html.slim
@@ -1,12 +1,11 @@
= paginator.render do
.pagination-centered
ul.pagination
== first_page_tag unless current_page.first?
== prev_page_tag unless current_page.first?
- each_page do |page|
- if page.left_outer? || page.right_outer? || page.inside_window?
== page_tag page
- elsif !page.was_truncated?
== gap_tag
== next_page_tag unless current_page.last?
== last_page_tag unless current_page.last?
ul.pagination role="pagination" aria-label=("Pagination" )
= first_page_tag unless current_page.first?
= prev_page_tag unless current_page.first?
- each_page do |page|
- if page.left_outer? || page.right_outer? || page.inside_window?
= page_tag page
- elsif !page.was_truncated?
= gap_tag
= next_page_tag unless current_page.last?
= last_page_tag unless current_page.last?
4 changes: 1 addition & 3 deletions foundation/app/views/kaminari/_prev_page.html.slim
@@ -1,4 +1,2 @@
li
= link_to_unless(current_page.first?,
raw(t 'views.pagination.previous'),
url, :rel => 'prev', :remote => remote)
= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, :rel => 'prev', :remote => remote
6 changes: 6 additions & 0 deletions foundation5/README.md
@@ -0,0 +1,6 @@
# Pagination theme for [Zurb Foundation](http://foundation.zurb.com)

With support for:

- erb
- haml
3 changes: 3 additions & 0 deletions foundation5/app/views/kaminari/_first_page.html.slim
@@ -0,0 +1,3 @@
li
= link_to_unless(current_page.first?,
raw(t 'views.pagination.first'), url, :remote => remote)
3 changes: 3 additions & 0 deletions foundation5/app/views/kaminari/_gap.html.erb
@@ -0,0 +1,3 @@
<li class="unavailable">
<%= link_to raw(t 'views.pagination.truncate'), '#' %>
</li>
2 changes: 2 additions & 0 deletions foundation5/app/views/kaminari/_gap.html.haml
@@ -0,0 +1,2 @@
%li.unavailable
= link_to raw(t 'views.pagination.truncate'), '#'
2 changes: 2 additions & 0 deletions foundation5/app/views/kaminari/_gap.html.slim
@@ -0,0 +1,2 @@
li.unavailable
= link_to raw(t 'views.pagination.truncate'), '#'
3 changes: 3 additions & 0 deletions foundation5/app/views/kaminari/_last_page.html.slim
@@ -0,0 +1,3 @@
li
= link_to_unless(current_page.last?,
raw(t 'views.pagination.last'), url, { :remote => remote })
4 changes: 4 additions & 0 deletions foundation5/app/views/kaminari/_next_page.html.slim
@@ -0,0 +1,4 @@
li
= link_to_unless(current_page.last?,
raw(t 'views.pagination.next'),
url, :rel => 'next', :remote => remote)
3 changes: 3 additions & 0 deletions foundation5/app/views/kaminari/_page.html.erb
@@ -0,0 +1,3 @@
<li class="<%= 'current' if page.current? %>">
<%= link_to page, page.current? ? '#' : url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
</li>
2 changes: 2 additions & 0 deletions foundation5/app/views/kaminari/_page.html.haml
@@ -0,0 +1,2 @@
%li{class: "#{'current' if page.current?}"}
= link_to page, page.current? ? '#' : url, {:remote => remote, :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil}
4 changes: 4 additions & 0 deletions foundation5/app/views/kaminari/_page.html.slim
@@ -0,0 +1,4 @@
li{class="#{'current' if page.current?}"}
= link_to(page, page.current? ? '#' : url,
{ :remote => remote,
:rel => page.next? ? 'next' : page.prev? ? 'prev' : nil })
17 changes: 17 additions & 0 deletions foundation5/app/views/kaminari/_paginator.html.erb
@@ -0,0 +1,17 @@
<%= paginator.render do -%>
<div class="pagination-centered">
<ul class="pagination">
<%= first_page_tag unless current_page.first? %>
<%= prev_page_tag unless current_page.first? %>
<% each_page do |page| -%>
<% if page.left_outer? || page.right_outer? || page.inside_window? -%>
<%= page_tag page %>
<% elsif !page.was_truncated? -%>
<%= gap_tag %>
<% end -%>
<% end -%>
<%= next_page_tag unless current_page.last? %>
<%= last_page_tag unless current_page.last? %>
</ul>
</div>
<% end -%>
12 changes: 12 additions & 0 deletions foundation5/app/views/kaminari/_paginator.html.haml
@@ -0,0 +1,12 @@
= paginator.render do
.pagination-centered
%ul.pagination
= first_page_tag unless current_page.first?
= prev_page_tag unless current_page.first?
- each_page do |page|
- if page.left_outer? || page.right_outer? || page.inside_window?
= page_tag page
- elsif !page.was_truncated?
= gap_tag
= next_page_tag unless current_page.last?
= last_page_tag unless current_page.last?
12 changes: 12 additions & 0 deletions foundation5/app/views/kaminari/_paginator.html.slim
@@ -0,0 +1,12 @@
= paginator.render do
.pagination-centered
ul.pagination
== first_page_tag unless current_page.first?
== prev_page_tag unless current_page.first?
- each_page do |page|
- if page.left_outer? || page.right_outer? || page.inside_window?
== page_tag page
- elsif !page.was_truncated?
== gap_tag
== next_page_tag unless current_page.last?
== last_page_tag unless current_page.last?
4 changes: 4 additions & 0 deletions foundation5/app/views/kaminari/_prev_page.html.slim
@@ -0,0 +1,4 @@
li
= link_to_unless(current_page.first?,
raw(t 'views.pagination.previous'),
url, :rel => 'prev', :remote => remote)
17 changes: 0 additions & 17 deletions foundation6/README.md

This file was deleted.

2 changes: 0 additions & 2 deletions foundation6/app/views/kaminari/_first_page.html.slim

This file was deleted.

1 change: 0 additions & 1 deletion foundation6/app/views/kaminari/_gap.html.erb

This file was deleted.

1 change: 0 additions & 1 deletion foundation6/app/views/kaminari/_gap.html.haml

This file was deleted.

1 change: 0 additions & 1 deletion foundation6/app/views/kaminari/_gap.html.slim

This file was deleted.

2 changes: 0 additions & 2 deletions foundation6/app/views/kaminari/_last_page.html.slim

This file was deleted.

2 changes: 0 additions & 2 deletions foundation6/app/views/kaminari/_next_page.html.slim

This file was deleted.

7 changes: 0 additions & 7 deletions foundation6/app/views/kaminari/_page.html.erb

This file was deleted.

5 changes: 0 additions & 5 deletions foundation6/app/views/kaminari/_page.html.haml

This file was deleted.

5 changes: 0 additions & 5 deletions foundation6/app/views/kaminari/_page.html.slim

This file was deleted.

15 changes: 0 additions & 15 deletions foundation6/app/views/kaminari/_paginator.html.erb

This file was deleted.

11 changes: 0 additions & 11 deletions foundation6/app/views/kaminari/_paginator.html.haml

This file was deleted.

11 changes: 0 additions & 11 deletions foundation6/app/views/kaminari/_paginator.html.slim

This file was deleted.

2 changes: 0 additions & 2 deletions foundation6/app/views/kaminari/_prev_page.html.slim

This file was deleted.

0 comments on commit 39b1df4

Please sign in to comment.