From dd4c77125dd750fe0043ddd6b2e0dd80c9efe8b2 Mon Sep 17 00:00:00 2001 From: Han Yeong-woo Date: Sun, 17 Sep 2023 08:26:42 +0900 Subject: [PATCH] feat: add about in index page --- .../components/icons/EnvelopeSimpleIcon.astro | 14 ++++ .../src/components/icons/GitHubIcon.astro | 19 +++++ .../icons/PencilSimpleLineIcon.astro | 14 ++++ apps/portfolio/src/components/icons/types.ts | 6 ++ .../src/components/pages/index/About.astro | 79 +++++++++++++++++++ apps/portfolio/src/pages/index.astro | 5 +- 6 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 apps/portfolio/src/components/icons/EnvelopeSimpleIcon.astro create mode 100644 apps/portfolio/src/components/icons/GitHubIcon.astro create mode 100644 apps/portfolio/src/components/icons/PencilSimpleLineIcon.astro create mode 100644 apps/portfolio/src/components/icons/types.ts create mode 100644 apps/portfolio/src/components/pages/index/About.astro diff --git a/apps/portfolio/src/components/icons/EnvelopeSimpleIcon.astro b/apps/portfolio/src/components/icons/EnvelopeSimpleIcon.astro new file mode 100644 index 0000000..49d2a04 --- /dev/null +++ b/apps/portfolio/src/components/icons/EnvelopeSimpleIcon.astro @@ -0,0 +1,14 @@ +--- +// From: https://github.com/phosphor-icons/core/blob/c67d7a849f450be1bfe64fd5820471e4019e5ff0/assets/regular/envelope-simple.svg + +import type { IconProps } from './types.js'; + +type Props = IconProps; +--- + + + + diff --git a/apps/portfolio/src/components/icons/GitHubIcon.astro b/apps/portfolio/src/components/icons/GitHubIcon.astro new file mode 100644 index 0000000..22d6701 --- /dev/null +++ b/apps/portfolio/src/components/icons/GitHubIcon.astro @@ -0,0 +1,19 @@ +--- +// From: https://github.com/devicons/devicon/blob/5615b6091fea770fdf7d6160d8d7056cf1130c03/icons/github/github-original.svg + +import type { IconProps } from './types.js'; + +type Props = IconProps; +--- + + + + + + + diff --git a/apps/portfolio/src/components/icons/PencilSimpleLineIcon.astro b/apps/portfolio/src/components/icons/PencilSimpleLineIcon.astro new file mode 100644 index 0000000..1bd0194 --- /dev/null +++ b/apps/portfolio/src/components/icons/PencilSimpleLineIcon.astro @@ -0,0 +1,14 @@ +--- +// From: https://github.com/phosphor-icons/core/blob/c67d7a849f450be1bfe64fd5820471e4019e5ff0/assets/regular/pencil-simple-line.svg + +import type { IconProps } from './types.js'; + +type Props = IconProps; +--- + + + + diff --git a/apps/portfolio/src/components/icons/types.ts b/apps/portfolio/src/components/icons/types.ts new file mode 100644 index 0000000..d8ca495 --- /dev/null +++ b/apps/portfolio/src/components/icons/types.ts @@ -0,0 +1,6 @@ +import type { HTMLAttributes } from 'astro/types'; + +export interface IconProps extends Omit, 'viewBox'> { + width: string | number; + height: string | number; +} diff --git a/apps/portfolio/src/components/pages/index/About.astro b/apps/portfolio/src/components/pages/index/About.astro new file mode 100644 index 0000000..797c862 --- /dev/null +++ b/apps/portfolio/src/components/pages/index/About.astro @@ -0,0 +1,79 @@ +--- +import EnvelopeSimpleIcon from '../../icons/EnvelopeSimpleIcon.astro'; +import GitHubIcon from '../../icons/GitHubIcon.astro'; +import PencilSimpleLineIcon from '../../icons/PencilSimpleLineIcon.astro'; + +import type { IconProps } from '../../icons/types.js'; + +interface Props { + class?: string | null; +} + +const { class: className } = Astro.props; + +interface Contact { + icon: (_props: IconProps) => any; + name: string; + href: string; +} + +const contacts: Contact[] = [ + { + icon: GitHubIcon, + name: 'GitHub', + href: 'https://github.com/nix6839', + }, + { + icon: EnvelopeSimpleIcon, + name: 'Email', + href: 'mailto:han@yeongwoo.dev', + }, + { + icon: PencilSimpleLineIcon, + name: 'Blog', + href: 'https://blog.yeongwoo.dev', + }, +]; +--- + +
+
+ + +

Han Yeong-woo

+

+ 프론트엔드 개발자로, 항상 최신 + 트렌드를 따라가기 위해 노력하고 있습니다. +

+
+
+ { + contacts.map(({ icon: Icon, name, href }) => ( + + + )) + } +
+
diff --git a/apps/portfolio/src/pages/index.astro b/apps/portfolio/src/pages/index.astro index 8eceb9e..4e1a151 100644 --- a/apps/portfolio/src/pages/index.astro +++ b/apps/portfolio/src/pages/index.astro @@ -1,9 +1,12 @@ --- +import About from '../components/pages/index/About.astro'; import BaseLayout from '../layouts/BaseLayout.astro'; const title = '포트폴리오'; --- -

{title}

+
+ +