Skip to content

Commit

Permalink
web production
Browse files Browse the repository at this point in the history
  • Loading branch information
Cedarich committed Oct 11, 2024
1 parent 9a10b26 commit 27cbd3b
Show file tree
Hide file tree
Showing 26 changed files with 532 additions and 247 deletions.
49 changes: 49 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@fortawesome/free-solid-svg-icons": "^6.6.0",
"@fortawesome/react-fontawesome": "^0.2.2",
"@headlessui/react": "^2.1.9",
"@heroicons/react": "^2.1.5",
"@testing-library/jest-dom": "^5.17.0",
Expand Down
3 changes: 3 additions & 0 deletions src/AppLayout/AppLayout.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.mainContent {
background-color: #f4f4f9;
}
150 changes: 150 additions & 0 deletions src/components/AccountSettings.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
import React, { useState, useEffect } from "react";
import LogoutModal from "./LogoutModal"; // Adjust the import path as needed

const Settings = () => {
const [isVisible, setIsVisible] = useState(false);
const [isLogoutModalOpen, setIsLogoutModalOpen] = useState(false); // State for LogoutModal

useEffect(() => {
setTimeout(() => {
setIsVisible(true);
}, 200); // Add delay for fade-in effect
}, []);

const handleSubmit = (event) => {
event.preventDefault(); // Prevents page reload
console.log("Form submitted");
// Add logic for handling the password change here
};

return (
<div
className={`flex flex-col p-2 md:flex-row max-w-[736px] w-full transition-all duration-700 ease-in-out ${
isVisible ? "opacity-100 translate-y-0" : "opacity-0 translate-y-10"
}`}
>
<div className="flex-1 mb-6 md:mr-4">
<h2 className="text-2xl font-bold mb-4 py-2">Settings</h2>

<form
onSubmit={handleSubmit}
className="bg-white p-6 rounded shadow-lg transition-transform duration-700 ease-in-out hover:shadow-xl"
>
<h4 className="text-[24px] font-semibold mb-2">Account</h4>
<p className="mb-4">
Edit your account settings and change your password
</p>
<div className="mb-4 border-t border-gray-200 py-2">
<label
className="block text-sm text-black font-bold"
htmlFor="email"
>
Email
</label>
<input
type="email"
id="email"
placeholder="[email protected]"
className="mt-1 block w-full rounded-md shadow-sm p-2 bg-[#f4f4f9] border-gray-300 focus:outline-none focus:ring-4 transition-all duration-300"
/>
</div>

<div className="mb-4">
<label
className="block text-sm text-black font-bold"
htmlFor="currentPassword"
>
Password
</label>
<input
type="password"
id="currentPassword"
placeholder="Enter current password"
className="mt-1 block w-full rounded-md shadow-sm p-2 bg-[#f4f4f9] border-gray-300 focus:outline-none focus:ring-4 transition-all duration-300"
/>
</div>

<div className="mb-4">
<label
className="block text-sm text-black font-bold"
htmlFor="newPassword"
>
New Password
</label>
<input
type="password"
id="newPassword"
placeholder="Enter new password"
className="mt-1 block w-full rounded-md shadow-sm p-2 bg-[#f4f4f9] border-gray-300 focus:outline-none focus:ring-4 transition-all duration-300"
/>
</div>

<div className="mb-4 border-b border-gray-200 py-2">
<label
className="block text-sm text-black font-bold"
htmlFor="confirmPassword"
>
Confirm Password
</label>
<input
type="password"
id="confirmPassword"
placeholder="Re-type new password"
className="mt-1 block w-full rounded-md shadow-sm p-2 bg-[#f4f4f9] border-gray-300 focus:outline-none focus:ring-4 transition-all duration-300"
/>
</div>

<button
type="submit"
className="bg-red-600 text-white font-bold py-2 px-4 rounded-xl shadow-lg transition-transform duration-300 ease-in-out transform hover:scale-110 hover:shadow-2xl hover:opacity-90 focus:outline-none focus:ring-4 focus:ring-red-500 text-sm md:text-base md:py-2 md:px-4"
>
Change Password
</button>
</form>
</div>

<div className="md:w-1/3 px-6 mt-6 py-6 transition-opacity duration-700 ease-in-out hover:opacity-90">
<h3 className="text-[24px] font-bold mb-4">Account</h3>
<ul className="space-y-2">
<li>
<button className="text-gray-600 hover:underline transition-all duration-300 ease-in-out hover:text-gray-800">
Profile
</button>
</li>
<li>
<button className="text-gray-500 hover:underline transition-all duration-300 ease-in-out hover:text-gray-800">
Notification
</button>
</li>
<li>
<button className="text-gray-500 hover:underline transition-all duration-300 ease-in-out hover:text-gray-800">
Payment Methods
</button>
</li>
<li>
<button className="text-gray-500 hover:underline transition-all duration-300 ease-in-out hover:text-gray-800">
Privacy
</button>
</li>
<li>
<button
onClick={() => setIsLogoutModalOpen(true)} // Show modal when clicked
className="text-gray-500 hover:underline transition-all duration-300 ease-in-out hover:text-gray-800"
>
Close Account
</button>
</li>
</ul>
</div>

{/* Logout Modal */}
{isLogoutModalOpen && (
<LogoutModal
onClose={() => setIsLogoutModalOpen(false)} // Close modal function
/>
)}
</div>
);
};

export default Settings;
3 changes: 2 additions & 1 deletion src/components/ContentCourse.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ const ContentCourse = () => {
};

return (
<div className="max-w-[736px] bg-white rounded-lg shadow-lg p-4 mt-4 w-full border border-gray-300 transition-transform duration-300 hover:scale-105">
<div className="max-w-[736px] bg-white rounded-lg shadow-lg p-2 mt-4 w-full border border-gray-300 transition-transform duration-300 hover:scale-105">
{/* Card now has a scale effect on hover */}

<h2 className="text-2xl font-bold mb-6">Content Course</h2>

{/* Color Theory Section */}
Expand Down
21 changes: 10 additions & 11 deletions src/components/CoursePlayer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,26 @@ const CoursePlayer = ({ course, onBack }) => {

return (
<motion.div
className="container mx-auto p-4 bg-[#f4f4f9]"
className="container bg-[#f4f4f9]"
variants={containerVariants}
initial="hidden"
animate="visible"
exit="hidden"
>
<div className="max-w-6xl px-2 py-2 flex flex-col min-h-screen transition-transform duration-700 ease-in-out opacity-100 transform translate-y-0">
<div className="max-w-6xl flex flex-col min-h-screen transition-transform duration-700 ease-in-out opacity-100 transform translate-y-0">
{/* Section with Video Player and ContentCourse */}
<motion.div
className="flex flex-col md:flex-row w-full gap-4"
variants={containerVariants}
>
{/* Left section with Video Player */}
<div className="flex-grow flex justify-center items-stretch">
<div className="w-full max-w-[736px] h-[400px] mt-6">
<div className="w-full max-w-[736px] h-[400px] py-2 ">
{/* Video Player */}
<div className="relative w-full h-full bg-[#f4f4f9] rounded-lg shadow-[0_0_15px_rgba(124,58,237,0.4)] transition-transform hover:shadow-[0_0_30px_rgba(124,58,237,0.7)] duration-200">
<div className="relative w-full h-full bg-[#f4f4f9] rounded-lg transition-transform hover:shadow-[0_0_30px_rgba(124,58,237,0.7)] duration-200">
{/* YouTube Video Embed with Autoplay */}
<iframe
className="w-full h-full rounded-lg"
className="w-full h-full rounded-lg "
src={`${course.videoUrl}?autoplay=1`} // Enable autoplay
title="YouTube video player"
frameBorder="0"
Expand All @@ -68,7 +68,7 @@ const CoursePlayer = ({ course, onBack }) => {
{/* Back Button */}
<motion.button
onClick={onBack}
className="absolute top-2 left-2 flex items-center justify-center w-10 h-10 bg-gradient-to-r from-[#9b7fd8] to-[#7A4DD2] text-white rounded-full shadow-md transition-all duration-300 ease-in-out"
className="absolute top-2 left-2 flex items-center justify-center w-8 h-8 bg-gradient-to-r from-[#9b7fd8] to-[#7A4DD2] text-white rounded-full shadow-md transition-all duration-300 ease-in-out"
whileHover={{ scale: 1.1, rotate: 180 }} // Add rotate here
whileTap={{ scale: 0.9 }}
>
Expand All @@ -80,18 +80,17 @@ const CoursePlayer = ({ course, onBack }) => {

{/* Right section with ContentCourse */}
<div className="w-full md:w-[300px] flex justify-center items-stretch">
<div className="w-full h-full mt-2">
<div className="w-full h-full ">
<ContentCourse course={course} />
</div>
</div>
</motion.div>

{/* Course Overview Section directly under Video Player */}
<motion.div
className="w-full max-w-[730px] mt-2"
className="w-full max-w-[730px] "
variants={containerVariants}
>
<h1 className="text-4xl font-bold text-black mb-4">
<h1 className="text-4xl font-bold text-black mb-4 mt-2">
E-Commerce Mobile App Design Using Figma
</h1>

Expand Down Expand Up @@ -142,7 +141,7 @@ const CoursePlayer = ({ course, onBack }) => {

<motion.button
onClick={handleToggle}
className="mt-4 text-[#9b7fd8] font-semibold py-2 px-4 rounded-lg transition-all duration-300 ease-in-out transform hover:bg-[#9b7fd8] hover:text-white hover:scale-105 focus:outline-none focus:ring-[#7a56d7] focus:ring-opacity-50"
className="mt-4 text-[#9b7fd8] font-semibold py-2 px-2 rounded-lg transition-all duration-300 ease-in-out transform hover:bg-[#9b7fd8] hover:text-white hover:scale-105 focus:outline-none focus:ring-[#7a56d7] focus:ring-opacity-50"
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Ecommerce.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";

const EcommerceMobileAppDesign = () => {
return (
<div className="max-w-4xl mx-auto p-6 bg-gray-100 rounded-lg shadow-md">
<div className="max-w-4xl mx-auto p-4 bg-gray-100 rounded-lg shadow-md">
<h1 className="text-3xl font-bold text-center text-purple-700 mb-4">
E-Commerce Mobile App Design Using Figma
</h1>
Expand Down
6 changes: 3 additions & 3 deletions src/components/InstructorProfiled.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ const InstructorProfiled = () => {
};

return (
<div className="container mx-auto p-4">
<div className="container mx-auto">
<div
className={`flex flex-col items-center bg-white rounded-lg shadow-lg p-6 transition-all duration-700 ease-in-out transform ${
className={`flex flex-col items-center bg-white rounded-lg shadow-lg p-4 transition-all duration-700 ease-in-out transform ${
isLoaded
? "opacity-100 scale-100 translate-y-0"
: "opacity-0 scale-90 translate-y-10"
Expand Down Expand Up @@ -173,7 +173,7 @@ const InstructorProfiled = () => {
{showSocials ? "Show Less" : "Show More"}
</button>
</div>
<div className="mt-2">
<div className="">
<Topheader />
</div>

Expand Down
4 changes: 2 additions & 2 deletions src/components/LearningCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const LearningsCard = () => {

return (
<motion.div
className="w-full max-w-[736px] h-auto bg-white rounded-lg shadow-lg p-6 sm:w-[90%] md:w-[80%] lg:w-[736px]"
className="w-full max-w-[736px] h-auto bg-white rounded-lg shadow-lg sm:w-[90%] md:w-[80%] lg:w-[736px]"
whileHover={{ scale: 1.03 }} // Apply hover scale here
transition={{ duration: 0.3 }} // Transition effect for scaling
>
Expand Down Expand Up @@ -132,7 +132,7 @@ const LearningsCard = () => {
</AnimatePresence>
<motion.button
onClick={handleToggle}
className="mt-4 text-[#9b7fd8] font-semibold py-2 px-4 rounded-lg transition-all duration-300 ease-in-out transform hover:bg-[#9b7fd8] hover:text-white hover:scale-105 focus:outline-none focus:ring-[#7a56d7] focus:ring-opacity-50"
className="mt-4 text-[#9b7fd8] font-semibold py-2 px-2 rounded-lg transition-all duration-300 ease-in-out transform hover:bg-[#9b7fd8] hover:text-white hover:scale-105 focus:outline-none focus:ring-[#7a56d7] focus:ring-opacity-50"
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
>
Expand Down
Loading

0 comments on commit 27cbd3b

Please sign in to comment.