Skip to content

Commit fb31a8f

Browse files
authored
Merge pull request #323 from Lemoncode/feature/#290-implement-md-mappert-to-html
installed markdwon-it library, implemented md mappert to html and updated sith elegance CV
2 parents 7570281 + 30458f6 commit fb31a8f

File tree

11 files changed

+149
-54
lines changed

11 files changed

+149
-54
lines changed

export-samples/html/cv-sith-elegance.html

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -617,9 +617,7 @@ <h4>Plataforma de Talento y agencia de recruiting técnico</h4>
617617
<p>Fin: <b>Actualidad</b></p>
618618
</div>
619619
<div class="data">
620-
<p>Tipo de organización: <b>Startup</b></p>
621-
<p>Roles dentro de la empresa: <b>Fundador</b></p>
622-
<p>Retos:</p>
620+
<p><b>Fundador</b></p>
623621
<ul>
624622
<li>
625623
Adaptación de la organización y procesos de la empresa para escalar las operaciones de la misma.
@@ -667,9 +665,7 @@ <h4>Herramientas para facilitar el trabajo colaborativo en el ecosistema de Atla
667665
<p>Fin: <b>2018-06-30</b></p>
668666
</div>
669667
<div class="data">
670-
<p>Tipo de organización: <b>Startup</b></p>
671-
<p>Roles dentro de la empresa: <b>CEO</b></p>
672-
<p>Retos:</p>
668+
<p><b>CEO</b></p>
673669
<ul>
674670
<li>Adaptación de todos los procesos de la compañía al nuevo RGPD</li>
675671
<li>Apertura de nueva filial en Bilbao</li>
@@ -694,8 +690,7 @@ <h3>Instituto de Empresa</h3>
694690
<h4>Computer Science Grade</h4>
695691
</div>
696692
<div class="data">
697-
<p>Tipo de organización: <b>Institución académica</b></p>
698-
<p>Roles dentro de la empresa: <b>Profesor asociado de productividad y metodologías ágiles</b></p>
693+
<p><b>Profesor asociado de productividad y metodologías ágiles</b></p>
699694
</div>
700695
</div>
701696
</div>
@@ -724,10 +719,8 @@ <h4>Computer Science Grade</h4>
724719
<p>Fin: <b>Jun 2006</b></p>
725720
</div>
726721
<div class="data">
727-
<p>Tipo de estudios: <b>Grado oficial</b></p>
728-
<p>Grado obtenido: <b>No obtenido</b></p>
729-
<p>Nombre de la institución: <b>OUC</b></p>
730-
<p>Ubicación de la institución: <b>Cataluña, España</b></p>
722+
<p><b>OUC</b></p>
723+
<p>.NET | .htaccess | ActiveCampaign | Adobe Analytics | Linux | Metasploit</p>
731724
</div>
732725
</div>
733726
</div>
@@ -750,10 +743,8 @@ <h4>Computer Science Grade</h4>
750743
<p>Fin: <b>May 2003</b></p>
751744
</div>
752745
<div class="data">
753-
<p>Tipo de estudios: <b>Certificación</b></p>
754-
<p>Grado obtenido: <b>Obtenido</b></p>
755-
<p>Nombre de la institución: <b>CFDTI IBM/La Caixa</b></p>
756-
<p>Ubicación de la institución: <b>Madrid, España</b></p>
746+
<p><b>CFDTI IBM/La Caixa</b></p>
747+
<p>.NET | .htaccess | ActiveCampaign | Adobe Analytics | Linux | Metasploit</p>
757748
</div>
758749
</div>
759750
</div>
@@ -776,10 +767,8 @@ <h4>Scrum Master certificado por la Scrum Alliance</h4>
776767
<p>Fin: <b>Mar 2008</b></p>
777768
</div>
778769
<div class="data">
779-
<p>Tipo de estudios: <b>Certificación</b></p>
780-
<p>Grado obtenido: <b>Obtenido</b></p>
781-
<p>Nombre de la institución: <b>Scrum Alliance</b></p>
782-
<p>Ubicación de la institución: <b>Madrid, España</b></p>
770+
<p><b>Scrum Alliance</b></p>
771+
<p>.NET | .htaccess | ActiveCampaign | Adobe Analytics | Linux | Metasploit</p>
783772
</div>
784773
</div>
785774
</div>

package-lock.json

Lines changed: 83 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/manfred2html/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
"@lemoncode/tsconfig": "*",
4545
"@types/ejs": "^3.1.2",
4646
"@types/jest": "^29.5.3",
47+
"@types/markdown-it": "^13.0.7",
4748
"jest": "^29.6.2",
4849
"ts-jest": "^29.1.1",
4950
"typescript": "^5.1.6",
@@ -52,6 +53,7 @@
5253
},
5354
"dependencies": {
5455
"@lemoncode/manfred-common": "*",
55-
"ejs": "^3.1.9"
56+
"ejs": "^3.1.9",
57+
"markdown-it": "^14.0.0"
5658
}
5759
}

packages/manfred2html/src/engine/cv-sith-elegance/html-parts/about-me-section/about-me-section.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<h1><%= profile?.name %> <br /><span><%= profile?.surnames %></span></h1>
44
<hr />
55
<p class="job-title"><%= profile?.title %></p>
6-
<p><%= profile?.description %></p>
6+
<%- mapMarkdownToHTML(profile?.description) %>
77
<%_ } -%>
88
99

packages/manfred2html/src/engine/cv-sith-elegance/html-parts/about-me-section/about-me-section.part.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import ejs from 'ejs';
22
import { ProfileSectionVm, mapFromMacCvToProfileSectionVm } from '@lemoncode/manfred-common/profile-section';
33
import { ISO_SPANISH_LANGUAGE } from '@/engine/engine.const';
4+
import { mapMarkdownToHTML } from '@/mappers';
45
import { ManfredAwesomicCV, Settings, Language } from '@/model';
56
import { getLabels } from './labels';
67
import aboutMe from './about-me-section.ejs?raw';
@@ -18,6 +19,7 @@ const generateAboutMeSectionInner = (
1819
const rootObject = {
1920
profile: profileSectionVm,
2021
labels: getLabels(language),
22+
mapMarkdownToHTML,
2123
};
2224

2325
return ejs.render(aboutMe, rootObject);

packages/manfred2html/src/engine/cv-sith-elegance/html-parts/experience-section/experience-section.ejs

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,12 @@
3939
<%_}-%>
4040
</div>
4141
<div class="data">
42-
<%_ if(experience.type) { -%>
43-
<p>Tipo de organización: <b><%- experience.type %></b></p>
44-
<%_ } -%>
45-
<p>Roles dentro de la empresa: <b><%- experience.roles[0].name %></b></p>
42+
<p><b><%- experience.roles[0].name %></b></p>
4643
<%_ if(experience.roles[0].challenges && experience.roles[0].challenges.length !== 0) { -%>
47-
<p>Retos:</p>
48-
<ul>
49-
<%_ for(const challenge of experience.roles[0].challenges){ -%>
50-
<li><%- challenge.description %></li>
51-
<%_ }-%>
52-
</ul>
53-
<%_ }-%>
44+
<%_ for(const challenge of experience.roles[0].challenges){ -%>
45+
<%- mapMarkdownToHTML(challenge.description) %>
46+
<%_ }-%>
47+
<%_ }-%>
5448
</div>
5549
</div>
5650
</div>

packages/manfred2html/src/engine/cv-sith-elegance/html-parts/experience-section/experience-section.part.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import ejs from 'ejs';
22
import { ExperienceVm, mapFromMacCvToExperienceSectionVm } from '@lemoncode/manfred-common/experience-section';
33
import { ISO_SPANISH_LANGUAGE } from '@/engine/engine.const';
4+
import { mapMarkdownToHTML } from '@/mappers';
45
import { Settings, Language, ManfredAwesomicCV } from '@/model';
56
import experienceTemplate from './experience-section.ejs?raw';
67
import { getLabels } from './labels';
@@ -18,6 +19,7 @@ const generateExperienceSectionInner = (
1819
const rootObject = {
1920
experienceCollection: experienceSectionVm,
2021
labels: getLabels(language),
22+
mapMarkdownToHTML,
2123
};
2224

2325
return ejs.render(experienceTemplate, rootObject);

packages/manfred2html/src/engine/cv-sith-elegance/html-parts/html-document-start/html-document-start.ejs

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,17 @@
5151
min-height: 100vh;
5252
padding: var(--spacing_64) var(--spacing_16);
5353
}
54+
ul ul {
55+
padding-left: var(--spacing_16);
56+
}
57+
58+
p br {
59+
margin-bottom: var(--spacing_12);
60+
}
61+
62+
p span {
63+
margin: 0 var(--spacing_8);
64+
}
5465
.container {
5566
display: grid;
5667
grid-template-areas:
@@ -296,6 +307,8 @@
296307
flex-direction: column;
297308
gap: var(--spacing_8);
298309
font-size: 12px;
310+
line-height: 18px;
311+
font-weight: 300;
299312
}
300313
.section__content > .data b {
301314
font-weight: 600;
@@ -336,7 +349,8 @@
336349
.section__content > .data {
337350
grid-area: date;
338351
font-size: 14px;
339-
line-height: 18px;
352+
line-height: 21px;
353+
340354
}
341355
}
342356
.line-icon {

packages/manfred2html/src/engine/cv-sith-elegance/html-parts/studies-section/studies-section.ejs

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,21 +36,17 @@
3636
<%_ } -%>
3737
</div>
3838
<div class="data">
39-
<p>Tipo de estudios: <b><%- study.studyType %></b></p>
40-
<p>
41-
Grado obtenido: <% if (study.degreeAchieved) { %>
42-
<b>Obtenido</b>
43-
<%} else { %>
44-
<b>No obtenido</b>
45-
<% } %>
46-
</p>
47-
<p>Nombre de la institución: <b><%- study.institution.name %></b></p>
48-
<%_ if (study.location) { -%>
49-
<p>
50-
Ubicación de la institución:
51-
<h4><%- study.description %></h4>
52-
<b><%- study.institution.location.region %> , <%- study.institution.location.country %> </b>
53-
</p>
39+
<p><b><%- study.institution.name %></b></p>
40+
<%_ if (study.linkedCompetences && study.linkedCompetences.length !== 0) { -%>
41+
<p>
42+
<% study.linkedCompetences.forEach(function(competence, index) { %>
43+
<% if (index === study.linkedCompetences.length - 1) { %>
44+
<%- competence.name %>
45+
<% } else { %>
46+
<%- competence.name %> <span> | </span>
47+
<% }; %>
48+
<% }); %>
49+
</p>
5450
<%_ } -%>
5551
</div>
5652
</div>

packages/manfred2html/src/engine/cv-sith-elegance/html-parts/studies-section/studies-section.part.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ import { getLabels } from './labels';
66
import studiesTemplate from './studies-section.ejs?raw';
77

88
export const generateStudiesSection = (cv: ManfredAwesomicCV, settings: Settings): string => {
9-
const studiesSectionVm = mapFromMacCvToStudiesSectionVm(cv);
9+
const studiesSection = mapFromMacCvToStudiesSectionVm(cv);
1010

11-
return generateStudiesSectionInner(studiesSectionVm, settings.language);
11+
return generateStudiesSectionInner(studiesSection, settings.language);
1212
};
1313

1414
const generateStudiesSectionInner = (
15-
studiesSectionVm: StudiesSectionVm[],
15+
studiesSection: StudiesSectionVm[],
1616
language: Language = ISO_SPANISH_LANGUAGE
1717
): string => {
1818
const rootObject = {
19-
studiesCollection: studiesSectionVm,
19+
studiesCollection: studiesSection,
2020
labels: getLabels(language),
2121
};
2222

0 commit comments

Comments
 (0)