From a50dbca257068fa7bfbb96e69e2270bece7a77db Mon Sep 17 00:00:00 2001 From: Ross Trottier Date: Fri, 19 Jul 2024 13:53:03 -0600 Subject: [PATCH] featured article on archive pages --- archive.php | 24 ++++++++++++++++++++++++ style.css | 21 +++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/archive.php b/archive.php index 2b889f1..1a8f1c3 100644 --- a/archive.php +++ b/archive.php @@ -4,12 +4,34 @@
post_count; + $article_number = 0; custom_breadcrumbs(); if (have_posts()) { while (have_posts()) { the_post(); $category = get_the_category()[0]; $count++; + $article_number++; + if ($article_number == 1) { + $author = get_userdata( $post->post_author ); + ?> + + +
diff --git a/style.css b/style.css index ecdc864..fd3e4cb 100644 --- a/style.css +++ b/style.css @@ -942,6 +942,10 @@ COMPONENTS font-size: 1.5rem; } +.st-article-archive-article-featured .st-article-section-main-article__author-link { + display: none; +} + @media (min-width: 760px) { .st-article-section-four-oh-four, .st-article-archives { @@ -954,6 +958,19 @@ COMPONENTS .st-article-archives .pagination { grid-column: 1/span 2; } + + .st-article-archive-article-featured { + grid-column: 1/span 2; + grid-row: 2/span 2; + } + + .st-article-archive-article-featured img { + width: 100%; + } + + .st-article-archive-article-featured .st-article-section-main-article__author-link { + display: initial; + } } @media (min-width: 1200px) { @@ -970,6 +987,10 @@ COMPONENTS .st-article-archives .pagination { grid-column: 1/span 4; } + + .st-article-archive-article-featured img { + height: 73.25%; + } } /* Pagination */