diff --git a/components/atoms/AnimatedText/AnimatedCharacters.tsx b/components/atoms/AnimatedText/AnimatedCharacters.tsx index 2da2c14..37d8c32 100644 --- a/components/atoms/AnimatedText/AnimatedCharacters.tsx +++ b/components/atoms/AnimatedText/AnimatedCharacters.tsx @@ -52,14 +52,6 @@ const AnimatedCharacters = ({ words.push(item.split(" ")); } - // Add a space ("\u00A0") to the end of each word - words.map((word: any) => { - return word.push("\u00A0"); - }); - - // Get the tag name from tagMap - // const Tag = React.createElement("h1"); - return ( {words.map((word: string, index: number) => { @@ -71,6 +63,7 @@ const AnimatedCharacters = ({ style={{ overflow: "hidden", display: "inline-block", + marginInlineEnd: "0.25em", }} key={index} > diff --git a/hooks/useGlobalization.ts b/hooks/useGlobalization.ts index a982c7c..51e4f76 100644 --- a/hooks/useGlobalization.ts +++ b/hooks/useGlobalization.ts @@ -28,7 +28,15 @@ function getter(...args: string[] | Object[]) { return current; } -const useGlobalization = () => { +export interface Globalization { + locale: string | undefined; + direction: Direction; + getLocalizedString: (...a: string[]) => string; + translate: (key: string, fallback: string) => any; + isArabic: boolean; +} + +const useGlobalization = (): Globalization => { const { locale } = useRouter(); const direction: Direction = locale === "ar" ? "rtl" : "ltr"; const isArabic = locale === "ar"; diff --git a/pages/about.tsx b/pages/about.tsx index ccefbea..b3077f4 100644 --- a/pages/about.tsx +++ b/pages/about.tsx @@ -1,6 +1,6 @@ import fs from "fs"; import grayMatter from "gray-matter"; -import useGlobalization from "hooks/useGlobalization"; +import useGlobalization, { Globalization } from "hooks/useGlobalization"; import Head from "next/head"; import Image from "next/image"; import { NextPage } from "next/types"; @@ -27,8 +27,62 @@ const RainbowText = styled.a` interface Props { projects: Project[]; } + +const jobs = (globalization: Globalization) => { + const { translate, locale } = globalization; + const dateLocale = locale === "ar" ? "ar-EG" : locale; + const options: Intl.DateTimeFormatOptions = { + month: "short", + year: "numeric", + }; + return [ + { + date: `${new Date("01-01-2023").toLocaleDateString( + dateLocale, + options + )} - ${translate("about.experience.present", "Present")}`, + title: translate( + "about.experience.seniorSoftwareEngineer", + "Senior Software Engineer" + ), + location: translate( + "about.experience.amsterdam", + "Amsterdam, Netherlands" + ), + company: "Rodeo Software", + role: translate("about.experience.fullTime", "Full-time"), + }, + { + date: `${new Date("11-01-2017").toLocaleDateString( + dateLocale, + options + )} - ${new Date("12-31-2022").toLocaleDateString(dateLocale, options)}`, + title: translate( + "about.experience.seniorFrontendEngineer", + "Senior Front-end Engineer" + ), + location: translate("about.experience.amman", "Amman, Jordan"), + company: "Cura Healthcare", + role: translate("about.experience.fullTime", "Full-time"), + }, + { + date: `${new Date("06-01-2015").toLocaleDateString( + dateLocale, + options + )} - ${new Date("11-01-2017").toLocaleDateString(dateLocale, options)}`, + title: translate( + "about.experience.frontendEngineer", + "Front-end Engineer" + ), + location: translate("about.experience.amman", "Amman, Jordan"), + company: "Plexable", + role: translate("about.experience.fullTime", "Full-time"), + }, + ]; +}; const About: NextPage = ({ projects }: Props) => { - const { getLocalizedString, translate, locale } = useGlobalization(); + const globalization = useGlobalization(); + const { getLocalizedString, translate, locale } = globalization; const dateLocale = locale === "ar" ? "ar-EG" : locale; const options: Intl.DateTimeFormatOptions = { month: "short", @@ -38,7 +92,7 @@ const About: NextPage = ({ projects }: Props) => { window.localStorage.setItem("color-theme", "light"); return ( -
+
@@ -78,51 +132,64 @@ const About: NextPage = ({ projects }: Props) => {
-
-
-
-
-
+
+
+
+
+
-
-
+
+
+ Portrait of Mohammed Rabay'a +
+
-
+
- + font-weight: bolder - + margin-left: -10% - + padding-top: 2em - +
= ({ projects }: Props) => {
-
+
= ({ projects }: Props) => { blurDataURL='"https://en.gravatar.com/userimage/201100235/0e21cbd55417f43fa3f5e687fa8b1fb2.png?size=1"' width={400} height={990} - className="overflow-hidden -mt-10 w-[292px]" + className="overflow-hidden mb-0 w-[292px] max-md:w-[200px] inline-block" />
-
+
{translate( "about.about1", "A software engineer with over 9+ years of experience, I am currently based in Amsterdam." )}
-
+
{translate( "about.about2", "I help companies build intuitive softwares and products using state-of-the-art technologies ensuring best practices are applied for smooth user experience and development process." )}
-
+
{translate("about.connect", "Let's connect...")} {translate("footer.downloadResume", "Download Resume")} @@ -181,73 +248,31 @@ const About: NextPage = ({ projects }: Props) => {
-
-

+
+

{translate("about.experience.title", "Experience")}

-
-

- {new Date("01-01-2023").toLocaleDateString(dateLocale, options)} -{" "} - {translate("about.experience.present", "Present")} -

-
-

- {translate( - "about.experience.seniorSoftwareEngineer", - "Senior Software Engineer" - )} -

-
- Rodeo Software .{" "} - {translate("about.experience.fullTime", "Full-time")} -
-
-
- {translate("about.experience.amsterdam", "Amsterdam, Netherlands")} -
-
-
-

-
- {new Date("11-01-2017").toLocaleDateString(dateLocale, options)} -{" "} - {new Date("12-31-2022").toLocaleDateString(dateLocale, options)} -

-
-

- {translate( - "about.experience.seniorFrontendEngineer", - "Senior Front-end Engineer" - )} -

-
- Cura Healthcare .{" "} - {translate("about.experience.fullTime", "Full-time")} -
-
-
- {translate("about.experience.amman", "Amman, Jordan")} -
-
-
-

- {new Date("06-01-2015").toLocaleDateString(dateLocale, options)} -{" "} - {new Date("11-01-2017").toLocaleDateString(dateLocale, options)} -

-
-

- {translate( - "about.experience.frontendEngineer", - "Front-end Engineer" - )} + {jobs(globalization).map((item, index) => ( +
+

+ {item.date}

-
- Plexable . {translate("about.experience.fullTime", "Full-time")} +
+

+ {item.title} +

+
+ {item.company} . {item.role} +
+
+ {item.location} +
+
+
+ {item.location}
-

- {translate("about.experience.amman", "Amman, Jordan")} -
-
+ ))}
); diff --git a/pages/index.tsx b/pages/index.tsx index 73e4f9d..c090995 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -40,7 +40,10 @@ const Home: NextPage = ({ projects }: Props) => { vertical="25%" > {index === 0 && ( - + {getLocalizedString("home", "featured")} )}