feat: add live GitHub star count, legal footer section, FAQ page

This commit is contained in:
ashim-hq
2026-04-24 00:24:44 +08:00
parent dca0de9a7e
commit 4af02612cc
3 changed files with 137 additions and 3 deletions
+10 -1
View File
@@ -34,12 +34,21 @@ const columns = [
},
],
},
{
title: "Legal",
links: [
{ label: "Licensing", href: "/#pricing" },
{ label: "Terms and Conditions", href: "/terms" },
{ label: "Privacy Policy", href: "/privacy" },
{ label: "FAQ", href: "/faq" },
],
},
];
export function Footer() {
return (
<footer className="border-t border-border bg-background-alt px-6 py-16">
<div className="mx-auto grid max-w-6xl gap-12 md:grid-cols-4">
<div className="mx-auto grid max-w-6xl gap-12 md:grid-cols-5">
<div>
<div className="flex items-center gap-2">
<div className="flex h-8 w-8 items-center justify-center rounded-lg bg-accent text-accent-foreground text-sm font-bold">
+22 -2
View File
@@ -1,7 +1,15 @@
"use client";
import { Github, Menu, Star, X } from "lucide-react";
import { useState } from "react";
import { useEffect, useState } from "react";
function formatStarCount(count: number): string {
if (count >= 1000) {
const k = count / 1000;
return `${k % 1 === 0 ? k.toFixed(0) : k.toFixed(1)}k`;
}
return count.toString();
}
const links = [
{ label: "Features", href: "#features" },
@@ -12,6 +20,18 @@ const links = [
export function Navbar() {
const [open, setOpen] = useState(false);
const [stars, setStars] = useState<string>("Star");
useEffect(() => {
fetch("https://api.github.com/repos/ashim-hq/ashim")
.then((res) => res.json())
.then((data) => {
if (typeof data.stargazers_count === "number") {
setStars(formatStarCount(data.stargazers_count));
}
})
.catch(() => {});
}, []);
return (
<nav className="fixed top-0 left-0 right-0 z-50 bg-background/60 backdrop-blur-xl after:absolute after:bottom-0 after:left-0 after:h-px after:w-full after:bg-gradient-to-r after:from-transparent after:via-accent/30 after:to-transparent">
@@ -47,7 +67,7 @@ export function Navbar() {
>
<Github size={16} />
<Star size={12} className="text-accent" />
<span>Star</span>
<span>{stars}</span>
</a>
<a
href="/contact"