1.0.0 • Published 2 years ago

react-cv-builder v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

react-cv-builder

A cv b webpage, built with React, Bootstrap and Font Awesome. Designed for printing to pdf. Remove margins and enable background graphics when printing to get the best result.

NPM JavaScript Style Guide

Example: https://darylbuckle.github.io/react-cv-builder

Install

npm install --save react-cv-builder

Bootstrap is required as a peer dependency.

npm install --save bootstrap@4.5.2
npm install --save react-bootstrap@1.6.1

Usage

import React, { Component } from 'react'

import { PortfolioPage } from 'react-cv-builder'
import 'react-cv-builder/dist/index.css'
import 'bootstrap/dist/css/bootstrap.css'

class Example extends Component {
  render() {
    return (
      <CVPage
        user={{
          firstname: 'Brian',
          lastname: 'Smith',
          headline: 'Web Developer',
          projects: [
            {
              name: 'My Website',
              owner: 'Brian Smith',
            },
          ],
          roles: [
            {
              title: 'Web Software Developer',
              company: 'ABC Solutions',
              location: 'Anytown, Your County, United Kingdom',
              startdate: new Date(2018, 2, 1),
              current: true,
            }
          ],
          qualifications: [
            {
              name: 'Bachelor of Science in Computer Science',
              location: 'Your University',
              grade: 'First Class Honours',
              startdate: new Date (2013, 8, 1),
              enddate: new Date (2016, 7, 1),
            },
          ],
          skills: [
            { name: 'React', group: 'Technologies', level: 60 },
            { name: 'Bootstrap', group: 'Technologies', level: 80 },
          ],
        }}
        page={{
          textColour: '#F44E3B',
          bgColour: 'grey',
          sections: [
            {
              identifier: 'Experience',
              title: 'Experience',
              subTitle: 'My professional experience.',
              systemUse: 'experience',
              col: 1
            },
            {
              identifier: 'Projects',
              title: 'Projects',
              subTitle: 'These are my own public and private projects.\r\n\r\nSelect a Project for more information.',
              systemUse: 'projects',
              col: 1
            },
            {
              identifier: 'Qualifications',
              title: 'Qualifications',
              subTitle: 'My academic qualifications.',
              systemUse: 'qualifications',
              col: 2
            },
            {
              identifier: 'Skills',
              title: 'Skills',
              subTitle: 'My key skills and technologies.\r\n\r\nClick on a technology to show projects that use it.',
              systemUse: 'skills',
              col: 2
            },
          ],
        }} 
      />
    )
  }
}

It is recommended to also import bootstrap js in your html.

<!-- Bootstrap core JS-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.bundle.min.js"></script>

Props

PropertyTypeMandatoryDescription
pagePagetrueA Page object.
userUsertrueA User object.

Page props

PropertyTypeMandatoryDescription
textColourstringfalsePrimary text colour for headings. HTML hex expected.
bgColourstringfalseBackground colour for the profile and footer sections. HTML hex expected.
coverUrlstringfalseUrl of an image to as the background for the header.
logoUrlstringfalseUrl of an image to use as the page name.
sectionsSections[]trueAn array of the Section object. A section is a part of the page which contains information.
externalLinksLink[]falseAdditional links to show in the header which link to external pages.
col1WidthnumberfalseWidth of the left column (1-12). Default is 8.
col2WidthnumberfalseWidth of the right column (1-12). Default is 4.
Section props

All sections render a link in the nav bar if identifier is set and linkedIdentifier is not set.

PropertyTypeMandatoryDescription
identifierstringtrueAn unique id for the section. Used in the id of elements.
linkedIdentifierstringfalseSet this to an identifier of another element to link to that element. This will not show an additional link in the nav bar and will highlight the linkedIdentifier when in that Section. Use to make a link span multiple sections.
titlestringfalseThe header of the section.
subTitlestringfalseThe sub-header of the section.
textColourstringfalseText colour. HTML hex expected.
bgColourstringfalseBackground colour of the section. HTML hex expected.
systemUsestringfalseSet to "projects" to render the My Projects tiles (projects in the User Projects list), "experience" to render your role timeline, "qualifications" to render your Qualifications tiles, "skills" to render your skills list. Any other value then the "content" prop will be rendered.
contentJSXfalseJSX content to render in the section.
classNamestringfalseA css class name for the container of the section.
tileClassNamestringfalseA css class name for the tiles (projects, experience and qualifications only).
containerClassNamestringfalseA css class name for the container of the section.
colnumberfalse1 or 2 - 1 to render in the left column, 2 for the right column.
Link props

Additional links to external sites.

PropertyTypeMandatoryDescription
titlestringtrueA name for the link.
urlstringtrueThe url of the link.

User props

PropertyTypeMandatoryDescription
firstnamestringtrueYour first name.
lasnamestringtrueYour last name.
headlinestringfalseA headline or your job title.
titlestringfalseYour current job title.
imageUrlstringfalseUrl of an image to use in your avatar.
locationstringfalseYour current location.
phonenumberstringfalseYour contact telephone number.
mailtostringfalseYour Email Address.
projectsProject[]falseA list of your own projects.
rolesRole[]falseA list of companies that you have been employed at.
qualificationsQualification[]falseA list of your qualifications.
skillsSkill[]falseA list of skills and/or technologies that you have worked with.
linkedinstringfalseYour LinkedIn user name. If set this will show in the footer.
twitterstringfalseYour Twitter user name. If set this will show in the footer.
facebookstringfalseYour Facebook user name. If set this will show in the footer.
instagramstringfalseYour Instagram user name. If set this will show in the footer.
githubstringfalseYour GitHub profile user name. If set this will show in the footer.
stackoverflowstringfalseYour Stack Overflow profile user id. If set this will show in the footer.
Project props
PropertyTypeMandatoryDescription
namestringfalseThe name/title of the project.
ownerstringtrueThe person or company who owns the project
Role props
PropertyTypeMandatoryDescription
titlestringtrueYour job title.
companystringtrueThe name of the company.
locationstringfalseYour place of work.
startdateDatefalseWhen you started employment. Must have either 'enddate' set or 'current' === true.
enddateDatefalseWhen you finished employment.
currentbooleanfalseWhether you are still employed.
positionsRole[]falseA list of positions held at the company included start and end dates.
projectsProject[]falseA list of projects worked on at the company.
infostringfalseAdditional details. Accepts html.
Qualification props
PropertyTypeMandatoryDescription
namestringtrueThe name/title of the qualification.
locationstringfalseThe place of study.
gradestringfalseGrade obtained.
iconobjectfalseA font awesome icon to show for this qualification.
startdateDatefalseWhen you started studying. Must have either 'enddate' set or 'current' === true.
enddateDatefalseWhen you finished/gained the qualification. If 'startdate' is not set only the enddate will show.
currentbooleanfalseWhether you are still studying for this qualification.
infostringfalseAdditional details. Shows on modal screen only. Accepts html.
Skill props
PropertyTypeMandatoryDescription
namestringtrueName of the skill.
groupstringtrueWhat group to show the skill under. If empty string no group header will be shown.
levelnumberfalseA number ranging from 0-100 to determine your skill level.

License

MIT © DarylBuckle