-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#16 problems section #18
Merged
sahil9001
merged 5 commits into
TCP-Tech:dev
from
virajchandra51:frontend-problems-section
Jan 5, 2023
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
|
||
const faqs = [ | ||
{ | ||
question: "How do I register for the hackathon?", | ||
answer: | ||
"Click on any Register Now button on the website. Alternatively, you can head over to Devfolio", | ||
}, | ||
{ | ||
question: "What is the participation fee?", | ||
answer: | ||
"Just some enthusiasm and an open mind are enough. We don't charge any money!!", | ||
}, | ||
{ | ||
question: "What if I don't have a team or idea?", | ||
answer: | ||
"We'll have team formation and ideation events geared towards helping you find a team. Make sure you join the discord server.", | ||
}, | ||
{ | ||
question: "Who can participate?", | ||
answer: | ||
"Everyone is welcome to apply, any student or working professionals. If you can innovate or just want to have a fun weekend, you are most welcome.", | ||
}, | ||
{ | ||
question: "What is the participation fee?", | ||
answer: | ||
"Just some enthusiasm and an open mind are enough. We don't charge any money!!", | ||
}, | ||
{ | ||
question: "What could be the size of the team?", | ||
answer: | ||
"You can make teams of up to 5 members. Lone wolfs are also welcome.", | ||
}, | ||
{ | ||
question: "Why should I participate in CodeUtsava 6.0?", | ||
answer: | ||
"You will get cash prizes if you win; otherwise, you will always get an excellent opportunity to network with like-minded people, learn many things and get cool schwag.😉", | ||
}, | ||
{ | ||
question: "How will the teams be judged?", | ||
answer: | ||
"The teams will be judged based on Viability, Technical Complexity, Presentation Skills and most importantly, Creativity.", | ||
}, | ||
{ | ||
question: "What is the Code of Conduct?", | ||
answer: | ||
"To ensure a positive experience among all the participants, we follow the MLH Code of Conduct. It is advised that you go through it once.", | ||
}, | ||
]; | ||
|
||
export default faqs; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import problem1 from '../images/file11.png' | ||
|
||
const problems = [ | ||
{ | ||
title: "Problem Statement 1", | ||
statement: "Coming Soon", | ||
img: problem1, | ||
}, | ||
{ | ||
title: "Problem Statement 2", | ||
statement: "Coming Soon", | ||
img: problem1, | ||
}, | ||
{ | ||
title: "Problem Statement 3", | ||
statement: "Coming Soon", | ||
img: problem1, | ||
}, | ||
{ | ||
title: "Problem Statement 4", | ||
statement: "Coming Soon", | ||
img: problem1, | ||
}, | ||
{ | ||
title: "Problem Statement 5", | ||
statement: "Coming Soon", | ||
img: problem1, | ||
}, | ||
{ | ||
title: "Problem Statement 6", | ||
statement: "Coming Soon", | ||
img: problem1, | ||
}, //repeated to show load more section | ||
]; | ||
|
||
export default problems; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
.codeutsava__section8-problems-container1 { | ||
display: grid; | ||
grid-template-columns: repeat(2 ,1fr); | ||
gap: 4rem; | ||
width: 80%; | ||
} | ||
|
||
.codeutsava__section8-problems-container2 { | ||
display: grid; | ||
grid-template-columns: repeat(2 ,1fr); | ||
gap: 4rem; | ||
width: 80%; | ||
transition: display 3s ease-in-out; | ||
margin-top: 4rem; | ||
} | ||
|
||
@keyframes fadeIn { | ||
0% { | ||
opacity: 0; | ||
} | ||
100% { | ||
opacity: 1; | ||
} | ||
} | ||
|
||
@keyframes fadeOut { | ||
0% { | ||
opacity: 1; | ||
} | ||
100% { | ||
opacity: 0; | ||
} | ||
} | ||
|
||
|
||
.codeutsava__section8-cardtitle { | ||
font-weight: 600; | ||
margin: 0.5rem 0; | ||
min-height: 3rem; | ||
display: flex; | ||
align-items: center; | ||
line-height: 24px; | ||
} | ||
|
||
.codeutsava__section8-line { | ||
border: 0.1px solid rgb(230, 230, 230); | ||
margin: 0.5rem 0; | ||
font-weight: lighter; | ||
} | ||
|
||
.codeutsava__section8-carddetails { | ||
margin: 1rem 0; | ||
color: rgb(220, 220, 220); | ||
} | ||
|
||
.codeutsava__section8-image { | ||
transition: all 0.2s ease-in-out; | ||
width: 100%; | ||
height: 20rem; | ||
object-fit: cover; | ||
border-radius: 16px; | ||
} | ||
|
||
.codeutsava__section8-image:hover { | ||
transform: scale(0.98); | ||
transition: all 0.2s ease-in-out; | ||
cursor: pointer; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from 'react' | ||
import { useState } from 'react' | ||
|
||
import './ProblemCard.css' | ||
import ProblemModal from '../problemModal/ProblemModal' | ||
|
||
const ProblemCard = ({img,title,statement}) => { | ||
|
||
const [modal, setModal] = useState(false); | ||
const [problem, setProblem] = useState([]); | ||
|
||
const getProblem = (img, title, statement) => { | ||
let temp = [img, title, statement] | ||
setProblem(item => [1, ...temp]) | ||
return setModal(true) | ||
} | ||
|
||
document.body.style.overflowY = !modal ? 'scroll' : 'hidden'; | ||
|
||
return ( | ||
<div className="codeutsava__section8-card-body"> | ||
<div className="codeutsava__section8-card"> | ||
<img className='codeutsava__section8-image' src={img} onClick={() => getProblem(img, title, statement)}></img> | ||
<div className="codeutsava__section8-cardtitle"> | ||
{title} | ||
</div> | ||
<div className="codeutsava__section8-line"> | ||
</div> | ||
<div className="codeutsava__section8-carddetails"> | ||
{statement} | ||
</div> | ||
</div> | ||
{ | ||
modal === true ? <ProblemModal img={img} title={title} statement={statement} hide={() => setModal(false)}/> : '' | ||
} | ||
</div> | ||
) | ||
} | ||
|
||
export default ProblemCard |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
.codeutsava__section8-problemModal-body { | ||
position: fixed; | ||
width: 80%; | ||
height: 80%; | ||
top: 10%; | ||
left: 10%; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
z-index: 100000; | ||
background: white; | ||
color: black; | ||
border-radius: 20px; | ||
} | ||
|
||
.problemModal-close { | ||
width: 1.5rem; | ||
position: fixed; | ||
top: 1.5rem; | ||
right: 1.5rem; | ||
cursor: pointer; | ||
} | ||
|
||
.line-animation { | ||
transform: scaleY(0.01) scaleX(0); | ||
animation: unfoldIn 1s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; | ||
} | ||
|
||
/* .line-animation-close { | ||
transform: scale(1); | ||
animation: unfoldOut 1s 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards; | ||
} */ | ||
|
||
@keyframes unfoldIn { | ||
0% { | ||
transform: scaleY(0.005) scaleX(0); | ||
box-shadow: none; | ||
} | ||
50% { | ||
transform: scaleY(0.005) scaleX(1); | ||
box-shadow: none; | ||
} | ||
100% { | ||
transform: scaleY(1) scaleX(1); | ||
box-shadow: 0 0 0 999em rgba(0, 0, 0, 0.8); | ||
} | ||
} | ||
|
||
/* @keyframes unfoldOut { | ||
0% { | ||
transform: scaleY(1) scaleX(1); | ||
} | ||
50% { | ||
transform: scaleY(0.005) scaleX(1); | ||
} | ||
100% { | ||
transform: scaleY(0.005) scaleX(0); | ||
} | ||
} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from "react"; | ||
|
||
import "./ProblemModal.css"; | ||
import cross from '../../assets/images/cross.png' | ||
|
||
const ProblemModal = ({img, title, statement, hide}) => { | ||
|
||
return ( | ||
<div className="codeutsava__section8-problemModal-body line-animation"> | ||
<img className="problemModal-close" onClick={hide} src={cross}/> | ||
<h1>{title}</h1> | ||
<p>{statement}</p> | ||
<img src={img} /> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ProblemModal; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add image height as 20rem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done