Skip to content

Commit

Permalink
Merge pull request #21 from kudos-ink/chore/folder-structure-reorg
Browse files Browse the repository at this point in the history
  • Loading branch information
ipapandinas authored Jan 1, 2024
2 parents 2530e93 + 06b9fae commit 9cef2ec
Show file tree
Hide file tree
Showing 29 changed files with 496 additions and 636 deletions.
35 changes: 23 additions & 12 deletions app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
import "@/styles/globals.css";
import { Metadata, Viewport } from "next";
import { siteConfig } from "@/config/site";
import { fontSans } from "@/config/fonts";
import { Fira_Code, Inter } from "next/font/google";
import { Providers } from "./providers";
import { Navbar } from "@/components/navbar";
import { Link } from "@nextui-org/link";
import { SITE_CONFIG } from "@/data/config";
import clsx from "clsx";

export const fontSans = Inter({
subsets: ["latin"],
display: "swap",
variable: "--font-sans",
});

export const fontMono = Fira_Code({
subsets: ["latin"],
display: "swap",
variable: "--font-mono",
});

export const metadata: Metadata = {
title: {
default: siteConfig.name,
template: `%s - ${siteConfig.name}`,
default: SITE_CONFIG.name,
template: `%s - ${SITE_CONFIG.name}`,
},
description: siteConfig.description,
description: SITE_CONFIG.description,
icons: {
icon: "/favicon.ico",
shortcut: "/favicon-16x16.png",
Expand All @@ -33,14 +45,13 @@ export default function RootLayout({
children: React.ReactNode;
}) {
return (
<html lang="en" suppressHydrationWarning>
<html
lang="en"
className={clsx(fontMono.variable, fontSans.variable)}
suppressHydrationWarning
>
<head />
<body
className={clsx(
"min-h-screen bg-background font-sans antialiased",
fontSans.variable,
)}
>
<body className="min-h-screen bg-background font-sans antialiased">
<Providers themeProps={{ attribute: "class", defaultTheme: "kudos" }}>
<div className="bg-[radial-gradient(ellipse_at_center,_var(--tw-gradient-stops))] from-default from-0% to-background to-80% relative flex flex-col h-screen">
<Navbar />
Expand Down
16 changes: 12 additions & 4 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Filter from "@/components/filter";
import { title, subtitle } from "@/components/primitives";
import Search from "@/components/search";
import { search, languages } from "@/data/items";
import { SEARCH_OPTIONS, LANGUAGES_OPTIONS } from "@/data/filters";

export default function Home() {
return (
Expand All @@ -12,14 +12,22 @@ export default function Home() {
</section>
<div className="flex flex-col items-center gap-4 py-8 md:py-10">
<div className="inline-block max-w-lg text-center justify-center">
<Search placeholder="Search" emoji="🔍" items={search} />
<Search placeholder="Search" emoji="🔍" items={SEARCH_OPTIONS} />
<h2 className={subtitle({ class: "mt-4" })}>Banner</h2>
</div>
</div>
<div className="grid grid-cols-2 gap-4">
<div className="flex justify-around items-stretch gap-4">
<Filter placeholder="Languages" emoji={"💪"} items={languages} />
<Filter placeholder="Interests" emoji={"🪄"} items={languages} />
<Filter
placeholder="Languages"
emoji={"💪"}
items={LANGUAGES_OPTIONS}
/>
<Filter
placeholder="Interests"
emoji={"🪄"}
items={LANGUAGES_OPTIONS}
/>
{/* <div>
<Bounties
currency="USD"
Expand Down
2 changes: 1 addition & 1 deletion app/table/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getGoodFirstIssues } from "@/actions/notion";
import { getGoodFirstIssues } from "@/lib/notion";
import ContributionsTable from "@/components/contributions-table/table";
import { transformNotionDataToContributions } from "@/utils/contribution";

Expand Down
8 changes: 5 additions & 3 deletions app/test/page.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import Row from "@/components/row";
import { getGoodFirstIssues, baseQueryDatabase } from "@/actions/notion";
import { getGoodFirstIssues, baseQueryDatabase } from "@/lib/notion";
import {
QueryDatabaseResponse,
PageObjectResponse,
} from "@notionhq/client/build/src/api-endpoints";
import { ValidNotionResponse, Properties } from "@/types";
import { daysSince, isValidNotionPage, getImagePath } from "@/utils/helpers";
import { ValidNotionResponse, Properties } from "@/lib/notion/types";
import projectLogosJson from "@/public/images/imageMap.json";
import { LoadMore } from "@/components/loadMore";
import { isValidNotionPage } from "@/lib/notion/utils";
import { getImagePath } from "@/utils/github";
import { daysSince } from "@/utils/date";

export default async function Page() {
const data = await getGoodFirstIssues({ page_size: 10 });
Expand Down
179 changes: 179 additions & 0 deletions assets/icons.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,179 @@
import * as React from "react";
import { IconSvgProps } from "@/types/index";

export const Logo: React.FC<IconSvgProps> = ({
size = 36,
width,
height,
...props
}) => (
<svg
fill="none"
height={size || height}
viewBox="0 0 32 32"
width={size || width}
{...props}
>
<path
clipRule="evenodd"
d="M17.6482 10.1305L15.8785 7.02583L7.02979 22.5499H10.5278L17.6482 10.1305ZM19.8798 14.0457L18.11 17.1983L19.394 19.4511H16.8453L15.1056 22.5499H24.7272L19.8798 14.0457Z"
fill="currentColor"
fillRule="evenodd"
/>
</svg>
);

export const HeartFilledIcon = ({
size = 24,
width,
height,
...props
}: IconSvgProps) => (
<svg
aria-hidden="true"
focusable="false"
height={size || height}
role="presentation"
viewBox="0 0 24 24"
width={size || width}
{...props}
>
<path
d="M12.62 20.81c-.34.12-.9.12-1.24 0C8.48 19.82 2 15.69 2 8.69 2 5.6 4.49 3.1 7.56 3.1c1.82 0 3.43.88 4.44 2.24a5.53 5.53 0 0 1 4.44-2.24C19.51 3.1 22 5.6 22 8.69c0 7-6.48 11.13-9.38 12.12Z"
fill="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={1.5}
/>
</svg>
);

export const SearchIcon = (props: IconSvgProps) => (
<svg
aria-hidden="true"
fill="none"
focusable="false"
height="1em"
role="presentation"
viewBox="0 0 24 24"
width="1em"
{...props}
>
<path
d="M11.5 21C16.7467 21 21 16.7467 21 11.5C21 6.25329 16.7467 2 11.5 2C6.25329 2 2 6.25329 2 11.5C2 16.7467 6.25329 21 11.5 21Z"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
/>
<path
d="M22 22L20 20"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
/>
</svg>
);

export const ChevronOpenIcon = (props: IconSvgProps) => (
<svg
height="21"
viewBox="0 0 21 21"
width="21"
xmlns="http://www.w3.org/2000/svg"
{...props}
>
<g
fill="none"
fill-rule="evenodd"
stroke="currentColor"
stroke-linecap="round"
stroke-linejoin="round"
transform="translate(7 5)"
>
<path d="m.5 3.5 3-3 3 3" />
<path d="m.5 8.5 3 3 3-3" />
</g>
</svg>
);

export const ChevronDownIcon = (props: IconSvgProps) => (
<svg
fill="none"
height="14"
viewBox="0 0 24 24"
width="14"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M17.9188 8.17969H11.6888H6.07877C5.11877 8.17969 4.63877 9.33969 5.31877 10.0197L10.4988 15.1997C11.3288 16.0297 12.6788 16.0297 13.5088 15.1997L15.4788 13.2297L18.6888 10.0197C19.3588 9.33969 18.8788 8.17969 17.9188 8.17969Z"
fill="currentColor"
/>
</svg>
);

export const DiscordIcon: React.FC<IconSvgProps> = ({
size = 24,
width,
height,
...props
}) => {
return (
<svg
height={size || height}
viewBox="0 0 24 24"
width={size || width}
{...props}
>
<path
d="M14.82 4.26a10.14 10.14 0 0 0-.53 1.1 14.66 14.66 0 0 0-4.58 0 10.14 10.14 0 0 0-.53-1.1 16 16 0 0 0-4.13 1.3 17.33 17.33 0 0 0-3 11.59 16.6 16.6 0 0 0 5.07 2.59A12.89 12.89 0 0 0 8.23 18a9.65 9.65 0 0 1-1.71-.83 3.39 3.39 0 0 0 .42-.33 11.66 11.66 0 0 0 10.12 0q.21.18.42.33a10.84 10.84 0 0 1-1.71.84 12.41 12.41 0 0 0 1.08 1.78 16.44 16.44 0 0 0 5.06-2.59 17.22 17.22 0 0 0-3-11.59 16.09 16.09 0 0 0-4.09-1.35zM8.68 14.81a1.94 1.94 0 0 1-1.8-2 1.93 1.93 0 0 1 1.8-2 1.93 1.93 0 0 1 1.8 2 1.93 1.93 0 0 1-1.8 2zm6.64 0a1.94 1.94 0 0 1-1.8-2 1.93 1.93 0 0 1 1.8-2 1.92 1.92 0 0 1 1.8 2 1.92 1.92 0 0 1-1.8 2z"
fill="currentColor"
/>
</svg>
);
};

export const TwitterIcon: React.FC<IconSvgProps> = ({
size = 24,
width,
height,
...props
}) => {
return (
<svg
height={size || height}
viewBox="0 0 24 24"
width={size || width}
{...props}
>
<path
d="M19.633 7.997c.013.175.013.349.013.523 0 5.325-4.053 11.461-11.46 11.461-2.282 0-4.402-.661-6.186-1.809.324.037.636.05.973.05a8.07 8.07 0 0 0 5.001-1.721 4.036 4.036 0 0 1-3.767-2.793c.249.037.499.062.761.062.361 0 .724-.05 1.061-.137a4.027 4.027 0 0 1-3.23-3.953v-.05c.537.299 1.16.486 1.82.511a4.022 4.022 0 0 1-1.796-3.354c0-.748.199-1.434.548-2.032a11.457 11.457 0 0 0 8.306 4.215c-.062-.3-.1-.611-.1-.923a4.026 4.026 0 0 1 4.028-4.028c1.16 0 2.207.486 2.943 1.272a7.957 7.957 0 0 0 2.556-.973 4.02 4.02 0 0 1-1.771 2.22 8.073 8.073 0 0 0 2.319-.624 8.645 8.645 0 0 1-2.019 2.083z"
fill="currentColor"
/>
</svg>
);
};

export const GithubIcon: React.FC<IconSvgProps> = ({
size = 24,
width,
height,
...props
}) => {
return (
<svg
height={size || height}
viewBox="0 0 24 24"
width={size || width}
{...props}
>
<path
clipRule="evenodd"
d="M12.026 2c-5.509 0-9.974 4.465-9.974 9.974 0 4.406 2.857 8.145 6.821 9.465.499.09.679-.217.679-.481 0-.237-.008-.865-.011-1.696-2.775.602-3.361-1.338-3.361-1.338-.452-1.152-1.107-1.459-1.107-1.459-.905-.619.069-.605.069-.605 1.002.07 1.527 1.028 1.527 1.028.89 1.524 2.336 1.084 2.902.829.091-.645.351-1.085.635-1.334-2.214-.251-4.542-1.107-4.542-4.93 0-1.087.389-1.979 1.024-2.675-.101-.253-.446-1.268.099-2.64 0 0 .837-.269 2.742 1.021a9.582 9.582 0 0 1 2.496-.336 9.554 9.554 0 0 1 2.496.336c1.906-1.291 2.742-1.021 2.742-1.021.545 1.372.203 2.387.099 2.64.64.696 1.024 1.587 1.024 2.675 0 3.833-2.33 4.675-4.552 4.922.355.308.675.916.675 1.846 0 1.334-.012 2.41-.012 2.737 0 .267.178.577.687.479C19.146 20.115 22 16.379 22 11.974 22 6.465 17.535 2 12.026 2z"
fill="currentColor"
fillRule="evenodd"
/>
</svg>
);
};
4 changes: 2 additions & 2 deletions components/bounties.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
DropdownItem,
} from "@nextui-org/dropdown";
import { Slider } from "@nextui-org/slider";
import { ChevronOpenIcon } from "./utils/icons/chevronOpenIcon";
import Emoji from "./utils/emoji";
import { ChevronOpenIcon } from "@/assets/icons";
import Emoji from "./emoji";

interface BountiesProps {
currency: string;
Expand Down
2 changes: 1 addition & 1 deletion components/contributions-table/row.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Chip } from "@nextui-org/chip";
import { Link } from "@nextui-org/link";
import MyImage from "@/components/ui/image";
import { daysSince } from "@/utils/helpers";
import { daysSince } from "@/utils/date";
import { useState, useRef, useEffect } from "react";

interface IProjectProps {
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions components/filter.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"use client";
import React, { FC } from "react";
import { Select, SelectItem } from "@nextui-org/select";
import { Item } from "@/components/utils/types/item";
import Emoji from "./utils/emoji";
import { FilterItem } from "@/types/filters";
import Emoji from "./emoji";

interface FilterProps {
placeholder: string;
emoji: string;
items: Item[];
items: FilterItem[];
}
export const Filter: FC<FilterProps> = ({ placeholder, items, emoji }) => {
return (
Expand Down
Loading

0 comments on commit 9cef2ec

Please sign in to comment.