- {colonPost.featuredImage?.node?.sourceUrl && (
-
+
+
+
-
-
)}
+
+
+ /* Если нужно точное соответствие макету, можно добавить медиа-запросы под свои нужды */
+
\ No newline at end of file
diff --git a/src/components/EndnewsList.astro b/src/components/EndnewsList.astro
index cc41e2c..c9a9591 100644
--- a/src/components/EndnewsList.astro
+++ b/src/components/EndnewsList.astro
@@ -2,7 +2,6 @@
import { getLatestAnews } from '../lib/api/posts.js';
import { fetchWPRestGet } from "@/lib/api/wp-rest-get-client";
-
// Даты/время
function formatDate(dateString: string): string {
const date = new Date(dateString);
@@ -51,118 +50,129 @@ const hasNews = newsPosts.length > 0;
const hasTop = topPosts.length > 0;
// По умолчанию открываем вкладку, где есть данные
-const defaultTab: "news" | "top" = hasTop ? "top" : "news";
+const defaultTab: "news" | "top" = hasNews ? "news" : "top";
---
{(hasNews || hasTop) && (
-
-
-
-
- {/* Radio-кнопки ВНЕ .endnews-tabs для работы CSS-селекторов */}
-
-
-
- {/* Только labels в блоке табов */}
+ Новости
-
+ {/* Табы на всю ширину, каждый по 50% - теперь div'ы */}
)}
+
+
-
+
\ No newline at end of file
diff --git a/src/components/MainMenu.astro b/src/components/MainMenu.astro
index 6bc6c61..13b6dff 100644
--- a/src/components/MainMenu.astro
+++ b/src/components/MainMenu.astro
@@ -17,24 +17,41 @@ if (!menu) {
---
-
-
+
- {/* Контент: две панели, показываем нужную через :checked */}
+ {/* Контент: две панели */}
Новости
+ Топ‑10
-
+
{Object.entries(groupedNews).map(([dateKey, datePosts]) => (
-
- ))}
+
+ {/* Переделано в ul > li */}
+
))}
-
- {topPosts.map((post, i) => (
-
-
- ))}
-
- {!hasTop &&
+ {topPosts.length > 0 ? (
+
{formatDate(dateKey + 'T00:00:00')}
-
- {datePosts.map((post) => (
- {formatTime(post.date)}
-
-
- {post.title}
-
-
- -
+ {datePosts.map((post) => (
+
-
+ {formatTime(post.date)}++ + {post.title} + ++
+ ))}
+
-
- {post.title}
-
-
- Топ пока пуст
}
+ -
+ {topPosts.map((post, i) => (
+
-
+ + + {post.title} + ++
+ ))}
+
Топ пока пуст
+ )}