mirror of
https://gitea.smigz.com/smiggiddy/odin-codeprojects.git
synced 2024-12-27 22:50:42 -05:00
feat(styling): yep
This commit is contained in:
parent
69d31af19e
commit
de5451a9ed
5 changed files with 153 additions and 92 deletions
|
@ -74,8 +74,37 @@ body {
|
||||||
gap: 1rem;
|
gap: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.education-info-form {
|
.education-info-form,
|
||||||
|
.job-info-form {
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 1rem;
|
||||||
background: hsl(var(--white-color));
|
background: hsl(var(--white-color));
|
||||||
|
border-radius: var(--default-border-radius);
|
||||||
|
}
|
||||||
|
|
||||||
|
.education-info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.education-info h2 {
|
||||||
|
align-self: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.education-item {
|
||||||
|
padding: 10px 25px 10px 25px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.education-item h2,
|
||||||
|
p {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.btn-group {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
margin: 30px 0 20px 0;
|
||||||
|
gap: 10px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,22 +18,39 @@ function App() {
|
||||||
const [educationInfo, setEducationInfo] = useState([]);
|
const [educationInfo, setEducationInfo] = useState([]);
|
||||||
const [editEducation, setEditEducation] = useState(null);
|
const [editEducation, setEditEducation] = useState(null);
|
||||||
const [employmentHistory, setEmploymentHistory] = useState([]);
|
const [employmentHistory, setEmploymentHistory] = useState([]);
|
||||||
|
const [showJobForm, setShowJobForm] = useState(false);
|
||||||
|
const [educationItemActive, setEducationItemActive] = useState(false);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="container">
|
<div className="container">
|
||||||
<div className="form">
|
<div className="form">
|
||||||
<GeneralInfoForm setBasicInfo={setBasicInfo} basicInfo={basicInfo} />
|
<GeneralInfoForm setBasicInfo={setBasicInfo} basicInfo={basicInfo} />
|
||||||
|
<div className="btn-group">
|
||||||
|
<button
|
||||||
|
onClick={() => {
|
||||||
|
setEducationItemActive(!educationItemActive);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Add Education Info
|
||||||
|
</button>
|
||||||
|
<button onClick={() => setShowJobForm(!showJobForm)}>
|
||||||
|
Add Employer Info
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
<EducationInfoForm
|
<EducationInfoForm
|
||||||
educationInfo={educationInfo}
|
educationInfo={educationInfo}
|
||||||
setEducationInfo={setEducationInfo}
|
setEducationInfo={setEducationInfo}
|
||||||
setEditEducation={setEditEducation}
|
setEditEducation={setEditEducation}
|
||||||
editEducation={editEducation}
|
editEducation={editEducation}
|
||||||
|
educationItemActive={educationItemActive}
|
||||||
/>
|
/>
|
||||||
<ExperienceForm
|
<ExperienceForm
|
||||||
employmentHistory={employmentHistory}
|
employmentHistory={employmentHistory}
|
||||||
setEmploymentHistory={setEmploymentHistory}
|
setEmploymentHistory={setEmploymentHistory}
|
||||||
|
showJobForm={showJobForm}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="resume">
|
<div className="resume">
|
||||||
<GeneralInfoDisplay basicInfo={basicInfo} />
|
<GeneralInfoDisplay basicInfo={basicInfo} />
|
||||||
<EducationInfoDisplay
|
<EducationInfoDisplay
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
export default function EducationInfoDisplay(props) {
|
export default function EducationInfoDisplay(props) {
|
||||||
return (
|
return (
|
||||||
<>
|
<div className="education-info">
|
||||||
|
<h2>Education</h2>
|
||||||
<EducationDisplay
|
<EducationDisplay
|
||||||
educationInfo={props.educationInfo}
|
educationInfo={props.educationInfo}
|
||||||
setEducationInfo={props.setEducationInfo}
|
setEducationInfo={props.setEducationInfo}
|
||||||
setEditEducation={props.setEditEducation}
|
setEditEducation={props.setEditEducation}
|
||||||
/>
|
/>
|
||||||
</>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,24 +16,24 @@ function EducationDisplay(props) {
|
||||||
<>
|
<>
|
||||||
{props.educationInfo.map((item) => {
|
{props.educationInfo.map((item) => {
|
||||||
return (
|
return (
|
||||||
<div key={item.schoolName} className="education-info">
|
<div key={item.schoolName} className="education-item">
|
||||||
<h2>School: {item.schoolName}</h2>
|
<h2>{item.schoolName}</h2>
|
||||||
<p>
|
<p>
|
||||||
Graduation: {item.graduationDate + " "}
|
Graduation: {item.graduationDate + " "}
|
||||||
Degree: {item.fieldOfStudy}
|
{item.fieldOfStudy}
|
||||||
<button onClick={() => props.setEditEducation(item)}>edit</button>
|
|
||||||
<button
|
|
||||||
onClick={() =>
|
|
||||||
deleteEducationItem(
|
|
||||||
props.educationInfo,
|
|
||||||
item.schoolName,
|
|
||||||
props.setEducationInfo,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
remove
|
|
||||||
</button>
|
|
||||||
</p>
|
</p>
|
||||||
|
<button onClick={() => props.setEditEducation(item)}>edit</button>
|
||||||
|
<button
|
||||||
|
onClick={() =>
|
||||||
|
deleteEducationItem(
|
||||||
|
props.educationInfo,
|
||||||
|
item.schoolName,
|
||||||
|
props.setEducationInfo,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
remove
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|
|
@ -2,20 +2,10 @@ import { useState, useEffect } from "react";
|
||||||
import Input from "./input";
|
import Input from "./input";
|
||||||
|
|
||||||
export default function EducationInfoForm(props) {
|
export default function EducationInfoForm(props) {
|
||||||
const [educationItemActive, setEducationItemActive] = useState(false);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<button
|
|
||||||
onClick={() => {
|
|
||||||
setEducationItemActive(!educationItemActive);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Add Education Info
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<EducationForm
|
<EducationForm
|
||||||
isActive={educationItemActive}
|
isActive={props.educationItemActive}
|
||||||
educationInfo={props.educationInfo}
|
educationInfo={props.educationInfo}
|
||||||
setEducationInfo={props.setEducationInfo}
|
setEducationInfo={props.setEducationInfo}
|
||||||
editSchool={props.editEducation}
|
editSchool={props.editEducation}
|
||||||
|
@ -59,22 +49,32 @@ function EducationForm({
|
||||||
<>
|
<>
|
||||||
{isActive ? (
|
{isActive ? (
|
||||||
<div className="education-info-form">
|
<div className="education-info-form">
|
||||||
|
<h2 className="general-info-header">Education History</h2>
|
||||||
<form action="" style={contactFormStyle}>
|
<form action="" style={contactFormStyle}>
|
||||||
<Input
|
<Input
|
||||||
|
label={true}
|
||||||
|
labelName="School"
|
||||||
|
name="School"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Enter university/school"
|
placeholder=""
|
||||||
value={schoolName}
|
value={schoolName}
|
||||||
onChange={(e) => setSchoolName(e.target.value)}
|
onChange={(e) => setSchoolName(e.target.value)}
|
||||||
/>
|
/>
|
||||||
<Input
|
<Input
|
||||||
|
label={true}
|
||||||
|
labelName="Graduation date"
|
||||||
|
name="graduationDate"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Enter graduation date"
|
placeholder=""
|
||||||
value={graduationDate}
|
value={graduationDate}
|
||||||
onChange={(e) => setGraduationDate(e.target.value)}
|
onChange={(e) => setGraduationDate(e.target.value)}
|
||||||
/>
|
/>
|
||||||
<Input
|
<Input
|
||||||
|
label={true}
|
||||||
|
labelName="Degree/Field of study"
|
||||||
|
name="degree"
|
||||||
type="text"
|
type="text"
|
||||||
placeholder="Enter degree/field of study"
|
placeholder=""
|
||||||
value={fieldOfStudy}
|
value={fieldOfStudy}
|
||||||
onChange={(e) => setFieldOfStudy(e.target.value)}
|
onChange={(e) => setFieldOfStudy(e.target.value)}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -1,20 +1,15 @@
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
import Input from "./input";
|
||||||
|
|
||||||
export default function ExperienceForm(props) {
|
export default function ExperienceForm(props) {
|
||||||
// const [jobs, setJobs] = useState([]);
|
|
||||||
const [showJobForm, setShowJobForm] = useState(false);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="Job-info-form">
|
<>
|
||||||
<button onClick={() => setShowJobForm(!showJobForm)}>
|
|
||||||
Add Employer Info
|
|
||||||
</button>
|
|
||||||
<JobForm
|
<JobForm
|
||||||
setJobs={props.setEmploymentHistory}
|
setJobs={props.setEmploymentHistory}
|
||||||
jobs={props.employmentHistory}
|
jobs={props.employmentHistory}
|
||||||
isActive={showJobForm}
|
isActive={props.showJobForm}
|
||||||
/>
|
/>
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,57 +47,76 @@ function JobForm({ isActive, jobs, setJobs }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{isActive ? (
|
{isActive ? (
|
||||||
<form action="" style={formStyle}>
|
<div className="job-info-form">
|
||||||
<input
|
<h2 className="general-info-header">Employment History</h2>
|
||||||
type="text"
|
<form action="" style={formStyle}>
|
||||||
placeholder="Employer"
|
<Input
|
||||||
value={employer}
|
name="employer"
|
||||||
onChange={(e) => setEmployer(e.target.value)}
|
label={true}
|
||||||
/>
|
labelName="Employer"
|
||||||
<input
|
type="text"
|
||||||
type="text"
|
placeholder=""
|
||||||
placeholder="Job title"
|
value={employer}
|
||||||
value={jobTitle}
|
onChange={(e) => setEmployer(e.target.value)}
|
||||||
onChange={(e) => setJobTitle(e.target.value)}
|
/>
|
||||||
/>
|
<Input
|
||||||
<input
|
name="jobTitle"
|
||||||
type="text"
|
label={true}
|
||||||
placeholder="Employment Start Date"
|
labelName="Job title"
|
||||||
value={employmentStart}
|
type="text"
|
||||||
onChange={(e) => setEmploymentStart(e.target.value)}
|
placeholder=""
|
||||||
/>
|
value={jobTitle}
|
||||||
<input
|
onChange={(e) => setJobTitle(e.target.value)}
|
||||||
type="text"
|
/>
|
||||||
placeholder="Employment End Date"
|
<Input
|
||||||
value={employmentEnd}
|
name="startDate"
|
||||||
onChange={(e) => setEmploymentEnd(e.target.value)}
|
label={true}
|
||||||
/>
|
labelName="Start date"
|
||||||
<textarea
|
type="text"
|
||||||
value={jobDescription}
|
placeholder=""
|
||||||
onChange={(e) => setJobDescription(e.target.value)}
|
value={employmentStart}
|
||||||
/>
|
onChange={(e) => setEmploymentStart(e.target.value)}
|
||||||
<button
|
/>
|
||||||
onClick={(e) => {
|
<Input
|
||||||
e.preventDefault();
|
name="endDate"
|
||||||
clear();
|
label={true}
|
||||||
}}
|
labelName="End date"
|
||||||
>
|
type="text"
|
||||||
Clear
|
placeholder=""
|
||||||
</button>
|
value={employmentEnd}
|
||||||
<button
|
onChange={(e) => setEmploymentEnd(e.target.value)}
|
||||||
onClick={(e) =>
|
/>
|
||||||
handleSubmit(e, {
|
<div className="input">
|
||||||
employer,
|
<label>Description</label>
|
||||||
jobTitle,
|
<textarea
|
||||||
jobDescription,
|
name="jobDescription"
|
||||||
employmentStart,
|
value={jobDescription}
|
||||||
employmentEnd,
|
onChange={(e) => setJobDescription(e.target.value)}
|
||||||
})
|
/>
|
||||||
}
|
</div>
|
||||||
>
|
<button
|
||||||
Submit
|
onClick={(e) => {
|
||||||
</button>
|
e.preventDefault();
|
||||||
</form>
|
clear();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Clear
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
onClick={(e) =>
|
||||||
|
handleSubmit(e, {
|
||||||
|
employer,
|
||||||
|
jobTitle,
|
||||||
|
jobDescription,
|
||||||
|
employmentStart,
|
||||||
|
employmentEnd,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
>
|
||||||
|
Submit
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue