From 3ecfe89fb9814b61c99d449d2ef0536255a413b1 Mon Sep 17 00:00:00 2001 From: Han Yeong-woo Date: Sat, 16 Sep 2023 21:37:17 +0900 Subject: [PATCH] feat: add about in index page (#14) --- .../components/icons/EnvelopeSimpleIcon.astro | 14 ++++ .../src/components/icons/GitHubIcon.astro | 19 +++++ .../icons/PencilSimpleLineIcon.astro | 14 ++++ apps/portfolio/src/components/icons/type.ts | 6 ++ .../src/components/pages/index/About.astro | 77 +++++++++++++++++++ apps/portfolio/src/pages/index.astro | 5 +- 6 files changed, 134 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/type.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..050df4f --- /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 './type.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..01bdcb6 --- /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 './type.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..f2f0ef1 --- /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 './type.js'; + +type Props = IconProps; +--- + + + + diff --git a/apps/portfolio/src/components/icons/type.ts b/apps/portfolio/src/components/icons/type.ts new file mode 100644 index 0000000..d8ca495 --- /dev/null +++ b/apps/portfolio/src/components/icons/type.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..0e9ca95 --- /dev/null +++ b/apps/portfolio/src/components/pages/index/About.astro @@ -0,0 +1,77 @@ +--- +import EnvelopeSimpleIcon from '../../icons/EnvelopeSimpleIcon.astro'; +import GitHubIcon from '../../icons/GitHubIcon.astro'; +import PencilSimpleLineIcon from '../../icons/PencilSimpleLineIcon.astro'; + +import type { IconProps } from '../../icons/type'; + +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}

+
+ +