From 606f5df100dab84d5d7f880c56758272a3b24709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Diedrich?= Date: Tue, 2 Aug 2022 14:11:49 +0200 Subject: [PATCH] pagination contains more numbers now --- assets/css/app.css | 4 ++++ lib/something_erlang_web/live/thread_live/show.ex | 14 +++++++------- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/assets/css/app.css b/assets/css/app.css index 728f228..f1f2a99 100644 --- a/assets/css/app.css +++ b/assets/css/app.css @@ -41,6 +41,10 @@ body { @apply mb-1; } +.pagination i { + @apply h-5 px-1; +} + /* Alerts and form errors used by phx.new */ .alert { padding: 15px; diff --git a/lib/something_erlang_web/live/thread_live/show.ex b/lib/something_erlang_web/live/thread_live/show.ex index 7cf51de..29e50e3 100644 --- a/lib/something_erlang_web/live/thread_live/show.ex +++ b/lib/something_erlang_web/live/thread_live/show.ex @@ -68,25 +68,25 @@ defmodule SomethingErlangWeb.ThreadLive.Show do next_button_target = if page_number < page_count, do: page_number + 1, else: page_count buttons = [ - %{label: "«", page: 1, special: " btn-square" <> first_page_disabled_button}, - %{label: "‹", page: prev_button_target, special: " btn-square" <> first_page_disabled_button}, + %{label: "«", page: 1, special: "" <> first_page_disabled_button}, + %{label: "‹", page: prev_button_target, special: "" <> first_page_disabled_button}, %{label: "#{page_number}", page: page_number, special: active_page_button}, - %{label: "›", page: next_button_target, special: " btn-square" <> last_page_disabled_button}, - %{label: "»", page: page_count, special: " btn-square" <> last_page_disabled_button} + %{label: "›", page: next_button_target, special: "" <> last_page_disabled_button}, + %{label: "»", page: page_count, special: "" <> last_page_disabled_button} ] ~H"""