Skip to content

Commit 13fbee7

Browse files
authored
Merge pull request #47 from binhtran432k/feature/gh-stats
feat: enhance gh-stats
2 parents da85ec3 + 8b7b5ef commit 13fbee7

File tree

4 files changed

+66
-14
lines changed

4 files changed

+66
-14
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import { component$ } from "@builder.io/qwik";
2+
import { Link } from "@builder.io/qwik-city";
3+
4+
const AVATAR_SIZE = 150;
5+
6+
export default component$(() => {
7+
return (
8+
<section class="container m-auto flex flex-wrap items-start justify-center p-4">
9+
<Link
10+
href="https://github.com/binhtran432k"
11+
class="relative mx-4 my-8 inline-block transition-opacity hover:opacity-80"
12+
target="_blank"
13+
>
14+
<img
15+
src="https://binhtran432k.com/binhtran432k/assets/avatar-lite.webp"
16+
height={AVATAR_SIZE}
17+
width={AVATAR_SIZE}
18+
style={{ width: `${AVATAR_SIZE}px`, height: `${AVATAR_SIZE}px` }}
19+
class="rounded-[50%] border-r-2 border-danger object-cover"
20+
alt="My Avatar"
21+
/>
22+
<div class="absolute -top-2 left-5 h-[120%] w-3/4 -rotate-[20deg] rounded-[50%] border-l-2 border-danger shadow-xl shadow-info/30" />
23+
</Link>
24+
<div class="flex flex-col shadow-lg shadow-info/30">
25+
<Link
26+
href="https://github-readme-stats.vercel.app/api?username=binhtran432k&show_icons=true"
27+
class="inline-block transition-opacity hover:opacity-80"
28+
target="_blank"
29+
>
30+
<img
31+
src="https://github-readme-stats.vercel.app/api?username=binhtran432k&show_icons=true&disable_animations=true&hide_border=true&bg_color=00000000&text_color=f9fafb&title_color=a855f7&icon_color=a855f7"
32+
height={220}
33+
width={500}
34+
alt="My Github Stats"
35+
/>
36+
</Link>
37+
<Link
38+
href="https://github-readme-stats.vercel.app/api/top-langs/?username=binhtran432k&hide=html,css,nushell&langs_count=10&layout=compact"
39+
class="inline-block transition-opacity hover:opacity-80"
40+
target="_blank"
41+
>
42+
<img
43+
src="https://github-readme-stats.vercel.app/api/top-langs/?username=binhtran432k&hide=html,css,nushell&langs_count=10&layout=compact&disable_animations=true&hide_border=true&bg_color=00000000&text_color=f9fafb&title_color=a855f7&icon_color=a855f7"
44+
height={240}
45+
width={320}
46+
alt="My Github Stats"
47+
/>
48+
</Link>
49+
</div>
50+
</section>
51+
);
52+
});

src/components/landing/landing.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
import { component$ } from "@builder.io/qwik";
2-
import bgImg from "~/assets/background.jpg";
2+
import BackgroundImage from "~/assets/background.jpg?jsx";
33
import Header from "../header/header";
44
import Intro from "../intro/intro";
55
import Social from "../social/social";
66
import ScrollDown from "../scroll-down/scroll-down";
77

88
export default component$(() => {
99
return (
10-
<div
11-
class="relative flex min-h-screen flex-col bg-cover bg-center [--bg-filter:theme(colors.dark/50%)]"
12-
style={{
13-
backgroundImage: `linear-gradient(var(--bg-filter), var(--bg-filter)), url('${bgImg}')`,
14-
}}
15-
>
10+
<div class="relative flex min-h-screen flex-col">
11+
<BackgroundImage
12+
class="absolute left-0 top-0 z-[-1] h-full w-full object-cover brightness-50"
13+
alt="Background"
14+
/>
1615
<Header />
1716
<div class="flex grow flex-col flex-wrap justify-between">
1817
<div class="flex grow flex-col justify-between">

src/routes/404.tsx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
11
import { component$ } from "@builder.io/qwik";
22
import { type DocumentHead } from "@builder.io/qwik-city";
3-
import bgImg from "~/assets/background.jpg";
3+
import BackgroundImage from "~/assets/background.jpg?jsx";
44
import Header from "~/components/header/header";
55
import Social from "~/components/social/social";
66

77
export default component$(() => {
88
return (
9-
<div
10-
class="relative flex min-h-screen flex-col bg-cover bg-center [--bg-filter:theme(colors.dark/50%)]"
11-
style={{
12-
backgroundImage: `linear-gradient(var(--bg-filter), var(--bg-filter)), url('${bgImg}')`,
13-
}}
14-
>
9+
<div class="relative flex min-h-screen flex-col">
10+
<BackgroundImage
11+
class="absolute left-0 top-0 z-[-1] h-full w-full object-cover brightness-50"
12+
alt="Background"
13+
/>
1514
<Header />
1615
<div class="flex grow flex-col flex-wrap justify-between px-4">
1716
<div class="container m-auto text-center">

src/routes/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { component$ } from "@builder.io/qwik";
22
import type { DocumentHead } from "@builder.io/qwik-city";
3+
import GhStats from "~/components/gh-stats/gh-stats";
34
import Landing from "~/components/landing/landing";
45
import Skill from "~/components/skill/skill";
56

@@ -8,6 +9,7 @@ export default component$(() => {
89
<>
910
<Landing />
1011
<Skill />
12+
<GhStats />
1113
</>
1214
);
1315
});

0 commit comments

Comments
 (0)