diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx index e200ba5..541bdbc 100644 --- a/src/app/about/page.tsx +++ b/src/app/about/page.tsx @@ -1,65 +1,63 @@ import type { Metadata } from "next"; import AboutUs from "@/views/AboutUs"; +import { getCmsPageContent, getCmsSiteContent } from "@/lib/content-cms"; import { siteUrl } from "@/lib/site"; -const title = "درباره ما | انجمن علمی کامپیوتر شرق گیلان"; -const description = - "آشنایی با تاریخچه، مأموریت‌ها و دستاوردهای انجمن علمی کامپیوتر شرق گیلان و راه‌های مشارکت دانشجویان در برنامه‌های انجمن."; +export const revalidate = 300; -export const metadata: Metadata = { - title, - description, - keywords: [ - "انجمن علمی کامپیوتر شرق گیلان", - "دانشگاه گیلان", - "انجمن علمی دانشجویی", - "رویدادهای فناوری", - ], - alternates: { canonical: "/about" }, - openGraph: { - title, +export async function generateMetadata(): Promise { + const [content, siteContent] = await Promise.all([ + getCmsPageContent("about"), + getCmsSiteContent(), + ]); + const title = content.seo.title || content.title || siteContent.official_name; + const description = content.seo.description || content.intro; + const image = content.seo.image?.url || siteContent.seo.image?.url || `${siteUrl}/favicon.ico`; + + return { + title: { absolute: title }, description, + alternates: { canonical: "/about" }, + openGraph: { + title, + description, + url: `${siteUrl}/about`, + siteName: siteContent.official_name, + type: "website", + images: [image], + locale: "fa_IR", + }, + twitter: { card: "summary_large_image", title, description, images: [image] }, + }; +} + +export default async function AboutPage() { + const [content, siteContent] = await Promise.all([ + getCmsPageContent("about"), + getCmsSiteContent(), + ]); + const structuredData = { + "@context": "https://schema.org", + "@type": "AboutPage", + name: content.seo.title || content.title, + description: content.seo.description || content.intro, url: `${siteUrl}/about`, - siteName: "انجمن علمی کامپیوتر شرق گیلان", - type: "website", - images: [`${siteUrl}/favicon.ico`], - locale: "fa_IR", - }, - twitter: { - card: "summary_large_image", - title, - description, - images: [`${siteUrl}/favicon.ico`], - }, -}; + mainEntity: { + "@type": "Organization", + name: siteContent.official_name, + url: siteUrl, + logo: siteContent.logo?.url || `${siteUrl}/favicon.ico`, + sameAs: [siteContent.contacts.instagram, siteContent.contacts.telegram].filter(Boolean), + }, + }; -const structuredData = { - "@context": "https://schema.org", - "@type": "AboutPage", - name: title, - description, - url: `${siteUrl}/about`, - mainEntity: { - "@type": "Organization", - name: "انجمن علمی کامپیوتر شرق گیلان", - url: siteUrl, - logo: `${siteUrl}/favicon.ico`, - sameAs: [ - "https://instagram.com/guilance.ir", - "https://t.me/guilance", - "https://t.me/guilancea", - ], - }, -}; - -export default function AboutPage() { return ( <> - -
- {/* Hero */} -
-
-

{ORG.title}

-

{ORG.subtitle}

+
+
+
+ {siteContent.faculty_subline ? ( +

+

+ ) : null} +

+ {content.title || content.identity_heading} +

+

+ {content.intro || content.identity_body} +

+
- {/* آمار کوتاه */} -
- - - - +
+
+ -
+
+
+ ); +} - {/* درباره ما */} -
-
-
- - -
-

- توانمندسازی دانشجویان با مهارت‌های موردنیاز صنعت، ایجاد شبکه‌های حرفه‌ای و فراهم‌کردن مسیرهای یادگیری - پروژه‌محور؛ از معرفی نقش‌ها و مسیرهای شغلی تا تمرین مهارت‌های نرم و فنی. -

-
-
+function PurposeSection({ content }: { content: AboutContentPage }) { + const cards = [ + { title: content.mission_heading, text: content.mission_body, Icon: Lightbulb, tone: "bg-primary text-primary-foreground" }, + { title: content.vision_heading, text: content.vision_body, Icon: Eye, tone: "bg-card text-card-foreground" }, + { title: content.values_heading, text: content.values_body, Icon: HeartHandshake, tone: "bg-accent text-accent-foreground" }, + ].filter((card) => card.title || card.text); - - -
    -
  • یادگیری پیوسته و اشتراک دانش
  • -
  • کیفیت، شفافیت و مسئولیت‌پذیری
  • -
  • فرصت برابر برای مشارکت
  • -
  • ارتباط مؤثر با صنعت و جامعه
  • -
-
-
+ if (!cards.length && !content.activities_body) return null; - {/* تماس سریع */} -
- - -
- {CONTACTS.map((c) => ( - - {c.label} - {c.value} - - ))} -
-
- - - -
-

روزهای شنبه تا چهارشنبه، ساعت ۱۰ تا ۱۸

-

پاسخ‌ها توسط تیم داوطلبان انجام می‌شود.

-
-
-
+ return ( +
+ {cards.length ? ( +
+ {cards.map(({ title, text, Icon, tone }, index) => ( +
+ + + {title ?

{title}

: null} + {text ?

{text}

: null} + {index === 0 ?
+ ))}
-
+ ) : null} - {/* انجمن‌ها */} -
-
-

انجمن‌ها

-

اطلاعات انجمن‌های زیرمجموعه/همکار

+ {content.activities_heading || content.activities_body ? ( +
+ + + + + + {content.activities_body ?

{content.activities_body}

: null} +
+ ) : null} +
+ ); +} -
- {ASSOCIATIONS.map((a) => ( - -
-
-
-

{a.name}

-

- {a.university}{a.city ? ` • ${a.city}` : ''}{' '} - {a.foundedYear && `• تأسیس: ${a.foundedYear}`} -

-
-
-

{a.about}

+function AudienceSection({ content }: { content: AboutContentPage }) { + if (!content.audiences.length) return null; - {a.focusAreas?.length ? ( -
- {a.focusAreas.map((f) => ( - - {f} - - ))} -
- ) : null} + return ( +
+
+

+ {content.audience_heading} +

+
+
+ {content.audiences.map((audience, index) => { + const Icon = audienceIcons[audience.icon] || UsersRound; + return ( +
+ + +
+

{audience.title}

+

{audience.text}

+
+
+ ); + })} +
+
+ ); +} -
- {a.links?.website && ( - وب‌سایت - )} - {a.links?.instagram && ( - اینستاگرام - )} - {a.links?.telegram && ( - تلگرام - )} - {a.links?.email && ( - ایمیل - )} -
-
-
+function AssociationHistory({ content }: { content: AboutContentPage }) { + if (!content.milestones.length) return null; + + return ( +
+
+

+ {content.history_heading} +

+
+
    +
+
+ ); +} + +function MemoriesGallery({ content }: { content: AboutContentPage }) { + if (!content.gallery_images.length) return null; + + return ( +
+
+ + {content.gallery_intro ?

{content.gallery_intro}

: null} +
+
+ {content.gallery_images.map((item, index) => ( +
+ {item.image ? ( + {item.image.alt} + ) : ( +
+ + +
+ )} + {item.caption ?
{item.caption}
: null} +
+ ))} +
+
+ ); +} + +function ClosingSection({ content }: { content: AboutContentPage }) { + const faqItems = content.items.filter((item) => item.kind === "faq"); + if (!faqItems.length && !content.cta_heading && !content.cta_body && !content.cta_action_label) return null; + + return ( +
+ {faqItems.length ? ( +
+

{content.faq_heading}

+
+ {faqItems.map((item) => ( +
+ + {item.title} + + +

{item.text}

+
))}
-
+ ) : null} - {/* کمیته‌ها */} -
-

کمیته‌ها و گروه‌های کاری

-
- {COMMITTEES.map((c) => ( - -
-

{c.title}

-

{c.desc}

-
-
- ))} +
+ {content.cta_action_label ? ( + content.cta_action_url ? ( + + {content.cta_action_label} + ) : ( + + {content.cta_action_label} + ) + ) : null} + +
+ ); +} - {/* پرسش‌های متداول */} -
-
-

پرسش‌های متداول

-
- - - -
-
-
- - {/* نقشه و آدرس اختیاری */} -
-

نشانی دانشکده

-
- -
-

آدرس: گیلان، رودسر، واجارگاه، دانشکده‌ی فنی و مهندسی شرق گیلان

-

کدپستی: ۴۴۹۱۸۹۸۵۶۶

-

تلفن: ۰۱۳-۴۲۶۸۸۴۴۷

-

برای هماهنگی حضوری از قبل پیام بدهید.

-
-
-
-