mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: css input issues
This commit is contained in:
parent
72597fcda6
commit
a5751b0a36
4 changed files with 37 additions and 47 deletions
|
|
@ -96,10 +96,10 @@ function CourseEdit(params: any) {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Submit YouTube Video Upload
|
// Submit YouTube Video Upload
|
||||||
const submitExternalVideo = async (external_video_data : any, activity: any, chapterId: string) => {
|
const submitExternalVideo = async (external_video_data: any, activity: any, chapterId: string) => {
|
||||||
console.log("submitExternalVideo", external_video_data);
|
console.log("submitExternalVideo", external_video_data);
|
||||||
await updateChaptersMetadata(courseid, data);
|
await updateChaptersMetadata(courseid, data);
|
||||||
await createExternalVideoActivity(external_video_data , activity, chapterId);
|
await createExternalVideoActivity(external_video_data, activity, chapterId);
|
||||||
await getCourseChapters();
|
await getCourseChapters();
|
||||||
setNewActivityModal(false);
|
setNewActivityModal(false);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -45,8 +45,8 @@ const CourseIdPage = (params: any) => {
|
||||||
) : (
|
) : (
|
||||||
<CoursePageLayout>
|
<CoursePageLayout>
|
||||||
<br></br>
|
<br></br>
|
||||||
<p>Course</p>
|
<p className="text-lg font-bold">Course</p>
|
||||||
<h1>
|
<h1 className="text-3xl font-bold flex items-center space-x-5">
|
||||||
{course.course.name}{" "}
|
{course.course.name}{" "}
|
||||||
<Link href={getUriWithOrg(orgslug, "") + `/course/${courseid}/edit`} rel="noopener noreferrer">
|
<Link href={getUriWithOrg(orgslug, "") + `/course/${courseid}/edit`} rel="noopener noreferrer">
|
||||||
<Pencil2Icon />
|
<Pencil2Icon />
|
||||||
|
|
@ -61,9 +61,9 @@ const CourseIdPage = (params: any) => {
|
||||||
<>
|
<>
|
||||||
<ToolTip sideOffset={-18} slateBlack content={activity.name}>
|
<ToolTip sideOffset={-18} slateBlack content={activity.name}>
|
||||||
<Link href={getUriWithOrg(orgslug, "") + `/course/${courseid}/activity/${activity.id.replace("activity_", "")}`}>
|
<Link href={getUriWithOrg(orgslug, "") + `/course/${courseid}/activity/${activity.id.replace("activity_", "")}`}>
|
||||||
<CourseIndicator
|
<CourseIndicator
|
||||||
done={course.trail.activities_marked_complete && course.trail.activities_marked_complete.includes(activity.id) && course.trail.status == "ongoing"}
|
done={course.trail.activities_marked_complete && course.trail.activities_marked_complete.includes(activity.id) && course.trail.status == "ongoing"}
|
||||||
/>
|
/>
|
||||||
</Link>
|
</Link>
|
||||||
</ToolTip>
|
</ToolTip>
|
||||||
|
|
||||||
|
|
@ -81,38 +81,42 @@ const CourseIdPage = (params: any) => {
|
||||||
|
|
||||||
<CourseMetaWrapper>
|
<CourseMetaWrapper>
|
||||||
<CourseMetaLeft>
|
<CourseMetaLeft>
|
||||||
<h2>Description</h2>
|
<h2 className="py-3 font-bold">Description</h2>
|
||||||
|
|
||||||
<BoxWrapper>
|
<BoxWrapper>
|
||||||
<p>{course.course.description}</p>
|
<p className="py-3">{course.course.description}</p>
|
||||||
</BoxWrapper>
|
</BoxWrapper>
|
||||||
|
|
||||||
<h2>What you will learn</h2>
|
<h2 className="py-3 font-bold">What you will learn</h2>
|
||||||
<BoxWrapper>
|
<BoxWrapper>
|
||||||
<p>{course.course.learnings == ![] ? "no data" : course.course.learnings}</p>
|
<p className="py-3">{course.course.learnings == ![] ? "no data" : course.course.learnings}</p>
|
||||||
</BoxWrapper>
|
</BoxWrapper>
|
||||||
|
|
||||||
<h2>Course Lessons</h2>
|
<h2 className="py-3 font-bold">Course Lessons</h2>
|
||||||
|
|
||||||
<BoxWrapper>
|
<BoxWrapper>
|
||||||
{course.chapters.map((chapter: any) => {
|
{course.chapters.map((chapter: any) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<div
|
||||||
<h3>{chapter.name}</h3>
|
key={chapter}
|
||||||
{chapter.activities.map((activity: any) => {
|
className="py-3"
|
||||||
|
>
|
||||||
|
<h3 className="text-lg">{chapter.name}</h3>
|
||||||
|
<div
|
||||||
|
className="py-3"
|
||||||
|
>{chapter.activities.map((activity: any) => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<p>
|
<p className="flex text-md">
|
||||||
{activity.name}
|
{activity.name}
|
||||||
<Link href={getUriWithOrg(orgslug, "") + `/course/${courseid}/activity/${activity.id.replace("activity_", "")}`} rel="noopener noreferrer">
|
<Link className="pl-3" href={getUriWithOrg(orgslug, "") + `/course/${courseid}/activity/${activity.id.replace("activity_", "")}`} rel="noopener noreferrer">
|
||||||
<EyeOpenIcon />
|
<EyeOpenIcon />
|
||||||
</Link>{" "}
|
</Link>{" "}
|
||||||
</p>
|
</p>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
})}
|
})}</div>
|
||||||
|
</div>
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</BoxWrapper>
|
</BoxWrapper>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Draggable } from "react-beautiful-dnd";
|
import { Draggable } from "react-beautiful-dnd";
|
||||||
import { EyeOpenIcon, Pencil2Icon } from '@radix-ui/react-icons'
|
import { EyeOpenIcon, Pencil2Icon } from '@radix-ui/react-icons'
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import { getUriWithOrg } from "@services/config/config";
|
import { getUriWithOrg } from "@services/config/config";
|
||||||
|
|
@ -10,38 +10,24 @@ function Activity(props: any) {
|
||||||
return (
|
return (
|
||||||
<Draggable key={props.activity.id} draggableId={props.activity.id} index={props.index}>
|
<Draggable key={props.activity.id} draggableId={props.activity.id} index={props.index}>
|
||||||
{(provided) => (
|
{(provided) => (
|
||||||
<ActivityWrapper key={props.activity.id} {...provided.draggableProps} {...provided.dragHandleProps} ref={provided.innerRef}>
|
<div
|
||||||
|
className="flex flex-row items-center py-2 my-3 rounded-md justify-center bg-gray-50 hover:bg-gray-100 space-x-2" key={props.activity.id} {...provided.draggableProps} {...provided.dragHandleProps} ref={provided.innerRef}>
|
||||||
<p>{props.activity.name} </p>
|
<p>{props.activity.name} </p>
|
||||||
<Link
|
<Link
|
||||||
href={getUriWithOrg(props.orgslug,"")+`/course/${props.courseid}/activity/${props.activity.id.replace("activity_", "")}`}
|
href={getUriWithOrg(props.orgslug, "") + `/course/${props.courseid}/activity/${props.activity.id.replace("activity_", "")}`}
|
||||||
|
|
||||||
rel="noopener noreferrer">
|
rel="noopener noreferrer"> <EyeOpenIcon />
|
||||||
<EyeOpenIcon/>
|
|
||||||
</Link>
|
</Link>
|
||||||
<Link
|
<Link
|
||||||
href={getUriWithOrg(props.orgslug,"") +`/course/${props.courseid}/activity/${props.activity.id.replace("activity_", "")}/edit`}
|
href={getUriWithOrg(props.orgslug, "") + `/course/${props.courseid}/activity/${props.activity.id.replace("activity_", "")}/edit`}
|
||||||
rel="noopener noreferrer">
|
rel="noopener noreferrer">
|
||||||
<Pencil2Icon/>
|
<Pencil2Icon />
|
||||||
</Link>
|
</Link>
|
||||||
</ActivityWrapper>
|
</div>
|
||||||
)}
|
)}
|
||||||
</Draggable>
|
</Draggable>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ActivityWrapper = styled.div`
|
|
||||||
padding: 2px;
|
|
||||||
padding-left: 17px;
|
|
||||||
list-style: none;
|
|
||||||
/* padding-left: 2px; */
|
|
||||||
background-color: #f4f4f4c5;
|
|
||||||
border-radius: 7px;
|
|
||||||
margin: 15px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
&:hover {
|
|
||||||
background-color: #8c949c7b;
|
|
||||||
}
|
|
||||||
|
|
||||||
`;
|
|
||||||
export default Activity;
|
export default Activity;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import styled from "styled-components";
|
import styled from "styled-components";
|
||||||
import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd";
|
import { DragDropContext, Droppable, Draggable } from "react-beautiful-dnd";
|
||||||
import Activity, { ActivityWrapper } from "./Activity";
|
import Activity from "./Activity";
|
||||||
|
|
||||||
function Chapter(props: any) {
|
function Chapter(props: any) {
|
||||||
return (
|
return (
|
||||||
|
|
@ -14,8 +14,8 @@ function Chapter(props: any) {
|
||||||
// isDragging={snapshot.isDragging}
|
// isDragging={snapshot.isDragging}
|
||||||
key={props.info.list.chapter.id}
|
key={props.info.list.chapter.id}
|
||||||
>
|
>
|
||||||
<h3>
|
<h3 className="pt-3 font-bold text-md">
|
||||||
{props.info.list.chapter.name}{" "}
|
{props.info.list.chapter.name}
|
||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
props.openNewActivityModal(props.info.list.chapter.id);
|
props.openNewActivityModal(props.info.list.chapter.id);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue