Skip to content

Commit c9945fb

Browse files
authored
Merge pull request #299 from AbelDeTena/epic/cv-jedi-minimalism-#282-create-header-section
created first structure of cv-jedi-minimalist and his header section
2 parents eb72011 + 255c21e commit c9945fb

File tree

33 files changed

+484
-3
lines changed

33 files changed

+484
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ interface Props {
1717
}
1818

1919
const DOWNLOAD_MESSAGE_TIMEOUT = 2500;
20-
const DESING_OPTIONS: TemplateCV[] = ['Sith Elegance', 'Galactic CleanTech'];
20+
const DESING_OPTIONS: TemplateCV[] = ['Sith Elegance', 'Galactic CleanTech', 'Jedi minimalism'];
2121
const LANGUAGE_OPTIONS: Language[] = ['es', 'en'];
2222

2323
export const ExportConfig: React.FC<Props> = props => {
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
</header>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import ejs from 'ejs';
2+
import headerElementEndTemplate from './header-element-end.ejs?raw';
3+
4+
export const generateHeaderElementEnd = (): string => ejs.render(headerElementEndTemplate);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './header-element-end.part';
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<header>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import ejs from 'ejs';
2+
import headerElementStartTemplate from './header-element-start.ejs?raw';
3+
4+
export const generateHeaderElementStart = (): string => ejs.render(headerElementStartTemplate);
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './header-element-start.part';
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<%_ if (profile && profile !== 'undefined' ) { -%>
2+
<h1><%= profile?.name %> <br /><span><%= profile?.surnames %></span></h1>
3+
<h2 ><%= profile?.title %></h2>
4+
<%_ } -%>
5+
6+
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { ManfredAwesomicCV } from '@/model';
2+
import { ProfileSectionVm, mapFromMacCvToProfileSectionVm } from '@lemoncode/manfred-common/profile-section';
3+
import headerSection from './header-section.ejs?raw';
4+
import ejs from 'ejs';
5+
6+
export const generateHeaderSection = (cv: ManfredAwesomicCV): string => {
7+
const profileSectionVm = mapFromMacCvToProfileSectionVm(cv);
8+
9+
return generateHeaderSectionInner(profileSectionVm);
10+
};
11+
12+
const generateHeaderSectionInner = (profileSectionVm: ProfileSectionVm): string => {
13+
const rootObject = {
14+
profile: profileSectionVm,
15+
};
16+
17+
return ejs.render(headerSection, rootObject);
18+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './header-section.part';

0 commit comments

Comments
 (0)