Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
rupali-codes authored Jul 31, 2023
2 parents 8519b6d + be033fc commit 984da86
Show file tree
Hide file tree
Showing 15 changed files with 312 additions and 44 deletions.
40 changes: 29 additions & 11 deletions components/CopyToClipboard/CopyToClipboard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import useCopyToClipboard from 'hooks/useCopyToClipboard'
import React from 'react'
import React, { useState } from 'react'
import { FaRegCopy } from 'react-icons/fa'

type CopyToClipboardProps = {
Expand All @@ -8,23 +8,41 @@ type CopyToClipboardProps = {

export const CopyToClipboard = ({ url }: CopyToClipboardProps): JSX.Element => {
const [copyToClipboard, { success }] = useCopyToClipboard()
const [isHovering, setIsHovering] = useState(false)

function handleCopy(e: React.MouseEvent<SVGElement, MouseEvent>) {
e.stopPropagation()
copyToClipboard(url)
}

return (
<div className="dropdown dropdown-left dropdown-hover">
<FaRegCopy
size={'1.3rem'}
className="text-theme-primary cursor-pointer"
title="Copy link"
onClick={(e) => handleCopy(e)}
/>
<p className="dropdown-content bg-theme-secondary text-white text-sm rounded-lg px-3 py-1 cursor-default">
{success ? 'Copied!' : 'Copy'}
</p>
<div
className="dropdown dropdown-left dropdown-hover"
onMouseEnter={() => setIsHovering(true)}
onMouseLeave={() => setIsHovering(false)}
>
<div style={{ position: 'relative' }}>
<FaRegCopy
size={'1.3rem'}
className="text-theme-primary cursor-pointer"
title="Copy link"
onClick={(e) => handleCopy(e)}
/>
{isHovering && (
<p
className="bg-theme-secondary text-white text-sm rounded-lg px-3 py-1 cursor-default"
style={{
position: 'absolute',
top: '-2rem', // Adjust this value to position the text above the icon
left: '50%',
transform: 'translateX(-50%)',
zIndex: 1,
}}
>
{success ? 'Copied!' : 'Copy'}
</p>
)}
</div>
</div>
)
}
Expand Down
58 changes: 40 additions & 18 deletions components/Share/Share.tsx
Original file line number Diff line number Diff line change
@@ -1,43 +1,65 @@
import React from 'react';
import { FaShareAlt } from 'react-icons/fa';
import React, { useState } from 'react'
import { FaShareAlt } from 'react-icons/fa'

type ShareProps = {
url: string;
title: string;
};
url: string
title: string
}

export const Share: React.FC<ShareProps> = ({ url, title }) => {
const [showShareOptions, setShowShareOptions] = useState(false)

async function handleShare() {
if (navigator.share) {
try {
await navigator.share({
title: title,
url: url,
});
console.log('Share was successful.');
})
console.log('Share was successful.')
} catch (error) {
console.error('Error sharing:', error);
console.error('Error sharing:', error)
}
} else {
console.log('Web Share API not supported on this browser.');
// Fallback behavior when Web Share API is not supported (e.g., open a new tab with the URL)
window.open(url, '_blank');
console.log('Web Share API not supported on this browser.')
// Fallback behavior when Web Share API is not supported (e.g., open a new tab with the URL)
window.open(url, '_blank')
}
}

return (
<div className="dropdown dropdown-left dropdown-hover">
<div
style={{
position: 'relative',
display: 'inline-block',
}}
onMouseEnter={() => setShowShareOptions(true)}
onMouseLeave={() => setShowShareOptions(false)}
>
<FaShareAlt
size={'1.2rem'}
className="text-theme-primary cursor-pointer"
title="Share link"
onClick={handleShare}
/>
<p className="dropdown-content bg-theme-secondary text-white text-sm rounded-lg px-3 py-1 cursor-default">
Share
</p>
{showShareOptions && (
<p
className="bg-theme-secondary text-white text-sm rounded-lg px-3 py-1"
style={{
position: 'absolute',
top: '100%',
left: '50%',
transform: 'translateX(-50%)',
zIndex: 1,
boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)',
cursor: 'default',
}}
>
Share
</p>
)}
</div>
);
};
)
}

export default Share;
export default Share
9 changes: 9 additions & 0 deletions database/IOT/raspberry.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[
{
"name": "An Introduction to Raspberry Pi microcontroller",
"description": "The Raspberry Pi is a low-cost, credit-card-sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. It also enables people of all ages to explore computing and learn programming languages like Scratch and Python.",
"url": "https://www.raspberrypi.org/",
"category": "internet of things",
"subcategory": "raspberrypi"
}
]
19 changes: 15 additions & 4 deletions database/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const sidebarData: ISidebar[] = [
{ name: 'Java', url: '/java', resources: DB.java },
{ name: 'Kotlin', url: '/kotlin', resources: DB.kotlin },
{ name: 'Rust', url: '/rust', resources: DB.Rust },
{name:'Dart', url: '/dart', resources: DB.dart},
{ name: 'Dart', url: '/dart', resources: DB.dart },
],
},
{
Expand Down Expand Up @@ -143,7 +143,10 @@ export const sidebarData: ISidebar[] = [
},
{
category: 'internet of things',
subcategory: [{ name: 'coursera', url: '/coursera', resources: DB.coursera }],
subcategory: [
{ name: 'coursera', url: '/coursera', resources: DB.coursera },
{ name: 'raspberry', url: '/raspberry', resources: DB.raspberrypi },
],
},
{
category: 'resources',
Expand All @@ -168,9 +171,17 @@ export const sidebarData: ISidebar[] = [
resources: DB.webDevelopment,
},
{ name: 'CSS', url: '/css', resources: DB.css },
{ name: 'machine learning', url: '/machine-learning', resources: DB.machineLearning },
{
name: 'machine learning',
url: '/machine-learning',
resources: DB.machineLearning,
},
{ name: 'tensorflow', url: '/tensorflow', resources: DB.tensorflow },
{ name: 'data structures', url: '/data-structures', resources: DB.dataStructures },
{
name: 'data structures',
url: '/data-structures',
resources: DB.dataStructures,
},
{ name: 'Android', url: '/android', resources: DB.android },
{
name: 'Web3 & Metaverse',
Expand Down
7 changes: 7 additions & 0 deletions database/frontend/colors.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,12 @@
"url": "https://paletton.com/",
"category": "frontend",
"subcategory": "colors"
},
{
"name": "ColorSpace",
"description": " An intuitive color palette generator for web designers and creatives. It offers a curated collection of palettes and gradients, allowing users to fine-tune and experiment with a variety of color schemes.",
"url": "https://mycolor.space/",
"category": "frontend",
"subcategory": "colors"
}
]
7 changes: 7 additions & 0 deletions database/frontend/images.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,5 +138,12 @@
"url": "https://www.shutterstock.com/",
"category": "frontend",
"subcategory": "images"
},
{
"name": "Dreamstime",
"description": "Dreamstime is the world's largest community for royalty-free photos and stock photography.",
"url": "https://www.dreamstime.com/",
"category": "frontend",
"subcategory": "images"
}
]
11 changes: 9 additions & 2 deletions database/frontend/online-code-editors.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,16 @@
},
{
"name": "Interviewbit",
"description": "Everything you need to crack your next tech interview is provided in this website",
"description": "Everything you need to crack your next tech interview is provided on this website",
"url": "https://www.interviewbit.com/",
"category": "frontend",
"subcategory": "online-code-editors"
},
{
"name": "GeeksforGeeks",
"description": " It is a free online compiler and debugger where programmers and developers can compile and run their code.",
"url": "https://ide.geeksforgeeks.org/",
"category": "frontend",
"subcategory": "online-code-editors"
}
]
]
3 changes: 2 additions & 1 deletion database/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ export { default as kotlin } from './languages/kotlin.json'
export { default as Rust } from './languages/rust.json'
export { default as java } from './languages/java.json'
export { default as cpp } from './languages/cpp.json'
export {default as dart} from './languages/dart.json'
export { default as dart } from './languages/dart.json'
//artificial intelligence
export { default as artificialIntelligence } from './artificial_intelligence/artificial-intelligence.json'
//internet of things
export { default as coursera } from './IOT/coursera.json'
export { default as raspberrypi } from './IOT/raspberry.json'
//machine learning
export { default as ml } from './machine_learning/machine-learning.json'
export { default as dataScience } from './machine_learning/data-science.json'
Expand Down
7 changes: 7 additions & 0 deletions database/open_source/blogs.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,12 @@
"url": "https://os.pradumnasaraf.dev/#/",
"category": "open source",
"subcategory": "open-source-blogs"
},
{
"name": "How to contribute in Quine Open source platform",
"description": "Are you a beginner in open source? This site will help you in making your first open-source contribution, teach you about the Quine open source platform, and connect with other open source contributors.",
"url": "https://www.youtube.com/playlist?list=PLnCV5fTAsUgpaLMY_Z8FqPxZ89v-_pcfY",
"category": "open source",
"subcategory": "open-source-blogs"
}
]
9 changes: 8 additions & 1 deletion database/other/communities.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[
{
"name": "Google Developer Groups",
"description": "It gives tech professionals the opportunity to learn new skills in a variety of formats. Here, events, workshops, and meet-ups are organised virtually or in-person for people with similar interests in technology.",
"description": "It allows tech professionals to learn new skills in a variety of formats. Here, events, workshops, and meet-ups are organized virtually or in-person for people with similar interests in technology.",
"url": "https://gdg.community.dev/",
"category": "other",
"subcategory": "communities"
Expand All @@ -26,5 +26,12 @@
"url": "https://devmesh.intel.com/member-programs/intel-student-ambassador-program",
"category": "other",
"subcategory": "communities"
},
{
"name": "AI Student Community",
"description": "An online community where students from all across the country learn, share experiences, and leverage their knowledge to create AI-enabled social impact solutions along with inclusively spreading AI awareness.",
"url": "https://aistudent.community/",
"category": "other",
"subcategory": "communities"
}
]
12 changes: 10 additions & 2 deletions database/youtube/computer-science.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,26 @@
},
{
"name": "Jenny's Lectures CS IT",
"description": "Jenny’s Lectures CS IT is a Free YouTube Channel providing Computer Science / Information Technology / Computer-related tutorials, including NET & JRF Coaching Videos, GATE Coaching Videos, UGC NET, NTA NET, JRF, BTech, MTech, Ph.D., tips and other helpful videos for Computer Science / Information Technology students.",
"description": "Jenny’s Lectures CS IT is a Free YouTube Channel providing Computer Science / Information Technology / Computer-related tutorials, including NET & JRF Coaching Videos, GATE Coaching Videos, UGC NET, NTA NET, JRF, BTech, MTech, Ph.D., tips, and other helpful videos for Computer Science / Information Technology students.",
"url": "https://www.youtube.com/@JennyslecturesCSIT",
"category": "youtube",
"subcategory": "computer-science",
"language": "hindi"
},
{
"name": "5 Minutes Engineering",
"description": "On 5 Minutes Engineering, you can find EASIEST explanations for all following mentioned subjects in HINDI: Aptitude, Machine Learning, Deep Learning, C, R and Python Programming Languages, Discrete Mathematics (DM), Theory Of Computation (TOC), Artificial Intelligence(AI), Database Management System(DBMS), Software Modeling and Designing(SMD), Software Engineering and Project Planning(SEPM), Data mining and Warehouse(DMW), Data analytics(DA), Mobile Communication(MC), Computer networks(CN), High performance Computing(HPC), Operating system, System programming (SPOS), Internet of things(IOT), and Design and analysis of algorithm(DAA)",
"description": "On 5 Minutes Engineering, you can find EASIEST explanations for all following mentioned subjects in HINDI: Aptitude, Machine Learning, Deep Learning, C, R, and Python Programming Languages, Discrete Mathematics (DM), Theory Of Computation (TOC), Artificial Intelligence(AI), Database Management System(DBMS), Software Modeling and Designing(SMD), Software Engineering and Project Planning(SEPM), Data mining and Warehouse(DMW), Data analytics(DA), Mobile Communication(MC), Computer networks(CN), High performance Computing(HPC), Operating system, System programming (SPOS), Internet of things(IOT), and Design and analysis of algorithm(DAA)",
"url": "https://www.youtube.com/@5MinutesEngineering",
"category": "youtube",
"subcategory": "computer-science",
"language": "hindi"
},
{
"name": "KNOWLEDGE GATE",
"description": " KNOWLEDGE GATE is a YouTube channel that discusses core Computer Science subjects and helps CS/IT students to prepare for University/semester and GATE Exams",
"url": "https://www.youtube.com/@KNOWLEDGEGATE_kg/about",
"category": "youtube",
"subcategory": "computer-science",
"language": "hindi"
}
]
53 changes: 53 additions & 0 deletions pages/[subcategory]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,59 @@ const SubCategory = () => {
<Head>
<title>{title}</title>
<meta name="theme-color" content="#202c46" />
<meta name="title" content="LinksHub" />
<meta
name="description"
content="LinksHub is the ultimate hub of ready-to-use tech resources. Discover free tools and libraries to streamline your development process and build better projects."
/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="keywords" content="LinksHub, developers, free resources, tools, software, libraries, frameworks, applications, websites" />
<meta name="author" content="Rupali Haldiya" />
<meta name="robots" content="index, follow" />
<meta name="revisit-after" content="7 days" />

{/* Open Graph */}
<meta property="og:url" content="https://linkshub.dev" />
<meta property="og:type" content="website" />
<meta
property="og:title"
content="LinksHub: A hub of ready-to-use tech resources"
/>
<meta
property="og:description"
content="LinksHub aims to provide developers with access to a wide range of free resources and tools that they can use in their work."
/>
<meta
property="og:image"
content="https://res.cloudinary.com/dhnkuonev/image/upload/v1683805184/linkshub_gcahgs.png"
/>
<meta property="og:site_name" content="LinksHub" />

{/* Twitter */}
<meta name="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content="https://linkshub.dev" />
<meta
property="twitter:title"
content="LinksHub: A hub of ready-to-use tech resources"
/>
<meta
property="twitter:description"
content="LinksHub aims to provide developers with access to a wide range of free resources and tools that they can use in their work."
/>
<meta
property="twitter:image"
content="https://res.cloudinary.com/dhnkuonev/image/upload/v1683805184/linkshub_gcahgs.png"
/>
<meta name="language" content="English" />
<meta
name="twitter:site"
content="https://twitter.com/linkshubdotdev"
/>
<meta property="discord:server" content="1064977356198006805" />
<meta
property="discord:invite"
content="https://discord.com/invite/NvK67YnJX5"
/>
</Head>
<TopBar className="shadow-black-500/50 fixed top-[76px] z-30 flex w-full -translate-x-4 items-center bg-gray-100 px-4 pt-6 pb-4 shadow-xl dark:bg-gray-900 md:hidden" />
<div className="min-h-[calc(100%-68px)] w-full pt-[85px] pb-4 md:min-h-[calc(100%-76px)] md:px-10 md:pt-10">
Expand Down
Loading

0 comments on commit 984da86

Please sign in to comment.