From b01105d2b2bf8bf6b8f85a7eb51889d1b54b76cd Mon Sep 17 00:00:00 2001 From: "E. S." Date: Tue, 5 Nov 2024 02:25:32 +0300 Subject: [PATCH] fix --- skin/main.phps | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/skin/main.phps b/skin/main.phps index 887c9b2..783bd9e 100644 --- a/skin/main.phps +++ b/skin/main.phps @@ -41,7 +41,7 @@ function index($ctx, array $versions, array $posts, PostLanguage $posts_lang) {
{$ctx->lang('recent_articles')}
{$ctx->for_each($posts, - fn($post, $i) => $ctx->articles_post_row($i, $post, $posts_lang, true))} + fn($post, $i) => $ctx->articles_post_row($i, $post, $posts_lang, true, false))} {$ctx->lang('view_all_articles')} @@ -91,7 +91,8 @@ function articles_post_row($ctx, int $index, Post $post, PostLanguage $selected_lang, - bool $no_block = false): string { + bool $no_block = false, + bool $show_year = true): string { $year = $post->getYear(); $date = $post->getDate(); $url = $post->getUrl($selected_lang); @@ -112,7 +113,7 @@ $buf .= '' : ''; return <<if_true($ctx->year > $year, +{$ctx->if_true($show_year && $ctx->year > $year, fn() => $ctx->articles_index_year_line($year, $index === 0, $selected_lang->value))} {$buf} HTML;