mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-22 20:51:29 +10:00
- refactor sections
- combine resume and metadata contexts
This commit is contained in:
@ -14,7 +14,7 @@ const LeftNavbar = () => (
|
||||
|
||||
<hr className="my-6" />
|
||||
|
||||
<div className="grid grid-cols-1 gap-5 text-secondary-dark">
|
||||
<div className="grid grid-cols-1 gap-4 text-secondary-dark">
|
||||
{sections.map((x) => (
|
||||
<SectionIcon
|
||||
key={x.id}
|
||||
|
||||
@ -1,17 +1,17 @@
|
||||
import React, { Fragment, memo } from 'react';
|
||||
import { Element } from 'react-scroll';
|
||||
import sections from '../../../data/leftSections';
|
||||
import Awards from '../sections/Awards';
|
||||
import Certifications from '../sections/Certifications';
|
||||
import Education from '../sections/Education';
|
||||
import Hobbies from '../sections/Hobbies';
|
||||
import Languages from '../sections/Languages';
|
||||
import Objective from '../sections/Objective';
|
||||
import Profile from '../sections/Profile';
|
||||
import References from '../sections/References';
|
||||
import Skills from '../sections/Skills';
|
||||
import Social from '../sections/Social';
|
||||
import Work from '../sections/Work';
|
||||
import Awards from './sections/Awards';
|
||||
import Certifications from './sections/Certifications';
|
||||
import Education from './sections/Education';
|
||||
import Hobbies from './sections/Hobbies';
|
||||
import Languages from './sections/Languages';
|
||||
import Objective from './sections/Objective';
|
||||
import Profile from './sections/Profile';
|
||||
import References from './sections/References';
|
||||
import Skills from './sections/Skills';
|
||||
import Social from './sections/Social';
|
||||
import Work from './sections/Work';
|
||||
import LeftNavbar from './LeftNavbar';
|
||||
import styles from './LeftSidebar.module.css';
|
||||
|
||||
|
||||
23
src/components/builder/left/sections/Awards.js
Normal file
23
src/components/builder/left/sections/Awards.js
Normal file
@ -0,0 +1,23 @@
|
||||
import React, { memo } from 'react';
|
||||
import Heading from '../../../shared/Heading';
|
||||
import List from '../../lists/List';
|
||||
|
||||
const Awards = ({ id, name, event }) => {
|
||||
const path = `${id}.items`;
|
||||
|
||||
return (
|
||||
<section>
|
||||
<Heading>{name}</Heading>
|
||||
|
||||
<List
|
||||
path={path}
|
||||
event={event}
|
||||
titlePath="title"
|
||||
subtitlePath="awarder"
|
||||
textPath="summary"
|
||||
/>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(Awards);
|
||||
23
src/components/builder/left/sections/Certifications.js
Normal file
23
src/components/builder/left/sections/Certifications.js
Normal file
@ -0,0 +1,23 @@
|
||||
import React, { memo } from 'react';
|
||||
import Heading from '../../../shared/Heading';
|
||||
import List from '../../lists/List';
|
||||
|
||||
const Certifications = ({ id, name, event }) => {
|
||||
const path = `${id}.items`;
|
||||
|
||||
return (
|
||||
<section>
|
||||
<Heading>{name}</Heading>
|
||||
|
||||
<List
|
||||
path={path}
|
||||
event={event}
|
||||
titlePath="title"
|
||||
subtitlePath="issuer"
|
||||
textPath="summary"
|
||||
/>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(Certifications);
|
||||
23
src/components/builder/left/sections/Education.js
Normal file
23
src/components/builder/left/sections/Education.js
Normal file
@ -0,0 +1,23 @@
|
||||
import React, { memo } from 'react';
|
||||
import Heading from '../../../shared/Heading';
|
||||
import List from '../../lists/List';
|
||||
|
||||
const Education = ({ id, name, event }) => {
|
||||
const path = `${id}.items`;
|
||||
|
||||
return (
|
||||
<section>
|
||||
<Heading>{name}</Heading>
|
||||
|
||||
<List
|
||||
hasDate
|
||||
path={path}
|
||||
event={event}
|
||||
titlePath="institution"
|
||||
textPath="field"
|
||||
/>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(Education);
|
||||
17
src/components/builder/left/sections/Hobbies.js
Normal file
17
src/components/builder/left/sections/Hobbies.js
Normal file
@ -0,0 +1,17 @@
|
||||
import React, { memo } from 'react';
|
||||
import Heading from '../../../shared/Heading';
|
||||
import List from '../../lists/List';
|
||||
|
||||
const Hobbies = ({ id, name, event }) => {
|
||||
const path = `${id}.items`;
|
||||
|
||||
return (
|
||||
<section>
|
||||
<Heading>{name}</Heading>
|
||||
|
||||
<List path={path} event={event} titlePath="name" />
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(Hobbies);
|
||||
17
src/components/builder/left/sections/Languages.js
Normal file
17
src/components/builder/left/sections/Languages.js
Normal file
@ -0,0 +1,17 @@
|
||||
import React, { memo } from 'react';
|
||||
import Heading from '../../../shared/Heading';
|
||||
import List from '../../lists/List';
|
||||
|
||||
const Languages = ({ id, name, event }) => {
|
||||
const path = `${id}.items`;
|
||||
|
||||
return (
|
||||
<section>
|
||||
<Heading>{name}</Heading>
|
||||
|
||||
<List path={path} event={event} titlePath="name" subtitlePath="fluency" />
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(Languages);
|
||||
15
src/components/builder/left/sections/Objective.js
Normal file
15
src/components/builder/left/sections/Objective.js
Normal file
@ -0,0 +1,15 @@
|
||||
import React, { memo } from 'react';
|
||||
import Heading from '../../../shared/Heading';
|
||||
import Input from '../../../shared/Input';
|
||||
|
||||
const Objective = () => {
|
||||
return (
|
||||
<section>
|
||||
<Heading>Objective</Heading>
|
||||
|
||||
<Input type="textarea" label="Objective" path="objective" />
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(Objective);
|
||||
47
src/components/builder/left/sections/Profile.js
Normal file
47
src/components/builder/left/sections/Profile.js
Normal file
@ -0,0 +1,47 @@
|
||||
import React, { memo } from 'react';
|
||||
import Heading from '../../../shared/Heading';
|
||||
import Input from '../../../shared/Input';
|
||||
import PhotoUpload from '../../../shared/PhotoUpload';
|
||||
|
||||
const Profile = () => {
|
||||
return (
|
||||
<section>
|
||||
<Heading>Profile</Heading>
|
||||
|
||||
<PhotoUpload />
|
||||
|
||||
<div className="grid grid-cols-2 gap-6">
|
||||
<Input name="firstName" label="First Name" path="profile.firstName" />
|
||||
<Input name="lastName" label="Last Name" path="profile.lastName" />
|
||||
</div>
|
||||
|
||||
<Input name="subtitle" label="Subtitle" path="profile.subtitle" />
|
||||
|
||||
<hr />
|
||||
|
||||
<Input
|
||||
name="addressLine1"
|
||||
label="Address Line 1"
|
||||
path="profile.address.line1"
|
||||
/>
|
||||
<Input
|
||||
name="addressLine2"
|
||||
label="Address Line 2"
|
||||
path="profile.address.line2"
|
||||
/>
|
||||
|
||||
<div className="grid grid-cols-2 gap-6">
|
||||
<Input name="city" label="City" path="profile.address.city" />
|
||||
<Input name="pincode" label="Pincode" path="profile.address.pincode" />
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<Input name="phone" label="Phone Number" path="profile.phone" />
|
||||
<Input name="website" label="Website" path="profile.website" />
|
||||
<Input name="email" label="Email Address" path="profile.email" />
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(Profile);
|
||||
23
src/components/builder/left/sections/References.js
Normal file
23
src/components/builder/left/sections/References.js
Normal file
@ -0,0 +1,23 @@
|
||||
import React, { memo } from 'react';
|
||||
import Heading from '../../../shared/Heading';
|
||||
import List from '../../lists/List';
|
||||
|
||||
const References = ({ id, name, event }) => {
|
||||
const path = `${id}.items`;
|
||||
|
||||
return (
|
||||
<section>
|
||||
<Heading>{name}</Heading>
|
||||
|
||||
<List
|
||||
path={path}
|
||||
event={event}
|
||||
titlePath="name"
|
||||
subtitlePath="position"
|
||||
textPath="summary"
|
||||
/>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(References);
|
||||
17
src/components/builder/left/sections/Skills.js
Normal file
17
src/components/builder/left/sections/Skills.js
Normal file
@ -0,0 +1,17 @@
|
||||
import React, { memo } from 'react';
|
||||
import Heading from '../../../shared/Heading';
|
||||
import List from '../../lists/List';
|
||||
|
||||
const Skills = ({ id, name, event }) => {
|
||||
const path = `${id}.items`;
|
||||
|
||||
return (
|
||||
<section>
|
||||
<Heading>{name}</Heading>
|
||||
|
||||
<List path={path} event={event} titlePath="name" subtitlePath="level" />
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(Skills);
|
||||
22
src/components/builder/left/sections/Social.js
Normal file
22
src/components/builder/left/sections/Social.js
Normal file
@ -0,0 +1,22 @@
|
||||
import React, { memo } from 'react';
|
||||
import Heading from '../../../shared/Heading';
|
||||
import List from '../../lists/List';
|
||||
|
||||
const Social = ({ id, name, event }) => {
|
||||
const path = `${id}.items`;
|
||||
|
||||
return (
|
||||
<section>
|
||||
<Heading>{name}</Heading>
|
||||
|
||||
<List
|
||||
path={path}
|
||||
event={event}
|
||||
titlePath="network"
|
||||
subtitlePath="username"
|
||||
/>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(Social);
|
||||
23
src/components/builder/left/sections/Work.js
Normal file
23
src/components/builder/left/sections/Work.js
Normal file
@ -0,0 +1,23 @@
|
||||
import React, { memo } from 'react';
|
||||
import Heading from '../../../shared/Heading';
|
||||
import List from '../../lists/List';
|
||||
|
||||
const Work = ({ id, name, event }) => {
|
||||
const path = `${id}.items`;
|
||||
|
||||
return (
|
||||
<section>
|
||||
<Heading>{name}</Heading>
|
||||
|
||||
<List
|
||||
hasDate
|
||||
path={path}
|
||||
event={event}
|
||||
titlePath="company"
|
||||
textPath="summary"
|
||||
/>
|
||||
</section>
|
||||
);
|
||||
};
|
||||
|
||||
export default memo(Work);
|
||||
Reference in New Issue
Block a user