1.0.2 • Published 3 years ago

react-dev-portfolio-builder v1.0.2

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

react-dev-portfolio-builder

A simple portfolio or cv page aimed at developers, built with React, Bootstrap and Font Awesome.

NPM JavaScript Style Guide

Example: https://darylbuckle.github.io/react-dev-portfolio-builder

Install

npm install --save react-dev-portfolio-builder

Bootstrap is required as a peer dependency.

npm install --save bootstrap@4.5.2

Usage

import React, { Component } from 'react'

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

class Example extends Component {
  render() {
    return (
      <PortfolioPage
        user={{
          firstname: 'Brian',
          lastname: 'Smith',
          headline: 'Web Developer',
          projects: [
            {
              name: 'My Website',
              owner: 'Brian Smith',
              startdate: new Date(2020, 6, 1),
              current: true,
              skills: [
                { name: 'React', group: 'Front End' },
                { name: 'Bootstrap', group: 'Front End' },
              ],
            },
          ],
          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: 'Projects',
              title: 'Projects',
              subTitle: 'These are my own public and private projects.\r\n\r\nSelect a Project for more information.',
              systemUse: 'projects',
            },
            {
              identifier: 'Experience',
              title: 'Experience',
              subTitle: 'My professional experience.',
              bgColour: '#f6f6f6',
              systemUse: 'experience'
            },
            {
              identifier: 'Qualifications',
              title: 'Qualifications',
              subTitle: 'My academic qualifications.',
              systemUse: 'qualifications'
            },
            {
              identifier: 'Skills',
              title: 'Skills',
              subTitle: 'My key skills and technologies.\r\n\r\nClick on a technology to show projects that use it.',
              bgColour: '#f6f6f6',
              systemUse: 'skills'
            },
            {
              identifier: 'About',
              title: 'About',
              content: (
                <div>
                  <p>About me goes here.</p>
                </div>
              )
            },
          ],
        }} 
      />
    )
  }
}

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.
projectClick(project: Project) => voidfalseCallback for selecting a project. If implemented the project modal will not be shown.
qualificationClick(qualification: Qualification) => voidfalseCallback for selecting a qualification. If implemented the qualification modal will not be shown.

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 nav-bar which link to external pages.
hideFooterbooleanfalseA flag to hide the page footer. Defaults to false.
footerLContentJSXfalseOverride the left part of the footer content.
footerCContentJSXfalseOverride the centre part of the footer content.
footerRContentJSXfalseOverride the right part of the footer content.
footerEndJSXfalseAdditional info to add onto the end of the footer.
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).
Link props

Additional links to external sites.

PropertyTypeMandatoryDescription
titlestringtrueA name for the link.
identifierstringtrueThe 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.
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.
mailtostringfalseEmail Address where the contact button will send to.
Project props
PropertyTypeMandatoryDescription
namestringfalseThe name/title of the project.
ownerstringtrueThe person or company who owns the project
rolestringfalseEnter the name of the company used in the 'company' property of the 'role' model if applicable.
iconobjectfalseA icon to show for this qualification.
thumbnailstringfalseThe url of an image to show instead of an icon. This can be the url of a public image or the path of a local asset.
thumbnailStyleStylefalseIf image is set you can use this to apply custom styles to the image.
imagesstring[]falseThis will show multiple images in a carousel on the modal screen instead of 'image'.
urlstringfalseA link to more information about the project. Will show on the modal screen.
privatebooleanfalseWhether the source code is public or private.
startdateDatefalseWhen you started working on the project. Must have either 'enddate' set or 'current' === true.
enddateDatefalseWhen you finished working on the project. If 'startdate' is not set only the enddate will show.
currentbooleanfalseWhether you are still working on this project.
skillsSkill[]falseA list of skills/technologies relating to the project. The project will then show in the skills section.
infostringfalseAdditional details. Shows on modal screen only. Accepts html.
Role props
PropertyTypeMandatoryDescription
titlestringtrueYour job title.
companystringtrueThe name of the company.
locationstringfalseYour place of work.
urlstringfalseA link to the companies website. The companies name on the timeline becomes a link if set.
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 qualifcation.
locationstringfalseThe place of study.
gradestringfalseGrade obtained.
iconobjectfalseA font awesome icon to show for this qualification.
imagestringfalseThe url of an image to show instead of an icon. This can be the url of a public image or the path of a local asset.
imagestyleobjectfalseIf image is set you can use this to apply custom styles to the image.
startdateDatefalseWhen you started studying. Must have either 'enddate' set or 'current' === true.
enddateDatefalseWhen you finished/gained the qualifcation. 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