mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-13 08:13:49 +10:00
add action button to load dummy data
This commit is contained in:
1
src/assets/dummy/data.json
Normal file
1
src/assets/dummy/data.json
Normal file
File diff suppressed because one or more lines are too long
@ -1,145 +0,0 @@
|
||||
{
|
||||
"profile": {
|
||||
"heading": "Profile",
|
||||
"photo": "https://i.imgur.com/PziAhpG.png",
|
||||
"firstName": "Amruth",
|
||||
"lastName": "Pillai",
|
||||
"subtitle": "UI/UX Designer & Full Stack Developer",
|
||||
"address": {
|
||||
"line1": "#5/A, Banashankari Nivas,",
|
||||
"line2": "Brindavan Layout, Padmanabhanagar,",
|
||||
"line3": "Bangalore, India - 560061"
|
||||
},
|
||||
"phone": "+91 98453 36113",
|
||||
"website": "amruthpillai.com",
|
||||
"email": "hello@amruthpillai.com"
|
||||
},
|
||||
"objective": {
|
||||
"enable": true,
|
||||
"heading": "Objective",
|
||||
"body": "Lorem ipsum dolor sit amet consectetur adipisicing elit. Quis deserunt fuga qui perspiciatis magni obcaecati libero ullam lorem, ipsum dolor sit amet consectetur adipisicing elit, voluptate dolores. Lorem ipsum dolor sit amet consectetur adipisicing elit. Assumenda maiores reiciendis, iusto cupiditate, laborum optio nesciunt corrupti, libero numquam a impedit totam magnam ipsum ducimus quas labore ea? Labore, eum."
|
||||
},
|
||||
"work": {
|
||||
"enable": true,
|
||||
"heading": "Work Experience",
|
||||
"items": [
|
||||
{
|
||||
"id": "e737444e-cad1-4862-a5ec-26b3103a2a9f",
|
||||
"title": "GoDhiyo Solutions Pvt. Ltd.",
|
||||
"role": "Full Stack Web Developer",
|
||||
"start": "July 2018",
|
||||
"end": "current",
|
||||
"description": "Lorem ipsum dolor sit amet consectetur, adipisicing elit. Consectetur tempore mollitia perspiciatis quisquam quis obcaecati ducimus architecto temporibus, optio natus fuga maxime beatae consequuntur quae a vero. Molestias, distinctio vero."
|
||||
},
|
||||
{
|
||||
"id": "24ada227-3f81-49f9-897e-210d0c407011",
|
||||
"title": "Grabhouse Pvt Ltd.",
|
||||
"role": "Full Stack Web Developer",
|
||||
"start": "July 2018",
|
||||
"end": "current",
|
||||
"description": "Lorem ipsum dolor sit amet consectetur, adipisicing elit. Consectetur tempore mollitia perspiciatis quisquam quis obcaecati ducimus architecto temporibus, optio natus fuga maxime beatae consequuntur quae a vero. Molestias, distinctio vero."
|
||||
}
|
||||
]
|
||||
},
|
||||
"education": {
|
||||
"enable": true,
|
||||
"heading": "Education",
|
||||
"items": [
|
||||
{
|
||||
"id": "a5995314-0026-44c6-8505-0eed5f59dcd1",
|
||||
"name": "Dayananda Sagar College of Engineering",
|
||||
"major": "Bachelor of Engineering in Computer Science & Engineering",
|
||||
"start": "2015",
|
||||
"end": "2018",
|
||||
"grade": "62%",
|
||||
"description": "Lorem ipsum dolor sit amet consectetur, adipisicing elit. Consectetur tempore mollitia perspiciatis quisquam quis obcaecati ducimus architecto temporibus, optio natus fuga maxime beatae consequuntur quae a vero. Molestias, distinctio vero."
|
||||
},
|
||||
{
|
||||
"id": "ce613329-246f-446d-bad1-3a46368e3f7f",
|
||||
"name": "Dayananda Sagar Institute of Technology",
|
||||
"major": "Diploma in Computer Science & Engineering",
|
||||
"start": "2012",
|
||||
"end": "2015",
|
||||
"grade": "80%",
|
||||
"description": "Lorem ipsum dolor sit amet consectetur, adipisicing elit. Consectetur tempore mollitia perspiciatis quisquam quis obcaecati ducimus architecto temporibus, optio natus fuga maxime beatae consequuntur quae a vero. Molestias, distinctio vero."
|
||||
}
|
||||
]
|
||||
},
|
||||
"awards": {
|
||||
"enable": true,
|
||||
"heading": "Honors & Awards",
|
||||
"items": [
|
||||
{
|
||||
"id": "011d4061-b675-412d-8943-19f2c4271099",
|
||||
"title": "International Flutter Hackathon '19",
|
||||
"subtitle": "1st Place, International Level"
|
||||
},
|
||||
{
|
||||
"id": "340a979f-72e8-406d-aa4f-cc99b98e1e68",
|
||||
"title": "Smart India Hackathon '17",
|
||||
"subtitle": "1st Place, National Level"
|
||||
}
|
||||
]
|
||||
},
|
||||
"certifications": {
|
||||
"enable": true,
|
||||
"heading": "Certifications",
|
||||
"items": [
|
||||
{
|
||||
"id": "868a8e11-3f0f-4ab2-877d-9334edfc25cf",
|
||||
"title": "The Complete React Native and Redux Course",
|
||||
"subtitle": "Udemy"
|
||||
},
|
||||
{
|
||||
"id": "056b8c6b-a376-4a9e-8008-4cc61d051c34",
|
||||
"title": "Applied CS with Android",
|
||||
"subtitle": "Google"
|
||||
}
|
||||
]
|
||||
},
|
||||
"skills": {
|
||||
"enable": true,
|
||||
"heading": "Skills & Hobbies",
|
||||
"items": [
|
||||
"Photography",
|
||||
"Music",
|
||||
"Travel",
|
||||
"Adobe Photoshop",
|
||||
"Figma",
|
||||
"React",
|
||||
"React Native",
|
||||
"NodeJS"
|
||||
]
|
||||
},
|
||||
"extras": {
|
||||
"enable": true,
|
||||
"heading": "Personal Information",
|
||||
"items": [
|
||||
{
|
||||
"id": "b94ad832-df86-4b6c-b1ee-8f955f72b891",
|
||||
"key": "Date of Birth",
|
||||
"value": "6th August 1995"
|
||||
},
|
||||
{
|
||||
"id": "76ee0ca4-2beb-49ba-9fb5-8dd7fe8d3b80",
|
||||
"key": "Father's Name",
|
||||
"value": "Ashokan Ramalingam"
|
||||
},
|
||||
{
|
||||
"id": "cc159f26-07f5-4f57-9cce-1cb7346e9ea5",
|
||||
"key": "Languages Known",
|
||||
"value": "English, Kannada, Tamil, Hindi, German"
|
||||
},
|
||||
{
|
||||
"id": "055ef7c2-f984-45e5-9f2b-8b2300de6be1",
|
||||
"key": "Nationality",
|
||||
"value": "Indian"
|
||||
},
|
||||
{
|
||||
"id": "b36abc3e-46d0-477b-808b-8a73037dc251",
|
||||
"key": "Passport Number",
|
||||
"value": "R0337285"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1,11 +0,0 @@
|
||||
{
|
||||
"layout": "Onyx",
|
||||
"font": {
|
||||
"family": "Montserrat"
|
||||
},
|
||||
"colors": {
|
||||
"background": "#FFFFFF",
|
||||
"primary": "#414141",
|
||||
"accent": "#FF5722"
|
||||
}
|
||||
}
|
||||
@ -24,6 +24,11 @@ const ActionsTab = ({ data, theme, dispatch }) => {
|
||||
dlAnchor.click();
|
||||
};
|
||||
|
||||
const loadDummyData = () => {
|
||||
dispatch({ type: 'load_dummy_data' });
|
||||
dispatch({ type: 'save_data' });
|
||||
};
|
||||
|
||||
const resetEverything = () => {
|
||||
dispatch({ type: 'reset' });
|
||||
dispatch({ type: 'save_data' });
|
||||
@ -88,7 +93,7 @@ const ActionsTab = ({ data, theme, dispatch }) => {
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => window.print()}
|
||||
className="mt-4 w-1/2 bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium py-2 px-5 rounded"
|
||||
className="mt-4 bg-blue-600 hover:bg-blue-700 text-white text-sm font-medium py-2 px-5 rounded"
|
||||
>
|
||||
<div className="flex justify-center items-center">
|
||||
<i className="material-icons mr-2 font-bold text-base">print</i>
|
||||
@ -99,6 +104,28 @@ const ActionsTab = ({ data, theme, dispatch }) => {
|
||||
|
||||
<hr className="my-6" />
|
||||
|
||||
<div className="shadow text-center p-5">
|
||||
<h6 className="font-bold text-sm mb-2">Load Dummy Data</h6>
|
||||
|
||||
<div className="text-sm">
|
||||
Unclear on what to do with a fresh blank page? Load some dummy data with pre-populated
|
||||
values to see how a resume should look and you can start editing from there.
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
onClick={loadDummyData}
|
||||
className="mt-4 bg-green-600 hover:bg-green-700 text-white text-sm font-medium py-2 px-5 rounded"
|
||||
>
|
||||
<div className="flex justify-center items-center">
|
||||
<i className="material-icons mr-2 font-bold text-base">flight_takeoff</i>
|
||||
<span className="text-sm">Populate Data</span>
|
||||
</div>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<hr className="my-6" />
|
||||
|
||||
<div className="shadow text-center p-5">
|
||||
<h6 className="font-bold text-sm mb-2">Reset Everything!</h6>
|
||||
|
||||
@ -111,7 +138,7 @@ const ActionsTab = ({ data, theme, dispatch }) => {
|
||||
<button
|
||||
type="button"
|
||||
onClick={resetEverything}
|
||||
className="mt-4 w-1/2 bg-red-600 hover:bg-red-700 text-white text-sm font-medium py-2 px-5 rounded"
|
||||
className="mt-4 bg-red-600 hover:bg-red-700 text-white text-sm font-medium py-2 px-5 rounded"
|
||||
>
|
||||
<div className="flex justify-center items-center">
|
||||
<i className="material-icons mr-2 font-bold text-base">refresh</i>
|
||||
|
||||
@ -4,8 +4,7 @@ import get from 'lodash/get';
|
||||
import set from 'lodash/set';
|
||||
import remove from 'lodash/remove';
|
||||
|
||||
import initialData from '../assets/starter/data.json';
|
||||
import initialTheme from '../assets/starter/theme.json';
|
||||
import dummyData from '../assets/dummy/data.json';
|
||||
import { move } from '../utils';
|
||||
|
||||
const initialState = {
|
||||
@ -118,11 +117,10 @@ const reducer = (state, { type, payload }) => {
|
||||
data: payload.data,
|
||||
theme: payload.theme,
|
||||
};
|
||||
case 'populate_starter':
|
||||
case 'load_dummy_data':
|
||||
return {
|
||||
...state,
|
||||
data: initialData,
|
||||
theme: initialTheme,
|
||||
...dummyData,
|
||||
};
|
||||
case 'reset':
|
||||
return initialState;
|
||||
|
||||
Reference in New Issue
Block a user