-
Notifications
You must be signed in to change notification settings - Fork 73
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
Reduce repetitive code of Frontend Roadmap Component #292
Merged
Mr-Sunglasses
merged 4 commits into
FOSS-Community:main
from
NegiSushant:modify_frontend
Jul 16, 2024
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
733becb
Reduce repetitive code
NegiSushant 6976d83
Merge branch 'FOSS-Community:main' into modify_frontend
NegiSushant 8f331de
suggested changes done
NegiSushant d0f2065
Merge branch 'modify_frontend' of https://github.com/NegiSushant/foss…
NegiSushant File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,56 @@ | ||
import React, { useState, useEffect } from "react"; | ||
import arrow from "../assets/img/frontend_icons/icons-arrow.png" | ||
import downarrow from "../assets/img/frontend_icons/down_arrow.png" | ||
|
||
import arrow from "../assets/img/frontend_icons/icons-arrow.png"; | ||
import downarrow from "../assets/img/frontend_icons/down_arrow.png"; | ||
|
||
const Frontend = () => { | ||
return ( | ||
<div> | ||
<h1 className="w-full mt-20 mb-24 text-white px-4 tracking-tight text-center text-5xl">Complete Frontend Roadmap</h1> | ||
|
||
< div className='flex flex-wrap mx-40 mt-26 mb-20 justify-center gap-4 md:gap-4 sm:gap-4'> | ||
|
||
<a href="/html_css" className=' sm:mb-10 px-2 flex flex-col shadow-lg shadow-[#00df9a] transition-shadow hover:bg-opacity-90 duration-[320ms] bg-gray-900 rounded-lg text-green-400 hover:bg-[#00df9a] hover:shadow-none transition-color hover:text-white transition-color'> | ||
<h2 className='text-center font-bold text-3xl px-4 py-6'>HTML/ CSS</h2> | ||
</a> | ||
<img src={arrow} className="w-0 h-0 max-w-screen-xl sm:w-20 sm:h-20"/> | ||
<img src={downarrow} className=" w-20 h-20 max-w-screen-xl sm:w-0 sm:h-0"/> | ||
<a href="/tailwind" className='sm:mb-10 pl-2 pr-2 flex flex-col shadow-lg shadow-[#00df9a] transition-shadow hover:bg-opacity-90 duration-[320ms] bg-gray-900 rounded-lg text-green-400 hover:bg-[#00df9a] hover:shadow-none transition-color hover:text-white transition-color'> | ||
<h2 className='text-center font-bold text-3xl px-4 py-6'>TAILWIND CSS</h2> | ||
</a> | ||
<img src={arrow} className="w-0 h-0 max-w-screen-xl sm:w-20 sm:h-20"/> | ||
<img src={downarrow} className="w-20 h-20 max-w-screen-xl sm:w-0 sm:h-0"/> | ||
<a href="/javascript" className='sm:mb-10 pl-2 pr-2 flex flex-col shadow-lg shadow-[#00df9a] transition-shadow hover:bg-opacity-90 duration-[320ms] bg-gray-900 rounded-lg text-green-400 hover:bg-[#00df9a] hover:shadow-none transition-color hover:text-white transition-color'> | ||
<h2 className='text-center font-bold text-3xl px-4 py-6'>JAVA SCRIPT</h2> | ||
</a> | ||
<img src={arrow} className="w-0 h-0 max-w-screen-xl sm:w-20 sm:h-20"/> | ||
<img src={downarrow} className="w-15 h-20 max-w-screen-xl sm:w-0 sm:h-0"/> | ||
<a href="/reactjs" className='sm:mb-10 pl-2 pr-2 flex flex-col shadow-lg shadow-[#00df9a] transition-shadow hover:bg-opacity-90 duration-[320ms] bg-gray-900 rounded-lg text-green-400 hover:bg-[#00df9a] hover:shadow-none transition-color hover:text-white transition-color'> | ||
<h2 className='text-center font-bold text-3xl px-4 py-6'>REACT JS</h2> | ||
</a> | ||
<img src={arrow} className="w-0 h-0 max-w-screen-xl sm:w-20 sm:h-20"/> | ||
<img src={downarrow} className="w-20 h-20 max-w-screen-xl sm:w-0 sm:h-0"/> | ||
<a href="/nextjs" className='sm:mb-10 pl-2 pr-2 flex flex-col shadow-lg shadow-[#00df9a] transition-shadow hover:bg-opacity-90 duration-[320ms] bg-gray-900 rounded-lg text-green-400 hover:bg-[#00df9a] hover:shadow-none transition-color hover:text-white transition-color'> | ||
<h2 className='text-center font-bold text-3xl px-4 py-6'>NEXT JS</h2> | ||
</a> | ||
<img src={arrow} className="w-0 h-0 max-w-screen-xl sm:w-20 sm:h-20"/> | ||
<img src={downarrow} className="w-20 h-20 max-w-screen-xl sm:w-0 sm:h-0"/> | ||
<a href="/vuejs" className='sm:mb-10 pl-2 pr-2 flex flex-col shadow-lg shadow-[#00df9a] transition-shadow hover:bg-opacity-90 duration-[320ms] bg-gray-900 rounded-lg text-green-400 hover:bg-[#00df9a] hover:shadow-none transition-color hover:text-white transition-color'> | ||
<h2 className='text-center font-bold text-3xl px-4 py-6'>VUE JS</h2> | ||
</a> | ||
<img src={arrow} className="w-0 h-0 max-w-screen-xl sm:w-20 sm:h-20"/> | ||
<img src={downarrow} className="w-20 h-20 max-w-screen-xl sm:w-0 sm:h-0"/> | ||
<a href="/threejs" className='sm:mb-10 pl-2 pr-2 flex flex-col shadow-lg shadow-[#00df9a] transition-shadow hover:bg-opacity-90 duration-[320ms] bg-gray-900 rounded-lg text-green-400 hover:bg-[#00df9a] hover:shadow-none transition-color hover:text-white transition-color'> | ||
<h2 className='text-center font-bold text-3xl px-4 py-6'>THREE JS</h2> | ||
</a> | ||
<img src={arrow} className="w-0 h-0 max-w-screen-xl sm:w-20 sm:h-20"/> | ||
<img src={downarrow} className="w-20 h-20 max-w-screen-xl sm:w-0 sm:h-0"/> | ||
<a href="/reactnative" className='sm:mb-10 pl-2 pr-2 flex flex-col shadow-lg shadow-[#00df9a] transition-shadow hover:bg-opacity-90 duration-[320ms] bg-gray-900 rounded-lg text-green-400 hover:bg-[#00df9a] hover:shadow-none transition-color hover:text-white transition-color'> | ||
<h2 className='text-center font-bold text-3xl px-4 py-6'>REACT NATIVE</h2> | ||
</a> | ||
<img src={arrow} className="w-0 h-0 max-w-screen-xl sm:w-20 sm:h-20"/> | ||
<img src={downarrow} className="w-20 h-20 max-w-screen-xl sm:w-0 sm:h-0"/> | ||
<a href="/electron" className='sm:mb-10 pl-2 pr-2 flex flex-col shadow-lg shadow-[#00df9a] transition-shadow hover:bg-opacity-90 duration-[320ms] bg-gray-900 rounded-lg text-green-400 hover:bg-[#00df9a] hover:shadow-none transition-color hover:text-white transition-color'> | ||
<h2 className='text-center font-bold text-3xl px-4 py-6'>ELECTRON</h2> | ||
</a> | ||
const courses = [ | ||
{ name: "HTML / CSS", link: "/html_css" }, | ||
{ name: "TAILWIND", link: "/tailwind" }, | ||
{ name: "JAVA SCRIPT", link: "/javascript" }, | ||
{ name: "REACT JS", link: "/reactjs" }, | ||
{ name: "NEXT JS", link: "/nextjs" }, | ||
{ name: "VUE JS", link: "/vuejs" }, | ||
{ name: "THREE JS", link: "/threejs" }, | ||
{ name: "REACT NATIVE", link: "/reactnative" }, | ||
{ name: "ELECTRON", link: "/electron" }, | ||
]; | ||
|
||
</div> | ||
return ( | ||
<div className="bg-gray-800 min-h-screen py-20"> | ||
<h1 className="w-full mb-24 text-white px-4 tracking-tight text-center text-5xl"> | ||
Complete Frontend Roadmap | ||
</h1> | ||
|
||
</div> | ||
); | ||
<div className="flex flex-wrap justify-center gap-4 mx-4 md:mx-20"> | ||
{courses.map((course, index) => ( | ||
<React.Fragment key={index}> | ||
<a | ||
href={course.link} | ||
className="w-full sm:w-auto sm:mb-10 flex flex-col shadow-lg shadow-[#00df9a] transition-shadow hover:bg-opacity-90 duration-[320ms] bg-gray-900 rounded-lg text-green-400 hover:bg-[#00df9a] hover:shadow-none hover:text-white" | ||
> | ||
<h2 className="text-center font-bold text-3xl px-4 py-6"> | ||
{course.name} | ||
</h2> | ||
</a> | ||
{index < courses.length - 1 && ( | ||
<div className="flex flex-col items-center"> | ||
<img | ||
src={arrow} | ||
alt="arrow" | ||
className="hidden sm:block w-20 h-20" | ||
/> | ||
<img | ||
src={downarrow} | ||
alt="down arrow" | ||
className="block sm:hidden w-20 h-20" | ||
/> | ||
</div> | ||
)} | ||
</React.Fragment> | ||
))} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Frontend; | ||
export default Frontend; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
You can use
grid-cols-7
which allows for better control over the placement of the courses and arrows.