mirror of
https://github.com/waynesutton/markdown-site.git
synced 2026-01-12 04:09:14 +00:00
fix(build): remove @netlify/functions dependency, use inline types
This commit is contained in:
@@ -98,6 +98,7 @@ export default function Home() {
|
||||
<strong>
|
||||
An open-source publishing framework for AI agents and developers.
|
||||
</strong>{" "}
|
||||
<br />
|
||||
Write markdown, sync from the terminal. <br />
|
||||
<br />
|
||||
<a
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
BookOpen,
|
||||
Activity,
|
||||
} from "lucide-react";
|
||||
import { GithubLogo } from "@phosphor-icons/react";
|
||||
import { GithubLogo, Spinner } from "@phosphor-icons/react";
|
||||
import VisitorMap from "../components/VisitorMap";
|
||||
import siteConfig from "../config/siteConfig";
|
||||
|
||||
@@ -48,9 +48,27 @@ export default function Stats() {
|
||||
.catch(() => setGithubStars(null));
|
||||
}, []);
|
||||
|
||||
// Don't render until stats load
|
||||
// Show loading spinner while stats load
|
||||
if (stats === undefined) {
|
||||
return null;
|
||||
return (
|
||||
<div className="stats-page-wide">
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
justifyContent: "center",
|
||||
alignItems: "center",
|
||||
minHeight: "60vh",
|
||||
flexDirection: "column",
|
||||
gap: "1rem",
|
||||
}}
|
||||
>
|
||||
<Spinner size={32} className="spinner-icon" />
|
||||
<p style={{ color: "var(--text-secondary)", fontSize: "0.875rem" }}>
|
||||
Loading statistics...
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// Stats card configuration with numbered sections
|
||||
|
||||
@@ -715,6 +715,20 @@ body {
|
||||
animation: dropdownFadeIn 0.15s ease;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.spinner-icon {
|
||||
animation: spin 1s linear infinite;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
@keyframes dropdownFadeIn {
|
||||
from {
|
||||
opacity: 0;
|
||||
@@ -878,8 +892,8 @@ body {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
@@ -896,6 +910,8 @@ body {
|
||||
}
|
||||
|
||||
.page-sidebar-expand svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
@@ -904,7 +920,7 @@ body {
|
||||
}
|
||||
|
||||
.page-sidebar-spacer {
|
||||
width: 20px;
|
||||
width: 24px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
@@ -1012,17 +1028,17 @@ body {
|
||||
}
|
||||
|
||||
.page-sidebar-expand {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.page-sidebar-expand svg {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.page-sidebar-spacer {
|
||||
width: 18px;
|
||||
width: 24px;
|
||||
}
|
||||
|
||||
.page-sidebar-link {
|
||||
|
||||
Reference in New Issue
Block a user