Skip to content

Commit

Permalink
release: v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
joshxfi authored Sep 13, 2024
2 parents f7a9e6d + 125859c commit 563052b
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 45 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v3
with:
fetch-depth: 2

- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2

- name: Install dependencies
run: bun install

- name: Build
- name: Build projects
run: bun run build
Binary file modified bun.lockb
Binary file not shown.
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@
},
"dependencies": {
"@hookform/resolvers": "^3.3.4",
"@radix-ui/react-avatar": "^1.0.4",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
"@radix-ui/react-hover-card": "^1.0.7",
"@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-popover": "^1.0.7",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-switch": "^1.0.3",
"@radix-ui/react-tabs": "^1.0.4",
"@radix-ui/react-tooltip": "^1.0.7",
"@radix-ui/react-avatar": "^1.1.0",
"@radix-ui/react-dialog": "^1.1.1",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-hover-card": "^1.1.1",
"@radix-ui/react-label": "^2.1.0",
"@radix-ui/react-popover": "^1.1.1",
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-switch": "^1.1.0",
"@radix-ui/react-tabs": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.2",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.1",
"cmdk": "^1.0.0",
"geist": "^1.3.0",
"lucide-react": "^0.378.0",
"next": "14.2.3",
"geist": "^1.3.1",
"lucide-react": "^0.441.0",
"next": "^14.2.11",
"next-themes": "^0.3.0",
"nextjs-toploader": "^1.6.12",
"posthog-js": "^1.131.4",
"react": "^18",
"react-dom": "^18",
"posthog-js": "^1.161.3",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-hook-form": "^7.51.4",
"sonner": "^1.4.41",
"tailwind-merge": "^2.3.0",
Expand All @@ -41,12 +41,12 @@
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"@types/react": "^18.3.5",
"@types/react-dom": "^18.3.0",
"eslint": "^8",
"eslint-config-next": "14.2.0",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
"tailwindcss": "^3.4.11",
"typescript": "^5.6.2"
}
}
31 changes: 25 additions & 6 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,32 @@
import type { Metadata } from "next";
import { GeistSans } from "geist/font/sans";
import { GeistMono } from "geist/font/mono";
import { ThemeProvider } from "@/components/theme-provider";
import { Toaster } from "@/components/ui/sonner";
import NextTopLoader from "nextjs-toploader";

import Navbar from "@/components/navbar";
import "./globals.css";
import { CSPostHogProvider } from "./provider";
import { Toaster } from "@/components/ui/sonner";
import { ThemeProvider } from "@/components/theme-provider";

import "./globals.css";

export const metadata: Metadata = {
metadataBase: new URL("https://www.github-stats.omsimos.com"),
metadataBase: new URL("https://github-stats.omsimos.com/"),
title: "GitHub Stats Generator | Omsimos",
description:
"Make your special repository feel special! Generate GitHub README stats with ease! Generate your stats, streaks, & top languages with 40+ themes to choose from! ",
robots: "index, follow",
robots: {
index: true,
follow: true,
googleBot: {
index: true,
follow: true,
noimageindex: false,
"max-video-preview": -1,
"max-image-preview": "large",
"max-snippet": -1,
},
},
openGraph: {
type: "website",
title: "GitHub Stats Generator — Omsimos",
Expand All @@ -25,6 +38,12 @@ export const metadata: Metadata = {
},
twitter: {
card: "summary_large_image",
title: "GitHub Stats Generator — Omsimos",
description:
"Make your special repository feel special! Generate GitHub README stats with ease! Generate your stats, streaks, & top languages with 40+ themes to choose from!",
},
alternates: {
canonical: "https://github-stats.omsimos.com/",
},
};

Expand All @@ -38,9 +57,9 @@ export default function RootLayout({
<CSPostHogProvider>
<body className={`${GeistSans.className} ${GeistMono.variable}`}>
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
<Navbar />
<Toaster />
<NextTopLoader />
<Navbar />
{children}
</ThemeProvider>
</body>
Expand Down
26 changes: 22 additions & 4 deletions src/components/navbar.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,25 @@
import Link from "next/link";
import { ToggleTheme } from "./toggle-theme";
import { GithubIcon } from "lucide-react";
import { SVGProps } from "react";

import { Button } from "./ui/button";
import { ToggleTheme } from "./toggle-theme";

export function GithubIcon(props: SVGProps<SVGSVGElement>) {
return (
<svg
xmlns="http://www.w3.org/2000/svg"
width="1em"
height="1em"
viewBox="0 0 24 24"
{...props}
>
<path
fill="currentColor"
d="M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"
></path>
</svg>
);
}

export default function Navbar() {
return (
Expand All @@ -10,11 +28,11 @@ export default function Navbar() {
<div className="space-x-1">
<Button asChild variant="outline" size="icon">
<a
href="https://github.com/omsimos/github-stats/tree/main"
href="https://github.com/omsimos/github-stats"
target="_blank"
rel="noopener noreferrer"
>
<GithubIcon className="h-5" />
<GithubIcon className="size-5" />
</a>
</Button>
<ToggleTheme />
Expand Down
14 changes: 8 additions & 6 deletions src/hooks/use-github-stats.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { useMemo } from "react";

export type Stats = {
theme?: string;
username?: string;
Expand All @@ -8,11 +10,11 @@ export type Stats = {
export const useGithubStats = (data: Stats) => {
const { theme, username, countPrivate, hideBorder } = data;

const stats = `https://github-readme-stats.vercel.app/api?username=${username}&theme=${theme}&show_icons=true&hide_border=${hideBorder}&count_private=${countPrivate}`;

const topLanguages = `https://github-readme-stats.vercel.app/api/top-langs/?username=${username}&theme=${theme}&show_icons=true&hide_border=${hideBorder}&layout=compact`;

const streak = `https://github-readme-streak-stats.herokuapp.com/?user=${username}&theme=${theme}&hide_border=${hideBorder}`;
return useMemo(() => {
const stats = `https://github-readme-stats.vercel.app/api?username=${username}&theme=${theme}&show_icons=true&hide_border=${hideBorder}&count_private=${countPrivate}`;
const topLanguages = `https://github-readme-stats.vercel.app/api/top-langs/?username=${username}&theme=${theme}&show_icons=true&hide_border=${hideBorder}&layout=compact`;
const streak = `https://github-readme-streak-stats.herokuapp.com/?user=${username}&theme=${theme}&hide_border=${hideBorder}`;

return { stats, topLanguages, streak };
return { stats, topLanguages, streak };
}, [username, theme, hideBorder, countPrivate]);
};

0 comments on commit 563052b

Please sign in to comment.