New solution page prepared.

This commit is contained in:
FilipHalon 2020-01-20 03:42:46 +01:00
parent 193abe4f3f
commit d8983d408c
2 changed files with 23 additions and 2 deletions

View File

@ -2,21 +2,29 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faLightbulb, faCloudUploadAlt } from '@fortawesome/free-solid-svg-icons'; import { faLightbulb, faCloudUploadAlt } from '@fortawesome/free-solid-svg-icons';
const NewTaskAdd = () => { const NewTaskAdd = props => {
const isNewSolution = props.addType === "solution";
return ( return (
<section className="task-description"> <section className="task-description">
<div className="task-description"> <div className="task-description">
<div className="task-border"> <div className="task-border">
<div className="task-description-heading"> <div className="task-description-heading">
<FontAwesomeIcon icon={faLightbulb} /> <FontAwesomeIcon icon={faLightbulb} />
<span>Dodawanie zadania</span> <span>Dodawanie {isNewSolution ? "rozwiązania" : "zadania"}</span>
</div> </div>
<form className="solution-add-area"> <form className="solution-add-area">
{isNewSolution ?
<div className="input-area">
<input type="file" placeholder="Załaduj rozwiązanie"/>
</div>
:
<div className="input-area"> <div className="input-area">
<input type="text" placeholder="Podaj streszczenie zadania"/> <input type="text" placeholder="Podaj streszczenie zadania"/>
<input type="text" placeholder="Wybierz język programowania"/> <input type="text" placeholder="Wybierz język programowania"/>
<input type="text" placeholder="Podaj szczegóły zadania"/> <input type="text" placeholder="Podaj szczegóły zadania"/>
</div> </div>
}
<div> <div>
<button type="submit"><FontAwesomeIcon icon={faCloudUploadAlt} /> Publikuj</button> <button type="submit"><FontAwesomeIcon icon={faCloudUploadAlt} /> Publikuj</button>
</div> </div>

13
pages/new-solution-add.js Normal file
View File

@ -0,0 +1,13 @@
import Sidebar from "./components/Sidebar";
import NewTaskAdd from "./components/NewTaskAdd";
const NewSolutionAddPage = () => {
return(
<main className="solution-add">
<Sidebar />
<NewTaskAdd addType="solution" />
</main>
)
};
export default NewSolutionAddPage;