Skip to content

Commit

Permalink
Merge branch 'main' of github.com:ankushKun/betterIDE
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushKun committed Dec 6, 2023
2 parents f67da0f + 7198be9 commit cf4092f
Show file tree
Hide file tree
Showing 9 changed files with 104 additions and 34 deletions.
8 changes: 8 additions & 0 deletions src/assets/activeFolders/browse.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/assets/activeFolders/code.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/assets/activeFolders/deploy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/assets/activeFolders/home.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions src/assets/activeFolders/test.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion src/assets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@ import browse from "./browse.svg";
import search from "./search.svg";
import stamp from "./stamp.svg";
import personalProjects from "./code.svg";
export { code, test, browse, personalCloud, dropDown, dropRight, nextArrow, tutorial, home, close, horizontal, deploy, search, stamp, personalProjects};
import activehome from "./activeFolders/home.svg";
import activeTest from "./activeFolders/test.svg";
import activeCode from "./activeFolders/code.svg";
import activeDeploy from "./activeFolders/deploy.svg";
import activeBrowse from "./activeFolders/browse.svg";
import tutorialFlow from "./tutorialFlow.png";
export { code, test, browse, personalCloud, dropDown, dropRight, nextArrow, tutorial, home, close, horizontal, deploy, search, stamp, personalProjects, activehome, activeTest, activeCode, activeDeploy, activeBrowse, tutorialFlow};
Binary file added src/assets/tutorialFlow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 54 additions & 30 deletions src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState } from 'react'
import { test, deploy, code, home, browse, personalProjects } from '../assets'
import { test, deploy, code, home, browse, personalProjects, activehome, activeCode, activeDeploy, activeTest, activeBrowse } from '../assets'
import { Link } from 'react-router-dom'
import cloud from '../assets/cloud.svg'

Expand Down Expand Up @@ -38,39 +38,63 @@ export const navlinks = [
}
]
const Sidebar = () => {
const [hoveredLink,setHoveredLink]= useState("");
const [active, setActive] = useState("");
const handleSelect = (name: string) => {
setActive(name);
}
return (
<div className='pt-2'>
<div className='flex px-2 flex-col items-start w-full gap-5 min-w-[200px]'>
{navlinks.map((link) => {
return (<Link to={link.link} className='w-full'>
<div onClick={() => handleSelect(link.name)} className={`flex flex-col justify-start rounded-[5px] items-start w-full ${active === link.name && 'bg-[#24312F]'} hover:bg-[#24312F] hover:rounded duration-300 p-1`}>
<div className='flex items-center justify-start'>
<img src={link.name} alt="deploy" className='w-12 max-w-xs h-12' />
<p className=' text-sm '>{link.iconName}</p>
</div>
</div>
</Link>);
})}

{/* <Link to="/deploy">
<div className='flex flex-col justify-center items-center hover:bg-[#24312F] hover:rounded duration-300 p-1'>
<img src={deploy} alt="test" className='w-12 h-12'/>
</div>
</Link>
<Link to="/personal-cloud">
<div className='flex flex-col justify-center items-center hover:bg-[#24312F] hover:rounded duration-300 p-1'>
<img src={personalCloud} alt="personal cloud" className='w-12 h-12'/>
</div>
</Link>
<Link to="/global-cloud">
<div className='flex flex-col justify-center items-center hover:bg-[#24312F] hover:rounded duration-300 p-1'>
<img src={globalCloud} alt="global cloud" className='w-12 h-12'/>
</div>
</Link> */}
const navlinks = [
{
iconName:"Home",
name: home,
activeName: activehome,
link: "/"
},
{
iconName:"Contracts",
name: code,
activeName: activeCode,
link: "/code"
},
{
iconName:"Deploy",
name: deploy,
activeName: activeDeploy,
link: "/deploy"
},
{
iconName:"Test",
name: test,
activeName: activeTest,
link: "/test"
},
,
{
iconName:"Personal Contracts",
name: test,
activeName: activeTest,
link: "/my-projects"
},
{
iconName:"Browse",
name: browse,
activeName: activeBrowse,
link: "/browse"
}
]
return (
<div className='pt-2'>
<div className='flex px-2 flex-col items-start w-full gap-5 min-w-[200px]'>
{navlinks.map((link)=>{
return (<Link to={link.link} className='w-full'>
<div onMouseEnter={()=>setHoveredLink(link.iconName)} onClick={()=>handleSelect(link.iconName)} className={`flex group flex-col justify-start rounded-[5px] items-start w-full text-[] ${active===link.iconName&&'bg-[#093E494D]'} hover:bg-[#093E494D] hover:rounded duration-300 p-1 transition-all `}>
<div className='flex items-center justify-start'>
<img src={(active===link.iconName||hoveredLink===link.iconName)?link.activeName:link.name} alt="deploy" className='w-12 max-w-xs h-12 hover:opacity-80'/>
<p className={` text-sm group-hover:text-[#81A5A0] ${active===link.name&&'text-[#81A5A0]'}`}>{link.iconName}</p>
</div>
</div>
</Link>);
})}
</div>
</div>
)
Expand Down
6 changes: 3 additions & 3 deletions src/components/Tour.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

import { tutorial } from "../assets"
import { tutorialFlow } from "../assets"
export const Tour = () => {
return (
<div className="pt-2">
<img src={tutorial} alt="Tutorial" />
<div className="pt-2 w-[1250px]">
<img src={tutorialFlow} alt="Tutorial" />
</div>
)
}

0 comments on commit cf4092f

Please sign in to comment.