Skip to content

Commit 8a295c1

Browse files
authored
Merge pull request #333 from Lemoncode/epic/cv-x-wing-squadron
cv x wing squadron completed. Ready to review.
2 parents c20e2ce + f6173fd commit 8a295c1

File tree

85 files changed

+1275
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1275
-18
lines changed

apps/react-app/src/pods/template-export/components/export-config/export-config.component.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface Props {
1717
}
1818

1919
const DOWNLOAD_MESSAGE_TIMEOUT = 2500;
20-
const DESIGN_OPTIONS: TemplateCV[] = ['Sith Elegance', 'Galactic CleanTech', 'Monochrome Force'];
20+
const DESIGN_OPTIONS: TemplateCV[] = ['Sith Elegance', 'Galactic CleanTech', 'X-Wing Squadron', 'Monochrome Force'];
2121
const LANGUAGE_OPTIONS: Language[] = ['es', 'en'];
2222

2323
export const ExportConfig: React.FC<Props> = props => {
@@ -30,6 +30,7 @@ export const ExportConfig: React.FC<Props> = props => {
3030
const [htmlPreview, setHtmlPreview] = React.useState<string>(
3131
onHTMLSettingSelectionChanged(htmlTemplate, exportHTMLSettings)
3232
);
33+
const [hideColorSelected, setHideColorSelected] = React.useState<boolean>(false);
3334

3435
const handleColorChange = (event: React.ChangeEvent<HTMLInputElement>) => {
3536
setExportHTMLSettings({ ...exportHTMLSettings, colorTheme: event.target.value as ColorTheme });
@@ -64,6 +65,7 @@ export const ExportConfig: React.FC<Props> = props => {
6465
};
6566

6667
React.useEffect(() => {
68+
setHideColorSelected(exportHTMLSettings.template === 'X-Wing Squadron');
6769
setHtmlPreview(onHTMLSettingSelectionChanged(htmlTemplate, exportHTMLSettings));
6870
}, [exportHTMLSettings]);
6971

@@ -81,9 +83,11 @@ export const ExportConfig: React.FC<Props> = props => {
8183
label={'Idioma cabeceras'}
8284
/> */}
8385
</div>
84-
<div className={classes.selectColorContainer}>
85-
<CustomSelectColor label={'Colores'} onChange={handleColorChange} />
86-
</div>
86+
{!hideColorSelected && (
87+
<div className={classes.selectColorContainer}>
88+
<CustomSelectColor label={'Colores'} onChange={handleColorChange} />
89+
</div>
90+
)}
8791
</div>
8892
<div className={classes.prevContainer}>
8993
<p className={`${classes.title}`}>Previsualización</p>

export-samples/html/cv-x-wing-squadron.html

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
h1 {
7575
display: flex;
7676
flex-direction: column;
77-
width: min-content;
77+
min-width: min-content;
7878
text-transform: capitalize;
7979
font-family: 'Source Serif Pro', sans-serif;
8080
font-size: 75px;
@@ -86,6 +86,15 @@
8686
-webkit-text-fill-color: transparent;
8787
}
8888

89+
.gradient__background {
90+
display: flex;
91+
flex-grow: 1;
92+
background: var(--manfred-gradient);
93+
background-clip: text;
94+
-webkit-background-clip: text;
95+
-webkit-text-fill-color: transparent;
96+
color: transparent;
97+
}
8998
@media (min-width: 728px) {
9099
h1 {
91100
font-size: 82px;
@@ -129,7 +138,7 @@
129138
}
130139

131140
.technologie__icon--gray-scale {
132-
width: 35px;
141+
max-width: 35px;
133142
filter: grayscale(100%);
134143
}
135144

@@ -145,9 +154,13 @@
145154

146155
header > img {
147156
align-self: center;
148-
width: 225px;
149-
height: 225px;
150157
border-radius: 225px;
158+
min-width: 225px;
159+
min-height: 225px;
160+
max-width: 350px;
161+
max-height: 350px;
162+
object-fit: cover;
163+
background: var(--manfred-gradient);
151164
}
152165

153166
.header__content {
@@ -162,6 +175,10 @@
162175
padding: var(--spacing_16) 0px;
163176
}
164177

178+
.header__content__name > * {
179+
padding-left: var(--spacing_8);
180+
}
181+
165182
.job-title {
166183
color: var(--manfred-dark);
167184
font-family: 'Source Serif Pro', sans-serif;
@@ -175,6 +192,7 @@
175192
display: flex;
176193
align-items: center;
177194
gap: var(--spacing_8);
195+
padding-left: var(--spacing_8);
178196
}
179197

180198
.header__content__address > p {
@@ -187,9 +205,10 @@
187205
display: flex;
188206
align-items: center;
189207
gap: var(--spacing_32);
208+
padding-left: var(--spacing_8);
190209
}
191210

192-
@media (min-width: 1024px) {
211+
@media (min-width: 728px) {
193212
.header__content__address > p {
194213
font-size: 16px;
195214
}
@@ -201,12 +220,7 @@
201220
justify-content: flex-start;
202221
align-items: center;
203222
flex-direction: row;
204-
gap: var(--spacing_64);
205-
}
206-
207-
header > img {
208-
width: 350px;
209-
height: 350px;
223+
gap: var(--spacing_48);
210224
}
211225

212226
.header__content {
@@ -387,7 +401,9 @@
387401
<svg xmlns="http://www.w3.org/2000/svg" width="64" height="10" viewBox="0 0 64 10" fill="none">
388402
<path d="M1.10269e-06 5L64 5" stroke="#3BA0B7" stroke-width="9" />
389403
</svg>
390-
<h1>david</h1>
404+
<div class="gradient__background">
405+
<h1>david</h1>
406+
</div>
391407
<h2 class="surname">bonilla fuertes</h2>
392408
<p class="job-title">Fundador en Manfred / C-Level Executive</p>
393409
</div>

packages/manfred-common/src/doc-parts/profile-section/profile-section.mapper.spec.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,4 +335,5 @@ describe('Testing profile-section.mapper.ts', () => {
335335
});
336336
});
337337
});
338+
338339
export {};

packages/manfred-common/src/doc-parts/studies-section/studies-section.helpers.spec.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ describe('studies-section.helpers specs', () => {
1515
description: 'description2',
1616
institution: {
1717
name: 'name2',
18+
description: 'description2',
1819
location: {
1920
country: 'Italia',
2021
region: 'region2',
@@ -31,6 +32,7 @@ describe('studies-section.helpers specs', () => {
3132
description: 'description2',
3233
institution: {
3334
name: 'name2',
35+
description: 'description2',
3436
location: {
3537
country: 'Italia',
3638
region: 'region2',
@@ -47,6 +49,7 @@ describe('studies-section.helpers specs', () => {
4749
description: 'description',
4850
institution: {
4951
name: 'name',
52+
description: 'description',
5053
location: {
5154
country: 'España',
5255
region: 'region',
@@ -69,6 +72,7 @@ describe('studies-section.helpers specs', () => {
6972
description: 'description',
7073
institution: {
7174
name: 'name',
75+
description: 'description',
7276
location: {
7377
country: 'España',
7478
region: 'region',
@@ -85,6 +89,7 @@ describe('studies-section.helpers specs', () => {
8589
description: 'description2',
8690
institution: {
8791
name: 'name2',
92+
description: 'description2',
8893
location: {
8994
country: 'Italia',
9095
region: 'region2',
@@ -101,6 +106,7 @@ describe('studies-section.helpers specs', () => {
101106
description: 'description2',
102107
institution: {
103108
name: 'name2',
109+
description: 'description2',
104110
location: {
105111
country: 'Italia',
106112
region: 'region2',
@@ -123,6 +129,7 @@ describe('studies-section.helpers specs', () => {
123129
description: 'description',
124130
institution: {
125131
name: 'name',
132+
description: 'description',
126133
location: {
127134
country: 'España',
128135
region: 'region',
@@ -139,6 +146,7 @@ describe('studies-section.helpers specs', () => {
139146
description: 'description2',
140147
institution: {
141148
name: 'name2',
149+
description: 'description2',
142150
location: {
143151
country: 'Italia',
144152
region: 'region2',
@@ -161,6 +169,7 @@ describe('studies-section.helpers specs', () => {
161169
description: 'description',
162170
institution: {
163171
name: 'name',
172+
description: 'description',
164173
location: {
165174
country: 'España',
166175
region: 'region',
@@ -177,6 +186,7 @@ describe('studies-section.helpers specs', () => {
177186
description: 'description2',
178187
institution: {
179188
name: 'name2',
189+
description: 'description2',
180190
location: {
181191
country: 'Italia',
182192
region: 'region2',
@@ -201,6 +211,7 @@ describe('studies-section.helpers specs', () => {
201211
description: 'description2',
202212
institution: {
203213
name: 'name2',
214+
description: 'description2',
204215
location: {
205216
country: 'Italia',
206217
region: 'region2',
@@ -223,6 +234,7 @@ describe('studies-section.helpers specs', () => {
223234
description: 'description2',
224235
institution: {
225236
name: 'name2',
237+
description: 'description2',
226238
location: {
227239
country: 'Italia',
228240
region: 'region2',

packages/manfred-common/src/doc-parts/studies-section/studies-section.mapper.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ describe('studies-section.mapper specs', () => {
9292
description: 'description',
9393
institution: {
9494
name: 'name',
95+
description: 'description',
9596
location: {
9697
country: 'España',
9798
region: 'region',
@@ -136,6 +137,7 @@ describe('studies-section.mapper specs', () => {
136137
address: 'address',
137138
},
138139
},
140+
linkedCompetences: [],
139141
},
140142
{
141143
studyType: 'certification',
@@ -173,6 +175,7 @@ describe('studies-section.mapper specs', () => {
173175
description: 'description',
174176
institution: {
175177
name: 'name',
178+
description: 'description',
176179
location: {
177180
country: 'España',
178181
region: 'region',
@@ -190,6 +193,7 @@ describe('studies-section.mapper specs', () => {
190193
description: 'description2',
191194
institution: {
192195
name: 'name2',
196+
description: 'description2',
193197
location: {
194198
country: 'Italia',
195199
region: 'region2',

packages/manfred-common/src/doc-parts/studies-section/studies-section.mapper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ManfredAwesomicCV } from '@/model';
1+
import { Competence, ManfredAwesomicCV } from '@/model';
22
import { CountryType, Institution, StudiesSectionVm, StudyTypeWithTranslation } from './studies-section.vm';
33
import { studiesTypes, countryList } from './studies-section.constants';
44
import { sortedStudiesByStartDate } from './studies-section.helpers';
@@ -16,13 +16,13 @@ export const mapFromMacCvToStudiesSectionVm = (cv: ManfredAwesomicCV): StudiesSe
1616
const description = study?.description ?? '';
1717
let institution: Institution = {
1818
name: study?.institution?.name ?? '',
19+
description: study?.institution?.description ?? '',
1920
location: {
2021
country: study?.institution?.location?.country ?? '',
2122
region: study?.institution?.location?.region ?? '',
2223
address: study?.institution?.location?.address ?? '',
2324
},
2425
};
25-
2626
const mapStudyType = mapStudiesTypes(studyType, studiesTypes);
2727
const mapCountry = mapCountries(institution.location.country, countryList);
2828
institution = { ...institution, location: { ...institution.location, country: mapCountry } };

packages/manfred-common/src/doc-parts/studies-section/studies-section.vm.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export interface StudiesSectionVm {
1414
export interface Institution {
1515
name: string;
1616
location: Location;
17+
description: string;
1718
}
1819

1920
export interface Location {
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<%_ if (profile && profile !== 'undefined' ) { -%>
2+
<section class="main__section about-me__section">
3+
<div class="main__section__header">
4+
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="6" viewBox="0 0 32 6" fill="none">
5+
<path d="M5.51343e-07 3L32 3" stroke="#3BA0B7" stroke-width="6" />
6+
</svg>
7+
<h2><%- labels.ABOUT_ME_HEADING %></h2>
8+
</div>
9+
<p><%= profile?.description %></p>
10+
</section>
11+
<%_ } -%>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import ejs from 'ejs';
2+
import { ProfileSectionVm, mapFromMacCvToProfileSectionVm } from '@lemoncode/manfred-common/profile-section';
3+
import { ManfredAwesomicCV, Language, Settings } from '@/model';
4+
import { ISO_SPANISH_LANGUAGE } from '@/engine/engine.const';
5+
import { getLabels } from './labels';
6+
import aboutMeSection from './about-me-section.ejs?raw';
7+
8+
export const generateAboutMeSection = (cv: ManfredAwesomicCV, settings: Settings): string => {
9+
const profileSectionVm = mapFromMacCvToProfileSectionVm(cv);
10+
return generateAboutMeSectionInner(profileSectionVm, settings.language);
11+
};
12+
13+
const generateAboutMeSectionInner = (
14+
profileSectionVm: ProfileSectionVm,
15+
language: Language = ISO_SPANISH_LANGUAGE
16+
): string => {
17+
const rootObject = {
18+
profile: profileSectionVm,
19+
labels: getLabels(language),
20+
};
21+
22+
return ejs.render(aboutMeSection, rootObject);
23+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './about-me-section.part';

0 commit comments

Comments
 (0)