generated from theodorusclarence/ts-nextjs-tailwind-starter
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
93 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
'use client'; | ||
|
||
import Image from 'next/image'; | ||
import * as React from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
interface SectionHeadingProps { | ||
titlePrefix: string; | ||
} | ||
|
||
const SectionHeading = ({ titlePrefix }: SectionHeadingProps) => { | ||
const { t } = useTranslation(); | ||
|
||
const titleIconDimension = 36; | ||
|
||
return ( | ||
<div className='m-2 flex flex-col items-center'> | ||
<Image | ||
className='h-auto' | ||
src={t(`${titlePrefix}.icon`)} | ||
alt={t(`${titlePrefix}.title`)} | ||
width={titleIconDimension} | ||
height={titleIconDimension} | ||
/> | ||
|
||
<h2 className='-mt-0.5 underline decoration-1 underline-offset-4 md:decoration-2'> | ||
{t(`${titlePrefix}.title`)} | ||
</h2> | ||
</div> | ||
); | ||
}; | ||
|
||
export default SectionHeading; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'use client'; | ||
|
||
import * as React from 'react'; | ||
import ReactMarkdown from 'react-markdown'; | ||
|
||
import SectionHeading from '@/components/atoms/SectionHeading'; | ||
|
||
import { SoftwareDevIntro } from '@/types/ShortText'; | ||
|
||
interface IntroProps { | ||
intro: SoftwareDevIntro; | ||
} | ||
|
||
const Intro = ({ intro }: IntroProps) => { | ||
const noOfYears = (new Date().getFullYear() - 2015).toString(); | ||
|
||
return ( | ||
<div> | ||
<SectionHeading titlePrefix='aboutWork.softwareDevelopment' /> | ||
|
||
<div className='mb-5'> | ||
<ReactMarkdown>{intro.content.replace('8', noOfYears)}</ReactMarkdown> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Intro; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters