Implement faculty page redirect and enhance course management features. Added a redirect for the faculty page to an external URL. Updated course data structure to include new fields for poster and brochure images, and introduced tagging functionality for courses. Enhanced admin course filters to support tag-based filtering and improved course form for tag management. Updated navigation links to reflect changes in course and faculty structure.
This commit is contained in:
1 parent
0e2fcaacdd
commit
ab7fcd41d8
22 files changed
+544
-167
No files matched your search
@@ -1,41 +1,5 @@
|
||||
import type { Metadata } from "next";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { Container } from "@/components/atoms/Container";
|
||||
import { Section } from "@/components/atoms/Section";
|
||||
import { FacultyMemberCard } from "@/components/molecules/FacultyMemberCard";
|
||||
import { PageHero } from "@/components/molecules/PageHero";
|
||||
import { getFaculty } from "@/lib/data/site";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
const t = await getTranslations("pages");
|
||||
return { title: t("facultyTitle"), description: t("facultyIntro") };
|
||||
}
|
||||
|
||||
export default async function FacultyPage() {
|
||||
const t = await getTranslations("pages");
|
||||
let members: Awaited<ReturnType<typeof getFaculty>> = [];
|
||||
try {
|
||||
members = await getFaculty();
|
||||
} catch (err) {
|
||||
console.error("[faculty] getFaculty failed:", err);
|
||||
}
|
||||
|
||||
return (
|
||||
<main id="main-content">
|
||||
<PageHero title={t("facultyTitle")} intro={t("facultyIntro")} />
|
||||
<Section className="bg-gradient-to-b from-background to-muted/40">
|
||||
<Container>
|
||||
{members.length === 0 ? (
|
||||
<p className="text-muted-foreground">در حال حاضر مدرسی برای نمایش نیست.</p>
|
||||
) : (
|
||||
<div className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{members.map((member) => (
|
||||
<FacultyMemberCard key={member.id} member={member} />
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</Container>
|
||||
</Section>
|
||||
</main>
|
||||
);
|
||||
export default function FacultyPage() {
|
||||
redirect("https://mst.aut.ac.ir/content/31094/شبکه-اساتید");
|
||||
}
|
||||
Reference in new issue
Block a user