shivam + claude changes
All checks were successful
Deploy Website / build-and-deploy (push) Successful in 28s
All checks were successful
Deploy Website / build-and-deploy (push) Successful in 28s
This commit is contained in:
@@ -14,7 +14,10 @@ export function Analytics() {
|
||||
await fetch('/api/analytics', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ path: pathname, timestamp: Date.now() }),
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'X-Analytics-Key': process.env.NEXT_PUBLIC_ANALYTICS_KEY || 'default-analytics-key',
|
||||
},
|
||||
keepalive: true,
|
||||
});
|
||||
} catch (e) {
|
||||
|
||||
@@ -9,7 +9,7 @@ export function Navbar() {
|
||||
const isActive = (path: string) => pathname?.startsWith(path);
|
||||
|
||||
return (
|
||||
<nav className="fixed top-0 left-0 w-full z-50 backdrop-blur-md bg-zinc-50/80 dark:bg-zinc-950/80 border-b border-zinc-200/50 dark:border-zinc-800/50">
|
||||
<nav aria-label="Main navigation" className="fixed top-0 left-0 w-full z-50 backdrop-blur-md bg-zinc-50/80 dark:bg-zinc-950/80 border-b border-zinc-200/50 dark:border-zinc-800/50">
|
||||
<div className="max-w-4xl mx-auto px-6 h-16 flex items-center justify-between">
|
||||
<Link href="/" className="font-bold text-lg tracking-tight hover:opacity-70 transition-opacity">
|
||||
AK
|
||||
@@ -29,13 +29,13 @@ export function Navbar() {
|
||||
Resume
|
||||
</Link>
|
||||
<div className="w-px h-4 bg-zinc-200 dark:bg-zinc-800 hidden sm:block"></div>
|
||||
<a href="https://code.akkolli.net/lepton" target="_blank" rel="noopener noreferrer" className="hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors hidden sm:block">
|
||||
<a href="https://code.akkolli.net/lepton" target="_blank" rel="noopener noreferrer" aria-label="Code repositories" className="hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors hidden sm:block">
|
||||
Code
|
||||
</a>
|
||||
<a href="https://github.com/akkolli" target="_blank" rel="noopener noreferrer" className="hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors hidden sm:block">
|
||||
<a href="https://github.com/akkolli" target="_blank" rel="noopener noreferrer" aria-label="GitHub profile" className="hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors hidden sm:block">
|
||||
GitHub
|
||||
</a>
|
||||
<a href="https://x.com/thekolliakshay" target="_blank" rel="noopener noreferrer" className="hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors hidden sm:block">
|
||||
<a href="https://x.com/thekolliakshay" target="_blank" rel="noopener noreferrer" aria-label="Twitter profile" className="hover:text-zinc-900 dark:hover:text-zinc-100 transition-colors hidden sm:block">
|
||||
Twitter
|
||||
</a>
|
||||
</div>
|
||||
|
||||
@@ -17,6 +17,8 @@ export function MobileTableOfContents({ headings }: { headings: Heading[] }) {
|
||||
<div className="block xl:hidden mb-8 border border-zinc-200 dark:border-zinc-800 rounded-lg overflow-hidden">
|
||||
<button
|
||||
onClick={() => setIsOpen(!isOpen)}
|
||||
aria-expanded={isOpen}
|
||||
aria-controls="mobile-toc"
|
||||
className="w-full flex items-center justify-between p-4 bg-zinc-50 dark:bg-zinc-900 text-sm font-medium text-zinc-900 dark:text-zinc-100"
|
||||
>
|
||||
<span>Table of Contents</span>
|
||||
@@ -26,7 +28,7 @@ export function MobileTableOfContents({ headings }: { headings: Heading[] }) {
|
||||
</button>
|
||||
|
||||
{isOpen && (
|
||||
<ul className="p-4 bg-white dark:bg-black border-t border-zinc-200 dark:border-zinc-800 space-y-3">
|
||||
<ul id="mobile-toc" className="p-4 bg-white dark:bg-black border-t border-zinc-200 dark:border-zinc-800 space-y-3">
|
||||
{headings.map((heading) => (
|
||||
<li
|
||||
key={heading.id}
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
'use client';
|
||||
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
export function ReadingProgressBar() {
|
||||
const [progress, setProgress] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
const updateProgress = () => {
|
||||
const scrollTop = window.scrollY;
|
||||
const docHeight = document.documentElement.scrollHeight - window.innerHeight;
|
||||
const readPercent = scrollTop / docHeight;
|
||||
setProgress(readPercent * 100);
|
||||
};
|
||||
|
||||
window.addEventListener('scroll', updateProgress);
|
||||
return () => window.removeEventListener('scroll', updateProgress);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<div className="fixed top-0 left-0 w-full h-1 z-[100] bg-transparent">
|
||||
<div
|
||||
className="h-full bg-zinc-900 dark:bg-zinc-100 transition-all duration-100 ease-out"
|
||||
style={{ width: `${progress}%` }}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -54,7 +54,7 @@ export function TableOfContents({ headings }: { headings: Heading[] }) {
|
||||
if (headings.length === 0) return null;
|
||||
|
||||
return (
|
||||
<nav className="text-sm animate-fade-in text-left">
|
||||
<nav aria-label="Table of contents" className="text-sm animate-fade-in text-left">
|
||||
<h4 className="font-bold text-zinc-900 dark:text-zinc-100 mb-4 uppercase tracking-wider text-xs">On this page</h4>
|
||||
<ul className="space-y-3">
|
||||
{Array.isArray(headings) && headings.map((heading) => (
|
||||
|
||||
Reference in New Issue
Block a user