diff --git a/app/assets/stylesheets/application.tailwind.css b/app/assets/stylesheets/application.tailwind.css index 8666d2f..dcaf29b 100644 --- a/app/assets/stylesheets/application.tailwind.css +++ b/app/assets/stylesheets/application.tailwind.css @@ -1,13 +1,7 @@ + +@import "./pagy.tailwind.css"; + @tailwind base; @tailwind components; @tailwind utilities; -/* - -@layer components { - .btn-primary { - @apply py-2 px-4 bg-blue-200; - } -} - -*/ diff --git a/app/assets/stylesheets/pagy.tailwind.css b/app/assets/stylesheets/pagy.tailwind.css new file mode 100644 index 0000000..3764241 --- /dev/null +++ b/app/assets/stylesheets/pagy.tailwind.css @@ -0,0 +1,34 @@ +.pagy { + @apply flex space-x-1 font-semibold text-sm text-gray-500; + + .page { + a { + @apply block rounded-lg px-3 py-1 bg-gray-200; + + &:hover { + @apply bg-gray-300; + } + } + + &.active a { + @apply text-white bg-gray-400 cursor-default; + } + + &.disabled a { + @apply text-gray-300 bg-gray-100 cursor-default; + } + + &.gap {} + + } + + .pagy-combo-input, + &.pagy-items-selector-js { + @apply inline-block whitespace-nowrap bg-gray-200 rounded-lg px-3 py-0.5; + + input { + @apply bg-gray-100 border-none rounded-md; + } + } + } + \ No newline at end of file diff --git a/app/assets/stylesheets/application.toastify.css b/app/assets/stylesheets/toastify.css similarity index 100% rename from app/assets/stylesheets/application.toastify.css rename to app/assets/stylesheets/toastify.css diff --git a/app/assets/stylesheets/application.turbo.css b/app/assets/stylesheets/turbo.css similarity index 100% rename from app/assets/stylesheets/application.turbo.css rename to app/assets/stylesheets/turbo.css diff --git a/app/views/scores/index.html.erb b/app/views/scores/index.html.erb index 14d710a..ae4515b 100644 --- a/app/views/scores/index.html.erb +++ b/app/views/scores/index.html.erb @@ -5,6 +5,8 @@ <%= link_to "New score", new_score_path, class: "rounded-lg py-3 px-5 bg-blue-600 text-white block font-medium" %> + <%== pagy_nav(@pagy) %> +