From 0493d323ae88f62a47eb76b7ca36de5525e24e91 Mon Sep 17 00:00:00 2001 From: Hyesung Oh Date: Tue, 19 Apr 2022 00:43:51 +0900 Subject: [PATCH 1/2] feat: display email and blog url at resume kbar --- apps/resume/src/constants/KbarActions/KbarActions.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apps/resume/src/constants/KbarActions/KbarActions.ts b/apps/resume/src/constants/KbarActions/KbarActions.ts index b28e6dce..197eac10 100644 --- a/apps/resume/src/constants/KbarActions/KbarActions.ts +++ b/apps/resume/src/constants/KbarActions/KbarActions.ts @@ -18,6 +18,7 @@ function generateKbarAction() { pushLeftWhenValid(blogUrl, { id: 'blog', name: 'Blog', + subtitle: blogUrl, section: 'Social', shortcut: [], keywords: 'blog, article, post', @@ -28,6 +29,7 @@ function generateKbarAction() { pushLeftWhenValid(email, { id: 'email', name: 'Email', + subtitle: email, section: 'Social', shortcut: [], keywords: 'contact, email, mail', From 8d5c430918641c59f2010d0e98cf46abc1e59dea Mon Sep 17 00:00:00 2001 From: Hyesung Oh Date: Tue, 19 Apr 2022 00:49:39 +0900 Subject: [PATCH 2/2] feat: apply resume link at blog kbar --- apps/blog/_config/index.json | 3 ++- apps/blog/_config/index.ts | 1 + apps/blog/src/constants/KbarActions/index.ts | 20 +++++++++++++++++++- packages/core/components/Icon/svg/Info.tsx | 11 +++++++++++ packages/core/components/Icon/svg/index.tsx | 2 ++ 5 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 packages/core/components/Icon/svg/Info.tsx diff --git a/apps/blog/_config/index.json b/apps/blog/_config/index.json index 013214bd..742f4c80 100644 --- a/apps/blog/_config/index.json +++ b/apps/blog/_config/index.json @@ -2,5 +2,6 @@ "blogName": "Cometin'", "blogDescription": "I like to share my knowledge.", "blogRepo": "hyesungoh/comet-land", - "blogUrl": "https://comet-land-blog.vercel.app" + "blogUrl": "https://comet-land-blog.vercel.app", + "resumeUrl": "https://comet-land-resume.vercel.app" } diff --git a/apps/blog/_config/index.ts b/apps/blog/_config/index.ts index f116c573..fd0caf83 100644 --- a/apps/blog/_config/index.ts +++ b/apps/blog/_config/index.ts @@ -4,3 +4,4 @@ export const blogName = jsonData.blogName; export const blogDescription = jsonData.blogDescription; export const blogRepo = jsonData.blogRepo; export const blogUrl = jsonData.blogUrl; +export const resumeUrl = jsonData.resumeUrl; diff --git a/apps/blog/src/constants/KbarActions/index.ts b/apps/blog/src/constants/KbarActions/index.ts index d837a448..7605f345 100644 --- a/apps/blog/src/constants/KbarActions/index.ts +++ b/apps/blog/src/constants/KbarActions/index.ts @@ -2,6 +2,7 @@ import { NextRouter } from 'next/router'; import { IconActionType, socialActions } from 'core/constants'; import { openExternalLink } from 'core/utils'; +import { resumeUrl } from '../../../_config'; import categoryActions from './categories'; import postActions from './posts'; @@ -35,7 +36,24 @@ function generateKbarAction(router: NextRouter) { perform: () => openExternalLink('/rss.xml'), }; - const kbarActions: IconActionType[] = [...routePostActions, ...routeCategoryActions, rssFeedAction, ...socialActions]; + const resumeAction = { + id: 'resume', + name: 'Resume', + subtitle: resumeUrl, + section: 'Social', + shortcut: [], + keywords: 'contact, hire, job', + icon: 'Info', + perform: () => openExternalLink(resumeUrl), + }; + + const kbarActions: IconActionType[] = [ + ...routePostActions, + ...routeCategoryActions, + rssFeedAction, + ...socialActions, + resumeAction, + ]; return kbarActions; } diff --git a/packages/core/components/Icon/svg/Info.tsx b/packages/core/components/Icon/svg/Info.tsx new file mode 100644 index 00000000..dd2b600c --- /dev/null +++ b/packages/core/components/Icon/svg/Info.tsx @@ -0,0 +1,11 @@ +import React from 'react'; + +import { IconProps } from '../type'; + +export function Info({ width = '24px', ...props }: IconProps) { + return ( + + + + ); +} diff --git a/packages/core/components/Icon/svg/index.tsx b/packages/core/components/Icon/svg/index.tsx index 282553c7..e53aceb5 100644 --- a/packages/core/components/Icon/svg/index.tsx +++ b/packages/core/components/Icon/svg/index.tsx @@ -4,6 +4,7 @@ import { Email } from './Email'; import { Facebook } from './Facebook'; import { Github } from './Github'; import { GithubLine } from './GithubLine'; +import { Info } from './Info'; import { Instagram } from './Instagram'; import { Link } from './Link'; import { Linkedin } from './Linkedin'; @@ -19,6 +20,7 @@ export const svg = { Facebook, Github, GithubLine, + Info, Instagram, Link, Linkedin,