Skip to content

Commit 970f31b

Browse files
committed
feat(): Adding project support
1 parent fbf8672 commit 970f31b

30 files changed

Lines changed: 510 additions & 265 deletions

jest.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ module.exports = {
2727
'@assets/(.*)': '<rootDir>/src/assets/$1',
2828
'@assets': '<rootDir>/src/assets',
2929
'@screens': '<rootDir>/src/screens',
30+
'@screens/(.*)': '<rootDir>/src/screens/$1',
3031
'@data': '<rootDir>/src/data',
32+
'@hooks': '<rootDir>/src/hooks',
3133
'@store/slice': '<rootDir>/src/store/slice',
3234
'@store': '<rootDir>/src/store',
3335
'@selectors': '<rootDir>/src/store/selectors',
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { SVGProps } from 'react';
2+
3+
const NpmIcon = (props: SVGProps<SVGSVGElement>) => {
4+
return (
5+
<svg
6+
xmlns="http://www.w3.org/2000/svg"
7+
viewBox="0 0 128 128"
8+
width="1em"
9+
height="1em"
10+
{...props}
11+
>
12+
<path
13+
fill="#cb3837"
14+
d="M0 7.062C0 3.225 3.225 0 7.062 0h113.88c3.838 0 7.063 3.225 7.063 7.062v113.88c0 3.838-3.225 7.063-7.063 7.063H7.062c-3.837 0-7.062-3.225-7.062-7.063zm23.69 97.518h40.395l.05-58.532h19.494l-.05 58.581h19.543l.05-78.075l-78.075-.1l-.1 78.126z"
15+
></path>
16+
<path
17+
fill="#fff"
18+
d="M25.105 65.52V26.512H40.96c8.72 0 26.274.034 39.008.075l23.153.075v77.866H83.645v-58.54H64.057v58.54H25.105z"
19+
></path>
20+
</svg>
21+
);
22+
};
23+
24+
export default NpmIcon;

src/assets/icons/Common/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ export { default as InstagramIcon } from './InstagramIcon';
1010
export { default as StarIcon } from './Star';
1111
export { default as StarTrekIcon } from './Startrek';
1212
export { default as Redirect } from './Redirect';
13+
export { default as NpmIcon } from './NpmIcon';
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import * as React from 'react';
2+
3+
const Dashwave = (props: React.SVGProps<SVGSVGElement>) => {
4+
return (
5+
<svg
6+
xmlns="http://www.w3.org/2000/svg"
7+
width="128"
8+
height="128"
9+
viewBox="0 0 128 128"
10+
{...props}
11+
>
12+
<path
13+
fill="#60767E"
14+
d="m64.375 12.563 2.783.025c13.807.342 24.972 5.738 35.092 15.1 9.71 10.307 14.352 22.679 14.188 36.687l-.026 2.783c-.342 13.807-5.738 24.972-15.1 35.092-10.307 9.71-22.679 14.352-36.687 14.188l-2.783-.026c-13.807-.342-24.972-5.738-35.092-15.1-9.71-10.307-14.352-22.679-14.187-36.687l.025-2.783c.342-13.807 5.738-24.972 15.1-35.092 10.307-9.71 22.679-14.352 36.687-14.187M31.82 36.664C24.283 46.336 20.73 57.827 22 70c1.75 8.342 4.623 15.374 10 22l1.52 1.895c7.037 7.859 17.586 12.308 27.957 13.355C72.803 107.772 83.235 104.112 92 97l1.895-1.52c7.859-7.037 12.308-17.586 13.355-27.957C107.772 56.197 104.112 45.765 97 37l-1.52-1.895c-7.006-7.825-17.653-12.445-28.027-13.32-13.947-.492-26.05 4.754-35.633 14.88"
15+
></path>
16+
<path
17+
fill="#60767E"
18+
d="M62 49c3.522 1.977 5.7 4.099 7 8 .226 2.393.408 4.79.563 7.188l.253 3.855L70 71h2l.113-2.633c.734-12.864.734-12.864 5.575-18.242C81.127 48.452 84.31 48.228 88 49c3.522 1.977 5.7 4.099 7 8 .122 2.866.185 5.697.188 8.563l.037 2.365c.005 2.025-.103 4.05-.225 6.072-2 2-2 2-4.5 2.313L88 76c-2.401-3.602-2.438-6.509-2.625-10.687l-.117-2.127A678 678 0 0 1 85 58h-2l-.113 2.887-.2 3.8-.175 3.762c-.644 4.467-2.16 7.1-5.2 10.364C73.89 80.57 70.709 80.776 67 80c-3.522-1.977-5.7-4.099-7-8-.226-2.393-.408-4.79-.562-7.187l-.254-3.856L59 58h-2l-.113 2.633c-.734 12.864-.734 12.864-5.574 18.242C47.876 80.547 44.687 80.779 41 80c-3.019-1.753-5.415-3.83-7-7-.235-2.994-.185-5.997-.187-9l-.038-2.523-.005-2.414-.013-2.215C34 55 34 55 36 53c2.5-.312 2.5-.312 5 0 2.401 3.602 2.438 6.509 2.625 10.688l.117 2.126c.094 1.729.177 3.457.258 5.186h2l.113-2.887.2-3.8.175-3.762c.644-4.467 2.16-7.1 5.2-10.364C55.11 48.43 58.292 48.225 62 49"
19+
></path>
20+
</svg>
21+
);
22+
};
23+
24+
export default Dashwave;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import * as React from 'react';
2+
3+
const Galaxy = (props: React.SVGProps<SVGSVGElement>) => {
4+
return (
5+
<svg
6+
xmlns="http://www.w3.org/2000/svg"
7+
viewBox="0 0 14 14"
8+
width="1em"
9+
height="1em"
10+
{...props}
11+
>
12+
<path
13+
fill="currentColor"
14+
fillRule="evenodd"
15+
d="M7.558.198a.75.75 0 1 0-.75 1.3c1.249.72 1.888 1.977 1.917 3.346c-1.714-2.18-4.668-3.269-7.337-1.728a.75.75 0 0 0 .75 1.3c1.251-.723 2.661-.647 3.863.015C3.26 4.83.83 6.84.83 9.918a.75.75 0 1 0 1.5 0c0-1.434.769-2.613 1.939-3.324c-1.016 2.57-.489 5.672 2.172 7.208a.75.75 0 1 0 .75-1.3c-1.242-.716-1.878-1.972-1.909-3.34C7 11.326 9.95 12.42 12.611 10.884a.75.75 0 0 0-.75-1.3c-1.24.717-2.644.641-3.844-.014c2.74-.399 5.151-2.412 5.151-5.488a.75.75 0 0 0-1.5 0c0 1.442-.768 2.624-1.94 3.334c1.032-2.575.497-5.677-2.171-7.218ZM7 8.001A1.001 1.001 0 1 0 7 6a1.001 1.001 0 0 0 0 2Z"
16+
clipRule="evenodd"
17+
></path>
18+
</svg>
19+
);
20+
};
21+
22+
export default Galaxy;
Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,35 @@
11
import Apple from './Apple';
2+
import Dashwave from './Dashwave';
3+
import Galaxy from './Galaxy';
24
import Hourcoding from './Hourcoding';
35
import Telegramonic from './Telegramonic';
46
import TopAppAi from './TopAppAi';
57
import { ProjectName } from './type';
68

7-
const SIZE = 36;
9+
const SIZE = 72;
810

911
export const PROJECT_NAME_ICON_MAP: Record<ProjectName, JSX.Element> = {
1012
[ProjectName.Hourcoding]: (
1113
<Hourcoding width={SIZE} height={SIZE} color="green" />
1214
),
15+
[ProjectName.HourcodingCheatsheet]: (
16+
<Hourcoding width={SIZE} height={SIZE} color="green" />
17+
),
18+
[ProjectName.HourcodingTools]: (
19+
<Hourcoding width={SIZE} height={SIZE} color="green" />
20+
),
21+
[ProjectName.HourcodingUI]: (
22+
<Hourcoding width={SIZE} height={SIZE} color="green" />
23+
),
24+
[ProjectName.HourcodingRoadmap]: (
25+
<Hourcoding width={SIZE} height={SIZE} color="green" />
26+
),
27+
[ProjectName.HourcodingStalker]: (
28+
<Hourcoding width={SIZE} height={SIZE} color="green" />
29+
),
1330
[ProjectName.MacOs]: <Apple width={SIZE} height={SIZE} color="white" />,
1431
[ProjectName.Telegramonic]: <Telegramonic width={SIZE} height={SIZE} />,
1532
[ProjectName.TopAppAi]: <TopAppAi width={SIZE} height={SIZE} />,
33+
[ProjectName.Dashwave]: <Dashwave width={SIZE} height={SIZE} />,
34+
[ProjectName.GalaxyUI]: <Galaxy width={SIZE} height={SIZE} color="white" />,
1635
};

src/assets/icons/Projects/type.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
export enum ProjectName {
2-
Hourcoding = 'Hourcoding',
3-
MacOs = 'MacOs',
4-
Telegramonic = 'Telegramonic',
5-
TopAppAi = 'TopAppAi',
2+
// Hourcoding projects
3+
Hourcoding = 'hourcoding',
4+
HourcodingCheatsheet = 'hourcoding_cheatsheet',
5+
HourcodingTools = 'hourcoding_tools',
6+
HourcodingUI = 'hourcoding_ui',
7+
HourcodingRoadmap = 'hourcoding_roadmap',
8+
HourcodingStalker = 'hourcoding_stalker',
9+
// Non Hourcoding projects
10+
MacOs = 'macos',
11+
Telegramonic = 'telegramonic',
12+
TopAppAi = 'topAppAi',
13+
Dashwave = 'dashwave',
14+
GalaxyUI = 'galaxyUI',
615
}

src/components/CardComponent/Card.tsx

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ export const Icon = ({ className, ...rest }: any) => {
1919
);
2020
};
2121

22-
export const CardBasic = ({ text }: { text?: string }) => {
22+
export const CardBasic = ({
23+
text,
24+
icon,
25+
}: {
26+
text?: string;
27+
icon?: React.ReactNode;
28+
}) => {
2329
const mouseX = useMotionValue(0);
2430
const mouseY = useMotionValue(0);
2531

@@ -41,8 +47,8 @@ export const CardBasic = ({ text }: { text?: string }) => {
4147

4248
return (
4349
<Box
44-
width={{ base: '36', md: '44', lg: '64' }}
45-
h={'100%'}
50+
width={'full'}
51+
height={{ base: '36', md: '44', lg: '64' }}
4652
className={
4753
'p-0.5 bg-transparent aspect-square flex items-center justify-center relative'
4854
}
@@ -56,12 +62,16 @@ export const CardBasic = ({ text }: { text?: string }) => {
5662
mouseY={mouseY}
5763
randomString={randomString}
5864
/>
59-
<div className="relative z-10 flex items-center justify-center">
65+
<div className="relative z-0 flex items-center justify-center">
66+
<div className="absolute z=0 w-full h-full bg-black/[0.8] rounded-full blur-md" />
6067
<div className="relative h-28 w-28 rounded-full flex items-center justify-center text-white font-bold text-4xl">
61-
<div className="absolute w-full h-full bg-white/[0.8] dark:bg-black/[0.8] blur-sm rounded-full" />
62-
<span className="dark:text-white text-black z-20 text-center w-[200%]">
63-
{text}
64-
</span>
68+
{icon ? (
69+
icon
70+
) : (
71+
<span className="dark:text-white text-black z-20 text-center w-[200%]">
72+
{text}
73+
</span>
74+
)}
6575
</div>
6676
</div>
6777
</div>
@@ -74,17 +84,17 @@ function CardPattern({ mouseX, mouseY, randomString }: any) {
7484
const style = { maskImage, WebkitMaskImage: maskImage };
7585

7686
return (
77-
<div className="pointer-events-none">
87+
<div className="pointer-events-none ">
7888
<div className="absolute inset-0 rounded-2xl [mask-image:linear-gradient(white,transparent)] group-hover/card:opacity-50"></div>
7989
<motion.div
8090
className="absolute inset-0 rounded-2xl bg-gradient-to-r from-green-500 to-blue-700 opacity-0 group-hover/card:opacity-100 backdrop-blur-xl transition duration-500"
8191
style={style}
8292
/>
8393
<motion.div
84-
className="absolute inset-0 rounded-2xl opacity-0 mix-blend-overlay group-hover/card:opacity-100"
94+
className="absolute inset-0 px-0 rounded-2xl opacity-0 mix-blend-overlay group-hover/card:opacity-100"
8595
style={style}
8696
>
87-
<p className="absolute inset-x-0 text-xs h-full break-words whitespace-pre-wrap text-white font-mono font-bold transition duration-500">
97+
<p className="absolute inset-[0] text-xs h-full break-words text-white font-mono font-bold transition duration-500">
8898
{randomString}
8999
</p>
90100
</motion.div>

src/components/CardComponent/CardExport.tsx

Lines changed: 57 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,23 @@ import { useRef } from 'react';
22
import { useCursor } from '../Cursor';
33
import { CardBasic, Icon } from './Card';
44
import { CardExportProps } from './types';
5-
import { Wrap } from '@chakra-ui/react';
5+
import { Box, Button, HStack, Text, Wrap } from '@chakra-ui/react';
6+
import { Chip, Language } from '../Chip';
7+
import { Link } from 'react-router-dom';
8+
import { PROJECT_NAME_ICON_MAP } from '@assets';
69

7-
const Card = ({ titleText, chips: chipText, centerText }: CardExportProps) => {
10+
const Card = ({
11+
titleText,
12+
chips,
13+
centerText,
14+
icon,
15+
description,
16+
link,
17+
}: CardExportProps) => {
818
const ref = useRef<HTMLDivElement>(null);
919
const { setCursorInsets } = useCursor();
1020
return (
11-
<div
21+
<Box
1222
ref={ref}
1323
onMouseEnter={() =>
1424
setCursorInsets({
@@ -20,26 +30,56 @@ const Card = ({ titleText, chips: chipText, centerText }: CardExportProps) => {
2030
}
2131
onMouseLeave={() => setCursorInsets(undefined)}
2232
className="border border-black/[0.2] dark:border-white/[0.2] flex flex-col items-start max-w-sm p-4 relative"
33+
style={{
34+
backdropFilter: 'blur(10px)',
35+
backgroundColor: 'rgba(255, 255, 255, 0.1)',
36+
}}
2337
>
24-
<CardBasic text={centerText} />
38+
<CardBasic text={centerText} icon={icon && PROJECT_NAME_ICON_MAP[icon]} />
2539
<Icon className="absolute h-6 w-6 -top-3 -left-3 dark:text-white text-black" />
2640
<Icon className="absolute h-6 w-6 -bottom-3 -left-3 dark:text-white text-black" />
2741
<Icon className="absolute h-6 w-6 -top-3 -right-3 dark:text-white text-black" />
2842
<Icon className="absolute h-6 w-6 -bottom-3 -right-3 dark:text-white text-black" />
29-
<h2 className="dark:text-white text-black mt-4 text-md font-light">
30-
{titleText}
31-
</h2>
32-
<Wrap mt={2}>
33-
{chipText?.map((chipText) => (
34-
<p
35-
key={chipText}
36-
className="text-sm border font-light dark:border-white/[0.2] border-black/[0.2] rounded-full text-black dark:text-white px-1 "
37-
>
38-
{chipText}
39-
</p>
40-
))}
43+
<HStack
44+
justifyContent={'space-between'}
45+
width={'full'}
46+
alignItems={'center'}
47+
alignContent={'center'}
48+
marginTop={2}
49+
mb={2}
50+
>
51+
<Text
52+
fontSize="md"
53+
color="white"
54+
fontWeight="bold"
55+
textAlign="left"
56+
lineHeight={5}
57+
as="a"
58+
href={link}
59+
>
60+
{titleText}
61+
</Text>
62+
<Button size="sm" py={0} px={1} as={Link} to={'/projects/' + icon}>
63+
Know More
64+
</Button>
65+
</HStack>
66+
<Text
67+
maxW={'72'}
68+
fontSize="sm"
69+
color="white"
70+
textAlign="justify"
71+
lineHeight={5}
72+
mb={2}
73+
>
74+
{description}
75+
</Text>
76+
<Wrap mt={2} maxW={'72'}>
77+
{chips
78+
?.slice(0, 5)
79+
?.map((tag) => <Chip key={tag} type={tag} size="sm" />)}
80+
<Chip type={Language.more} size="sm" />
4181
</Wrap>
42-
</div>
82+
</Box>
4383
);
4484
};
4585

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
import { ProjectName } from '@assets';
2+
import { Language } from '../Chip';
3+
14
export type CardExportProps = {
25
centerText?: string;
36
titleText?: string;
7+
icon?: ProjectName;
48
subtitleText?: string;
5-
chips?: string[];
9+
chips?: Language[];
10+
link?: string;
11+
description?: string;
612
};

0 commit comments

Comments
 (0)