From 9e4a2e90ec9a01671c19e0eaf52ada77b5eaa86c Mon Sep 17 00:00:00 2001 From: Dominik Polakovics Date: Fri, 13 Dec 2024 16:47:04 +0100 Subject: [PATCH] feat: pagination --- .../News/Partials/List/Pagination.html | 2 +- .../Public/Scss/components/_news.scss | 60 +++++++++++++------ 2 files changed, 44 insertions(+), 18 deletions(-) diff --git a/packages/base/Resources/Private/Extensions/News/Partials/List/Pagination.html b/packages/base/Resources/Private/Extensions/News/Partials/List/Pagination.html index efe872d..f6abf36 100644 --- a/packages/base/Resources/Private/Extensions/News/Partials/List/Pagination.html +++ b/packages/base/Resources/Private/Extensions/News/Partials/List/Pagination.html @@ -19,7 +19,7 @@ -
  • +
  • {page}
  • diff --git a/packages/base/Resources/Public/Scss/components/_news.scss b/packages/base/Resources/Public/Scss/components/_news.scss index 8c8e50f..b029c80 100644 --- a/packages/base/Resources/Public/Scss/components/_news.scss +++ b/packages/base/Resources/Public/Scss/components/_news.scss @@ -1,19 +1,3 @@ -// .frame-type-news_newsliststicky { -// .header { -// display:flex; -// margin-bottom: 2.5rem; -// -// .title { -// flex: 1; -// align-content: center; -// -// h2 { -// margin: 0; -// } -// } -// } -// } - .news-list-view { display: grid; grid-template-columns: repeat(6, 1fr); @@ -52,7 +36,49 @@ } .f3-widget-paginator { - grid-column: span 6; + display: flex; + justify-content: center; + align-items: center; + list-style: none; + margin: 2rem 0; + padding: 0; + grid-column: span 6; + + li { + margin: 0 0.5rem; + + &.dots span { + background: none; + color: $primary-color; + } + + &.current a { + background: lighten($primary-color, 20%); + color: $secondary-color; + } + + a { + display: inline-block; + width: 2.5rem; + height: 2.5rem; + line-height: 2.5rem; + text-align: center; + border-radius: 50%; + background: $primary-color; + color: $secondary-color; + font-weight: bold; + text-decoration: none; + transition: background 0.3s ease-in-out; + + &:hover { + background: lighten($primary-color, 10%); + } + } + } + + .previous a, .next a, .first a, .last a { + // these are also styled as circles + } } }