mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: redesign edit course page
This commit is contained in:
parent
b49f15814f
commit
988c50505e
3 changed files with 54 additions and 12 deletions
|
|
@ -226,22 +226,22 @@ function CourseEdit(params: any) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Header></Header>
|
<Page>
|
||||||
<Title>
|
<Title>
|
||||||
Edit Course Chapters{" "}
|
Edit Course {" "}
|
||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setNewChapterModal(true);
|
setNewChapterModal(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
+
|
Add chapter +
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
updateChapters();
|
updateChapters();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Save Chapters
|
Save
|
||||||
</button>
|
</button>
|
||||||
</Title>
|
</Title>
|
||||||
{newChapterModal && <NewChapterModal closeModal={closeNewChapterModal} submitChapter={submitChapter}></NewChapterModal>}
|
{newChapterModal && <NewChapterModal closeModal={closeNewChapterModal} submitChapter={submitChapter}></NewChapterModal>}
|
||||||
|
|
@ -283,12 +283,46 @@ function CourseEdit(params: any) {
|
||||||
</DragDropContext>
|
</DragDropContext>
|
||||||
</ChapterlistWrapper>
|
</ChapterlistWrapper>
|
||||||
)}
|
)}
|
||||||
|
</Page>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Page = styled.div`
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
min-height: 100vh;
|
||||||
|
min-width: 100vw;
|
||||||
|
padding-top: 30px;
|
||||||
|
|
||||||
|
// dots background
|
||||||
|
background-image: radial-gradient(#4744446b 1px, transparent 1px), radial-gradient(#4744446b 1px, transparent 1px);
|
||||||
|
background-position: 0 0, 25px 25px;
|
||||||
|
background-size: 50px 50px;
|
||||||
|
background-attachment: fixed;
|
||||||
|
background-repeat: repeat;
|
||||||
|
|
||||||
|
button {
|
||||||
|
margin-left: 10px;
|
||||||
|
background-color: #000000;
|
||||||
|
border: none;
|
||||||
|
border-radius: 5px;
|
||||||
|
padding: 5px 10px;
|
||||||
|
color: white;
|
||||||
|
font-size: 13px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: 0.2s;
|
||||||
|
font-family: "DM Sans", sans-serif;
|
||||||
|
&:hover {
|
||||||
|
background-color: #474444;
|
||||||
|
|
||||||
|
transition: 0.2s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`;
|
||||||
const ChapterlistWrapper = styled.div`
|
const ChapterlistWrapper = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
padding-left: 30px;
|
padding-left: 30px;
|
||||||
|
justify-content: center;
|
||||||
`;
|
`;
|
||||||
export default CourseEdit;
|
export default CourseEdit;
|
||||||
|
|
|
||||||
|
|
@ -48,15 +48,22 @@ function Chapter(props: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const ChapterWrapper = styled.div`
|
const ChapterWrapper = styled.div`
|
||||||
margin-bottom: 5px;
|
margin-bottom: 20px;
|
||||||
padding: 11px;
|
padding: 4px;
|
||||||
background-color: #00000010;
|
background-color: #ffffffc5;
|
||||||
width: 310px;
|
width: 900px;
|
||||||
|
font-size: 15px;
|
||||||
display: block;
|
display: block;
|
||||||
border-radius: 9px;
|
border-radius: 9px;
|
||||||
border: 1px solid rgba(255, 255, 255, 0.19);
|
border: 1px solid rgba(255, 255, 255, 0.19);
|
||||||
box-shadow: 0px 13px 33px -13px rgb(0 0 0 / 12%);
|
box-shadow: 0px 13px 33px -13px rgb(0 0 0 / 12%);
|
||||||
transition: all 0.2s ease;
|
transition: all 0.2s ease;
|
||||||
|
|
||||||
|
|
||||||
|
h3{
|
||||||
|
padding-left: 20px;
|
||||||
|
padding-right: 20px;
|
||||||
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const LecturesList = styled.div`
|
const LecturesList = styled.div`
|
||||||
|
|
|
||||||
|
|
@ -29,14 +29,15 @@ function Lecture(props: any) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const LectureWrapper = styled.div`
|
export const LectureWrapper = styled.div`
|
||||||
padding: 10px;
|
padding: 2px;
|
||||||
padding-left: 17px;
|
padding-left: 17px;
|
||||||
list-style: none;
|
list-style: none;
|
||||||
/* padding-left: 2px; */
|
/* padding-left: 2px; */
|
||||||
background-color: #8c949c33;
|
background-color: #f4f4f4c5;
|
||||||
border-radius: 28px;
|
border-radius: 7px;
|
||||||
margin: 15px;
|
margin: 15px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: #8c949c7b;
|
background-color: #8c949c7b;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue