Skip to content

Commit

Permalink
Merge pull request #60 from apaul2077/main
Browse files Browse the repository at this point in the history
necessary changes
  • Loading branch information
Sivam2313 authored Dec 23, 2024
2 parents b11977b + 3453f8c commit 55b4e2a
Show file tree
Hide file tree
Showing 10 changed files with 302 additions and 246 deletions.
2 changes: 2 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="RECursion Website" content="RECursion 2023" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300&family=Roboto&family=Roboto+Slab:wght@900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Mullish:wght@300;400;600;700&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap" rel="stylesheet">
Expand Down
20 changes: 14 additions & 6 deletions src/App.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
* {
margin: auto;
box-sizing: border-box;
align-items: center;
/* background-image: url("./assets/images/homepage_grid.png");
background-size: contain;*/
Expand All @@ -8,18 +9,25 @@ body{
overflow-x: hidden;
}

.new-layout{
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

.App {
background-color: #7a7adb;
background-image: linear-gradient(180deg, #102027 0%, #191919 29%);
background-color: #1e1e1e;
/* background-image: linear-gradient(180deg, #102027 0%, #191919 29%); */
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
justify-content: center;
width: fit-content;
min-height: 100vh;
width: 100%;
height: fit-content;
/* width: fit-content; */
min-height: 100vh; /*Acts as canvas */
width: 100%; /*Acts as canvas */
/* height: fit-content; */
}
.container{
display: flex;
Expand Down
65 changes: 21 additions & 44 deletions src/components/InterviewExperiences/DetailedExperienceCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,63 +32,40 @@ const DetailedExperienceCard = ({ experience }) => {
};
return (
<div
className="h-full min-h-screen mb-20 w-full lg:w-1/2 rounded-xl p-4 border-outline text-white"
style={{
boxShadow: "3px 3px #BDE0FF",
background: "#ffffff22",
}}
className="mb-0 w-full p-4 text-white bg-[#292929] p-10 mr-0 mt-0 ml-0"
>
<div className="justify-start flex font-sub p-2 text-xl">
<div className="h-[50px] w-[50px] me-2 ms-0">
<img
src={oracleLogo}
alt="company logo"
className="h-[50px] w-[50px] object-contain rounded-md"
/>
</div>
<div className="w-full font-bold">
<div className="w-full font-bold flex">
<div className="w-full font-head font-bold text-xl text-onSurface">
<div>{experience?.company} Interview Experience </div>
<div className="text-sm text-secondaryText">
SWE /{" "}
<span className="text-[#EF6041]">
{" "}
{experience?.job_Profile}{" "}
</span>
</div>
</div>
<div className="font-head text-green-500 font-bold text-sm">
SELECTED
</div>
<h1 className="text-secondary font-poppins font-semibold text-3xl mb-6 text-left p-4">
Interview Experiences
</h1>
<div className="flex flex-col p-4">
<div class="bg-[#535353] text-white p-4 rounded-lg font-sans mt-2 mb-2 mr-0 ml-0 w-full">
<div class="flex justify-between font-semibold text-lg flex">
<div className="text-left m-0">Company Name:{experience?.company}</div>
<div className="m-0">No of Rounds: 5</div>
</div>
<div class="text-base font-semibold">
<p className="text-left">Role: SDE full time</p>
<p className="text-left">Mode: On-Campus</p>
</div>
</div>
</div>

<div className="flex justify-between items-center m-0 mb-2">
<p className="m-0">Posted by {experience?.user.username} on {getDate(experience?.created_at)}{" "}</p>
<div class="text-green-500 font-semibold m-0">✔️ Verified</div>
</div>
</div>
{/* <blockquote
className="text-onSurface font-sub mt-4"
>
{experience?.interview_Questions}
</blockquote> */}
<ReactMarkdown
children={experience?.interview_Questions}
className="font-sub text-sm lg:text-lg"
className="font-Mulish text-lg text-justify p-4"
remarkPlugins={[remarkGfm]}
rehypePlugins={[rehypeRaw]}
/>
<div className="flex justify-end w-full mt-5">
<div className="w-full font-bold text-sm text-secondaryText">
<div className="w-full text-right">
{" "}
Added By {experience?.user.username}{" "}
</div>
<div className="w-full text-right">
{" "}
<i className="text-sm material-icons">date_range</i>{" "}
{getDate(experience?.created_at)}{" "}
</div>
</div>
</div>
</div>
</div >
);
};

Expand Down
23 changes: 5 additions & 18 deletions src/components/InterviewExperiences/DetailedExperiencePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useParams } from "react-router-dom";
import { GetDetailExperience, GetExperiences } from "../../api/experiences";
import useLoading from "../../hooks/useLoading";
import Loader from "../Loader";
import IECard from "./IECard";
import IECardblack from "./IECardblack";
import DetailedExperienceCard from "./DetailedExperienceCard";
import Reviews from "./Reviews";
import useAuth from "../../hooks/useAuth";
Expand Down Expand Up @@ -38,33 +38,20 @@ const DetailedExperiencePage = () => {
return loading ? (
<Loader />
) : (
<div>
<div
className="mt-[8vh] pt-[8vh] flex items-start justify-start flex-col lg:flex-row"
style={{
background: "#1A202C",
minWidth: "100vw",
height: "max-content",
padding: "1em",
}}
className="mt-[7vh] pt-[1vh] flex items-start justify-start flex-col lg:flex-row w-screen mr-0 ml-0"
>
{DetailedExperienceCard({ experience })}

<div className=" w-full lg:w-1/3 min-w-[500px] mt-0">
<div className="w-full lg:min-w-[500px] bg-[#121212] mt-0 mb-0 flex-1">
{InterviewExperiences?.results?.slice(0, 5).map((interview, id) => {
if (interview.id != experienceId) {
return <IECard key={id} interview={interview} />;
return <IECardblack key={id} interview={interview} />;
}
})}
</div>
</div>
{
(experience?.user.email === user?.email || user.role <= 2)?
<Reviews idx={experience?.id}/>:
<div></div>

}
</div>

);
};

Expand Down
185 changes: 92 additions & 93 deletions src/components/InterviewExperiences/Experiences.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,112 +80,111 @@ const Experiences = () => {
return dateString;
};

const companies = [
"Company",
"Microsoft",
"Adobe",
"Wells Fargo",
"BNY",
"Texas Instruments",
"Oracle",
"JP Morgan",
];

return loading ? (
<div>
<Loader />
</div>
) : (
<Container
marginTop={"8vh"}
padding={"1em"}
bg={"gray.800"}
minWidth={"100vw"}
minHeight={"100vh"}
maxHeight={"fit-content"}
>
<div style={{ textAlign: "center", marginTop: "4vh" }}>
<h1 className="text-white font-head text-3xl mb-2">
Interview Experiences
</h1>
<p className="text-whitesmoke font-sub italic">
{" "}
Nothing ever becomes real'til it is experienced - John Keats{" "}
</p>
</div>
<div>
<SearchExperiences
setInterviewExperiences={setInterviewExperiences}
setSearch={setSearch}
setCompany={setCompany}
setInterviewType={setInterviewType}
FilterHandler={FilterHandler}
Company={Company}
InterviewType={InterviewType}
/>
</div>

<div>
<Link to="/experience/add">
<Button colorScheme='teal' variant='outline'>
<EditIcon />
Post Experience
</Button>
</Link>
</div>

<Container
p={0}
pt="4px"
borderBottom="0px"
width={"100vh"}
maxWidth={"90vw"}
minH="container.sm"
<div className="flex">
<div
// className="mt-[8vh] p-4 bg-background min-w-full min-h-screen max-h-fit"
className="m-0 p-16 flex flex-col justify-center items-center min-h-screen bg-background w-[70vw] max-900:w-full max-570:pl-4 max-570:pr-4"
>
{/* Top heading */}
<div className="text-left w-full p-1 m-4">
<h1 className="text-secondary font-poppins font-semibold text-3xl mb-2">
Interview Experiences
</h1>
<p className="text-white font-poppins italic">
{" "}
Nothing ever becomes real'til it is experienced - John Keats{" "}
</p>
</div>

{InterviewExperiences?.results?.map((interview, id) => {
return <IECard key={id} interview={interview} />;
})}

<div
style={{
display: "flex",
flexDirection: "row",
justifyContent: "center",
alignItems: "center",
}}
>
{/* For Previous 10 Experiences. */}
{InterviewExperiences?.previous && (
<button
style={{
margin: "1em",
width: "5em",
padding: "15px",
boxShadow: "3px 3px #BDE0FF",
border: "solid 1px #BDE0FF",
border: "solid 1px",
}}
onClick={() => {
NextExperiences(InterviewExperiences?.previous);
}}
>
Prev
</button>
)}
{/*Search Area */}
<div className="w-full flex">
<SearchExperiences
setInterviewExperiences={setInterviewExperiences}
setSearch={setSearch}
setCompany={setCompany}
setInterviewType={setInterviewType}
FilterHandler={FilterHandler}
Company={Company}
InterviewType={InterviewType}
/>
{/* <Link to="/experience/add">
<Button colorScheme='teal' variant='outline'>
Post Experience
</Button>
</Link> */}
</div>

<div className="w-full">
{InterviewExperiences?.results?.map((interview, id) => {
return <IECard key={id} interview={interview} />;
})}

{/* For Next 10 Experiences. */}
<div className="flex justify-center align-center">
{/* For Previous 10 Experiences. */}
{InterviewExperiences?.previous && (
<button
className="m-4 w-24 p-2 rounded-lg text-white font-bold bg-secondary"
onClick={() => {
NextExperiences(InterviewExperiences?.previous);
}}
>
Previous
</button>
)}

{InterviewExperiences?.next && (
{/* For Next 10 Experiences. */}

{InterviewExperiences?.next && (
<button
className="m-4 w-20 p-2 rounded-lg text-white font-bold bg-secondary"
onClick={() => {
NextExperiences(InterviewExperiences?.next);
}}
>
Next
</button>
)}
</div>
</div>
</div>

<div className="pt-16 pl-3 pr-2 pb-2 bg-surfaceVariant rounded-lg ml-4 flex-1 font-semibold max-900:hidden m-0">
<h2 className="text-white font-semibold text-lg mb-4">Search for companies</h2>
<div className="flex flex-wrap gap-1">
<button
style={{
margin: "1em",
width: "5em",
padding: "15px",
boxShadow: "3px 3px #BDE0FF",
border: "solid 1px #BDE0FF",
borderRadius: "8px",
color:"#BDE0FF"
}}
onClick={() => {
NextExperiences(InterviewExperiences?.next);
}}
className="p-2 bg-primary rounded-lg text-onPrimary"
onClick={() => setCompany(null)}
>
Next
All
</button>
)}
{companies.map((company, idx) => (
<button
key={idx}
className="p-2 bg-tertiary rounded-lg text-white"
onClick={() => setCompany(company)}
>
{company}
</button>
))}
</div>
</div>
</Container>
</Container>
</div>
);
};

Expand Down
Loading

0 comments on commit 55b4e2a

Please sign in to comment.