feat(about): move github contributions from footer to about section
This commit is contained in:
1 parent
d30e15f3b9
commit
286ec847fc
3 files changed
+16
-17
No files matched your search
@@ -1,19 +1,22 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import type { Education, Experience, SiteSettings } from '../lib/data';
|
import type { Education, Experience, SiteSettings } from '../lib/data';
|
||||||
import ScrollReveal from './ScrollReveal';
|
import ScrollReveal from './ScrollReveal';
|
||||||
|
import GithubContributions from './GithubContributions';
|
||||||
|
|
||||||
interface AboutProps {
|
interface AboutProps {
|
||||||
settings: SiteSettings;
|
settings: SiteSettings;
|
||||||
experience: Experience[];
|
experience: Experience[];
|
||||||
education?: Education[];
|
education?: Education[];
|
||||||
sectionTag?: string;
|
sectionTag?: string;
|
||||||
|
githubUsername?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function About({
|
export default function About({
|
||||||
settings,
|
settings,
|
||||||
experience,
|
experience,
|
||||||
education = [],
|
education = [],
|
||||||
sectionTag = '01 // Profile & Background'
|
sectionTag = '01 // Profile & Background',
|
||||||
|
githubUsername = 'ssbg04'
|
||||||
}: AboutProps) {
|
}: AboutProps) {
|
||||||
const paragraphs = (settings.biography && settings.biography.length > 0)
|
const paragraphs = (settings.biography && settings.biography.length > 0)
|
||||||
? settings.biography
|
? settings.biography
|
||||||
@@ -312,6 +315,13 @@ export default function About({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Bento Cell 5: GitHub Contributions Activity Graph (12 cols) */}
|
||||||
|
<div className="lg:col-span-12">
|
||||||
|
<ScrollReveal variant="fade-up" delay={160} className="h-full">
|
||||||
|
<GithubContributions username={githubUsername} />
|
||||||
|
</ScrollReveal>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import type { SocialLink } from '../lib/data';
|
|||||||
import haptic from '../lib/haptics';
|
import haptic from '../lib/haptics';
|
||||||
|
|
||||||
const SpotifyWidget = lazy(() => import('./SpotifyWidget'));
|
const SpotifyWidget = lazy(() => import('./SpotifyWidget'));
|
||||||
const GithubContributions = lazy(() => import('./GithubContributions'));
|
|
||||||
|
|
||||||
const getFooterIcon = (platform: string) => {
|
const getFooterIcon = (platform: string) => {
|
||||||
const p = platform.toLowerCase();
|
const p = platform.toLowerCase();
|
||||||
@@ -75,18 +74,8 @@ export default function Footer({ fullName = 'Cris Charles Garcia', socialLinks =
|
|||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<footer className="relative z-10 border-t border-border-custom bg-muted-custom/20 pt-10 pb-16 sm:pb-10">
|
<footer className="relative z-10 border-t border-border-custom bg-muted-custom/20 py-8 sm:py-10">
|
||||||
<div className="max-w-7xl mx-auto px-4 sm:px-6 flex flex-col items-center gap-6">
|
<div className="max-w-7xl mx-auto px-4 sm:px-6 flex flex-col sm:flex-row items-center justify-between gap-4">
|
||||||
|
|
||||||
{/* Center: GitHub Contributions Activity Graph */}
|
|
||||||
<div className="w-full flex justify-center">
|
|
||||||
<Suspense fallback={<div className="h-40 w-full max-w-4xl rounded-3xl bg-foreground-custom/5 animate-pulse" />}>
|
|
||||||
<GithubContributions username="ssbg04" />
|
|
||||||
</Suspense>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* Bottom row: copyright, Spotify popup button & social links */}
|
|
||||||
<div className="w-full pt-4 border-t border-border-custom/50 flex flex-col sm:flex-row items-center justify-between gap-4">
|
|
||||||
<p className="text-xs text-muted-foreground-custom text-center sm:text-left">
|
<p className="text-xs text-muted-foreground-custom text-center sm:text-left">
|
||||||
© {new Date().getFullYear()} {fullName}. Built with Astro & React.
|
© {new Date().getFullYear()} {fullName}. Built with Astro & React.
|
||||||
</p>
|
</p>
|
||||||
@@ -132,7 +121,6 @@ export default function Footer({ fullName = 'Cris Charles Garcia', socialLinks =
|
|||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* ─── Spotify Now Playing Modal ─── */}
|
{/* ─── Spotify Now Playing Modal ─── */}
|
||||||
{isSpotifyModalOpen && (
|
{isSpotifyModalOpen && (
|
||||||
|
|||||||
@@ -17,9 +17,10 @@ interface ApiResponse {
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
username?: string;
|
username?: string;
|
||||||
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function GithubContributions({ username = 'ssbg04' }: Props) {
|
export default function GithubContributions({ username = 'ssbg04', className = '' }: Props) {
|
||||||
const [data, setData] = useState<ApiResponse | null>(null);
|
const [data, setData] = useState<ApiResponse | null>(null);
|
||||||
const [loading, setLoading] = useState<boolean>(true);
|
const [loading, setLoading] = useState<boolean>(true);
|
||||||
const [error, setError] = useState<boolean>(false);
|
const [error, setError] = useState<boolean>(false);
|
||||||
@@ -112,7 +113,7 @@ export default function GithubContributions({ username = 'ssbg04' }: Props) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="w-full max-w-4xl rounded-3xl glass-card border border-border-custom p-4 sm:p-6 flex flex-col gap-4 shadow-sm relative overflow-hidden group">
|
<div className={`w-full rounded-3xl bento-card p-5 sm:p-6 flex flex-col gap-4 shadow-sm relative overflow-hidden group ${className}`}>
|
||||||
{/* ─── Top Row: Title, Stats & GitHub Link ─── */}
|
{/* ─── Top Row: Title, Stats & GitHub Link ─── */}
|
||||||
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-3 pb-3 border-b border-border-custom/50">
|
<div className="flex flex-col sm:flex-row sm:items-center justify-between gap-3 pb-3 border-b border-border-custom/50">
|
||||||
<div className="flex items-center gap-3">
|
<div className="flex items-center gap-3">
|
||||||
|
|||||||
Reference in new issue
Block a user