feat: 208 interactive phone number and email in the main section (#210)

This commit is contained in:
Marcin Woś 2023-03-13 20:26:11 +01:00 committed by GitHub
parent 14895d1ad5
commit 2d60b640f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 13 deletions

View file

@ -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

4
package-lock.json generated
View file

@ -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",

View file

@ -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",

View file

@ -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' },

View file

@ -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.',
}),

View file

@ -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;

View file

@ -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';
---
<div>
<Typography variant="label">{label}:</Typography>
{
url ? (
<Typography as="a" href={url} target="_blank" class="underline">
<Typography as="a" href={url} target={target} class="underline">
{parsedValue}
</Typography>
) : (