From 79235cb98c86c160c8463e4995e5688c596b58e6 Mon Sep 17 00:00:00 2001 From: Zee <50284+zspencer@users.noreply.github.com> Date: Tue, 20 Feb 2024 10:27:53 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=F0=9F=94=A8=20`Pagination`:=20Fix?= =?UTF-8?q?=20missing=20translation=20error=20for=20`Next`=20and=20`Previo?= =?UTF-8?q?us`=20links=20(#2217)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - https://github.com/zinc-collective/convene/issues/2216 With the Pagy 7 upgrade; the helper I wrote so we could add spacing between the Pagination links broke. This switches out from doing an in-ruby style override to an in-css style override; which should be less fraught. --- .../stylesheets/application.postcss.css | 1 + app/assets/stylesheets/extensions/pagy.scss | 8 +++++ .../journal/journals/_journal.html.erb | 2 +- .../marketplace/orders/index.html.erb | 2 +- app/helpers/pagy_helper.rb | 31 ------------------- app/views/neighborhoods/show.html.erb | 2 +- 6 files changed, 12 insertions(+), 34 deletions(-) create mode 100644 app/assets/stylesheets/extensions/pagy.scss diff --git a/app/assets/stylesheets/application.postcss.css b/app/assets/stylesheets/application.postcss.css index ff9af79db..dc8bd8752 100644 --- a/app/assets/stylesheets/application.postcss.css +++ b/app/assets/stylesheets/application.postcss.css @@ -8,3 +8,4 @@ @import "./utilities.scss"; @import "./components.scss"; @import "actiontext.css"; +@import "./extensions/pagy.scss"; diff --git a/app/assets/stylesheets/extensions/pagy.scss b/app/assets/stylesheets/extensions/pagy.scss new file mode 100644 index 000000000..f0e347199 --- /dev/null +++ b/app/assets/stylesheets/extensions/pagy.scss @@ -0,0 +1,8 @@ +.pagy-nav { + @apply flex justify-between; + + .page.active a, + .page.disabled a { + @apply no-underline; + } +} diff --git a/app/furniture/journal/journals/_journal.html.erb b/app/furniture/journal/journals/_journal.html.erb index 485fa7bde..2b37d4016 100644 --- a/app/furniture/journal/journals/_journal.html.erb +++ b/app/furniture/journal/journals/_journal.html.erb @@ -7,7 +7,7 @@ <%= render Journal::EntryComponent.with_collection(@entries) %> - <%== pagy_nav(@pagy, nav_extra: 'flex justify-between') %> + <%== pagy_nav(@pagy) %> <%= render Journal::NewEntryButtonComponent.new(journal: journal) %> diff --git a/app/furniture/marketplace/orders/index.html.erb b/app/furniture/marketplace/orders/index.html.erb index 33a4ae9de..9191ad744 100644 --- a/app/furniture/marketplace/orders/index.html.erb +++ b/app/furniture/marketplace/orders/index.html.erb @@ -2,5 +2,5 @@ <%- @pagy, @records = pagy(orders.paid) %>