diff --git a/README.md b/README.md index f6f89c3..2426de2 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,7 @@ ✓ [Social Links](#social-links) ✓ [Skill Section](#skills) ✓ [Experience Section](#experience) +✓ [Certification Section](#certifications) ✓ [Education Section](#education) ✓ [Projects Section](#projects) ✓ [Blog Posts Section](#blog-posts) @@ -243,6 +244,14 @@ const config = { companyLink: 'https://example.com', }, ], + certifications: [ + { + body: 'Certification Body Name', + name: 'Sample Certification', + year: 'March 2022', + link: 'https://example.com', + }, + ], education: [ { institution: 'Institution Name', @@ -509,6 +518,27 @@ module.exports = { Empty array will hide the education section. +### Certifications + +Provide your industry certifications in `certifications`. + +```js +// gitprofile.config.js +module.exports = { + // ... + certifications: [ + { + name: 'Lorem ipsum', + body: 'Lorem ipsum dolor sit amet', + year: 'March 2022', + link: 'https://example.com', + }, + ], +}; +``` + +Empty array will hide the certifications section. + ### Projects Your public repo from GitHub will be displayed here automatically. You can limit how many projects do you want to be displayed. Also, you can hide forked or specific repo. diff --git a/gitprofile.config.js b/gitprofile.config.js index f9e9542..b4b9ae5 100644 --- a/gitprofile.config.js +++ b/gitprofile.config.js @@ -25,7 +25,8 @@ const config = { email: 'arifulalamszn@gmail.com', }, resume: { - fileUrl: 'resume.pdf', // Empty fileUrl will hide the `Download Resume` button. + fileUrl: + 'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf', // Empty fileUrl will hide the `Download Resume` button. }, skills: [ 'PHP', @@ -59,6 +60,14 @@ const config = { companyLink: 'https://example.com', }, ], + /* certifications: [ + { + name: 'Lorem ipsum', + body: 'Lorem ipsum dolor sit amet', + year: 'March 2022', + link: 'https://example.com' + }, + ], */ education: [ { institution: 'Institution Name', diff --git a/public/resume.pdf b/public/resume.pdf deleted file mode 100644 index 774c2ea..0000000 Binary files a/public/resume.pdf and /dev/null differ diff --git a/src/components/GitProfile.jsx b/src/components/GitProfile.jsx index 4aaef5f..95d9843 100644 --- a/src/components/GitProfile.jsx +++ b/src/components/GitProfile.jsx @@ -7,6 +7,7 @@ import AvatarCard from './avatar-card'; import Details from './details'; import Skill from './skill'; import Experience from './experience'; +import Certification from './certification'; import Education from './education'; import Project from './project'; import Blog from './blog'; @@ -187,6 +188,10 @@ const GitProfile = ({ config }) => { loading={loading} education={sanitizedConfig.education} /> +
@@ -272,6 +277,14 @@ GitProfile.propTypes = { to: PropTypes.string, }) ), + certifications: PropTypes.arrayOf( + PropTypes.shape({ + body: PropTypes.string, + name: PropTypes.string, + year: PropTypes.string, + link: PropTypes.string, + }) + ), education: PropTypes.arrayOf( PropTypes.shape({ institution: PropTypes.string, diff --git a/src/components/certification/index.jsx b/src/components/certification/index.jsx new file mode 100644 index 0000000..46a620e --- /dev/null +++ b/src/components/certification/index.jsx @@ -0,0 +1,99 @@ +import { skeleton } from '../../helpers/utils'; +import { Fragment } from 'react'; +import PropTypes from 'prop-types'; + +const ListItem = ({ year, name, body, link }) => ( +
  • +
    +
    {year}
    +
    + + {name} + +
    +

    {body}

    +
  • +); + +const Certification = ({ certifications, loading }) => { + const renderSkeleton = () => { + let array = []; + for (let index = 0; index < 2; index++) { + array.push( + + ); + } + + return array; + }; + + return ( + <> + {certifications?.length !== 0 && ( +
    +
    +
    +
    + {loading ? ( + skeleton({ width: 'w-32', height: 'h-8' }) + ) : ( + + Certification + + )} +
    +
    +
    +
      + {loading ? ( + renderSkeleton() + ) : ( + + {certifications.map((certification, index) => ( + + ))} + + )} +
    +
    +
    +
    + )} + + ); +}; + +ListItem.propTypes = { + year: PropTypes.node, + name: PropTypes.node, + body: PropTypes.node, + link: PropTypes.string, +}; + +Certification.propTypes = { + certifications: PropTypes.array.isRequired, + loading: PropTypes.bool.isRequired, +}; + +export default Certification; diff --git a/src/helpers/utils.jsx b/src/helpers/utils.jsx index 8476645..e4fa356 100644 --- a/src/helpers/utils.jsx +++ b/src/helpers/utils.jsx @@ -163,6 +163,7 @@ export const sanitizeConfig = (config) => { }, skills: config?.skills || [], experiences: config?.experiences || [], + certifications: config?.certifications || [], education: config?.education || [], blog: { source: config?.blog?.source, diff --git a/types/index.d.ts b/types/index.d.ts index e66253a..6278739 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -214,6 +214,12 @@ export interface Experience { to?: string; companyLink?: string; } +export interface Certifications { + body?: string; + name?: string; + year?: string; + link?: string; +} export interface Education { institution?: string; @@ -252,6 +258,11 @@ export interface Config { */ experiences?: Array; + /** + * Certifications list + */ + certifications?: Array; + /** * Education list */