mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 00:32:35 +10:00
Added new template - Leafish
This commit is contained in:
28
client/templates/Leafish/Leafish.tsx
Normal file
28
client/templates/Leafish/Leafish.tsx
Normal file
@ -0,0 +1,28 @@
|
||||
import { useMemo } from 'react';
|
||||
|
||||
import { useAppSelector } from '@/store/hooks';
|
||||
import { PageProps } from '@/utils/template';
|
||||
|
||||
import { getSectionById } from '../sectionMap';
|
||||
import styles from './Leafish.module.scss';
|
||||
import Masthead from './widgets/Masthead';
|
||||
import Section from './widgets/Section';
|
||||
|
||||
const Leafish: React.FC<PageProps> = ({ page }) => {
|
||||
const isFirstPage = useMemo(() => page === 0, [page]);
|
||||
|
||||
const layout: string[][] = useAppSelector((state) => state.resume.metadata.layout[page]);
|
||||
|
||||
return (
|
||||
<div className={styles.page}>
|
||||
{isFirstPage && <Masthead />}
|
||||
|
||||
<div className={styles.container}>
|
||||
<div className={styles.column}>{layout[0].map((key) => getSectionById(key, Section))}</div>
|
||||
<div className={styles.column}>{layout[1].map((key) => getSectionById(key, Section))}</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default Leafish;
|
||||
Reference in New Issue
Block a user