From 23a684325b1fc6ee06ed8c209858180ade7fc87a Mon Sep 17 00:00:00 2001 From: FOLX Bot Date: Sun, 16 Aug 2026 15:33:14 +0200 Subject: [PATCH] Nova rubrika /aktuelles: splosne novice locene od naslovnice, povezava v glavi in nogi, v sitemapu --- client/src/App.tsx | 1 + client/src/components/footer.tsx | 5 +++++ client/src/components/header.tsx | 1 + client/src/pages/category.tsx | 5 +++-- client/src/pages/home.tsx | 9 ++++++++- server/routes.ts | 1 + 6 files changed, 19 insertions(+), 3 deletions(-) diff --git a/client/src/App.tsx b/client/src/App.tsx index bf45651..419546b 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -40,6 +40,7 @@ function Router() { + } /> diff --git a/client/src/components/footer.tsx b/client/src/components/footer.tsx index 593585a..89fee27 100644 --- a/client/src/components/footer.tsx +++ b/client/src/components/footer.tsx @@ -50,6 +50,11 @@ export default function Footer({ narrow }: { narrow?: boolean }) { News +
  • + + Aktuelles + +
  • Video diff --git a/client/src/components/header.tsx b/client/src/components/header.tsx index 699459f..f0093a4 100644 --- a/client/src/components/header.tsx +++ b/client/src/components/header.tsx @@ -10,6 +10,7 @@ const navItems = [ { label: "News", href: "/category/News" }, { label: "Video", href: "/videos" }, { label: "Galerie", href: "/gallery" }, + { label: "Aktuelles", href: "/aktuelles" }, { label: "Horoskop", href: "/horoskop" }, { label: "Rezepte", href: "/rezepte" }, { label: "Kontakt", href: "/kontakt" }, diff --git a/client/src/pages/category.tsx b/client/src/pages/category.tsx index 5073876..1742d8b 100644 --- a/client/src/pages/category.tsx +++ b/client/src/pages/category.tsx @@ -20,8 +20,9 @@ interface PaginatedResponse { hasMore: boolean; } -export default function CategoryPage() { - const { category } = useParams<{ category: string }>(); +export default function CategoryPage({ fixedCategory }: { fixedCategory?: string } = {}) { + const params = useParams<{ category: string }>(); + const category = fixedCategory || params.category; const searchString = useSearch(); const [, setLocation] = useLocation(); diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index 36b4a4b..76a1560 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -711,10 +711,17 @@ export default function Home() { }; }, []); - const { data: articles, isLoading } = useQuery({ + const { data: allArticles, isLoading } = useQuery({ queryKey: ["/api/articles"], }); + // Splosne novice imajo svojo rubriko /aktuelles in ne sodijo na naslovnico, + // ki ostaja Volksmusik in Schlager. + const articles = useMemo( + () => (allArticles || []).filter((a) => a.category !== "Aktuelles"), + [allArticles] + ); + const { data: popular } = useQuery({ queryKey: ["/api/articles/popular"], }); diff --git a/server/routes.ts b/server/routes.ts index 118a261..834b104 100644 --- a/server/routes.ts +++ b/server/routes.ts @@ -950,6 +950,7 @@ export async function registerRoutes( const staticPages = [ { loc: "/", priority: "1.0", changefreq: "daily" }, + { loc: "/aktuelles", priority: "0.8", changefreq: "hourly" }, { loc: "/videos", priority: "0.8", changefreq: "daily" }, { loc: "/gallery", priority: "0.7", changefreq: "weekly" }, { loc: "/horoskop", priority: "0.7", changefreq: "daily" },