Nova rubrika /aktuelles: splosne novice locene od naslovnice, povezava v glavi in nogi, v sitemapu

This commit is contained in:
FOLX Bot 2026-08-16 15:33:14 +02:00
parent 59279fa039
commit 23a684325b
6 changed files with 19 additions and 3 deletions

View File

@ -40,6 +40,7 @@ function Router() {
<Route path="/search" component={SearchPage} />
<Route path="/article/:slug" component={ArticlePage} />
<Route path="/category/:category" component={CategoryPage} />
<Route path="/aktuelles" component={() => <CategoryPage fixedCategory="Aktuelles" />} />
<Route path="/videos" component={VideosPage} />
<Route path="/gallery" component={GalleryPageWrapper} />
<Route path="/horoskop" component={HoroscopePage} />

View File

@ -50,6 +50,11 @@ export default function Footer({ narrow }: { narrow?: boolean }) {
<span className="text-muted-foreground cursor-pointer hover:text-primary transition-colors" data-testid="link-footer-news">News</span>
</Link>
</li>
<li>
<Link href="/aktuelles">
<span className="hover:text-primary transition-colors cursor-pointer">Aktuelles</span>
</Link>
</li>
<li>
<Link href="/videos">
<span className="text-muted-foreground cursor-pointer hover:text-primary transition-colors" data-testid="link-footer-video">Video</span>

View File

@ -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" },

View File

@ -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();

View File

@ -711,10 +711,17 @@ export default function Home() {
};
}, []);
const { data: articles, isLoading } = useQuery<Article[]>({
const { data: allArticles, isLoading } = useQuery<Article[]>({
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<Article[]>({
queryKey: ["/api/articles/popular"],
});

View File

@ -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" },