fix the issues
This commit is contained in:
@@ -29,7 +29,7 @@ export default async function SingleAcademyPage({ params }: { params: Promise<{
|
||||
const readingTime = calculateReadingTime(translation);
|
||||
|
||||
return (
|
||||
<div className={`min-h-screen bg-[#0B1120] text-white font-sans selection:bg-orange-500/30 ${isRtl ? "rtl" : "ltr"}`} dir={isRtl ? "rtl" : "ltr"}>
|
||||
<div className={`min-h-screen bg-[#0B1120] text-white selection:bg-orange-500/30 ${isRtl ? "rtl" : "ltr"}`} dir={isRtl ? "rtl" : "ltr"}>
|
||||
<div
|
||||
className="fixed inset-0 z-0 pointer-events-none opacity-20"
|
||||
style={{
|
||||
|
||||
@@ -11,7 +11,7 @@ export default async function AcademyPage({ params }: { params: Promise<{ locale
|
||||
.catch(() => []);
|
||||
|
||||
return (
|
||||
<div className="min-h-screen pt-8 font-sans bg-background text-foreground md:pt-16">
|
||||
<div className="min-h-screen pt-8 bg-background text-foreground md:pt-16">
|
||||
<div className="max-w-[1440px] mx-auto px-4 md:px-8">
|
||||
<AcademyClient data={data || []} />
|
||||
</div>
|
||||
|
||||
@@ -2,8 +2,6 @@ import Hero from "@/components/network/Hero";
|
||||
import Services from "@/components/network/Services";
|
||||
import Technologies from "@/components/network/Technologies";
|
||||
import Projects from "@/components/network/Projects";
|
||||
import Consultation from "@/components/network/Consultation";
|
||||
import ContactFooter from "@/components/network/ContactFooter";
|
||||
import { Portfolio } from "@/utilities/types/portfolio.type";
|
||||
import { BACKEND_URL_LOCAL } from "@/utilities/constants/urls.constant";
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ export default async function HomePage({ params }: { params: Promise<{ locale: s
|
||||
]);
|
||||
|
||||
return (
|
||||
<div className="min-h-screen bg-[#0B1120] text-white font-sans selection:bg-orange-500/30">
|
||||
<div className="min-h-screen bg-[#0B1120] text-white selection:bg-orange-500/30">
|
||||
<div className="fixed top-0 inset-x-0 h-[500px] bg-gradient-to-b from-orange-500/5 via-transparent to-transparent pointer-events-none -z-10"></div>
|
||||
|
||||
<main className="flex flex-col gap-24 pt-32 pb-12">
|
||||
|
||||
@@ -13,13 +13,53 @@ export default function Navbar() {
|
||||
const router = useRouter();
|
||||
|
||||
const languages = [
|
||||
{ code: "fa", flag: "🇮🇷", label: "فارسی" },
|
||||
{ code: "en", flag: "🇬🇧", label: "English" },
|
||||
{ code: "ar", flag: "🇸🇦", label: "العربية" },
|
||||
{
|
||||
code: "fa",
|
||||
label: "فارسی",
|
||||
icon: (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480" className="w-5 h-4 rounded-sm">
|
||||
<path fill="#239f40" d="M0 0h640v160H0z" />
|
||||
<path fill="#fff" d="M0 160h640v160H0z" />
|
||||
<path fill="#da0000" d="M0 320h640v160H0z" />
|
||||
<text x="320" y="265" fontSize="70" textAnchor="middle" fill="#da0000" fontFamily="sans-serif" fontWeight="bold">
|
||||
ﷲ
|
||||
</text>
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
{
|
||||
code: "en",
|
||||
label: "English",
|
||||
icon: (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480" className="w-5 h-4 rounded-sm">
|
||||
<path fill="#012169" d="M0 0h640v480H0z" />
|
||||
<path fill="#FFF" d="m75 0 244 181L562 0h78v62L400 241l240 178v61h-80L320 301 81 480H0v-60l239-178L0 64V0h75z" />
|
||||
<path
|
||||
fill="#C8102E"
|
||||
d="m424 281 216 159v40L369 281h55zm-184 20 6 35L22 480H0v-50l240-129zM640 0v3L391 191l2-44L590 0h50zM0 0l239 176h-60L0 42V0z"
|
||||
/>
|
||||
<path fill="#FFF" d="M241 0v480h160V0H241zM0 160v160h640V160H0z" />
|
||||
<path fill="#C8102E" d="M0 193v96h640v-96H0zM273 0v480h96V0h-96z" />
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
{
|
||||
code: "ar",
|
||||
label: "العربية",
|
||||
icon: (
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 480" className="w-5 h-4 rounded-sm">
|
||||
<path fill="#138808" d="M0 0h640v480H0z" />
|
||||
<path
|
||||
fill="#fff"
|
||||
d="M433.8 193c-11.8 11.2-30.8 14-43.5 6.7-10.7-5.8-15.6-18.4-11.7-29.6 4-11.4 17.5-18 29-14.4 9 2.7 15.6 10.7 17 20 1 6.5-2 13-6.6 17.8l-12.7-12.2c2.5-2.5 4.3-6.3 3-10-1.5-4-6-6-10-5-4.4 1-7.2 5.5-6.5 10 .8 4.7 5.5 8.2 10.2 8l10.4-10-10.3-10c-8 1.4-12.5 10-9.8 17.6 2.5 7.2 10.6 10.8 17.8 8.4 5.7-1.8 10-6.8 11.4-12.7.8-3.7.3-7.5-1.5-10.8-2.6-4.8-7.5-8-13-8.8-7.8-1-15.5 2.5-19.8 9-4.8 7.3-4.7 17.3.5 24.3 6.6 8.8 20 11.3 29.8 5.6 7-4 12-10.8 14-18.8z"
|
||||
/>
|
||||
<path fill="#fff" d="M120 330h400v15H120zM480 315l20 20-20 20v-40z" />
|
||||
</svg>
|
||||
),
|
||||
},
|
||||
];
|
||||
|
||||
const handleLanguageChange = (newLocale: string) => {
|
||||
// Replace the current locale in the URL path with the new one
|
||||
const newPath = pathname.replace(new RegExp(`^/${locale}`), `/${newLocale}`);
|
||||
router.replace(newPath);
|
||||
};
|
||||
@@ -65,12 +105,12 @@ export default function Navbar() {
|
||||
<button
|
||||
key={language.code}
|
||||
onClick={() => handleLanguageChange(language.code)}
|
||||
className={`border px-3 py-1.5 rounded-md text-sm transition ${
|
||||
className={`border px-3 py-1.5 rounded-md flex items-center justify-center transition ${
|
||||
locale === language.code ? "border-accent bg-accent/10" : "border-border hover:bg-card"
|
||||
}`}
|
||||
title={language.label}
|
||||
>
|
||||
{language.flag}
|
||||
{language.icon}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
@@ -123,11 +163,12 @@ export default function Navbar() {
|
||||
<button
|
||||
key={language.code}
|
||||
onClick={() => handleLanguageChange(language.code)}
|
||||
className={`border px-3 py-1.5 rounded-md text-sm transition flex-1 ${
|
||||
locale === language.code ? "border-accent bg-accent/10" : "border-border hover:bg-card"
|
||||
className={`border px-3 py-1.5 flex items-center justify-center gap-2 rounded-md text-sm transition flex-1 ${
|
||||
locale === language.code ? "border-accent bg-accent/10 text-foreground" : "border-border hover:bg-card text-muted"
|
||||
}`}
|
||||
>
|
||||
{language.flag} {language.label}
|
||||
{language.icon}
|
||||
{language.label}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@ export default function Hero() {
|
||||
|
||||
<p className="max-w-2xl px-4 mx-auto mb-8 text-sm sm:mb-12 sm:text-base text-muted">{t("description")}</p>
|
||||
|
||||
<div className="flex flex-col justify-center gap-6 px-4 py-4 mx-auto mb-8 border sm:flex-row sm:gap-12 sm:mb-12 bg-white/[0.02] sm:px-12 sm:py-6 rounded-xl border-border w-fit">
|
||||
<div className="flex justify-center gap-6 px-4 py-4 mx-auto mb-8 border sm:gap-12 sm:mb-12 bg-white/[0.02] sm:px-12 sm:py-6 rounded-xl border-border w-fit">
|
||||
<div className="text-center">
|
||||
<h3 className="mb-1 text-2xl font-bold sm:text-3xl text-accent" dir="ltr">
|
||||
{t("stats.deliveredProjects")}
|
||||
|
||||
@@ -5,6 +5,7 @@ export default createMiddleware({
|
||||
locales: ["fa", "en", "ar"],
|
||||
defaultLocale: "fa",
|
||||
localePrefix: "always",
|
||||
localeDetection: false,
|
||||
});
|
||||
|
||||
export const config = {
|
||||
|
||||
Reference in New Issue
Block a user