-
Notifications
You must be signed in to change notification settings - Fork 9
UI: made the course page responsive #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
base: c4gt-community
Are you sure you want to change the base?
UI: made the course page responsive #11
Conversation
src/components/BurgerMenu/index.tsx
Outdated
| </div> | ||
| </div> | ||
| <div className={`sidebar`}> | ||
| {/* {NavItemsData.map((el: any, i: number) => { |
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.
why have we commented these?
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.
added updates as per the review, PTAL.
src/components/CourseCard.tsx
Outdated
| > | ||
| <Card className="p-2"> | ||
| <Row> | ||
| <Card className="p-2" style={{ cursor: "pointer", position: "relative" }}> |
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.
can we move the contents of style={{}} in a dedicated css file?
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.
Please make sure to do this for all inline style={{}} attributes
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.
added updates as per the review, PTAL.
| }} | ||
| > | ||
| {" "} | ||
| Svayam - NCERT |
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.
can we remove this hardcoding?
| }} | ||
| > | ||
| {" "} | ||
| 0 INR |
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.
Can we remove this hard coding?
src/components/NewHeader.tsx
Outdated
| {/* <Nav.Link href="/my_courses" className="text-white"><FaGratipay /> My Courses</Nav.Link> */} | ||
|
|
||
| </Nav> | ||
| {/* <Nav className="me-auto"> |
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.
delete comments if not required.
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.
added updates as per the review, PTAL.
| ".sidebarel" | ||
| ) as NodeListOf<HTMLDivElement>; | ||
|
|
||
| const closeSidebar = () => { |
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.
Can we move these to a dedicated .css file?
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.
added updates as per the review, PTAL.
src/App.tsx
Outdated
| <Router> | ||
| <div className="App" id={theme} style={{minHeight:'100vh'}}> | ||
| <div className="App" id={theme} style={{ minHeight: "100vh" }}> | ||
| {/* <button onClick={toggleTheme} className={`px-6 py-2.5 bg-sky-500 text-white font-medium text-xs leading-tight uppercase rounded-r-xl shadow-md mb-4 hover:bg-sky-700 hover:shadow-lg focus:bg-sky-700 focus:shadow-lg focus:outline-none focus:ring-0 active:bg-blue-800 active:shadow-lg transition duration-150 ease-in-out fixed bottom-0`}> {theme === "dark" ? <svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M12 3v1m0 16v1m9-9h-1M4 12H3m15.364 6.364l-.707-.707M6.343 6.343l-.707-.707m12.728 0l-.707.707M6.343 17.657l-.707.707M16 12a4 4 0 11-8 0 4 4 0 018 0z" /></svg> : <svg className="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M20.354 15.354A9 9 0 018.646 3.646 9.003 9.003 0 0012 21a9.003 9.003 0 008.354-5.646z" /></svg>} </button> */} |
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.
can you remove this commented code?
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.
added updates as per the review, PTAL.
src/components/CourseCard.tsx
Outdated
| course, | ||
| isMyCourse, | ||
| }) => { | ||
| console.log("mnop:", { course }); |
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.
remove console
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.
added updates as per the review, PTAL.
src/components/CourseCard.tsx
Outdated
| <div> | ||
| <FaCalendar /> | ||
| <span> | ||
| {moment(course?.time?.range?.start).format("Do MMM, YYYY")} |
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.
pass some fallback time to it
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.
do the same for all values
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.
added updates as per the review, PTAL.
src/components/CourseFilters.tsx
Outdated
| {cFilter.label} | ||
| </div> */} | ||
| <div className="filterEl"> | ||
| {cFilter.component && ( |
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.
use proper naming conventions
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.
added updates as per the review, PTAL.
| @@ -0,0 +1,61 @@ | |||
| const Menu = () => { | |||
| const menu = document.querySelector(".menu") as HTMLDivElement; | |||
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.
why are we doing it like this ? can't we use some package or UI library for this ?
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.
We could have avoided it, had the code been written using tailwind, in which case we could have used states and class names to achieve it. But bootstrap doesn't support this. Plus even we were to use a package we would still need to customize it via css to suit our needs.
I have made the main course page responsive, also separated all the styles files into a different directory for better organization.
Demo Video:
https://github.com/Samagra-Development/dsep-ui/assets/64116092/39947717-6cbe-4322-9523-170609a15f0a