Refactor HomeTemplate and layout components for improved structure and responsiveness. Adjusted CSS animations for better visual performance and updated layout links to enhance navigation. Removed unused brand link from the professional layout and streamlined section structures for clarity.

This commit is contained in:
smhk1376 committed 2026-09-24 16:54:52 +03:30
1 parent b6ff82fad9
commit 0874b968ba
5 files changed
+33 -22

No files matched your search

+3 -2
View File
@@ -224,14 +224,15 @@
@media (min-width: 768px) and (prefers-reduced-motion: no-preference) { @media (min-width: 768px) and (prefers-reduced-motion: no-preference) {
@supports (animation-timeline: view()) { @supports (animation-timeline: view()) {
@keyframes section-reveal { @keyframes section-reveal {
from { opacity: 0; transform: translateY(1.25rem); } from { opacity: 0.35; transform: translateY(0.6rem); }
to { opacity: 1; transform: translateY(0); } to { opacity: 1; transform: translateY(0); }
} }
.motion-section { .motion-section {
animation: section-reveal both cubic-bezier(0.22, 1, 0.36, 1); animation: section-reveal both cubic-bezier(0.22, 1, 0.36, 1);
animation-timeline: view(); animation-timeline: view();
animation-range: entry 8% cover 22%; /* Finish early so section padding never reads as an empty page */
animation-range: entry 0% cover 12%;
} }
} }
} }
-1
View File
@@ -21,7 +21,6 @@ export default async function ProfessionalLayout({
searchLabel={t("nav.search")} searchLabel={t("nav.search")}
brandTitle={siteShortName} brandTitle={siteShortName}
brandSubtitle={t("nav.brandSubtitle")} brandSubtitle={t("nav.brandSubtitle")}
brandHref="/professional"
academicsLabel={t("nav.academics")} academicsLabel={t("nav.academics")}
programSelectorTitle={t("home.programSelectorTitle")} programSelectorTitle={t("home.programSelectorTitle")}
executiveLabel={t("home.executiveLabel")} executiveLabel={t("home.executiveLabel")}
+30 -17
View File
@@ -98,33 +98,46 @@ export function HomeIdeas({
</div> </div>
</Container> </Container>
</Section> </Section>
<Section className="overflow-hidden py-0"> <section className="overflow-hidden bg-chart-3 text-background">
<Container className="grid max-w-none min-w-0 px-0 lg:grid-cols-2"> <div className="grid min-w-0 lg:grid-cols-2">
<div className="relative min-h-64 sm:min-h-80 lg:min-h-[32rem]"> <div className="relative z-[1] order-2 flex min-w-0 flex-col justify-center gap-4 px-5 py-8 sm:gap-5 sm:px-10 sm:py-10 lg:order-1 lg:min-h-[22rem] lg:px-14 lg:py-12">
<Image src="/brand/campus-collaboration-v1.png" alt="همکاری مدرسان و متخصصان در محیط دانشگاه" fill className="object-cover" sizes="(max-width:1024px) 100vw, 50vw" /> <p className="text-xs font-bold text-background/55">
</div> یادگیری در بستر مسئله‌های واقعی
<div className="relative flex min-w-0 items-center overflow-hidden bg-chart-3 px-5 py-12 text-background sm:px-12 sm:py-14 lg:px-16"> </p>
<MetamorphField tone="dark" density="sparse" className="opacity-20" /> <Heading
<div className="relative z-[2] w-full min-w-0 max-w-xl"> level={2}
<p className="text-xs font-bold text-background/55">یادگیری در بستر مسئله‌های واقعی</p> className="text-2xl leading-snug break-words text-background sm:text-3xl lg:text-[2.125rem] lg:leading-snug"
<Heading level={2} className="mt-3 text-3xl leading-tight break-words text-background sm:text-4xl">جایی برای پیوند دانش دانشگاهی و تجربه‌ی صنعت</Heading> >
<p className="mt-5 text-base leading-8 text-background/65">دوره‌ها با مشارکت مدرسان دانشگاه، مدیران و متخصصان طراحی می‌شوند تا آموخته‌ها از کلاس به تصمیم و اجرا برسند.</p> جایی برای پیوند دانش دانشگاهی و تجربه‌ی صنعت
</Heading>
<p className="max-w-xl text-sm leading-7 text-background/70 sm:text-base sm:leading-8">
دوره‌ها با مشارکت مدرسان دانشگاه، مدیران و متخصصان طراحی می‌شوند تا
آموخته‌ها از کلاس به تصمیم و اجرا برسند.
</p>
<Link <Link
href="/about" href="/about"
className={cn( className={cn(
buttonVariants({ variant: "outline" }), buttonVariants({ variant: "outline" }),
"mt-7 border-background/25 bg-transparent text-background hover:bg-background hover:text-foreground", "mt-1 w-fit border-background/30 bg-transparent text-background hover:bg-background hover:text-foreground",
)} )}
> >
آشنایی با رویکرد ما آشنایی با رویکرد ما
</Link> </Link>
</div> </div>
<div className="relative order-1 aspect-[16/10] min-h-0 lg:order-2 lg:aspect-auto lg:min-h-full lg:self-stretch">
<Image
src="/brand/campus-collaboration-v1.png"
alt="همکاری مدرسان و متخصصان در محیط دانشگاه"
fill
className="object-cover"
sizes="(max-width:1024px) 100vw, 50vw"
/>
</div> </div>
</Container> </div>
</Section> </section>
<Section tone="muted" className="py-20 sm:py-24"> <Section tone="muted" className="pt-12 pb-16 sm:pt-14 sm:pb-20">
<Container> <Container>
<div className="mb-10 flex min-w-0 items-end justify-between gap-4"> <div className="mb-8 flex min-w-0 flex-col gap-3 sm:mb-10 sm:flex-row sm:items-end sm:gap-6">
<div className="min-w-0"> <div className="min-w-0">
<p className="text-xs font-bold text-primary">دانش برای عمل</p> <p className="text-xs font-bold text-primary">دانش برای عمل</p>
<Heading level={2} className="mt-2 text-3xl break-words sm:text-4xl"> <Heading level={2} className="mt-2 text-3xl break-words sm:text-4xl">
@@ -137,7 +150,7 @@ export function HomeIdeas({
href="/insights" href="/insights"
className={cn( className={cn(
buttonVariants({ variant: "ghost" }), buttonVariants({ variant: "ghost" }),
"hidden shrink-0 gap-2 text-primary sm:inline-flex", "w-fit shrink-0 gap-2 text-primary",
)} )}
> >
همه بینش‌ها <ArrowLeft className="size-4" /> همه بینش‌ها <ArrowLeft className="size-4" />
-1
View File
@@ -40,7 +40,6 @@ export const homeNav: NavItem[] = [
]; ];
export const professionalNav: NavItem[] = [ export const professionalNav: NavItem[] = [
{ label: "صفحه اصلی", href: "/" },
{ {
label: "فهرست دوره‌ها", label: "فهرست دوره‌ها",
href: "/professional#programs", href: "/professional#programs",
-1
View File
@@ -32,7 +32,6 @@ export const homeNav: NavItem[] = [
]; ];
export const professionalNav: NavItem[] = [ export const professionalNav: NavItem[] = [
{ label: "صفحه اصلی", href: "/" },
{ {
label: "فهرست دوره‌ها", label: "فهرست دوره‌ها",
href: "/professional#programs", href: "/professional#programs",