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>
|
||||
|
||||
Reference in new issue
Block a user