From 6a8bb3b4c80cbdb7be044bfb046f59fe24cc60e1 Mon Sep 17 00:00:00 2001 From: Maksym Gendin Date: Thu, 1 Apr 2021 14:14:53 +0200 Subject: [PATCH] Implemented certificates section --- index.js | 9 +++++++++ package.json | 2 +- pug/background-card.pug | 1 + pug/background/certificates.pug | 26 ++++++++++++++++++++++++++ 4 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 pug/background/certificates.pug diff --git a/index.js b/index.js index ece6611e..637ce85e 100644 --- a/index.js +++ b/index.js @@ -106,6 +106,14 @@ function render(resume) { }); }); + _(resume.certificates).forEach(c => { + const date = c.date; + + if (date) { + c.date = utils.getFormattedDate(date, 'MMM DD, YYYY'); + } + }); + _(resume.awards).forEach(a => { const date = a.date; @@ -180,6 +188,7 @@ function getFloatingNavItems(resume) { {label: 'Projects Experience', target: 'projects-experience', icon: 'code', requires: 'projects'}, {label: 'Skills', target: 'skills', icon: 'tools', requires: 'skills'}, {label: 'Education', target: 'education', icon: 'graduation-cap', requires: 'education'}, + {label: 'Certificates', target: 'certificates', icon: 'profile', requires: 'certificates'}, {label: 'Awards', target: 'awards', icon: 'trophy', requires: 'awards'}, {label: 'Volunteer Work', target: 'volunteer-work', icon: 'child', requires: 'volunteer'}, {label: 'Publications', target: 'publications', icon: 'newspaper', requires: 'publications'}, diff --git a/package.json b/package.json index 0da4200d..c0b6a94d 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "markdown-it-abbr": "^1.0.3", "moment": "^2.22.2", "pug": "^2.0.4", - "resume-schema": "0.1.3", + "resume-schema": "1.0.0", "tarball-extract": "0.0.3", "sshpk": ">=1.13.2", "underscore": "^1.6.0" diff --git a/pug/background-card.pug b/pug/background-card.pug index 4e329101..1a2374ae 100644 --- a/pug/background-card.pug +++ b/pug/background-card.pug @@ -9,6 +9,7 @@ section.col-md-9.card-wrapper.pull-right include background/projects-experience.pug include background/skills.pug include background/education.pug + include background/certificates.pug include background/awards.pug include background/volunteer-work.pug include background/publications.pug diff --git a/pug/background/certificates.pug b/pug/background/certificates.pug new file mode 100644 index 00000000..fcfcffb0 --- /dev/null +++ b/pug/background/certificates.pug @@ -0,0 +1,26 @@ +unless _.isEmpty(resume.certificates) + .detail#certificates + .icon + i.fs-lg.icon-profile + span.mobile-title Certificates + + .info + h4.title.text-uppercase Certificates + + .content + ul.list-unstyled.clear-margin + each certificate in resume.certificates + li.card.card-nested + .content + p.clear-margin(itemprop="certificate") + strong + if certificate.url + a(href=certificate.url, target="_blank")= certificate.name + |,  + else + |#{certificate.name + ', '} + |#{certificate.issuer} + + p.text-muted + small + |Issued on: #{certificate.date}