diff --git a/lib/kanta_web/components/shared/pagination/pagination.ex b/lib/kanta_web/components/shared/pagination/pagination.ex
index 13fb48a..eff64be 100644
--- a/lib/kanta_web/components/shared/pagination/pagination.ex
+++ b/lib/kanta_web/components/shared/pagination/pagination.ex
@@ -24,17 +24,41 @@ defmodule KantaWeb.Components.Shared.Pagination do
- <%= for page <- 1..@metadata[:total_pages] do %>
+
+ 1
+
+ <%= if @metadata[:page_number] > 6 do %>
+
...
+ <% end %>
+ <%= for page <- max(2, @metadata[:page_number] - 4)..min(@metadata[:total_pages] - 1, @metadata[:page_number] + 4) do %>
- <%= page %>
+ <%= page %>
<% end %>
+ <%= if @metadata[:page_number] < @metadata[:total_pages] - 5 do %>
+
...
+ <% end %>
+
+ <%= @metadata[:total_pages] %>
+