mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-10 04:22:27 +10:00
- creating a dynamic color palette
- implementing actions section
This commit is contained in:
@ -14,7 +14,7 @@ const LeftNavbar = () => (
|
|||||||
|
|
||||||
<hr className="my-6" />
|
<hr className="my-6" />
|
||||||
|
|
||||||
<div className="grid grid-cols-1 gap-4 text-secondary-dark">
|
<div className="grid grid-cols-1 gap-4 text-primary-400">
|
||||||
{sections.map((x) => (
|
{sections.map((x) => (
|
||||||
<SectionIcon
|
<SectionIcon
|
||||||
key={x.id}
|
key={x.id}
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
.list {
|
.list {
|
||||||
@apply flex flex-col border border-secondary rounded;
|
@apply flex flex-col border border-primary-200 rounded;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
.listItem {
|
.list-item {
|
||||||
@apply flex items-center justify-between border-t border-secondary px-6 py-5;
|
@apply flex items-center justify-between border-t border-primary-200 px-6 py-5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.listItem:first-child {
|
.list-item:first-child {
|
||||||
@apply border-t-0;
|
@apply border-t-0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -11,7 +11,7 @@
|
|||||||
@apply transition-opacity duration-200 ease-in-out;
|
@apply transition-opacity duration-200 ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.listItem:hover .menu {
|
.list-item:hover .menu {
|
||||||
@apply opacity-100;
|
@apply opacity-100;
|
||||||
@apply transition-opacity duration-200 ease-in-out;
|
@apply transition-opacity duration-200 ease-in-out;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@ import SyncIndicator from './SyncIndicator';
|
|||||||
const RightNavbar = () => {
|
const RightNavbar = () => {
|
||||||
return (
|
return (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<div className="grid grid-cols-1 gap-4 text-secondary-dark">
|
<div className="grid grid-cols-1 gap-4 text-primary-400">
|
||||||
{sections.map((x) => (
|
{sections.map((x) => (
|
||||||
<SectionIcon
|
<SectionIcon
|
||||||
key={x.id}
|
key={x.id}
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import Colors from './sections/Colors';
|
|||||||
import Fonts from './sections/Fonts';
|
import Fonts from './sections/Fonts';
|
||||||
import Layout from './sections/Layout';
|
import Layout from './sections/Layout';
|
||||||
import Templates from './sections/Templates';
|
import Templates from './sections/Templates';
|
||||||
|
import Actions from './sections/Actions';
|
||||||
|
|
||||||
const getComponent = (id) => {
|
const getComponent = (id) => {
|
||||||
switch (id) {
|
switch (id) {
|
||||||
@ -18,6 +19,8 @@ const getComponent = (id) => {
|
|||||||
return Colors;
|
return Colors;
|
||||||
case 'fonts':
|
case 'fonts':
|
||||||
return Fonts;
|
return Fonts;
|
||||||
|
case 'actions':
|
||||||
|
return Actions;
|
||||||
default:
|
default:
|
||||||
throw new Error();
|
throw new Error();
|
||||||
}
|
}
|
||||||
|
|||||||
83
src/components/builder/right/sections/Actions.js
Normal file
83
src/components/builder/right/sections/Actions.js
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
import React, { memo } from 'react';
|
||||||
|
import { MdImportExport } from 'react-icons/md';
|
||||||
|
import Heading from '../../../shared/Heading';
|
||||||
|
import Button from '../../../shared/Button';
|
||||||
|
import styles from './Actions.module.css';
|
||||||
|
import Input from '../../../shared/Input';
|
||||||
|
|
||||||
|
const Actions = () => {
|
||||||
|
return (
|
||||||
|
<section>
|
||||||
|
<Heading>Actions</Heading>
|
||||||
|
|
||||||
|
<div className={styles.container}>
|
||||||
|
<h5>Import from Other Sources</h5>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
You can import your information from various sources like JSON Resume
|
||||||
|
or your LinkedIn profile to autofill most of the data for your resume.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div className="mt-4 flex">
|
||||||
|
<Button icon={MdImportExport} title="Import" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className={styles.container}>
|
||||||
|
<h5>Export Your Resume</h5>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Export your resume as a PDF to share with recruiters or a JSON that
|
||||||
|
you will be able to import back onto this app on another computer.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div className="mt-4 flex">
|
||||||
|
<Button title="Save as PDF" />
|
||||||
|
<Button outline title="Export as JSON" className="ml-6" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className={styles.container}>
|
||||||
|
<h5>Share Your Resume</h5>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
The link below will be accessible publicly if you choose, and you can
|
||||||
|
share the latest version of your resume to anyone in the world.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<Input type="action" value="https://google.com" onClick={() => {}} />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className={styles.container}>
|
||||||
|
<h5>Load Demo Data</h5>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Unclear on what to do with a fresh blank page? Load some demo data to
|
||||||
|
see how a resume should look and you can start editing from there.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div className="mt-4 flex">
|
||||||
|
<Button title="Load Demo Data" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className={styles.container}>
|
||||||
|
<h5>Delete Account</h5>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
If you would like to delete your account and erase all your resumes,
|
||||||
|
it’s just one button away. Please be weary as this is an irreversible
|
||||||
|
process.
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div className="mt-4 flex">
|
||||||
|
<Button title="Delete Account" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default memo(Actions);
|
||||||
11
src/components/builder/right/sections/Actions.module.css
Normal file
11
src/components/builder/right/sections/Actions.module.css
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
.container {
|
||||||
|
@apply bg-primary-100 rounded grid gap-5 p-8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container h5 {
|
||||||
|
@apply text-lg font-semibold;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container p {
|
||||||
|
@apply text-sm font-medium;
|
||||||
|
}
|
||||||
@ -1,9 +1,9 @@
|
|||||||
import cx from 'classnames';
|
import cx from 'classnames';
|
||||||
import React, { memo } from 'react';
|
import React, { memo } from 'react';
|
||||||
import { useDispatch, useSelector } from '../../../../contexts/ResumeContext';
|
import { useDispatch, useSelector } from '../../../../contexts/ResumeContext';
|
||||||
|
import fonts from '../../../../data/fonts';
|
||||||
import { handleKeyUp } from '../../../../utils';
|
import { handleKeyUp } from '../../../../utils';
|
||||||
import Heading from '../../../shared/Heading';
|
import Heading from '../../../shared/Heading';
|
||||||
import fonts from '../../../../data/fonts';
|
|
||||||
import styles from './Fonts.module.css';
|
import styles from './Fonts.module.css';
|
||||||
|
|
||||||
const Fonts = () => {
|
const Fonts = () => {
|
||||||
|
|||||||
@ -1,19 +1,15 @@
|
|||||||
.font {
|
.font {
|
||||||
@apply px-6 py-6 text-xl font-medium truncate text-center bg-secondary rounded shadow;
|
@apply px-6 py-6 text-xl font-medium truncate text-center border border-transparent bg-primary-100 rounded;
|
||||||
@apply transition-colors duration-200 ease-in-out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.font:focus {
|
.font:focus {
|
||||||
@apply outline-none bg-secondary-light;
|
@apply outline-none border border-primary-400;
|
||||||
@apply transition-colors duration-200 ease-in-out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.font:hover {
|
.font:hover {
|
||||||
@apply bg-secondary-light;
|
@apply border border-primary-400;
|
||||||
@apply transition-colors duration-200 ease-in-out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.font.selected {
|
.font.selected {
|
||||||
@apply outline-none bg-secondary-light;
|
@apply outline-none border border-primary-600;
|
||||||
@apply transition-colors duration-200 ease-in-out;
|
|
||||||
}
|
}
|
||||||
@ -1,7 +1,7 @@
|
|||||||
.droppable {
|
.droppable {
|
||||||
@apply p-6 bg-secondary-light col-span-1 rounded;
|
@apply p-6 bg-primary-100 col-span-1 rounded;
|
||||||
}
|
}
|
||||||
|
|
||||||
.draggable {
|
.draggable {
|
||||||
@apply px-4 py-2 capitalize font-medium rounded bg-secondary;
|
@apply px-4 py-2 capitalize font-medium rounded bg-primary-200;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,16 +1,19 @@
|
|||||||
import cx from 'classnames';
|
import cx from 'classnames';
|
||||||
import React, { memo } from 'react';
|
import React, { memo, useContext } from 'react';
|
||||||
import { useDispatch, useSelector } from '../../../../contexts/ResumeContext';
|
import { useDispatch, useSelector } from '../../../../contexts/ResumeContext';
|
||||||
import templates from '../../../../data/templates';
|
import templates from '../../../../data/templates';
|
||||||
import { handleKeyUp } from '../../../../utils';
|
import { handleKeyUp } from '../../../../utils';
|
||||||
import Heading from '../../../shared/Heading';
|
import Heading from '../../../shared/Heading';
|
||||||
import styles from './Templates.module.css';
|
import styles from './Templates.module.css';
|
||||||
|
import ThemeContext from '../../../../contexts/ThemeContext';
|
||||||
|
|
||||||
const Templates = () => {
|
const Templates = () => {
|
||||||
const dispatch = useDispatch();
|
const dispatch = useDispatch();
|
||||||
const template = useSelector('metadata.template');
|
const template = useSelector('metadata.template');
|
||||||
|
const { toggleDarkMode } = useContext(ThemeContext);
|
||||||
|
|
||||||
const handleClick = (value) => {
|
const handleClick = (value) => {
|
||||||
|
toggleDarkMode();
|
||||||
dispatch({
|
dispatch({
|
||||||
type: 'on_input',
|
type: 'on_input',
|
||||||
payload: {
|
payload: {
|
||||||
|
|||||||
@ -8,12 +8,12 @@
|
|||||||
|
|
||||||
.template img {
|
.template img {
|
||||||
height: 240px;
|
height: 240px;
|
||||||
@apply w-full object-cover border-2 border-transparent rounded;
|
@apply w-full object-cover border border-transparent rounded;
|
||||||
@apply transition-opacity duration-200 ease-in-out;
|
@apply transition-opacity duration-200 ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.template.selected img {
|
.template.selected img {
|
||||||
@apply border-2 border-primary;
|
@apply border-primary-600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.template:hover img {
|
.template:hover img {
|
||||||
|
|||||||
@ -12,7 +12,7 @@
|
|||||||
.resume > .page {
|
.resume > .page {
|
||||||
max-width: 184px;
|
max-width: 184px;
|
||||||
height: 260px;
|
height: 260px;
|
||||||
@apply rounded absolute w-full bg-secondary-light;
|
@apply rounded absolute w-full bg-primary-100 text-primary-400;
|
||||||
@apply transition-opacity duration-200 ease-in-out;
|
@apply transition-opacity duration-200 ease-in-out;
|
||||||
@apply cursor-pointer absolute flex justify-center items-center;
|
@apply cursor-pointer absolute flex justify-center items-center;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
height: 260px;
|
height: 260px;
|
||||||
@apply rounded absolute w-full bg-black;
|
@apply rounded absolute w-full bg-black;
|
||||||
@apply opacity-0 transition-opacity duration-200 ease-in-out;
|
@apply opacity-0 transition-opacity duration-200 ease-in-out;
|
||||||
@apply absolute text-gray-500 flex flex-col justify-evenly items-center;
|
@apply absolute text-primary-500 flex flex-col justify-evenly items-center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.resume > .page:hover {
|
.resume > .page:hover {
|
||||||
|
|||||||
@ -1,18 +1,10 @@
|
|||||||
import { Link, navigate } from 'gatsby';
|
import { Link } from 'gatsby';
|
||||||
import React, { memo, useContext } from 'react';
|
import React, { memo } from 'react';
|
||||||
import UserContext from '../../contexts/UserContext';
|
|
||||||
import Avatar from '../shared/Avatar';
|
import Avatar from '../shared/Avatar';
|
||||||
import Logo from '../shared/Logo';
|
import Logo from '../shared/Logo';
|
||||||
import styles from './TopNavbar.module.css';
|
import styles from './TopNavbar.module.css';
|
||||||
|
|
||||||
const TopNavbar = () => {
|
const TopNavbar = () => {
|
||||||
const { logout } = useContext(UserContext);
|
|
||||||
|
|
||||||
const handleLogout = async () => {
|
|
||||||
await logout();
|
|
||||||
navigate('/');
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.navbar}>
|
<div className={styles.navbar}>
|
||||||
<div className="container">
|
<div className="container">
|
||||||
@ -20,18 +12,9 @@ const TopNavbar = () => {
|
|||||||
<Logo size="40px" />
|
<Logo size="40px" />
|
||||||
</Link>
|
</Link>
|
||||||
|
|
||||||
<div className="flex items-center">
|
|
||||||
<button
|
|
||||||
className="text-primary font-semibold focus:outline-none hover:underline"
|
|
||||||
onClick={handleLogout}
|
|
||||||
>
|
|
||||||
Logout
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<Avatar className="ml-8" />
|
<Avatar className="ml-8" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@ const Hero = () => {
|
|||||||
|
|
||||||
<div className="ml-12">
|
<div className="ml-12">
|
||||||
<h1 className="text-5xl font-bold">Reactive Resume</h1>
|
<h1 className="text-5xl font-bold">Reactive Resume</h1>
|
||||||
<h2 className="mt-1 text-3xl text-gray-500">
|
<h2 className="mt-1 text-3xl text-primary-500">
|
||||||
A free and open-source resume builder.
|
A free and open-source resume builder.
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
|
|||||||
@ -11,9 +11,9 @@ const Avatar = ({ className }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<img
|
<img
|
||||||
className={cx(styles.container, className)}
|
|
||||||
src={photoURL}
|
src={photoURL}
|
||||||
alt={user.displayName}
|
alt={user.displayName}
|
||||||
|
className={cx(styles.container, className)}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,21 +1,20 @@
|
|||||||
import classNames from 'classnames';
|
import cx from 'classnames';
|
||||||
import React, { memo } from 'react';
|
import React, { memo } from 'react';
|
||||||
import { handleKeyUp } from '../../utils';
|
import { handleKeyUp } from '../../utils';
|
||||||
import styles from './Button.module.css';
|
import styles from './Button.module.css';
|
||||||
|
|
||||||
const Button = ({ icon, title, onClick, outline, className, isLoading }) => {
|
const Button = ({ icon, title, onClick, outline, className, isLoading }) => {
|
||||||
const Icon = icon;
|
const Icon = icon;
|
||||||
const classes = classNames(styles.container, className, {
|
|
||||||
[styles.outline]: outline,
|
|
||||||
});
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
className={classes}
|
|
||||||
onKeyUp={(e) => handleKeyUp(e, onClick)}
|
onKeyUp={(e) => handleKeyUp(e, onClick)}
|
||||||
onClick={isLoading ? undefined : onClick}
|
onClick={isLoading ? undefined : onClick}
|
||||||
|
className={cx(styles.container, className, {
|
||||||
|
[styles.outline]: outline,
|
||||||
|
})}
|
||||||
>
|
>
|
||||||
{icon && <Icon size="14" className="mr-2" />}
|
{icon && <Icon size="14" className="mr-3" />}
|
||||||
{isLoading ? 'Loading...' : title}
|
{isLoading ? 'Loading...' : title}
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -1,16 +1,31 @@
|
|||||||
.container {
|
.container {
|
||||||
padding: 6px 24px;
|
font-size: 11px;
|
||||||
@apply flex items-center cursor-pointer inline-flex rounded font-semibold bg-primary border border-primary text-inverse;
|
padding: 6px 18px;
|
||||||
|
@apply relative flex items-center cursor-pointer rounded font-semibold bg-primary-900 border border-primary-900 text-primary-50;
|
||||||
|
@apply transition-colors duration-200 ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container:hover {
|
.container:hover {
|
||||||
@apply bg-primary-dark;
|
@apply bg-primary-700 border-primary-700;
|
||||||
|
@apply transition-colors duration-200 ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container:active {
|
||||||
|
top: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container:focus {
|
||||||
|
@apply outline-none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container.outline {
|
.container.outline {
|
||||||
@apply border border-primary bg-inverse text-primary;
|
@apply border border-primary-900 bg-transparent text-primary-900;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container.outline:hover {
|
.container.outline:hover {
|
||||||
@apply bg-inverse-dark;
|
@apply bg-primary-200;
|
||||||
|
}
|
||||||
|
|
||||||
|
.container.outline:focus {
|
||||||
|
@apply outline-none;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,8 +2,9 @@ import cx from 'classnames';
|
|||||||
import { isFunction } from 'lodash';
|
import { isFunction } from 'lodash';
|
||||||
import React, { memo, useEffect, useState } from 'react';
|
import React, { memo, useEffect, useState } from 'react';
|
||||||
import { FaAngleDown } from 'react-icons/fa';
|
import { FaAngleDown } from 'react-icons/fa';
|
||||||
import { MdClose } from 'react-icons/md';
|
import { MdClose, MdOpenInNew } from 'react-icons/md';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
import { v4 as uuidv4 } from 'uuid';
|
||||||
|
import { IoIosCopy } from 'react-icons/io';
|
||||||
import { useDispatch, useSelector } from '../../contexts/ResumeContext';
|
import { useDispatch, useSelector } from '../../contexts/ResumeContext';
|
||||||
import { handleKeyUp } from '../../utils';
|
import { handleKeyUp } from '../../utils';
|
||||||
import styles from './Input.module.css';
|
import styles from './Input.module.css';
|
||||||
@ -17,12 +18,11 @@ const Input = ({
|
|||||||
onBlur,
|
onBlur,
|
||||||
options,
|
options,
|
||||||
touched,
|
touched,
|
||||||
|
onClick,
|
||||||
onChange,
|
onChange,
|
||||||
className,
|
className,
|
||||||
isRequired,
|
isRequired,
|
||||||
placeholder,
|
placeholder,
|
||||||
onDeleteItem,
|
|
||||||
showDeleteItemButton,
|
|
||||||
type = 'text',
|
type = 'text',
|
||||||
}) => {
|
}) => {
|
||||||
const [uuid, setUuid] = useState(null);
|
const [uuid, setUuid] = useState(null);
|
||||||
@ -68,12 +68,12 @@ const Input = ({
|
|||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{showDeleteItemButton && isFunction(onDeleteItem) && (
|
{isFunction(onClick) && (
|
||||||
<MdClose
|
<MdClose
|
||||||
size="16px"
|
size="16px"
|
||||||
tabIndex="0"
|
tabIndex="0"
|
||||||
onClick={onDeleteItem}
|
onClick={onClick}
|
||||||
onKeyUp={(e) => handleKeyUp(e, onDeleteItem)}
|
onKeyUp={(e) => handleKeyUp(e, onClick)}
|
||||||
className="absolute right-0 cursor-pointer opacity-50 hover:opacity-75 mx-4"
|
className="absolute right-0 cursor-pointer opacity-50 hover:opacity-75 mx-4"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@ -143,6 +143,21 @@ const Input = ({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{type === 'action' && (
|
||||||
|
<div className={cx('relative grid items-center', styles.readOnly)}>
|
||||||
|
<input readOnly id={uuid} name={name} type="text" value={value} />
|
||||||
|
|
||||||
|
<div
|
||||||
|
tabIndex="0"
|
||||||
|
role="button"
|
||||||
|
onClick={onClick}
|
||||||
|
onKeyUp={(e) => handleKeyUp(e, onClick)}
|
||||||
|
>
|
||||||
|
<MdOpenInNew size="16px" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
{error && touched && <p>{error}</p>}
|
{error && touched && <p>{error}</p>}
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -5,25 +5,25 @@
|
|||||||
.container label input,
|
.container label input,
|
||||||
.container label textarea,
|
.container label textarea,
|
||||||
.container label select {
|
.container label select {
|
||||||
@apply py-3 px-4 rounded bg-secondary text-primary border border-secondary appearance-none;
|
@apply py-3 px-4 rounded text-primary-900 bg-primary-200 border border-transparent appearance-none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container label input::placeholder,
|
.container label input::placeholder,
|
||||||
.container label textarea::placeholder,
|
.container label textarea::placeholder,
|
||||||
.container label select::placeholder {
|
.container label select::placeholder {
|
||||||
@apply text-primary opacity-50;
|
@apply opacity-50;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container label input:hover,
|
.container label input:hover,
|
||||||
.container label textarea:hover,
|
.container label textarea:hover,
|
||||||
.container label select:hover {
|
.container label select:hover {
|
||||||
@apply outline-none border-secondary-dark;
|
@apply outline-none border-primary-400;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container label input:focus,
|
.container label input:focus,
|
||||||
.container label textarea:focus,
|
.container label textarea:focus,
|
||||||
.container label select:focus {
|
.container label select:focus {
|
||||||
@apply outline-none border-primary;
|
@apply outline-none border-primary-600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container label > p {
|
.container label > p {
|
||||||
@ -32,9 +32,30 @@
|
|||||||
|
|
||||||
.circle {
|
.circle {
|
||||||
left: 14px;
|
left: 14px;
|
||||||
@apply absolute bg-white rounded-full w-6 h-6;
|
@apply absolute bg-primary-900 rounded-full w-6 h-6;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.circle + input {
|
div.circle + input {
|
||||||
padding-left: 44px;
|
padding-left: 44px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.read-only input:hover {
|
||||||
|
cursor: default;
|
||||||
|
border-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.read-only input:focus {
|
||||||
|
border-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.read-only div {
|
||||||
|
@apply absolute rounded-r top-0 right-0 bottom-0 w-20 flex justify-center items-center bg-primary-50;
|
||||||
|
}
|
||||||
|
|
||||||
|
.read-only div:hover {
|
||||||
|
@apply bg-primary-100;
|
||||||
|
}
|
||||||
|
|
||||||
|
.read-only div:focus {
|
||||||
|
@apply outline-none;
|
||||||
|
}
|
||||||
|
|||||||
@ -21,8 +21,7 @@ const InputArray = ({ formik, schema, helpers, label, path, placeholder }) => {
|
|||||||
{({ field, meta }) => (
|
{({ field, meta }) => (
|
||||||
<Input
|
<Input
|
||||||
className="my-1"
|
className="my-1"
|
||||||
showDeleteItemButton
|
onClick={() => helpers.remove(i)}
|
||||||
onDeleteItem={() => helpers.remove(i)}
|
|
||||||
{...field}
|
{...field}
|
||||||
{...meta}
|
{...meta}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
width: 60px;
|
width: 60px;
|
||||||
height: 60px;
|
height: 60px;
|
||||||
flex: 0 0 60px;
|
flex: 0 0 60px;
|
||||||
@apply flex items-center justify-center cursor-pointer bg-secondary text-secondary-dark rounded-full;
|
@apply flex items-center justify-center cursor-pointer bg-primary-200 text-primary-500 rounded-full;
|
||||||
@apply transition-opacity duration-200 ease-in-out;
|
@apply transition-opacity duration-200 ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -18,8 +18,8 @@ const SectionIcon = ({ section, containerId, tooltipPlacement }) => {
|
|||||||
offset={-18}
|
offset={-18}
|
||||||
duration={500}
|
duration={500}
|
||||||
containerId={containerId}
|
containerId={containerId}
|
||||||
activeClass="text-primary"
|
activeClass="text-primary-900"
|
||||||
className="py-2 cursor-pointer focus:outline-none focus:text-primary hover:text-primary animate__animated animate__fadeIn"
|
className="py-2 cursor-pointer focus:outline-none focus:text-primary-900 hover:text-primary-900"
|
||||||
>
|
>
|
||||||
<Icon size="18px" />
|
<Icon size="18px" />
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@ -2,22 +2,28 @@ import React, { createContext, memo, useEffect, useState } from 'react';
|
|||||||
|
|
||||||
const COLOR_CONFIG = {
|
const COLOR_CONFIG = {
|
||||||
light: {
|
light: {
|
||||||
'--color-primary': '#444',
|
'--color-primary-50': '#FFFFFF',
|
||||||
'--color-primary-dark': '#333',
|
'--color-primary-100': '#FAFAFA',
|
||||||
'--color-inverse': '#fff',
|
'--color-primary-200': '#F1F0F0',
|
||||||
'--color-inverse-dark': '#f5f5f5',
|
'--color-primary-300': '#D8D2CD',
|
||||||
'--color-secondary-light': '#f7fafc',
|
'--color-primary-400': '#CDC4BA',
|
||||||
'--color-secondary': '#edf2f7',
|
'--color-primary-500': '#ABA59D',
|
||||||
'--color-secondary-dark': '#718096',
|
'--color-primary-600': '#8A8680',
|
||||||
|
'--color-primary-700': '#686663',
|
||||||
|
'--color-primary-800': '#484745',
|
||||||
|
'--color-primary-900': '#282727',
|
||||||
},
|
},
|
||||||
dark: {
|
dark: {
|
||||||
'--color-primary': '#f5f5f5',
|
'--color-primary-50': '#212121',
|
||||||
'--color-primary-dark': '#eeeeee',
|
'--color-primary-100': '#2c2c2c',
|
||||||
'--color-inverse': '#212121',
|
'--color-primary-200': '#424242',
|
||||||
'--color-inverse-dark': '#181818',
|
'--color-primary-300': '#616161',
|
||||||
'--color-secondary-light': '#2c2c2c',
|
'--color-primary-400': '#757575',
|
||||||
'--color-secondary': '#444',
|
'--color-primary-500': '#9e9e9e',
|
||||||
'--color-secondary-dark': '#888',
|
'--color-primary-600': '#bdbdbd',
|
||||||
|
'--color-primary-700': '#e0e0e0',
|
||||||
|
'--color-primary-800': '#eeeeee',
|
||||||
|
'--color-primary-900': '#f5f5f5',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,8 +1,9 @@
|
|||||||
import {
|
import {
|
||||||
MdColorLens,
|
MdColorLens,
|
||||||
MdDashboard,
|
MdDashboard,
|
||||||
MdStyle,
|
|
||||||
MdFontDownload,
|
MdFontDownload,
|
||||||
|
MdImportExport,
|
||||||
|
MdStyle,
|
||||||
} from 'react-icons/md';
|
} from 'react-icons/md';
|
||||||
|
|
||||||
export default [
|
export default [
|
||||||
@ -26,4 +27,9 @@ export default [
|
|||||||
name: 'Fonts',
|
name: 'Fonts',
|
||||||
icon: MdFontDownload,
|
icon: MdFontDownload,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
id: 'actions',
|
||||||
|
name: 'Actions',
|
||||||
|
icon: MdImportExport,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
.modal {
|
.modal {
|
||||||
width: min(600px, calc(100vw - 100px));
|
width: min(600px, calc(100vw - 100px));
|
||||||
@apply p-8 rounded bg-inverse text-primary outline-none;
|
@apply p-8 rounded bg-primary-50 outline-none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal .title {
|
.modal .title {
|
||||||
|
|||||||
@ -40,7 +40,7 @@ const Builder = ({ id }) => {
|
|||||||
<div className="col-span-3">
|
<div className="col-span-3">
|
||||||
<LeftSidebar />
|
<LeftSidebar />
|
||||||
</div>
|
</div>
|
||||||
<div className="h-screen overflow-scroll col-span-5 bg-inverse-dark grid items-center justify-center">
|
<div className="h-screen overflow-scroll col-span-5 bg-primary-100 grid items-center justify-center">
|
||||||
<Artboard />
|
<Artboard />
|
||||||
</div>
|
</div>
|
||||||
<div className="col-span-3">
|
<div className="col-span-3">
|
||||||
|
|||||||
@ -49,8 +49,10 @@ const Home = () => {
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer className="my-24">
|
<footer className="my-24">
|
||||||
<p className="font-medium text-gray-500">
|
<p className="text-primary-500 opacity-75">
|
||||||
Licensed under <a href="/">MIT</a> | Made with love by{' '}
|
Licensed under <a href="/">MIT</a>
|
||||||
|
<br />
|
||||||
|
Made with love by{' '}
|
||||||
<a href="https://www.amruthpillai.com/">Amruth Pillai</a>
|
<a href="https://www.amruthpillai.com/">Amruth Pillai</a>
|
||||||
</p>
|
</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|||||||
@ -1,9 +1,12 @@
|
|||||||
:root {
|
:root {
|
||||||
--color-primary: #444;
|
--color-primary-50: #FFFFFF;
|
||||||
--color-primary-dark: #333;
|
--color-primary-100: #FAFAFA;
|
||||||
--color-inverse: #fff;
|
--color-primary-200: #F1F0F0;
|
||||||
--color-inverse-dark: #f5f5f5;
|
--color-primary-300: #D8D2CD;
|
||||||
--color-secondary-light: #f7fafc;
|
--color-primary-400: #CDC4BA;
|
||||||
--color-secondary: #e2e8f0;
|
--color-primary-500: #ABA59D;
|
||||||
--color-secondary-dark: #a0aec0;
|
--color-primary-600: #8A8680;
|
||||||
|
--color-primary-700: #686663;
|
||||||
|
--color-primary-800: #484745;
|
||||||
|
--color-primary-900: #282727;
|
||||||
}
|
}
|
||||||
@ -1,12 +1,9 @@
|
|||||||
:root {
|
|
||||||
@apply transition-colors duration-200 ease-in-out;
|
|
||||||
}
|
|
||||||
|
|
||||||
html,
|
html,
|
||||||
body {
|
body {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-family: "Montserrat", sans-serif;
|
font-family: "Montserrat", sans-serif;
|
||||||
@apply text-primary bg-inverse;
|
@apply text-primary-900 bg-primary-50;
|
||||||
|
@apply transition-colors duration-200 ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
@ -22,7 +19,7 @@ a:hover {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hr {
|
hr {
|
||||||
@apply w-full border-secondary h-1;
|
@apply w-full border-primary-200 h-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
section {
|
section {
|
||||||
@ -34,15 +31,7 @@ label {
|
|||||||
}
|
}
|
||||||
|
|
||||||
label > span:first-child {
|
label > span:first-child {
|
||||||
@apply mb-1 text-secondary-dark font-semibold tracking-wide text-xs uppercase;
|
@apply mb-1 text-primary-500 font-semibold tracking-wide text-xs uppercase;
|
||||||
}
|
|
||||||
|
|
||||||
#artboard {
|
|
||||||
color: #444;
|
|
||||||
}
|
|
||||||
|
|
||||||
#artboard hr {
|
|
||||||
border-color: #eee;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.MuiTooltip-tooltip {
|
.MuiTooltip-tooltip {
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.Toastify__toast--default {
|
.Toastify__toast--default {
|
||||||
@apply bg-primary text-inverse;
|
@apply bg-primary-900 text-primary-50;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Toastify__toast-body {
|
.Toastify__toast-body {
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
purge: ['./src/**/*.js', './src/**/*.jsx', './src/**/*.ts', './src/**/*.tsx'],
|
purge: ['./src/**/*.js'],
|
||||||
theme: {
|
theme: {
|
||||||
container: {
|
container: {
|
||||||
center: true,
|
center: true,
|
||||||
@ -9,13 +9,16 @@ module.exports = {
|
|||||||
'context-menu': 'context-menu',
|
'context-menu': 'context-menu',
|
||||||
},
|
},
|
||||||
colors: {
|
colors: {
|
||||||
primary: 'var(--color-primary)',
|
'primary-50': 'var(--color-primary-50)',
|
||||||
'primary-dark': 'var(--color-primary-dark)',
|
'primary-100': 'var(--color-primary-100)',
|
||||||
inverse: 'var(--color-inverse)',
|
'primary-200': 'var(--color-primary-200)',
|
||||||
'inverse-dark': 'var(--color-inverse-dark)',
|
'primary-300': 'var(--color-primary-300)',
|
||||||
'secondary-light': 'var(--color-secondary-light)',
|
'primary-400': 'var(--color-primary-400)',
|
||||||
secondary: 'var(--color-secondary)',
|
'primary-500': 'var(--color-primary-500)',
|
||||||
'secondary-dark': 'var(--color-secondary-dark)',
|
'primary-600': 'var(--color-primary-600)',
|
||||||
|
'primary-700': 'var(--color-primary-700)',
|
||||||
|
'primary-800': 'var(--color-primary-800)',
|
||||||
|
'primary-900': 'var(--color-primary-900)',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user