Update database connection details and enhance course management functionality. Changed DATABASE_URL in deployment workflow to a direct connection string. Added course pruning logic in seed script to maintain database integrity. Updated faculty and registration forms to include additional fields for better data capture. Refined layout components for improved user experience and responsiveness.
This commit is contained in:
1 parent
0874b968ba
commit
6909a935fd
74 files changed
+1506
-420
No files matched your search
@@ -1,13 +1,21 @@
|
||||
import type { Metadata } from "next";
|
||||
import { notFound } from "next/navigation";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { Container } from "@/components/atoms/Container";
|
||||
import { Section } from "@/components/atoms/Section";
|
||||
import { PageHero } from "@/components/molecules/PageHero";
|
||||
import { ContactInterestForm } from "@/components/organisms/ContactInterestForm";
|
||||
import {
|
||||
Card,
|
||||
CardContent,
|
||||
CardHeader,
|
||||
CardTitle,
|
||||
} from "@/components/ui/card";
|
||||
import { getLegalPage } from "@/lib/data/site";
|
||||
|
||||
type Props = { params: Promise<{ slug: string }> };
|
||||
|
||||
const ALLOWED = new Set(["privacy", "accessibility", "press", "careers"]);
|
||||
const ALLOWED = new Set(["press", "careers"]);
|
||||
|
||||
export async function generateStaticParams() {
|
||||
return [...ALLOWED].map((slug) => ({ slug }));
|
||||
@@ -25,17 +33,31 @@ export default async function LegalSlugPage({ params }: Props) {
|
||||
if (!ALLOWED.has(slug)) notFound();
|
||||
const page = await getLegalPage(slug);
|
||||
if (!page) notFound();
|
||||
const t = await getTranslations("pages");
|
||||
|
||||
return (
|
||||
<main id="main-content">
|
||||
<PageHero title={page.title} />
|
||||
<Section className="bg-gradient-to-b from-background to-muted/40">
|
||||
<Container narrow className="space-y-5 rounded-2xl bg-card p-6 shadow-sm ring-1 ring-border sm:p-10">
|
||||
{page.body.map((paragraph) => (
|
||||
<p key={paragraph} className="leading-8 text-foreground/90">
|
||||
{paragraph}
|
||||
</p>
|
||||
))}
|
||||
<Container className="grid gap-10 lg:grid-cols-2">
|
||||
<div className="space-y-5 rounded-2xl bg-card p-6 shadow-sm ring-1 ring-border sm:p-10">
|
||||
{page.body.map((paragraph) => (
|
||||
<p key={paragraph} className="leading-8 text-foreground/90">
|
||||
{paragraph}
|
||||
</p>
|
||||
))}
|
||||
</div>
|
||||
<Card className="rounded-2xl border-border/70 shadow-lg">
|
||||
<CardHeader>
|
||||
<CardTitle>ارسال پیام</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<ContactInterestForm
|
||||
submitLabel={t("submit")}
|
||||
successLabel={t("registerSuccess")}
|
||||
/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</Container>
|
||||
</Section>
|
||||
</main>
|
||||
|
||||
@@ -17,15 +17,18 @@ export async function generateMetadata(): Promise<Metadata> {
|
||||
}
|
||||
|
||||
export default async function AboutPage() {
|
||||
const t = await getTranslations("pages");
|
||||
const topics = await getTopics();
|
||||
|
||||
return (
|
||||
<main id="main-content">
|
||||
<PageHero title={t("aboutTitle")} intro={siteMission} />
|
||||
<PageHero
|
||||
eyebrow="درباره مرکز آموزشهای آزاد"
|
||||
title="آموزش مدیریت با پشتوانه امیرکبیر"
|
||||
intro="مرکز آموزشهای آزاد دانشکده مدیریت، علم و فناوری دانشگاه صنعتی امیرکبیر، بر آموزش مدیران و تیمهای مدیریتی برای تحول در صنعت تمرکز دارد. دورههای ما به تصمیمگیری دادهمحور، بهکارگیری هوش مصنوعی در کسبوکار و مدیریت اجرای تغییر در سازمان میپردازند."
|
||||
/>
|
||||
<Section className="relative overflow-hidden">
|
||||
<Container>
|
||||
<p className="text-xs font-bold text-primary">مسیرهای اثرگذاری</p><Heading level={2} className="mt-2 text-3xl sm:text-4xl">حوزههای تمرکز</Heading>
|
||||
<p className="text-xs font-bold text-primary">آنچه میآموزید</p><Heading level={2} className="mt-2 text-3xl sm:text-4xl">توانمندیهای مدیریتی برای تحول در صنعت</Heading>
|
||||
<div className="mt-8 grid gap-4 sm:grid-cols-2">
|
||||
{aboutFocusAreas.map((area) => (
|
||||
<SurfaceCard key={area.title}>
|
||||
@@ -42,7 +45,7 @@ export default async function AboutPage() {
|
||||
</Section>
|
||||
<Section tone="muted">
|
||||
<Container>
|
||||
<p className="text-xs font-bold text-primary">نگاه میانرشتهای</p><Heading level={2} className="mt-2 text-3xl sm:text-4xl">تقاطع مدیریت و فناوری</Heading>
|
||||
<p className="text-xs font-bold text-primary">حوزههای آموزشی</p><Heading level={2} className="mt-2 text-3xl sm:text-4xl">موضوع مورد نیاز خود را پیدا کنید</Heading>
|
||||
<div className="mt-6 grid gap-3 sm:grid-cols-2 lg:grid-cols-4">
|
||||
{topics.map((topic) => (
|
||||
<SurfaceCard key={topic.id} padded="sm" className="h-full">
|
||||
@@ -58,7 +61,7 @@ export default async function AboutPage() {
|
||||
))}
|
||||
</div>
|
||||
<Link href="/programs" className={cn(buttonVariants(), "mt-8")}>
|
||||
کشف برنامهها
|
||||
مشاهده برنامههای آموزشی
|
||||
</Link>
|
||||
</Container>
|
||||
</Section>
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
import type { Metadata } from "next";
|
||||
import Image from "next/image";
|
||||
import { getTranslations } from "next-intl/server";
|
||||
import { Container } from "@/components/atoms/Container";
|
||||
import { Heading } from "@/components/atoms/Heading";
|
||||
import { Section } from "@/components/atoms/Section";
|
||||
import { FacultyMemberCard } from "@/components/molecules/FacultyMemberCard";
|
||||
import { PageHero } from "@/components/molecules/PageHero";
|
||||
import { SurfaceCard } from "@/components/molecules/SurfaceCard";
|
||||
import { getFaculty } from "@/lib/data/site";
|
||||
|
||||
export async function generateMetadata(): Promise<Metadata> {
|
||||
@@ -24,27 +22,7 @@ export default async function FacultyPage() {
|
||||
<Container>
|
||||
<div className="grid gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
||||
{members.map((member) => (
|
||||
<SurfaceCard key={member.id} className="group rounded-2xl">
|
||||
<div className="relative mb-5 aspect-[4/3] overflow-hidden rounded-xl bg-muted">
|
||||
<Image
|
||||
src={member.imageUrl}
|
||||
alt={member.name}
|
||||
fill
|
||||
className="object-cover transition-transform duration-500 group-hover:scale-[1.03]"
|
||||
sizes="(max-width:768px) 100vw, 33vw"
|
||||
/>
|
||||
</div>
|
||||
<Heading as="h2" level={4}>
|
||||
{member.name}
|
||||
</Heading>
|
||||
<p className="mt-1 text-sm text-primary">{member.title}</p>
|
||||
<p className="mt-1 text-xs text-muted-foreground">
|
||||
{member.focus}
|
||||
</p>
|
||||
<p className="mt-3 text-sm leading-7 text-muted-foreground">
|
||||
{member.bio}
|
||||
</p>
|
||||
</SurfaceCard>
|
||||
<FacultyMemberCard key={member.id} member={member} />
|
||||
))}
|
||||
</div>
|
||||
</Container>
|
||||
|
||||
@@ -43,8 +43,6 @@ export default async function MainLayout({
|
||||
links={[
|
||||
{ label: t("footer.press"), href: "/press" },
|
||||
{ label: t("footer.careers"), href: "/careers" },
|
||||
{ label: t("footer.accessibility"), href: "/accessibility" },
|
||||
{ label: t("footer.privacy"), href: "/privacy" },
|
||||
]}
|
||||
/>
|
||||
</>
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
HomeRest,
|
||||
type HomeLabels,
|
||||
} from "@/components/templates/HomeTemplate";
|
||||
import { getArticles, getFeaturedArticle } from "@/lib/data/articles";
|
||||
import { getFeaturedArticle } from "@/lib/data/articles";
|
||||
import { getEvents } from "@/lib/data/events";
|
||||
import { getPrograms } from "@/lib/data/programs";
|
||||
import { getSiteStats, getTopics } from "@/lib/data/site";
|
||||
@@ -39,15 +39,9 @@ async function HeroSection() {
|
||||
getFeaturedArticle(),
|
||||
getLabels(),
|
||||
]);
|
||||
if (!featured) return null;
|
||||
return <HomeHero featured={featured} eyebrow={labels.ideasEyebrow} />;
|
||||
}
|
||||
|
||||
async function IdeasSection() {
|
||||
const [articles, labels] = await Promise.all([getArticles(), getLabels()]);
|
||||
return <HomeIdeas articles={articles} title={labels.ideasTitle} />;
|
||||
}
|
||||
|
||||
async function EventsSection() {
|
||||
const [events, labels] = await Promise.all([getEvents(), getLabels()]);
|
||||
return (
|
||||
@@ -90,7 +84,7 @@ export default function HomePage() {
|
||||
return (
|
||||
<main id="main-content">
|
||||
<HeroSection />
|
||||
<IdeasSection />
|
||||
<HomeIdeas />
|
||||
<EventsSection />
|
||||
<RestSection />
|
||||
</main>
|
||||
|
||||
@@ -12,11 +12,13 @@ export async function generateMetadata(): Promise<Metadata> {
|
||||
}
|
||||
|
||||
export default async function ValuesPage() {
|
||||
const t = await getTranslations("pages");
|
||||
|
||||
return (
|
||||
<main id="main-content">
|
||||
<PageHero title={t("valuesTitle")} intro={valuesContent.intro} />
|
||||
<PageHero
|
||||
eyebrow="ارزشهای آموزشی ما"
|
||||
title={valuesContent.title}
|
||||
intro={valuesContent.intro}
|
||||
/>
|
||||
<Section className="bg-gradient-to-b from-background to-muted/40">
|
||||
<Container>
|
||||
<div className="grid gap-5 sm:grid-cols-2">
|
||||
|
||||
Reference in new issue
Block a user