Skip to content

Small css changes and optimisation image files #7

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified public/android-chrome-192x192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/android-chrome-512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/apple-touch-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/courses/canva.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/courses/excel.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/courses/internet.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/courses/notfound.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/courses/storytelling.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/tutorial/add-new-course.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/tutorial/course-details-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/tutorial/courses-page.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/images/tutorial/dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 8 additions & 27 deletions src/Pages/CourseDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {useState,useEffect} from 'react';
import {useParams} from "react-router-dom";
import LoadingSpinner from '../components/Utilities/Loaders/LoadingSpinner.js';
import Buttons from "../components/Utilities/Buttons/buttons";
import CourseDetailsItem from './../components/Utilities/Cards/CourseDetailsItem';
export default function CourseDetails(){
const API = 'https://chain-legendary-strawflower.glitch.me/courses/';
const params = useParams();
Expand All @@ -18,8 +19,7 @@ export default function CourseDetails(){
useEffect(()=>{
fetchDetails()
},[]);



if (!course) {
return(<div><LoadingSpinner/></div>);
}else{
Expand All @@ -34,31 +34,12 @@ export default function CourseDetails(){
<h3 className="text-3xl font-bold text-indigo-500 underline underline-offset-8 hover:text-gray-600 hover:duration-600">{course.title}</h3>
<p className="mt-3 mb-3 text-lg leading-relaxed text-slate-700 border-b-2 border-gray-500 py-2 antialiased">{course.description}</p>
<ul className="list-none flex-wrap grid grid-cols-2 mb-3 mt-5">
<li className="py-2 flex flex-col">
<div className="flex items-center">
<div><span className="text-normal font-normal inline-block py-1 px-2 rounded-full text-slate-100 bg-indigo-600 mr-3"><i className="fa-solid fa-calendar-minus"></i></span></div>
<div><h4 className="text-slate-600 hover:text-indigo-500 font-normal hover:underline text-normal">Start Date:<span>{course.dates.start_date.split("-").reverse().join("/")}</span></h4></div></div>
</li>
<li className="py-2 flex flex-col">
<div className="flex items-center">
<div><span className="text-normal font-normal inline-block py-1 px-2 rounded-full text-slate-100 bg-indigo-600 mr-3"><i className="fa-solid fa-calendar-plus"></i></span></div>
<div><h4 className="text-slate-600 hover:text-indigo-500 font-normal hover:underline text-normal">End Date:<span>{course.dates.end_date.split("-").reverse().join("/")}</span></h4></div></div></li>
<li className="py-2 flex flex-col">
<div className="flex items-center">
<div><span className="text-normal font-normal inline-block py-1 px-2 rounded-full text-slate-100 bg-indigo-600 mr-3"><i className="fa-solid fa-clock"></i></span></div>
<div><h4 className="text-slate-600 hover:text-indigo-500 font-normal hover:underline text-normal">Duration:<span>{course.duration}</span></h4></div></div></li>
<li className="py-2 flex flex-col">
<div className="flex items-center">
<div><span className="text-normal font-normal inline-block py-1 px-2 rounded-full text-gray-100 bg-indigo-600 mr-3"><i className="fa-solid fa-globe"></i></span></div>
<div><h4 className="text-slate-600 hover:text-indigo-500 font-normal hover:underline text-normal">Online:<span>{course.online ? "Yes" : " No"}</span></h4></div></div></li>
<li className="py-2 flex flex-col">
<div className="flex items-center">
<div><span className="text-normal font-normal inline-block py-1 px-2 rounded-full text-slate-100 bg-indigo-600 mr-3"><i className="fa-solid fa-coins"></i></span></div>
<div><h4 className="text-slate-600 hover:text-indigo-500 font-normal hover:underline text-normal">Normal Price:<span>{course.price.normal}</span></h4></div></div></li>
<li className="py-2 flex flex-col">
<div className="flex items-center">
<div><span className="text-normal font-normal inline-block py-1 px-2 rounded-full text-slate-100 bg-indigo-600 mr-3"><i className="fa-solid fa-gift"></i></span></div>
<div><h4 className="text-slate-600 hover:text-indigo-500 font-normal hover:underline text-normal">Early-bird Price:<span>{course.price.early_bird}</span></h4></div></div></li>
<CourseDetailsItem heading={"Start Date"} content={course.dates.start_date.split("-").reverse().join("/")} IconTitle={"fa-solid fa-calendar-minus"}/>
<CourseDetailsItem heading={"End Date"} content={course.dates.end_date.split("-").reverse().join("/")} IconTitle={"fa-solid fa-calendar-plus"}/>
<CourseDetailsItem heading={"Duration"} content={course.duration} IconTitle={"fa-solid fa-clock"}/>
<CourseDetailsItem heading={"Online"} content={course.online ? "Yes" : " No"} IconTitle={"fa-solid fa-globe"}/>
<CourseDetailsItem heading={"Normal Price"} content={course.price.normal} IconTitle={"fa-solid fa-coins"}/>
<CourseDetailsItem heading={"Early-bird Price"} content={course.price.early_bird} IconTitle={"fa-solid fa-gift"}/>
</ul>
<Buttons fetchDetails={fetchDetails()} data={course} idNumber={course.id} />
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Utilities/Buttons/buttondelete.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export default function ButtonDelete(props){

return (
<>
<button onClick={() => openModal()} className="text-white bg-red-600 hover:bg-gray-900 hover:ease-out hover:duration-300 focus:outline-none focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2">
<button onClick={() => openModal()} className="text-white bg-red-600 hover:bg-gray-900 hover:ease-out hover:duration-300 focus:outline-none focus:ring-4 focus:ring-gray-300 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 shadow-sm">
<i class="fa-solid fa-trash-can"></i> Delete
</button>
<DelleteMessage idNumber={props.idNumber} closeModal={closeModal} open={isModalOpen} close={closeModal} />
Expand Down
2 changes: 1 addition & 1 deletion src/components/Utilities/Buttons/buttonedit.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function ButtonEdit(props){
function openModal() {setIsModalOpen(true);}
return (
<div style={{ position: 'relative', zIndex: '1' }}>
<button onClick={() => openModal()} className="text-white bg-indigo-400 border border-gray-300 hover:bg-white hover:ease-out hover:duration-300 hover:text-gray-900 focus:outline-none focus:ring-4 focus:ring-gray-200 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2">
<button onClick={() => openModal()} className="text-white bg-indigo-400 border border-gray-300 hover:bg-white hover:ease-out hover:duration-300 hover:text-gray-900 focus:outline-none focus:ring-4 focus:ring-gray-200 font-medium rounded-lg text-sm px-5 py-2.5 mr-2 mb-2 shadow-sm">
<i class="fa-solid fa-pen-to-square"></i> Edit</button>
<EditPage fetchDetails={props.fetchDetails} data={props.data} idNumber={props.idNumber} open={isModalOpen} close={closeModal} />
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Utilities/Cards/CourseDetailsItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ export default function CourseDetailsItem({IconTitle,heading,content}){
<li className="py-2 flex flex-col">
<div className="flex items-center">
<div>
<span className="text-normal font-normal inline-block py-1 px-2 rounded-full text-slate-100 bg-indigo-600 mr-3"><i className={IconTitle}></i></span></div>
<span className="text-normal font-normal inline-block py-1 px-2 rounded-full text-gray-100 bg-indigo-600 mr-3 "><i className={IconTitle}></i></span></div>
<div>
<h4 className="text-slate-600 hover:text-indigo-500 font-normal hover:underline text-normal">{heading}: <span>{content}</span></h4>
<h4 className="text-gray-600 hover:text-indigo-500 font-normal text-normal hover:border-b-2 hover:border-indigo-400">{heading}: <span className="font-bold">&nbsp; {content}</span></h4>
</div>
</div>
</li>
Expand Down
1 change: 1 addition & 0 deletions src/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ body{
margin:0;
min-height:100vh;
font-family: 'Open Sans', sans-serif;

}

#footer {
Expand Down