feat: improved contributions graph

Changed files
+17 -8
src
+9
src/components/Contributions.astro
···
···
+
---
+
import Tag from "./Tag.astro"
+
import GitHubCalendar from "./GithubCalendar"
+
---
+
+
<div class="flex flex-col p-8 border-ctp-surface0 border w-full h-min relative">
+
<Tag name="Contributions"/>
+
<GitHubCalendar client:load username="imabanana80"/>
+
</div>
+3 -1
src/components/GithubCalendar.jsx
···
return <div>Loading GitHub calendar...</div>;
}
-
return <GitHubCalendar username={username} theme={theme} blockMargin={4} blockRadius={8} blockSize={10} {...props} />;
}
···
return <div>Loading GitHub calendar...</div>;
}
+
return <GitHubCalendar username={username} theme={theme}
+
blockMargin={4} blockRadius={8} blockSize={10}
+
{...props} />;
}
+1 -1
src/components/Tag.astro
···
---
<span
-
class=`absolute top-[-0.5rem] left-2 text-xs text-ctp-overlay0 bg-ctp-mantle pl-2 pr-2`
>{name}</span
>
···
---
<span
+
class=`absolute top-[-0.5rem] left-3 text-xs text-ctp-overlay1 bg-ctp-mantle pl-2 pr-2`
>{name}</span
>
+1 -1
src/layouts/Layout.astro
···
<title>banana@potassium.sh</title>
</head>
<body class="bg-ctp-crust pl-[12%] pr-[12%] text-ctp-text">
-
<main class="w-full min-h-full max-h-max bg-ctp-mantle">
<Navbar/>
<slot />
</main>
···
<title>banana@potassium.sh</title>
</head>
<body class="bg-ctp-crust pl-[12%] pr-[12%] text-ctp-text">
+
<main class="w-full min-h-full max-h-max bg-ctp-mantle relative">
<Navbar/>
<slot />
</main>
+3 -5
src/pages/index.astro
···
import Layout from '../layouts/Layout.astro';
import Profile from "../components/Profile.astro";
-
import GitHubCalendar from '../components/GithubCalendar';
---
<Layout>
-
<section class="h-[50%] grid-cols-5 grid p-32 gap-12">
<Profile/>
<div class="col-span-3 gap-8 flex flex-col">
-
<div class="flex flex-col p-8 border-ctp-surface0 border w-full h-min">
-
<GitHubCalendar client:load username="imabanana80"/>
-
</div>
</div>
</section>
</Layout>
···
import Layout from '../layouts/Layout.astro';
import Profile from "../components/Profile.astro";
+
import Contributions from "../components/Contributions.astro"
---
<Layout>
+
<section class="h-[50%] grid-cols-5 grid p-32 pt-48 gap-12">
<Profile/>
<div class="col-span-3 gap-8 flex flex-col">
+
<Contributions/>
</div>
</section>
</Layout>