Skip to content

Commit

Permalink
Merge branch 'main' into deep
Browse files Browse the repository at this point in the history
  • Loading branch information
k-deepak04 committed Jul 25, 2023
2 parents ef97ace + 60f71e2 commit ef51450
Show file tree
Hide file tree
Showing 14 changed files with 165 additions and 35 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# ignoring files that are necessary for the project to run/develop
*.md
node_modules/
LICENSE
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:lts-slim

RUN npm install -g pnpm

WORKDIR /app
EXPOSE 3000

# Copy the package.json and pnpm-lock.yaml
COPY package.json .
COPY pnpm-lock.yaml .

RUN npm run dev-setup

COPY . .
34 changes: 23 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
## Table of Contents

- [Welcome to LinksHub 👋](#welcome-to-linkshub-)
- [Demo 💻](#demo-)
- [Tech stack 📚](#tech-stack-)
- [Socials 📱](#socials-)
- [Getting Started 👩‍💻](#getting-started-)
- [Let's jump right in🌟](#lets-jump-right-in)
- [_Want to add your favorite links to the Hub? make sure to follow CONTRIBUTING guidelines._](#want-to-add-your-favorite-links-into-the-hub-make-sure-to-follow-contributing-guidelines)
- [Add or update description](#want-to-add-or-update-the-descriptions-of-subcategories)
- [Building with Gitpod 💣](#building-with-gitpod-)
- [Our Contributors ✨](#our-contributors-)
- [License 📝](#license-)
- [Support ⭐](#support-)
- [Demo 💻](#demo-)
- [Tech stack 📚](#tech-stack-)
- [Socials 📱](#socials-)
- [Getting Started 👩‍💻](#getting-started-)
- [Let's jump right in🌟](#lets-jump-right-in)
- [_Want to add your favourite links to the Hub? make sure to follow CONTRIBUTING guidelines._](#want-to-add-your-favourite-links-to-the-hub-make-sure-to-follow-contributing-guidelines)
- [Want to add or update the descriptions of subcategories?](#want-to-add-or-update-the-descriptions-of-subcategories)
- [Building with Gitpod 💣](#building-with-gitpod-)
- [Top 50 Contributors ✨](#top-50-contributors-)
- [License 📝](#license-)
- [Support ⭐](#support-)

<a name="welcome-to-linkshub"></a>

Expand Down Expand Up @@ -99,6 +99,18 @@ You can see the live demo at: https://linkshub.vercel.app
pnpm run dev
```

> **P.S**: If you have `docker` installed in your system, you can follow these steps to set up the environment:
> 1. After forking and cloning the repo(as mentioned above), get into the project directory:
> ```bash
> cd LinksHub/
> ```
> 2. Start the docker container with:
> ```bash
> docker compose up
> ```
> 3. Now start adding your changes.
> **Note:** You don't need to restart the container again and again after starting it once, because the changes you make will reflect into the container instantly.
7. Make your changes before staging them.
8. Stage your changes
Expand Down
12 changes: 3 additions & 9 deletions components/SocialMedia/SocialMediaIconsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const SocialMediaIconsList: FC<{
<IconContext.Provider
value={{ className: 'shared-class', size: '24' }}
>
<FaDiscord className="hover:text-discord transition duration-300 ease-in-out" />
<FaDiscord className="hover:text-violet-500 transition duration-300 ease-in-out" />
</IconContext.Provider>
</a>
</li>
Expand All @@ -51,7 +51,7 @@ export const SocialMediaIconsList: FC<{
<IconContext.Provider
value={{ className: 'shared-class', size: '24' }}
>
<FaGithub className="hover:text-github transition duration-300 ease-in-out" />
<FaGithub className="hover:text-violet-500 transition duration-300 ease-in-out" />
</IconContext.Provider>
</a>
</li>
Expand All @@ -67,7 +67,7 @@ export const SocialMediaIconsList: FC<{
<IconContext.Provider
value={{ className: 'shared-class', size: '24' }}
>
<FaTwitter className="hover:text-twitter transition duration-300 ease-in-out" />
<FaTwitter className="hover:text-violet-500 transition duration-300 ease-in-out" />
</IconContext.Provider>
</a>
</li>
Expand All @@ -85,9 +85,3 @@ export const SocialMediaIconsList: FC<{
</ul>
)
}

// colors: {
// discord: '#7289DA',
// github: '#211F1F',
// twitter: '#1DA1F2',
// },
5 changes: 5 additions & 0 deletions data/maintainersData.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const maintainersData = [
{ login: 'rupali-codes', name: 'Rupali Codes' },
{ login: 'CBID2', name: 'CBID2' },
{ login: 'ujjawaltyagii', name: 'Ujjawal Tyagi' },
]
9 changes: 8 additions & 1 deletion database/backend/authentication.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,12 @@
"url": "https://appwrite.io/docs/authentication",
"category": "backend",
"subcategory": "authentication"
},
{
"name": "Passport Authentication",
"description": "Passport is authentication middleware for Node.js. Extremely flexible and modular, this tool can be unobtrusively dropped in to any Express-based web application. It also provides a comprehensive set of support authentication strategies for usernames, passwords, Facebook, Twitter, and more.",
"url": "https://www.passportjs.org/",
"category": "backend",
"subcategory": "authentication"
}
]
]
11 changes: 9 additions & 2 deletions database/frontend/react.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[
{
"name": "React js",
"description": "Free online course for learning react js",
"description": "Free online course for learning React js",
"url": "https://scrimba.com/learn/learnreact#",
"category": "frontend",
"subcategory": "react",
"language": "english"
},
{
"name": "React js",
"description": "Free React course in order to learn fundamentals of React by FreeCodeCamp. This course is beginner friendly and easy to understand and to apply in large codebase.",
"description": "This freecodecamp course is beginner friendly and provides information that developers can apply in large codebases.",
"url": "https://youtu.be/4UZrsTqkcW4",
"category": "frontend",
"subcategory": "react",
Expand Down Expand Up @@ -84,5 +84,12 @@
"url": "https://youtu.be/nDGA3km5He4",
"category": "frontend",
"subcategory": "react"
},
{
"name": "DEVHINTS.IO React.js Cheatsheet",
"description": "This React.js cheatsheet gives comprehensive information on the language's fundamental concepts and implements a knowledge management approach to help developers understand them.",
"url": "https://devhints.io/react",
"category": "frontend",
"subcategory": "react"
}
]
9 changes: 8 additions & 1 deletion database/resources/blogs.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,5 +145,12 @@
"url": "https://app.daily.dev/",
"category": "resources",
"subcategory": "blogs"
},
{
"name": "Notion",
"description": "A new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.",
"url": "https://www.notion.so/personal",
"category": "resources",
"subcategory": "blogs"
}
]
]
7 changes: 7 additions & 0 deletions database/resources/official-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,12 @@
"url": "https://nuxtjs.org/",
"category": "resources",
"subcategory": "officialdocs"
},
{
"name": "Node.js",
"description": "Node.js is built on top of the Google Chrome V8 JavaScript engine, and it's mainly used to create web servers - but it can be used for other purposes too.",
"url": "https://nodejs.dev/en/learn/",
"category": "resources",
"subcategory": "officialdocs"
}
]
10 changes: 9 additions & 1 deletion database/youtube/data-structures.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,18 @@
},
{
"name": "TAP ACADEMY",
"description": "A well-structured DSA playlist from beginner to advanced level in Java",
"description": "A well-structured DSA playlist that provides beginner to advanced level tutorials in Java.",
"url": "https://youtube.com/playlist?list=PLU83Ru7iGtAvP1rqt65MCDSBPFCzUKGXG",
"category": "youtube",
"subcategory": "data-structures",
"language": "english"
},
{
"name": "CODING NINJAS",
"description": "This channel provides DSA course in Python from beginner to advance level.",
"url": "https://youtube.com/playlist?list=PLrk5tgtnMN6TYBW0-U4YhIRyYEVpqVEnJ",
"category": "youtube",
"subcategory": "data-structures",
"language": "english"
}
]
15 changes: 15 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: '3.9'
services:
app:
build: .
ports:
- "3000:3000"
expose:
- 3000
volumes:
- .:/app:rw
command:
- pnpm
- run
- dev

32 changes: 31 additions & 1 deletion pages/contributors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { FC } from 'react'
import Image from 'next/image'
import Link from 'next/link'
import type { GetStaticProps } from 'next'
import { useTheme } from 'next-themes'
import { maintainersData } from '../data/maintainersData'
import { useState } from 'react'

interface Contributor {
id: number
Expand Down Expand Up @@ -60,6 +63,8 @@ export const getStaticProps: GetStaticProps<{
const ContributorsPage: FC<{ contributors: Contributor[] }> = ({
contributors,
}) => {
const [hoveredContributor, setHoveredContributor] = useState<string>('')
const { resolvedTheme } = useTheme()
const filteredContributors = contributors.filter(
(contributor) => contributor.contributions >= 6
)
Expand All @@ -77,6 +82,12 @@ const ContributorsPage: FC<{ contributors: Contributor[] }> = ({
className: buttonStyles,
}

const isDarkMode = resolvedTheme === 'dark'

const imageInfo = `image-effect w-9 h-9 rounded-full bg-gray-100 border text-lg text-gray-900 pl-[9px] pt-1 ${
isDarkMode ? '' : 'border-dashed border-violet-400'
} `

return (
<div>
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-5 mt-8">
Expand All @@ -85,14 +96,33 @@ const ContributorsPage: FC<{ contributors: Contributor[] }> = ({
key={contributor.id}
className="bg-gray-100 rounded-3xl py-5 px-2 border border-dashed border-violet-500 dark:border-violet-400 shadow-lg dark:bg-gray-900 dark:text-gray-300 dark:shadow-sm flex flex-col hover:scale-105 transition-transform duration-300 cursor-pointer m-1"
>
<div className="flex justify-center">
<div className="flex justify-center image-wrapper">
<Image
src={contributor.avatar_url}
alt={contributor.login}
width={110}
height={110}
className=" rounded-full mb-4 border-2 border-violet-500 dark:border-violet-400 transition-transform duration-300 hover:scale-105 hover:border-dotted m-2"
/>
<span
className={imageInfo}
onMouseEnter={() => setHoveredContributor(contributor.login)}
onMouseLeave={() => setHoveredContributor('')}
>
{maintainersData.some(
(data) => data.login === contributor.login
) ? (
hoveredContributor === contributor.login ? (
<span>Maintainer</span>
) : (
<span>M</span>
)
) : hoveredContributor === contributor.login ? (
<span>Contributor</span>
) : (
<span>C</span>
)}
</span>
</div>
<div className="text-center">
<div className="text-2xl text-violet-600 dark:text-violet-400 m-2">
Expand Down
33 changes: 29 additions & 4 deletions styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,33 @@ pre {
scrollbar-width: thin;
scrollbar-color: var(--scroll-thumb) var(--scroll-track);
}
@media (min-width:597px) and (max-width:800px){
.grid-cols-1 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 597px) and (max-width: 800px) {
.grid-cols-1 {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}

.image-wrapper {
position: relative;
}

.image-effect {
position: relative;
top: 20px;
right: 15px;
}

.image-effect:hover span {
position: absolute;
top: -2px;
left: -1px;
white-space: nowrap;
padding: 0.3rem 1rem;
font-size: 0.75rem;
font-weight: 500;
background-color: #6b46c1;
color: white;
border-radius: 2rem;
border-top-left-radius: 2rem;
border-bottom-left-radius: 2rem;
}
5 changes: 0 additions & 5 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ module.exports = {
],
theme: {
extend: {
colors: {
discord: '#7289DA',
github: '#211F1F',
twitter: '#1DA1F2',
},
screens: {
xs: '200px',
},
Expand Down

0 comments on commit ef51450

Please sign in to comment.