Replies: 3 comments 12 replies
-
|
@loust333 unless you really need very different nav helpers, v43 allows you to customize the look interactively. See https://ddnexus.github.io/pagy/resources/stylesheets/ |
Beta Was this translation helpful? Give feedback.
-
|
@loust333 were you able to fix the a_lambda issue? |
Beta Was this translation helpful? Give feedback.
-
|
If you're just trying to change the look of the previous and next arrows then 1 way we have figured out how to do it is by overriding the I18n yml en:
pagy:
p11n: 'OneOther'
aria_label:
nav:
one: "Page"
other: "Pages"
previous: "Previous"
next: "Next"
previous: <svg class="pointer-events-none text-gray-400 h-5 w-5" viewBox="0 0 24 24" data-icon="chevron_left" fill="none" role="img"> <path stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M15 19l-7-7 7-7" /> </svg>
next: <svg class="pointer-events-none text-gray-400 h-5 w-5" viewBox="0 0 24 24" data-icon="chevron_right" fill="none" role="img"> <path stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" d="M9 5l7 7-7 7" /> </svg>
gap: "…"
item_name:
one: "item"
other: "items"
info_tag:
no_count: "Page %{page} of %{pages}"
no_items: "No %{item_name} found"
single_page: "Displaying %{count} %{item_name}"
multiple_pages: "Displaying %{item_name} %{from}-%{to} of %{count} in total"
input_nav_js: "Page %{page_input} of %{pages}"
limit_tag_js: "Show %{limit_input} %{item_name} per page"If there is a better way to do this then I would love to know it. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
Thanks first of all for your work. The pagy v43 looks great ! 🥳
Here is the current config that we have in our project:
Rails: v7 (Rails v8 coming soon)
Ruby: v3.4.7
CSS Framework: TailwindCss v3
Javascript: Esbuild + StimulusJS
For the pagination, we did the following. An application helper method to display the pagination with our style:
I'm interested in upgrading, and I tried, but it just did not work as expected.
The setup was fine, no worries. The last part was the most complicated.
I followed the article: https://ddnexus.github.io/pagy/guides/how-to/#using-your-pagination-templates
But I get errors like "undefined method a_lambda for Pagy::Offet
Here are my questions:
Let me know if you need more infos 🙂
Best regards,
Lourenço Steve
Beta Was this translation helpful? Give feedback.
All reactions