Skip to content

Commit

Permalink
feat: add company url (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
rqbazan authored Jan 12, 2022
1 parent ce1fb32 commit 2252239
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 127 deletions.
3 changes: 2 additions & 1 deletion src/app/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,14 @@ function AppDocument({ techProfile, techResume }: AppDocumentProps) {
key={workExperience.id}
title={workExperience.title}
companyName={workExperience.company}
companyUrl={workExperience.companyUrl}
location={workExperience.location}
startAt={workExperience.startAt}
endAt={workExperience.endAt}
description={workExperience.description}
>
{workExperience.lines
.split('\n')
?.split('\n')
.filter(Boolean)
.map((line, i) => (
<ListItem key={`${workExperience.id}-line-${i}`}>
Expand Down
10 changes: 6 additions & 4 deletions src/app/ui/heading/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface HeadingProps {
title: string
subtitle: string
information: {
phone: string
phone?: string
email: string
website: string
location: string
Expand Down Expand Up @@ -70,9 +70,11 @@ export function Heading({
{subtitle}
</Text>
<View style={styles.infoContainer}>
<Link src={`tel:${phone}`} style={styles.link}>
<IconText text={phone} iconName="call" />
</Link>
{phone ? (
<Link src={`tel:${phone}`} style={styles.link}>
<IconText text={phone} iconName="call" />
</Link>
) : null}
<Link src={`mailto:${email}`} style={styles.link}>
<IconText text={email} iconName="atSymbol" />
</Link>
Expand Down
38 changes: 29 additions & 9 deletions src/app/ui/work-post/index.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import * as React from 'react'
import { Text, Style, View, StyleSheet } from '~/react-pdf'
import { Text, Style, View, StyleSheet, Link } from '~/react-pdf'
import { useTheme } from '~/app/hooks'
import { IconText } from '../icon-text'
import { DateRange } from '../date-range'

export interface WorkPostProps {
style?: Style
endAt?: string
companyUrl?: string
startAt: string
title: string
companyName: string
Expand Down Expand Up @@ -45,20 +46,35 @@ const Title: React.FC<{ style?: Style }> = ({ children, style }) => {
return <Text style={[styles.title, style!]}>{children}</Text>
}

const WorkPlace: React.FC<{ style?: Style }> = ({ children, style }) => {
const WorkPlace: React.FC<{ style?: Style; url?: string }> = ({
children,
url,
style,
}) => {
const theme = useTheme()

return (
<Text style={[styles.workPlace, { color: theme.colors.primary }, style!]}>
{children}
</Text>
)
const commonStyle = [
styles.workPlace,
{ color: theme.colors.primary },
style!,
]

if (url) {
return (
<Link src={url}>
<Text style={commonStyle}>{children}</Text>
</Link>
)
}

return <Text style={commonStyle}>{children}</Text>
}

export const WorkPost = ({
style,
title,
companyName,
companyUrl,
location,
startAt,
endAt,
Expand All @@ -71,7 +87,9 @@ export const WorkPost = ({
<View style={style}>
<Title>{title}</Title>
<View style={styles.metaInfoContainer}>
{companyName && <WorkPlace>{companyName}</WorkPlace>}
{companyName ? (
<WorkPlace url={companyUrl}>{companyName}</WorkPlace>
) : null}
<DateRange
style={{ marginLeft: companyName ? 'auto' : 0, marginRight: 16 }}
startAt={startAt}
Expand All @@ -84,7 +102,9 @@ export const WorkPost = ({
{description}
</Text>
)}
{children && <View style={styles.content}>{children}</View>}
{React.Children.count(children) > 0 ? (
<View style={styles.content}>{children}</View>
) : null}
</View>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/browser/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ReactDOM from 'react-dom'
import { PDFViewer } from '~/react-pdf'
import { Lang } from '~/types'
import { App } from '~/app'
import data from '~/data/en.json'
import data from '~/data/es.json'
import './styles.css'

ReactDOM.render(
Expand Down
36 changes: 24 additions & 12 deletions src/data/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,15 @@
],
"location": "Peru",
"website": "https://rcrd.space",
"email": "[email protected]",
"phone": "+51 986006178",
"email": "[email protected]",
"github": "https://github.com/rqbazan",
"linkedin": "https://www.linkedin.com/in/rqbazan",
"twitter": "https://twitter.com/rqbazan",
"seoDescription": "Software developer mostly with NodeJS 💚 I love to write clean beautiful code even when it's unnecessary.",
"seoBanner": "https://res.cloudinary.com/dpwoyjb1f/image/upload/v1610162961/me/social_banner.png",
"seoTitle": "Lead Frontend"
"twitter": "https://twitter.com/rqbazan"
},
"techResume": {
"id": "recNxIiI11AEqGBYr",
"name": "EN - Soffware Engineer",
"aboutMe": "Software Creator with +4 years of experience working on the frontend and backend side. I've worked with many technologies over the past years, now focused on the Web with Node.js, React, TypeScript, and GraphQL.",
"aboutMe": "Software Developer with +5 years of experience working on the frontend and backend side. I've worked with many technologies over the past years, now focused on the Web with Node.js, React, TypeScript, and GraphQL.",
"published": true,
"lang": "en",
"langSkills": [
Expand Down Expand Up @@ -68,23 +64,36 @@
}
],
"keywords": "software,developer,javascript,nodejs",
"primaryColor": "#1d4ed8",
"primaryColor": "#fa0050",
"workExperiences": [
{
"id": "reckmIvfl6DsDEaFt",
"title": "Sr. Software Engineer",
"company": "PedidosYa",
"companyUrl": "https://www.linkedin.com/company/pedidosya/mycompany",
"location": "Remote",
"description": "PedidosYa is the leading delivery and quick commerce technology company in LATAM. Since 2014 it has been part of Delivery Hero.",
"startAt": "2022-01-10",
"Tech Resumes": ["recNxIiI11AEqGBYr"]
},
{
"id": "reckmIvfl6DsDEaFt",
"title": "Frontend Lead Engineer",
"company": "Riqra",
"location": "Lima - Perú",
"companyUrl": "https://www.linkedin.com/company/riqra/",
"location": "Remote",
"description": "Riqra is building an e-commerce suite dedicated to digitize the B2B sales in LATAM.",
"startAt": "2020-07-01",
"lines": "I'm the core maintainer for all the frontend applications, leading structural changes in our architecture. #Leadership\nI'm developing integrations with national and international payment systems. #Payments\n",
"endAt": "2022-01-07",
"lines": "I was the core maintainer for all the frontend applications, leading structural changes in our architecture. #Leadership\nI developed integrations with national and international payment systems. #Payments\nI started the E2E testing initiative for the Storefront. #Testing\n",
"Tech Resumes": ["recNxIiI11AEqGBYr"]
},
{
"id": "recYuPM3hquiVvljs",
"title": "Backend Node.js Engineer",
"company": "VISA - VendeMás",
"location": "Lima - Perú",
"companyUrl": "https://www.vendemas.com.pe/",
"location": "Remote",
"description": "VendeMás provides technologies for middle-entry-level merchants, so they can accept payments with all the credit cards.",
"startAt": "2020-03-01",
"endAt": "2020-06-30",
Expand All @@ -95,14 +104,17 @@
"id": "recVCofW95QMMBDDR",
"title": "Software Consultant",
"company": "Freelance",
"companyUrl": "https://rcrd.space/projects",
"location": "Perú",
"startAt": "2019-09-01",
"endAt": "2022-01-01",
"lines": "I provided consulting about modern software development practices, on topics ranging from prototyping to continuous deployment of a web application. #Workflows\nI developed web and mobile solutions using the Node.js ecosystem. #FullStack\nI taught about modern software development as a FullStack Node.js Developer. #DevTalks\n",
"Tech Resumes": ["recNxIiI11AEqGBYr"]
},
{
"id": "rec6YYXDNBuMGR81l",
"title": "Full Stack Node.js Developer",
"companyUrl": "https://www.linkedin.com/company/riqra/",
"company": "Riqra",
"location": "Lima - Perú",
"description": "Riqra is building an e-commerce suite dedicated to digitize the B2B sales in LATAM.",
Expand All @@ -124,7 +136,7 @@
"Tech Resumes": ["recNxIiI11AEqGBYr"]
}
],
"title": "Frontend Lead Engineer",
"title": "Sr. Software Engineer",
"createdAt": "2021-01-21"
}
}
Loading

1 comment on commit 2252239

@vercel
Copy link

@vercel vercel bot commented on 2252239 Jan 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.