From 51975d1bc0799c7d93fc2e95f023b8f17841c428 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Tue, 9 Jan 2024 09:29:53 +0100 Subject: [PATCH] handling previous/next news --- resources/css/pages/single-news.css | 66 +++++++++++++++++++++++++++-- single-post.php | 36 +++++++++++++++- 2 files changed, 98 insertions(+), 4 deletions(-) diff --git a/resources/css/pages/single-news.css b/resources/css/pages/single-news.css index cb36c8c..c91e4bc 100644 --- a/resources/css/pages/single-news.css +++ b/resources/css/pages/single-news.css @@ -1,8 +1,6 @@ -body.acoustisque { - @apply bg-slate-800; -} .entry-content.single-news-editor-content { @apply mx-auto mt-8 px-4; + ul li::marker, ol li::marker { @apply text-purple-500; @@ -11,3 +9,65 @@ body.acoustisque { @apply !bg-secondary; } } + +.post-news-page-container { + .previous-next-posts { + @apply grid md:grid-cols-2 gap-y-4 gap-8 mx-auto max-w-screen-xl px-6 xl:px-24 my-16; + &__previous, + &__next { + @apply flex gap-4 bg-white rounded-lg shadowed py-4 px-6 items-center; + transition: all 0.2s ease-out; + text-decoration: none !important; + + &:hover { + @apply -translate-y-1; + } + .post_thumbnail { + @apply object-contain + rounded-lg + w-20 + h-20; + } + .post_denomination, + .post_title { + @apply font-bold no-underline; + } + .post_denomination { + @apply mb-1 text-secondary; + } + .post_title { + @apply text-neutral-900; + line-height: 1.4; + } + } + &__previous { + @apply text-left justify-end; + &:after { + @apply inline-block h-7 w-7 border-2 border-neutral-900 rounded-full shrink-0; + content: ''; + margin-top: auto; + margin-bottom: auto; + background-image: url('../resources/img/graphic-assets/chevron_right.svg'); + background-repeat: no-repeat; + background-position: center; + background-size: 50% 50%; + } + } + &__next { + @apply text-right; + &:before { + @apply inline-block h-7 w-7 border-2 border-neutral-900 rounded-full shrink-0; + content: ''; + margin-top: auto; + margin-bottom: auto; + background-image: url('../resources/img/graphic-assets/chevron_left.svg'); + background-repeat: no-repeat; + background-position: center; + background-size: 50% 50%; + } + } + &__link-content { + @apply h-fit pt-1; + } + } +} diff --git a/single-post.php b/single-post.php index 5291082..0b943a4 100644 --- a/single-post.php +++ b/single-post.php @@ -7,6 +7,7 @@ $args = array( $relatedPageTemplatePage = get_pages($args) ? get_pages($args)[0] : null; ?> +
"> @@ -48,11 +49,44 @@ $relatedPageTemplatePage = get_pages($args) ? get_pages($args)[0] : null; )); ?> -