feat: Enhance metadata generation for About Us and Contact Us pages, implement legacy slug resolution for blog posts, and add city-specific intros
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
import { getStateInfo } from "@/lib/getStateInfo";
|
||||
import { buildAboutIntro } from "@/lib/staticPageIntro";
|
||||
import Head from "./Head";
|
||||
import Services from "./Services";
|
||||
|
||||
async function AboutUsPage() {
|
||||
const { matchedCity } = await getStateInfo();
|
||||
const { matchedCity, matchedState, isRoot } = await getStateInfo();
|
||||
const siteName = matchedCity?.site_name || "نوبت ۷۲۴";
|
||||
const slogan = matchedCity?.slogan;
|
||||
// این صفحه self-canonical است؛ بدون متن شهری، ۳۵ دامنه یک محتوا اعلام میکردند.
|
||||
// دامنهٔ ریشه شهر نیست، پس متن شهری نمیگیرد.
|
||||
const cityIntro = isRoot
|
||||
? ""
|
||||
: buildAboutIntro(matchedCity?.name, matchedState?.name, siteName, slogan);
|
||||
|
||||
return (
|
||||
<div
|
||||
@@ -15,6 +21,7 @@ async function AboutUsPage() {
|
||||
<div
|
||||
className=" text-[#525252] text-[16px] font-normal mt-[32px] leading-[28px] md:leading-[32px] lg:leading-[40px] px-[16px] sm:px-[52px] md:px-[15%] text-justify md:text-center flex flex-col gap-[16px] "
|
||||
>
|
||||
{cityIntro && <p>{cityIntro}</p>}
|
||||
<p>
|
||||
{siteName} یک سامانهی آنلاین نوبتدهی پزشکی است که با هدف سادهتر کردن
|
||||
دسترسی مردم به خدمات سلامت طراحی شده است. ما تلاش میکنیم تجربهی رزرو
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Links from "./Links";
|
||||
|
||||
function Call({ matchedCity, isDefault }) {
|
||||
function Call({ matchedCity, isDefault, cityIntro }) {
|
||||
return (
|
||||
<div
|
||||
className={`lg:min-w-[calc(50%_+_70px)] bg-banner-about !bg-center !bg-no-repeat !bg-cover h-fit pt-[16px] sm:pt-[29px] md:pt-[42px] lg:pt-[55px] bg-contact rounded-[8px] pb-[30px] sm:pb-[42px] md:pb-[55px] overflow-hidden lg:pb-[171px] px-[16px] sm:px-[27px] md:px-[39px] lg:px-[48px] ${isDefault ? "lg:pl-[18%]" : "w-full"}`}
|
||||
@@ -9,6 +9,11 @@ function Call({ matchedCity, isDefault }) {
|
||||
<h2 className="text-[#FAFAFA] leading-[26px] text-[14px] md:text-[16px] font-normal mt-6">
|
||||
{matchedCity?.footer_description || "برای ارتباط با ما از راه های زیر استفاده کنید"}
|
||||
</h2>
|
||||
{cityIntro && (
|
||||
<p className="text-[#E5E5F5] leading-[26px] text-[13px] md:text-[15px] font-normal mt-4">
|
||||
{cityIntro}
|
||||
</p>
|
||||
)}
|
||||
<Links matchedCity={matchedCity} />
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -1,13 +1,24 @@
|
||||
import { getStateInfo } from "@/lib/getStateInfo";
|
||||
import { buildContactIntro } from "@/lib/staticPageIntro";
|
||||
import Call from "./call/Call";
|
||||
import Connect from "./Connect";
|
||||
|
||||
async function ContactUsPage() {
|
||||
const { matchedCity, isRoot } = await getStateInfo();
|
||||
const { matchedCity, matchedState, isRoot } = await getStateInfo();
|
||||
// مثل «درباره ما»: این صفحه هم self-canonical شد و بدون متن شهری، تلفن و ایمیل
|
||||
// یکسانِ ۳۵ دامنه دوباره duplicate میساخت.
|
||||
const cityIntro = isRoot
|
||||
? ""
|
||||
: buildContactIntro(
|
||||
matchedCity?.name,
|
||||
matchedState?.name,
|
||||
matchedCity?.site_name,
|
||||
matchedCity?.slogan
|
||||
);
|
||||
|
||||
return (
|
||||
<div className="w-full pt-[24px] sm:pt-[56px] md:pt-[88px] lg:pt-[120px] mt-[56px] padding-responsive flex flex-col lg:flex-row items-center justify-between h-fit">
|
||||
<Call matchedCity={matchedCity} isDefault={isRoot} />
|
||||
<Call matchedCity={matchedCity} isDefault={isRoot} cityIntro={cityIntro} />
|
||||
{isRoot && <Connect />}
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user