From 52999058516d4f7faa9e986028eb063b7a401bfe Mon Sep 17 00:00:00 2001 From: James Morris Date: Wed, 28 Sep 2022 18:18:45 +0100 Subject: [PATCH] Added in the static front-end of the pagination refs https://github.com/TryGhost/Team/issues/1984 --- ghost/admin/app/styles/layouts/content.css | 95 +++++++++++++++++-- ghost/admin/app/templates/posts/analytics.hbs | 17 ++++ .../assets/icons/arrow-left-pagination.svg | 10 ++ .../assets/icons/arrow-right-pagination.svg | 10 ++ 4 files changed, 123 insertions(+), 9 deletions(-) create mode 100644 ghost/admin/public/assets/icons/arrow-left-pagination.svg create mode 100644 ghost/admin/public/assets/icons/arrow-right-pagination.svg diff --git a/ghost/admin/app/styles/layouts/content.css b/ghost/admin/app/styles/layouts/content.css index 502410dbd1..51200188b0 100644 --- a/ghost/admin/app/styles/layouts/content.css +++ b/ghost/admin/app/styles/layouts/content.css @@ -936,15 +936,6 @@ a.gh-post-list-signups.active:hover > span, a.gh-post-list-conversions.active:ho border-radius: var(--border-radius); } -.gh-links-list-item:first-child { - padding-top: 0; -} - -.gh-links-list-item:last-child { - padding-bottom: 0; - border-bottom: none; -} - .gh-links-list-item { display: flex; justify-content: space-between; @@ -956,6 +947,19 @@ a.gh-post-list-signups.active:hover > span, a.gh-post-list-conversions.active:ho text-decoration: none; } +.gh-links-list-item:first-child { + padding-top: 0; +} + +.gh-links-list-item:last-child { + padding-bottom: 0; + border-bottom: none; +} + +.gh-links-list > .gh-links-list-item:last-child { + border-bottom: 0 none; +} + .gh-links-list-item a { margin: 0; padding: 0 32px 0 0; @@ -975,6 +979,79 @@ a.gh-post-list-signups.active:hover > span, a.gh-post-list-conversions.active:ho color: var(--darkgrey); } +.gh-links-pagination { + display: flex; + justify-content: space-between; + align-items: center; + width: calc(100% + 40px); + background: linear-gradient(180deg, #FBFBFB 0%, #FFFFFF 50%); + padding: 20px; + margin: -1px -20px -20px -20px; + border-top: 1px solid var(--lightgrey-l1); + border-radius: 0 0 3px 3px; +} + +.gh-links-pagination-progress { + font-weight: 500; + font-size: 13px; + line-height: 16px; + letter-spacing: 0.01em; + color: var(--midlightgrey); +} + +.gh-links-pagination-actions { + display: flex; + flex-direction: row; + gap: 20px; +} + +.gh-links-pagination-action { + display: flex; + flex-direction: row; + justify-content: flex-start; + align-items: center; + gap: 8px; + color: var(--green); + font-weight: 600; + font-size: 13px; + line-height: 16px; + letter-spacing: 0.01em; + transition: color .2s linear; +} + +.gh-links-pagination-action.gh-links-pagination-prev { + position: relative; + padding-right: 20px; +} + +.gh-links-pagination-action.gh-links-pagination-prev:after { + content: ""; + position: absolute; + top: 20%; + bottom: 20%; + right: 0; + background: var(--lightgrey); + border-radius: 2px; + width: 1.5px; + height: 60%; +} + +.gh-links-pagination-action svg { + width: 6px; + fill: var(--green); + stroke: var(--green); + transition: all .2s linear; +} + +.gh-links-pagination-action:hover { + color: var(--green-d2); +} + +.gh-links-pagination-action:hover svg { + fill: var(--green-d2); + stroke: var(--green-d2); +} + /* Post list – LABS /* ---------------------------------------------------------- */ diff --git a/ghost/admin/app/templates/posts/analytics.hbs b/ghost/admin/app/templates/posts/analytics.hbs index d1f1644e37..f0c7451546 100644 --- a/ghost/admin/app/templates/posts/analytics.hbs +++ b/ghost/admin/app/templates/posts/analytics.hbs @@ -106,6 +106,23 @@ {{/each}} + {{!-- TODO: Wire this pagination up + + --}} {{/if}} diff --git a/ghost/admin/public/assets/icons/arrow-left-pagination.svg b/ghost/admin/public/assets/icons/arrow-left-pagination.svg new file mode 100644 index 0000000000..a73a55f77a --- /dev/null +++ b/ghost/admin/public/assets/icons/arrow-left-pagination.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/ghost/admin/public/assets/icons/arrow-right-pagination.svg b/ghost/admin/public/assets/icons/arrow-right-pagination.svg new file mode 100644 index 0000000000..2c52643dd0 --- /dev/null +++ b/ghost/admin/public/assets/icons/arrow-right-pagination.svg @@ -0,0 +1,10 @@ + + + + + + + + + +