Skip to content
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

Feature/cgd 36 #5

Merged
merged 23 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions src/app/TechStack/components/TechStackCard.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import { PencilSquareIcon } from "@heroicons/react/24/solid";
import { TechItem } from "./fixtures/TechStack";
import { Avatar } from "@/components";

interface TechStackCardProps {
title: string;
data: TechItem[];
}

export default function TechStackCard({ title, data }: TechStackCardProps) {
return (
<div className="card w-72 sm:w-96 text-primary-content bg-neutral-50 rounded-lg">
<div className="flex flex-row justify-between">
<h3 className="text-xl font-semibold text-neutral-900 mt-5 ml-5 self-center">
{title}
</h3>
<button
type="button"
className="btn grid grid-cols-[auto,auto] gap-x-1 mt-5 mr-5 capitalize w-16 h-8 p-0 min-h-full text-sm font-semibold text-neutral-500 bg-white border-transparent"
aria-label={`Edit ${title}`}
>
<PencilSquareIcon className="h-4 w-4 text-black" />
Edit
</button>
</div>
<div className="h-40 overflow-y-auto mx-5 mt-6 mb-5">
<ul className="text-neutral-900">
{data.map((element) => (
<li
className="text-base mb-5 last:mb-0 relative grid grid-cols-[1fr,auto] items-center"
key={element.id}
>
{element.value}
<div className="avatar-group -space-x-2 absolute left-28">
{element.users.map((user) => (
<Avatar key={`${element.id}-${user}`} />
))}
</div>
</li>
))}
</ul>
</div>
</div>
);
}
28 changes: 28 additions & 0 deletions src/app/TechStack/components/TechStackContainer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { techStack } from "./fixtures/TechStack";
import { TechStackCard } from ".";

export default function TechStackContainer() {
return (
<div className="card max-w-tech-card-container bg-primary-100 p-10">
<ul className="grid lg:grid-cols-2 xl:grid-cols-3 grid-cols-1 gap-y-20 justify-items-stretch">
{Object.keys(techStack).map((cardType, index) => (
<li
key={cardType}
className={`mx-auto xl:mx-0 ${
index % 3 === 0
? "justify-self-start"
: index % 3 === 1
? "justify-self-center"
: "justify-self-end"
}`}
>
<TechStackCard
title={cardType}
data={techStack[cardType as keyof typeof techStack]}
/>
</li>
))}
</ul>
</div>
);
}
58 changes: 58 additions & 0 deletions src/app/TechStack/components/fixtures/TechStack.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
type CardType =
| "Frontend"
| "CSS Library"
| "Backend"
| "Project Management"
| "Server-Side"
| "Hosting";

export interface TechItem {
id: number;
value: string;
users: string[];
}

export const techStack: Record<CardType, TechItem[]> = {
Frontend: [
{ id: 1, value: "JavaScript", users: ["Tim", "John"] },
{ id: 2, value: "React", users: ["John"] },
{ id: 3, value: "Vue", users: ["Myke", "Josh", "Jack"] },
{ id: 4, value: "Angular", users: ["John"] },
{ id: 5, value: "TypeScript", users: ["Jack", "John"] },
],
"CSS Library": [
{ id: 1, value: "Tailwind", users: ["Tim", "John"] },
{ id: 2, value: "Bootstrap", users: ["John"] },
{ id: 3, value: "Daisy UI", users: ["Myke", "Josh", "Jack"] },
{ id: 4, value: "Vanilla CSS", users: ["John"] },
{ id: 5, value: "Materialize", users: ["Jack", "John"] },
],
Backend: [
{ id: 1, value: "Node", users: ["Tim", "John"] },
{ id: 2, value: "NET", users: ["John"] },
{ id: 3, value: "Ruby", users: ["Myke", "Josh", "Jack"] },
{ id: 4, value: "Java", users: ["John"] },
{ id: 5, value: "Python", users: ["Jack", "John"] },
],
"Project Management": [
{ id: 1, value: "Jira", users: ["Tim", "John"] },
{ id: 2, value: "GitLab", users: ["John"] },
{ id: 3, value: "Trello", users: ["Myke", "Josh", "Jack"] },
{ id: 4, value: "Notion", users: ["John"] },
{ id: 5, value: "Obsidian", users: ["Jack", "John"] },
],
"Server-Side": [
{ id: 1, value: "AWS", users: ["Tim", "John"] },
{ id: 2, value: "Azure", users: ["John"] },
{ id: 3, value: "Firebase", users: ["Myke", "Josh", "Jack"] },
{ id: 4, value: "Linode", users: ["John"] },
{ id: 5, value: "Google Cloud", users: ["Jack", "John"] },
],
Hosting: [
{ id: 1, value: "Heroku", users: ["Tim", "John"] },
{ id: 2, value: "Netlify", users: ["John"] },
{ id: 3, value: "Github", users: ["Myke", "Josh", "Jack"] },
{ id: 4, value: "Render", users: ["John"] },
{ id: 5, value: "Bluocean", users: ["Jack", "John"] },
],
};
2 changes: 2 additions & 0 deletions src/app/TechStack/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export { default as TechStackCard } from "./TechStackCard";
export { default as TechStackContainer } from "./TechStackContainer";
19 changes: 19 additions & 0 deletions src/app/globals.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
@tailwind base;
@tailwind components;
@tailwind utilities;


::-webkit-scrollbar {
width: 4px;
}

::-webkit-scrollbar-track {
background: #919191;
border-radius: 2px;
}

::-webkit-scrollbar-thumb {
background: #C0C0C0;
border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
background: #C0C0C0;
}
1 change: 0 additions & 1 deletion src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export const metadata: Metadata = {
description: "Generated by create next app",
};


// If loading a variable font, you don't need to specify the font weight
const inter = Inter({
weight: ["400", "500", "600", "700"],
Expand Down
7 changes: 7 additions & 0 deletions src/components/Avatar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function Avatar() {
return (
<div className="avatar bg-neutral-300 rounded-full border-2 border-neutral-100">
<div className="w-6"></div>
</div>
);
}
1 change: 1 addition & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export { default as StoreProvider } from "./StoreProvider";
export { default as Avatar } from "./Avatar";
20 changes: 19 additions & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,25 @@ module.exports = {
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {},
theme: {
extend: {
maxWidth: {
"tech-card-container": "85.5625rem",
Dan-Y-Ko marked this conversation as resolved.
Show resolved Hide resolved
},
colors: {
Dan-Y-Ko marked this conversation as resolved.
Show resolved Hide resolved
"primary-50": "#ecf4f0",
"primary-100": "#c4ded2",
"primary-200": "#a7cdbc",
"primary-300": "#7fb79d",
"primary-400": "#66a98a",
"primary-600": "#3a8663",
"primary-700": "#2d684d",
"primary-800": "#23513c",
"primary-900": "#1b3e2e",
"neutral-50": "#F1F1F1",
},
},
},
daisyui: {
themes: [
{
Expand Down