From 2d60b640f165bd600009475c5e49a2f5090cf804 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=9B?= <41524451+CaptainObjective@users.noreply.github.com> Date: Mon, 13 Mar 2023 20:26:11 +0100 Subject: [PATCH] feat: 208 interactive phone number and email in the main section (#210) --- CHANGELOG.md | 6 +++--- package-lock.json | 4 ++-- package.json | 2 +- src/data/sections/main-section.data.ts | 6 +++--- src/data/sections/skills-section.data.ts | 4 ++-- src/types/shared.ts | 2 +- src/web/components/labelled-value.astro | 5 ++++- 7 files changed, 16 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cafd913..5ac76ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,11 @@ All notable changes to this project will be documented in this file. -## [0.0.7] - 2023-03-13 +## [0.1.0] - 2023-03-13 -### Dependencies +### Features -- chore(deps): update dependencies ([details](https://api.github.com/repos/KonradSzwarc/devscard/pulls/211)) +- feat: improved target attribute in labelled values ([details](https://github.com/KonradSzwarc/devscard/pull/210)) ## [0.0.6] - 2023-03-06 diff --git a/package-lock.json b/package-lock.json index 530a1c7..1d7fab1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "devscard", - "version": "0.0.7", + "version": "0.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "devscard", - "version": "0.0.7", + "version": "0.1.0", "hasInstallScript": true, "dependencies": { "@floating-ui/dom": "1.2.4", diff --git a/package.json b/package.json index 9126b4d..32e9ce1 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "devscard", "description": "Template for creating a comprehensive virtual CV for developers.", - "version": "0.0.7", + "version": "0.1.0", "private": true, "engines": { "node": ">=14", diff --git a/src/data/sections/main-section.data.ts b/src/data/sections/main-section.data.ts index 2cd3e54..d1380ce 100644 --- a/src/data/sections/main-section.data.ts +++ b/src/data/sections/main-section.data.ts @@ -13,13 +13,13 @@ const mainSectionData = { fullName: 'Mark Freeman', role: 'Senior React Developer', details: [ - { label: 'Phone', value: '+48 604 343 212' }, - { label: 'Email', value: 'mark.freeman.dev@gmail.com' }, + { label: 'Phone', value: '605 475 6961', url: 'tel:605 475 6961' }, + { label: 'Email', value: 'mark.freeman.dev@gmail.com', url: 'mailto:mark.freeman.dev@gmail.com' }, { label: 'From', value: 'Warsaw, Poland' }, { label: 'Salary range', value: '18 000 - 25 000 PLN' }, ], pdfDetails: [ - { label: 'Phone', value: '+48 604 343 212' }, + { label: 'Phone', value: '605 475 6961' }, { label: 'Email', value: 'mark.freeman.dev@gmail.com' }, { label: 'LinkedIn', value: '/in/mark-freeman', url: 'https://linkedin.com' }, { label: 'GitHub', value: '/mark-freeman', url: 'https://github.com' }, diff --git a/src/data/sections/skills-section.data.ts b/src/data/sections/skills-section.data.ts index 52289b4..d2da296 100644 --- a/src/data/sections/skills-section.data.ts +++ b/src/data/sections/skills-section.data.ts @@ -44,7 +44,7 @@ const skillsSectionData = { description: 'Nulla interdum pellentesque ultricies. Ut id eros commodo, ultrices ligula eu, elementum ante.', }), chakraUi({ level: 5 }), - tailwindCss({ level: 2 }), + tailwindCss({ level: 3 }), prettier({ level: 5 }), eslint({ level: 4, @@ -52,7 +52,7 @@ const skillsSectionData = { 'Nulla tempor turpis at vehicula pharetra. Vestibulum tellus tortor, commodo et suscipit id, lobortis id nunc.', }), nestJs({ - level: 2, + level: 3, description: 'Praesent feugiat ultricies iaculis. In posuere vehicula odio, sed consequat velit porta viverra.', }), diff --git a/src/types/shared.ts b/src/types/shared.ts index f270111..e66eff4 100644 --- a/src/types/shared.ts +++ b/src/types/shared.ts @@ -66,7 +66,7 @@ export interface LabelledValue { value: string | string[]; /** - * URL that will be opened in a new tab, when the value is clicked. + * URL that will be opened, when the value is clicked. */ url?: string; diff --git a/src/web/components/labelled-value.astro b/src/web/components/labelled-value.astro index cc18513..7abb31e 100644 --- a/src/web/components/labelled-value.astro +++ b/src/web/components/labelled-value.astro @@ -7,13 +7,16 @@ export interface Props extends LabelledValue {} const { label, value, url } = Astro.props; const parsedValue = Array.isArray(value) ? value.join(', ') : value; + +const isHttpLink = url?.startsWith('http'); +const target = isHttpLink ? '_blank' : '_self'; ---
{label}: { url ? ( - + {parsedValue} ) : (