Using own custom Foundation 6 paginator
This commit is contained in:
parent
7e7d2e6c0b
commit
28e4f8e705
6 changed files with 67 additions and 13 deletions
|
|
@ -2,14 +2,13 @@
|
|||
a.black href=package_path(name: pkg.name)
|
||||
div.grid-thumbnail
|
||||
- if pkg.screenshots.any?
|
||||
// TODO: smarter search for the beste screenshot instead of taking the first one
|
||||
// TODO: smarter selection of the most useful screenshot instead of taking the first one
|
||||
- screenshot = pkg.screenshots.first
|
||||
= image_tag(screenshot.image.url(:thumb, timestamp: false), alt: screenshot.caption)
|
||||
= image_tag(screenshot.image.url(:thumb, timestamp: false), alt: screenshot.caption, class: 'thumbnail')
|
||||
- else
|
||||
img.screenshot src="/images/dummy/no-screenshots-upload-one.svg"
|
||||
img.screenshot.thumbnail src="/images/dummy/no-screenshots-upload-one.svg"
|
||||
div
|
||||
// TODO: use description instead of package name (as soon as it is available)
|
||||
.pkgname
|
||||
=pkg.name
|
||||
= pkg.name
|
||||
.pkgdescription
|
||||
= pkg.description
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
- if @packages.length>0
|
||||
// Use different pagination navigators depending on the screen width
|
||||
div.show-for-large-up
|
||||
=will_paginate @packages, renderer: FoundationPagination::Rails, :inner_window => 3
|
||||
div.show-for-large
|
||||
=will_paginate @packages, :renderer => FoundationPaginationRenderer, :inner_window => 3
|
||||
div.show-for-medium-only
|
||||
=will_paginate @packages, renderer: FoundationPagination::Rails, :inner_window => 1
|
||||
=will_paginate @packages, :renderer => FoundationPaginationRenderer, :inner_window => 1
|
||||
div.show-for-small-only
|
||||
=will_paginate @packages, renderer: FoundationPagination::Rails, :page_links => false
|
||||
=will_paginate @packages, :renderer => FoundationPaginationRenderer, :page_links => false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue