From 36b25ba7db6ee0364417131f0799b90785591e6d Mon Sep 17 00:00:00 2001 From: rishavanand Date: Sat, 10 Oct 2020 18:14:31 +0530 Subject: [PATCH] add new template (#55) --- src/config/templates/index.ts | 2 + .../{demo.ts => templates/template-1.ts} | 115 ++------- src/config/templates/template-2.ts | 220 ++++++++++++++++++ 3 files changed, 240 insertions(+), 97 deletions(-) create mode 100644 src/config/templates/index.ts rename src/config/{demo.ts => templates/template-1.ts} (56%) create mode 100644 src/config/templates/template-2.ts diff --git a/src/config/templates/index.ts b/src/config/templates/index.ts new file mode 100644 index 0000000..1b2ba6b --- /dev/null +++ b/src/config/templates/index.ts @@ -0,0 +1,2 @@ +export * from './template-1'; +export * from './template-2'; diff --git a/src/config/demo.ts b/src/config/templates/template-1.ts similarity index 56% rename from src/config/demo.ts rename to src/config/templates/template-1.ts index 1f9ea14..b9b25be 100644 --- a/src/config/demo.ts +++ b/src/config/templates/template-1.ts @@ -1,80 +1,53 @@ -import { v4 as uuidv4 } from 'uuid'; -import { FIELD_TYPES } from './global'; -import { FieldProps } from '../components/Field'; -import { SectionProps } from '../components/Section'; -import { TEXT_ALIGNMENT, TEXT_SIZE } from '../components/Field/TextField'; -import { IMAGE_ALIGNMENT } from '../components/Field/ImageField'; -import { SKILLS } from './skills'; - -export const DEMO_SECTION_DATA: Array>> = [ +export const TEMPLATE_1 = [ { name: 'Intro', - id: 'section001', - sectionIndex: 1, fields: [ [ { - id: 'field001', options: { width: 600, alignment: 'center', fitImage: true }, data: { url: 'https://rishavanand.github.io/static/images/greetings.gif', alt: 'Greetings' }, - type: FIELD_TYPES.IMAGE, - sectionIndex: 0, - columnIndex: 0, - fieldIndex: 0, + type: 'image', }, { - id: 'field002', options: { size: 'h3', alignment: 'center' }, data: { value: "I'm Rishav, a full-time full-stack freelance developer šŸ‘Øā€šŸ’» working remotely since 2013 šŸš€", }, - type: FIELD_TYPES.TEXT, - sectionId: 'section001', + type: 'text', }, { - id: 'field003', options: { size: '', isList: true }, data: { value: 'šŸ”­ Iā€™m currently working on [Github Profilinator](https://github.com/rishavanand/github-profilinator)', }, - type: FIELD_TYPES.TEXT, - sectionId: 'section001', + type: 'text', }, { - id: 'field004', options: { size: '', isList: true }, data: { value: 'šŸŒ± Iā€™m currently learning Hyperledger and Kubernetes' }, - type: FIELD_TYPES.TEXT, - sectionId: 'section001', + type: 'text', }, { - id: 'field005', options: { size: '', isList: true }, data: { value: 'ā“ Ask me about anything related to MERN stack and related technologies' }, - type: FIELD_TYPES.TEXT, - sectionId: 'section001', + type: 'text', }, { - id: 'field006', options: { size: '', isList: true }, data: { value: 'āš” Fun fact: I use tabs over spaces' }, - type: FIELD_TYPES.TEXT, - sectionId: 'section001', + type: 'text', }, ], ], }, { name: 'My Skill Set', - id: 'section002', - sectionIndex: 2, nameToMarkdown: true, fields: [ [ { - id: 'field007', options: { size: '50', alignment: 'center' }, data: { list: [ @@ -89,21 +62,13 @@ export const DEMO_SECTION_DATA: Array