website homePage cleaning the code

This commit is contained in:
parsa aghaei 2024-10-20 17:34:37 +03:30
parent acfcea1cb7
commit 71734d6f0c
6 changed files with 85 additions and 57 deletions

View File

@ -1,27 +1,34 @@
import Image from "next/image";
import Testimonials from "./components/testimonials/testimonials";
import Contact from "./components/contact/contact";
import AboutMe from "./components/about-me/aboutMe";
import Services from "./components/services/services";
import MyProjects from "./components/projects/projects";
import Testimonials from "../components/testimonials/testimonials";
import Contact from "../components/contact/contact";
import AboutMe from "../components/aboutMe/aboutMe";
import Services from "../components/services/services";
import MyProjects from "../components/projects/projects";
import { getDictionary } from "@/app/lib/functions/dictionaries";
import { getDefaultLocale } from "@/app/lib/functions/utils";
import { Metadata } from "next";
const description =
"Hi, I am Parsa Aghayi, a Frontend & Backend Developer. Here's my personal website to know more about me and contact me if you want! ;)";
export const metadata: Metadata = {
title: "parsa aghayi's personal website",
description:
"Hi, I am parsa aghayi. Frontend & Backend Developer and here is my personal website to know me and contact me if you want! ;)",
title: "Parsa Aghayi's Personal Website",
description,
openGraph: {
title: "parsa aghayi's personal website",
description:
"Hi, I am parsa aghayi. Frontend & Backend Developer and here is my personal website to know me and contact me if you want! ;)",
title: "Parsa Aghayi's Personal Website",
description,
images: [`${process.env.NEXT_PUBLIC_FRONT_URL}/images/profile.png`],
},
};
export default async function Home() {
const dict = await getDictionary(getDefaultLocale());
const socialLinks = [
{ href: "#", src: "/images/icons/facebook.svg", alt: "facebook" },
{ href: "#", src: "/images/icons/twitter.svg", alt: "twitter" },
{ href: "#", src: "/images/icons/instagram.svg", alt: "instagram" },
{ href: "#", src: "/images/icons/linkedin.svg", alt: "linkedin" },
];
return (
<div className="my-15 flex w-full max-w-[1420px] flex-col items-center gap-[50px]">
{/* Home */}
@ -32,58 +39,35 @@ export default async function Home() {
{/* start */}
<div className="flex w-full max-w-[500px] flex-wrap justify-center lg:w-[45%] xl:w-[50%]">
<div className="aboutme-image">
<img
src={"/images/profile.png"}
alt="profile picture"
<Image
src="/images/profile.png"
alt="Profile picture"
width={500} // specify dimensions for next/image optimization
height={500}
className="w-full"
/>
</div>
{/* socials */}
<div className="mt-10 flex w-full justify-center">
<div className="flex items-center gap-[25px]">
<a href="#">
<Image
src={"/images/icons/facebook.svg"}
width={32}
height={32}
alt="facebook"
className="svg-hover hover:cursor-pointer"
/>
</a>
<a href="#">
<Image
src={"/images/icons/twitter.svg"}
width={32}
height={32}
alt="twitter"
className="svg-hover hover:cursor-pointer"
/>
</a>
<a href="#">
<Image
src={"/images/icons/instagram.svg"}
width={32}
height={32}
alt="instagram"
className="svg-hover hover:cursor-pointer"
/>
</a>
<a href="#">
<Image
src={"/images/icons/linkedin.svg"}
width={32}
height={32}
alt="linkedin"
className="svg-hover hover:cursor-pointer"
/>
</a>
{socialLinks.map(({ href, src, alt }) => (
<a key={alt} href={href} rel="noopener noreferrer">
<Image
src={src}
width={32}
height={32}
alt={alt}
className="svg-hover hover:cursor-pointer"
/>
</a>
))}
</div>
</div>
</div>
{/* end */}
<div className="items flex w-full max-w-[90%] flex-col md:max-w-[70%] lg:w-[45%] xl:w-[50%]">
<p className="text-[20px] font-[400] text-black 2xl:text-[24px]">
{dict.homePage.top.greating}
{dict.homePage.top.greeting}
</p>
<p className="text-[30px] font-[600] capitalize text-[#FD6F00] 2xl:text-[32px]">
{dict.homePage.top.name}
@ -97,9 +81,9 @@ export default async function Home() {
<p className="my-[40px] text-justify text-[21px] font-[400] text-black lg:pe-0">
{dict.homePage.top.descriptionAboutMe}
</p>
<button className="flex h-[52px] w-[188px] items-center whitespace-nowrap rounded-md bg-[#FD6F00] p-[18px] px-[52px] text-[21px] font-[400] text-[#fff]">
{/* <button type="button" className="flex h-[52px] w-[188px] items-center whitespace-nowrap rounded-md bg-[#FD6F00] p-[18px] px-[52px] text-[21px] font-[400] text-[#fff]">
Hire Me
</button>
</button> */}
</div>
</div>

View File

@ -50,7 +50,51 @@ export default function MobileMenu({ clicked, setClicked, dict }: propsType) {
>
{dict.header.Home}
</a>
{/* سایر لینک‌ها به همین شکل */}
<a
href="/#about-me"
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"
onClick={() => {
setClicked(false);
}}
>
{dict.header.AboutMe}
</a>
<a
href="/#services"
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"
onClick={() => {
setClicked(false);
}}
>
{dict.header.Services}
</a>
<a
href="/#projects"
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"
onClick={() => {
setClicked(false);
}}
>
{dict.header.Projects}
</a>
<a
href="/#testimonials"
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"
onClick={() => {
setClicked(false);
}}
>
{dict.header.Testimonials}
</a>
<a
href="/#contact"
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"
onClick={() => {
setClicked(false);
}}
>
{dict.header.Contact}
</a>
<Link
href="/blog"
className="block w-full whitespace-nowrap px-[14px] py-[10px] text-[21px] font-[400] hover:cursor-pointer hover:bg-slate-100"

View File

@ -1,7 +1,7 @@
{
"homePage": {
"top": {
"greating": "Hi I am",
"greeting": "Hi I am",
"name": "parsa aghayi",
"profession": "Frontend & Backend",
"roll": "Developer",

View File

@ -1,7 +1,7 @@
{
"homePage": {
"top": {
"greating": "سلام، من",
"greeting": "سلام، من",
"name": "پارسا آقایی هستم",
"profession": "توسعه‌دهنده",
"roll": "فرانت‌اند و بک‌اند",

View File

@ -121,7 +121,7 @@ export type LocaleCookieType = { name: string; value: string };
export type Dictionary = {
homePage: {
top: {
greating: string;
greeting: string;
name: string;
profession: string;
roll: string;