diff --git a/src/Components/menu_section/my_projects/MyProjects.css b/src/Components/menu_section/my_projects/MyProjects.css
index f753a680..bd85823d 100644
--- a/src/Components/menu_section/my_projects/MyProjects.css
+++ b/src/Components/menu_section/my_projects/MyProjects.css
@@ -20,10 +20,11 @@ button {
gap: 20px;
margin: 20px 0;
}
-.top h1 {
- margin-left: 70px;
+.top a {
+ font-size: 30px;
+ margin-left: 20px;
+ margin-right: 40px;
}
-
.project-card {
/* background-color: rgb(23, 23, 83); */
color: white;
@@ -86,4 +87,37 @@ color: gray;
.light .project-card h2 , .light .project-card p{
background: lightblue !important;
color: #000000 !important;
+}
+.home-icon{
+ margin-left: 5%;
+ cursor: pointer;
+}
+.nav{
+ display: flex;
+ justify-content: space-around;
+}
+.top a:hover{
+ background-color: rgb(1, 1, 147);
+ border-radius: 10px;
+}
+.main-title{
+ text-decoration: underline;
+}
+
+@media screen and (max-width:560px) {
+ .nav{
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ flex: 1;
+ }
+ .top{
+ flex-direction: column;
+ }
+ .home-icon{
+ margin-left: 15%;
+ }
+ .top a{
+ font-size: 20px;
+ }
}
\ No newline at end of file
diff --git a/src/Components/menu_section/my_projects/MyProjects.js b/src/Components/menu_section/my_projects/MyProjects.js
index 7fad50c3..69acd95f 100644
--- a/src/Components/menu_section/my_projects/MyProjects.js
+++ b/src/Components/menu_section/my_projects/MyProjects.js
@@ -2,94 +2,45 @@ import {FaPlus} from 'react-icons/fa';
import Menu from '../../Menu';
import './MyProjects.css'
import {Link} from 'react-router-dom';
-import Card1 from "../../../img/card1.jpg";
-import Card2 from "../../../img/card2.jpg";
-import Card3 from "../../../img/card3.jpg";
-import Card4 from "../../../img/card4.jpg";
-import {BsHeartFill} from 'react-icons/bs';
+import {features} from '../../projects/index.js';
+import { BsHeartFill } from 'react-icons/bs';
import homeIcon from '../../../img/homeicon.png';
import {useContext} from "react";
import {ThemeContext} from "../../../App";
-
-const SampleData = [
- {
- id: 1,
- name: "ToDo app",
- noOfHearts: "10",
- github: "/",
- description: "This is an awesome project. I have used bla blaaaa. This is an awesome project. I have used bla blaaaa",
- skills: ['HTML', 'CSS', 'JavaScript'],
- uploadedDate: '2023-10-15',
- image: Card1
- },
- {
- id: 2,
- name: "Weather app",
- noOfHearts: "10",
- github: "/",
- description: "This is an awesome project. I have used bla blaaaa. This is an awesome project. I have used bla blaaaa",
- skills: ['HTML', 'CSS', 'JavaScript'],
- uploadedDate: '2023-10-15',
- image: Card2
- },
- {
- id: 3,
- name: "Expense tracker",
- noOfHearts: "10",
- github: "/",
- description: "This is an awesome project. I have used bla blaaaa. This is an awesome project. I have used bla blaaaa",
- skills: ['HTML', 'CSS', 'JavaScript'],
- uploadedDate: '2023-10-15',
- image: Card3
- },
- {
- id: 4,
- name: "E commerce website",
- noOfHearts: "10",
- github: "/",
- description: "This is an awesome project. I have used bla blaaaa. This is an awesome project. I have used bla blaaaa",
- skills: ['HTML', 'CSS', 'JavaScript'],
- uploadedDate: '2023-10-15',
- image: Card4
+const truncateText = (text) =>{
+ if (text.length <= 70) {
+ return text;
}
-]
+ return text.slice(0, 70) + '...';
+}
function MyProjects({showMenu = true}) {
-
const {theme} = useContext(ThemeContext)
-
return (
{showMenu &&
}
+
-
My Projects
-
-
-
+
+
{/*In future, Based on User Login, data can be added here in "href"*/}
-
+
-
+
+
+
+
-
{
- SampleData.map(project => {
- return (
+ features.map(project => {
+ return(
- )
+ );
})
}
- {
- SampleData.map(project => {
- return (
-
- )
- })
- }
-
@@ -101,26 +52,22 @@ export default MyProjects;
function MyProjectCard({project}) {
- const {theme} = useContext(ThemeContext)
+ const {theme} = useContext(ThemeContext);
return (
-
+
-
{project.name}
+
{project.title}
- {project.noOfHearts}
+ {project.hearts}
-
{project.description.substring(0, 75)}...
-
{project.uploadedDate}
+
{truncateText(project.text)}
-
-
-
@@ -128,5 +75,5 @@ function MyProjectCard({project}) {
- )
+ );
}
\ No newline at end of file
diff --git a/src/Components/menu_section/new_project/NewProject.css b/src/Components/menu_section/new_project/NewProject.css
index 482f1db5..a845bd03 100644
--- a/src/Components/menu_section/new_project/NewProject.css
+++ b/src/Components/menu_section/new_project/NewProject.css
@@ -118,4 +118,7 @@ span {
transform: scale(1);
opacity: 1;
}
+}
+.top{
+ margin-left: 60px;
}
\ No newline at end of file