Skip to content

Commit

Permalink
add new template (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
rishavanand committed Oct 10, 2020
1 parent eba0c8b commit 36b25ba
Show file tree
Hide file tree
Showing 3 changed files with 240 additions and 97 deletions.
2 changes: 2 additions & 0 deletions src/config/templates/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './template-1';
export * from './template-2';
115 changes: 18 additions & 97 deletions src/config/demo.ts → src/config/templates/template-1.ts
Original file line number Diff line number Diff line change
@@ -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<SectionProps & Required<Pick<SectionProps, 'sectionIndex'>>> = [
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: [
Expand All @@ -89,21 +62,13 @@ export const DEMO_SECTION_DATA: Array<SectionProps & Required<Pick<SectionProps,
'chartjs',
],
},
type: FIELD_TYPES.SKILLS,
sectionId: 'section002',
sectionIndex: 1,
columnIndex: 0,
fieldIndex: 0,
type: 'skills',
title: 'Frontend',
},
],
[
{
type: FIELD_TYPES.SKILLS,
sectionIndex: 1,
columnIndex: 1,
id: 'a2c62fb6-6bd2-4cc6-8e50-518ab06395b4',
fieldIndex: 0,
type: 'skills',
title: 'Backend',
options: { size: '50' },
data: {
Expand All @@ -127,11 +92,7 @@ export const DEMO_SECTION_DATA: Array<SectionProps & Required<Pick<SectionProps,
],
[
{
type: FIELD_TYPES.SKILLS,
sectionIndex: 1,
columnIndex: 2,
id: '5930876a-fd0d-411c-b76f-87b8920db446',
fieldIndex: 0,
type: 'skills',
title: 'DevOps',
options: { size: '50' },
data: { list: ['aws', 'gcp', 'kubernetes', 'linux', 'git', 'bash'] },
Expand All @@ -141,14 +102,10 @@ export const DEMO_SECTION_DATA: Array<SectionProps & Required<Pick<SectionProps,
},
{
name: 'Connect with me',
id: '9c7100f6-ab5b-4536-8dca-0f0d787a95b7',
fields: [
[
{
type: FIELD_TYPES.SOCIAL,
sectionIndex: 2,
columnIndex: 0,
id: '8ebb8cd1-2235-4f37-855c-0c1d92c600a5',
type: 'social',
options: { alignment: 'center' },
data: {
sites: {
Expand All @@ -160,100 +117,64 @@ export const DEMO_SECTION_DATA: Array<SectionProps & Required<Pick<SectionProps,
instagram: { username: 'iamrishavanand' },
},
},
fieldIndex: 0,
title: '',
},
],
],
sectionIndex: 2,
nameToMarkdown: true,
},
{
name: 'Github Stats',
id: '34635f08-db04-4cda-bb54-23d84e8f0f49',
fields: [
[
{
type: FIELD_TYPES.GITHUB_STATS,
sectionIndex: 3,
columnIndex: 0,
id: 'd75c686c-8b04-455b-8595-e2a6d0c2c8e6',
type: 'github-stats',
options: { alignment: 'center' },
data: { username: 'rishavanand' },
fieldIndex: 0,
},
],
],
sectionIndex: 3,
nameToMarkdown: true,
},
{
name: 'Recent Blog Posts',
id: 'e92e33bb-f26b-419d-bf3e-1958ce6ad660',
fields: [
[
{
type: FIELD_TYPES.BLOG_POST,
sectionIndex: 4,
columnIndex: 0,
id: 'c143fb83-719e-43c1-a1bb-af72878ae370',
},
],
],
sectionIndex: 4,
fields: [[{ type: 'blog-post' }]],
nameToMarkdown: true,
},
{
name: 'Spotify Listening',
id: 'ea07ce6b-cc2b-47f5-b345-931e561b83v6',
sectionIndex: 6,
fields: [
[
{
id: 'field001',
options: { size: 'h3', alignment: 'center' },
data: {
spotifyMarkdown: '',
},
type: FIELD_TYPES.SPOTIFY,
sectionId: 'ea07ce6b-cc2b-47f5-b345-931e561b83v6',
data: { spotifyMarkdown: '' },
type: 'spotify',
},
],
],
},
{
name: 'Visitor Counter',
id: 'ea07ce6b-cc2b-47f5-b345-931e561b57c8',
sectionIndex: 5,
fields: [
[
{
type: FIELD_TYPES.PROFILE_VISITOR_COUNTER,
sectionIndex: 5,
columnIndex: 0,
id: '1fbf06da-c9e9-4a9c-aafb-5ba07aae9972',
type: 'profile-visitor-counter',
options: { alignment: 'center' },
data: { username: 'rishavanand' },
fieldIndex: 0,
},
],
],
},
{
name: 'Support Me',
id: '796debb6-97a6-4e56-8f4e-1fc0965074ee',
sectionIndex: 7,

nameToMarkdown: true,
fields: [
[
{
type: FIELD_TYPES.SUPPORTME,
sectionIndex: 7,
columnIndex: 0,
id: '2c3abfca-f83e-401b-b719-6591d633f23d',
type: 'supportme',
options: { alignment: 'left' },
data: { paypal: '', buymeacoffee: 'rishavanand' },
fieldIndex: 0,
},
],
],
Expand Down
Loading

0 comments on commit 36b25ba

Please sign in to comment.