Files
williammarch.xyz/out/_next/static/chunks/app/page-36895ca0935db1f7.js
2026-04-02 19:13:46 +01:00

1 line
29 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{9407:function(e,t,a){Promise.resolve().then(a.bind(a,4812)),Promise.resolve().then(a.bind(a,4455)),Promise.resolve().then(a.bind(a,8599)),Promise.resolve().then(a.bind(a,8061))},4812:function(e,t,a){"use strict";a.d(t,{default:function(){return h}});var s=a(7437),n=a(2265),r=a(2041);let i=["rgba(255,255,255,0.04)","rgba(255,255,255,0.13)","rgba(255,255,255,0.28)","rgba(255,255,255,0.50)","rgba(255,255,255,0.80)"];function l(e){let{label:t,value:a,sub:n}=e;return(0,s.jsxs)("div",{className:"glass rounded-2xl px-5 py-4 flex flex-col gap-1",children:[(0,s.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-[.1em] text-white/25",children:t}),(0,s.jsx)("span",{className:"text-[clamp(1.4rem,3vw,2rem)] font-black text-white tabular-nums leading-none",children:a}),(0,s.jsx)("span",{className:"text-xs text-white/30",children:n})]})}function o(e){let{data:t}=e,[a,r]=(0,n.useState)(null),l=(0,n.useMemo)(()=>{let e=new Map;return t.forEach(t=>{let a=new Date(1e3*t.timestamp).toISOString().split("T")[0];e.set(a,(e.get(a)||0)+t.contributions)}),e},[t]),{weeks:o,monthLabels:c}=(0,n.useMemo)(()=>{let e=new Date;e.setHours(0,0,0,0);let t=new Date(e);t.setDate(e.getDate()-e.getDay()-357);let a=[],s=[],n=-1,r=new Date(t);for(let e=0;e<52;e++){let t=[];for(let e=0;e<7;e++){let e=r.toISOString().split("T")[0];t.push({date:new Date(r),key:e,count:l.get(e)||0}),r.setDate(r.getDate()+1)}let i=t[0].date.getMonth();i!==n&&(s.push({label:t[0].date.toLocaleDateString("en-US",{month:"short"}),x:15*e+26}),n=i),a.push(t)}return{weeks:a,monthLabels:s}},[l]);return(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,s.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[.1em] text-white/30",children:"Contribution Calendar \xb7 last 12 months"}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 text-[10px] text-white/20",children:[(0,s.jsx)("span",{children:"Less"}),i.map((e,t)=>(0,s.jsx)("span",{className:"rounded-sm inline-block w-2.5 h-2.5 flex-shrink-0",style:{background:e,border:"1px solid rgba(255,255,255,0.06)"},"aria-hidden":"true"},t)),(0,s.jsx)("span",{children:"More"})]})]}),(0,s.jsx)("div",{className:"overflow-x-auto pb-1",children:(0,s.jsxs)("svg",{width:806,height:125,"aria-label":"Contribution calendar heatmap",role:"img",children:[c.map((e,t)=>(0,s.jsx)("text",{x:e.x,y:10,fontSize:9,fill:"rgba(255,255,255,0.25)",fontFamily:"var(--font-geist-mono, monospace)",children:e.label},t)),["","Mon","","Wed","","Fri",""].map((e,t)=>e?(0,s.jsx)("text",{x:22,y:17+15*t+12,fontSize:9,fill:"rgba(255,255,255,0.2)",textAnchor:"end",fontFamily:"var(--font-geist-mono, monospace)",children:e},t):null),(0,s.jsx)("g",{transform:"translate(".concat(26,", 14)"),children:o.map((e,t)=>e.map((e,a)=>{var n;return(0,s.jsx)("rect",{x:15*t,y:15*a,width:12,height:12,rx:2.5,fill:i[0===(n=e.count)?0:n<=2?1:n<=5?2:n<=9?3:4],onMouseEnter:t=>r({x:t.clientX,y:t.clientY,date:e.date.toLocaleDateString("en-GB",{weekday:"short",day:"numeric",month:"short",year:"numeric"}),count:e.count}),onMouseLeave:()=>r(null),className:"transition-opacity duration-100 hover:opacity-70 cursor-default",children:(0,s.jsx)("title",{children:"".concat(e.count," contribution").concat(1!==e.count?"s":""," on ").concat(e.date.toLocaleDateString())})},e.key)}))})]})}),a&&(0,s.jsxs)("div",{className:"fixed z-50 pointer-events-none px-2.5 py-1.5 rounded-lg text-xs font-medium text-white bg-[#1a1a1a] border border-white/[0.1] shadow-xl whitespace-nowrap",style:{left:a.x+12,top:a.y-36},children:[(0,s.jsx)("span",{className:"font-bold",children:a.count})," contribution",1!==a.count?"s":"",(0,s.jsx)("span",{className:"text-white/40 ml-1.5",children:a.date})]})]})}function c(e){let{data:t}=e,a=(0,n.useMemo)(()=>Array.from({length:12},(e,a)=>{let s=new Date;s.setMonth(s.getMonth()-11+a);let n="".concat(s.getFullYear(),"-").concat(String(s.getMonth()+1).padStart(2,"0"));return{label:s.toLocaleDateString("en-US",{month:"short"}),count:t.filter(e=>{let t=new Date(1e3*e.timestamp);return"".concat(t.getFullYear(),"-").concat(String(t.getMonth()+1).padStart(2,"0"))===n}).reduce((e,t)=>e+t.contributions,0)}}),[t]),r=Math.max(...a.map(e=>e.count),1);return(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[.1em] text-white/30 block mb-5",children:"Monthly activity"}),(0,s.jsx)("div",{className:"relative h-24 flex items-end gap-1.5","aria-label":"Monthly commit activity bar chart",role:"img",children:a.map((e,t)=>{let a=e.count/r*100;return(0,s.jsxs)("div",{className:"flex-1 flex flex-col items-center gap-1.5 group",children:[(0,s.jsx)("div",{className:"w-full relative",style:{height:"80px"},children:(0,s.jsx)("div",{className:"absolute bottom-0 left-0 right-0 rounded-sm transition-all duration-300 ease-out",style:{height:"".concat(Math.max(a,2),"%"),background:"rgba(255,255,255,".concat(.06+a/100*.5,")")},title:"".concat(e.label,": ").concat(e.count," contributions")})}),(0,s.jsx)("span",{className:"text-[8px] text-white/20 font-mono",children:e.label})]},t)})})]})}function d(e){let{commits:t}=e;return t.length?(0,s.jsxs)("div",{children:[(0,s.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[.1em] text-white/30 block mb-5",children:"Recent commits"}),(0,s.jsx)("ol",{className:"flex flex-col","aria-label":"Recent commit list",children:t.slice(0,10).map((e,a)=>{var n,r,i;let l=(e.sha||"").slice(0,7),o=((null===(n=e.commit)||void 0===n?void 0:n.message)||"").split("\n")[0].slice(0,64),c=e.created||(null===(i=e.commit)||void 0===i?void 0:null===(r=i.author)||void 0===r?void 0:r.date);return t.length,(0,s.jsxs)("li",{className:"commit-line relative flex gap-3 pb-4 ".concat(""),children:[(0,s.jsx)("div",{className:"mt-1.5 flex-shrink-0",children:(0,s.jsx)("span",{className:"block w-2 h-2 rounded-full bg-white/20 relative z-10","aria-hidden":"true"})}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsxs)("div",{className:"flex items-baseline gap-2 mb-0.5 flex-wrap",children:[(0,s.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-white/25",children:e._repo}),(0,s.jsx)("a",{href:e._repoUrl?"".concat(e._repoUrl,"/commit/").concat(e.sha):"#",target:"_blank",rel:"noopener noreferrer",className:"font-mono text-[10px] text-white/20 hover:text-white/50 transition-colors px-1 py-0.5 rounded bg-white/[0.04] border border-white/[0.06]","aria-label":"View commit ".concat(l),children:l}),(0,s.jsx)("span",{className:"text-[10px] text-white/20 ml-auto",children:c?function(e){let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<1)return"just now";if(t<60)return"".concat(t,"m");let a=Math.floor(t/60);if(a<24)return"".concat(a,"h");let s=Math.floor(a/24);return s<30?"".concat(s,"d"):"".concat(Math.floor(s/30),"mo")}(c):""})]}),(0,s.jsx)("p",{className:"text-sm text-white/60 truncate leading-snug",children:o})]})]},e.sha)})})]}):(0,s.jsx)("p",{className:"text-sm text-white/20 py-4",children:"No recent commits."})}function h(){let[e,t]=(0,n.useState)([]),[a,i]=(0,n.useState)([]),[h,x]=(0,n.useState)([]),[u,m]=(0,n.useState)(!0),[p,f]=(0,n.useState)(null);(0,n.useEffect)(()=>{!async function(){try{let[e,a]=await Promise.all([(0,r.uE)(6),(0,r.J6)()]);t(e),i(a);let s=await (0,r.h5)(e);x(s)}catch(e){f(e instanceof Error?e.message:"Unknown error")}finally{m(!1)}}()},[]);let g=(0,n.useMemo)(()=>(0,r.vZ)(a),[a]);return(0,s.jsx)("section",{id:"activity",className:"py-24 px-6","aria-labelledby":"activity-heading",children:(0,s.jsxs)("div",{className:"max-w-5xl mx-auto",children:[(0,s.jsx)("span",{className:"label",children:"Gitea \xb7 Code activity"}),(0,s.jsx)("h2",{id:"activity-heading",className:"text-[clamp(1.8rem,4vw,2.5rem)] font-black tracking-tight text-white mb-10",children:"Contributions"}),(0,s.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3 mb-6",children:[(0,s.jsx)(l,{label:"Contributions",value:u?"—":g.total.toLocaleString(),sub:"this year"}),(0,s.jsx)(l,{label:"Current streak",value:u?"—":"".concat(g.currentStreak,"d"),sub:"days"}),(0,s.jsx)(l,{label:"Longest streak",value:u?"—":"".concat(g.longestStreak,"d"),sub:"days"}),(0,s.jsx)(l,{label:"Active days",value:u?"—":g.activeDays,sub:"this year"})]}),(0,s.jsx)("div",{className:"glass rounded-2xl p-5 sm:p-6 mb-4",children:u?(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsx)("div",{className:"skel h-3 w-48"}),(0,s.jsx)("div",{className:"skel h-[120px] w-full rounded-xl"})]}):p?(0,s.jsxs)("div",{className:"text-center py-6",children:[(0,s.jsx)("p",{className:"text-white/30 text-sm",children:"Could not load heatmap"}),(0,s.jsx)("p",{className:"text-white/20 text-xs font-mono mt-1",children:p})]}):(0,s.jsx)(o,{data:a})}),(0,s.jsxs)("div",{className:"grid lg:grid-cols-[1fr_360px] gap-4",children:[(0,s.jsx)("div",{className:"glass rounded-2xl p-5 sm:p-6",children:u?(0,s.jsx)("div",{className:"skel h-32 w-full rounded-xl"}):(0,s.jsx)(c,{data:a})}),(0,s.jsx)("div",{className:"glass rounded-2xl p-5 sm:p-6 overflow-hidden",children:u?(0,s.jsx)("div",{className:"flex flex-col gap-4",children:[void 0,void 0,void 0,void 0,void 0].map((e,t)=>(0,s.jsxs)("div",{className:"flex gap-3",children:[(0,s.jsx)("div",{className:"skel w-2 h-2 rounded-full mt-1.5 flex-shrink-0"}),(0,s.jsxs)("div",{className:"flex-1",children:[(0,s.jsx)("div",{className:"skel h-2.5 w-1/3 mb-1.5"}),(0,s.jsx)("div",{className:"skel h-3.5 w-5/6"})]})]},t))}):(0,s.jsx)(d,{commits:h})})]}),!u&&e.length>0&&(0,s.jsxs)("div",{className:"glass rounded-2xl p-5 sm:p-6 mt-4",children:[(0,s.jsx)("span",{className:"text-[11px] font-semibold uppercase tracking-[.1em] text-white/30 block mb-5",children:"Repository breakdown"}),(0,s.jsx)("div",{className:"flex flex-col gap-2.5",children:e.slice(0,6).map(t=>{let a=Math.max(...e.map(e=>e.stars_count),1),n=t.stars_count/a*100;return(0,s.jsxs)("div",{className:"flex items-center gap-3 group",children:[(0,s.jsx)("a",{href:t.html_url,target:"_blank",rel:"noopener noreferrer",className:"text-xs font-mono text-white/40 hover:text-white/70 transition-colors w-36 truncate shrink-0",children:t.name}),(0,s.jsx)("div",{className:"flex-1 h-1.5 bg-white/[0.04] rounded-full overflow-hidden",children:(0,s.jsx)("div",{className:"h-full rounded-full bg-white/25 transition-all duration-500",style:{width:"".concat(Math.max(n,2),"%")}})}),(0,s.jsx)("span",{className:"text-[10px] text-white/25 tabular-nums w-6 text-right",children:t.stars_count})]},t.id)})})]})]})})}},4455:function(e,t,a){"use strict";a.d(t,{default:function(){return i}});var s=a(7437),n=a(2265),r=a(1266);function i(){let[e,t]=(0,n.useState)("idle");return(0,s.jsx)("section",{id:"contact",className:"py-24 px-6 bg-[#0a0a0a]","aria-labelledby":"contact-heading",children:(0,s.jsxs)("div",{className:"max-w-5xl mx-auto",children:[(0,s.jsx)("span",{className:"label",children:"Get in touch"}),(0,s.jsx)("h2",{id:"contact-heading",className:"text-[clamp(1.8rem,4vw,2.5rem)] font-black tracking-tight text-white mb-10",children:"Lets work together."}),(0,s.jsxs)("div",{className:"grid md:grid-cols-[280px_1fr] gap-6",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("a",{href:"mailto:".concat(r.Ey.email),className:"glass rounded-xl p-4 flex items-center gap-3 group hover:border-white/[0.14] hover:-translate-x-[-4px] transition-all duration-150",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-lg bg-white/[0.05] flex items-center justify-center flex-shrink-0","aria-hidden":"true",children:(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"rgba(255,255,255,0.5)",strokeWidth:"1.8",children:[(0,s.jsx)("rect",{x:"2",y:"4",width:"20",height:"16",rx:"2"}),(0,s.jsx)("path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7"})]})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-[10px] text-white/25 uppercase tracking-wider",children:"Email"}),(0,s.jsx)("p",{className:"text-xs font-medium text-white/55 truncate group-hover:text-white/80 transition-colors",children:r.Ey.email})]})]}),(0,s.jsxs)("a",{href:"".concat(r.lR,"/").concat(r.Qs),target:"_blank",rel:"noopener noreferrer",className:"glass rounded-xl p-4 flex items-center gap-3 group hover:border-white/[0.14] hover:translate-x-1 transition-all duration-150",children:[(0,s.jsx)("div",{className:"w-8 h-8 rounded-lg bg-white/[0.05] flex items-center justify-center flex-shrink-0","aria-hidden":"true",children:(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"rgba(255,255,255,0.5)",strokeWidth:"1.8",children:[(0,s.jsx)("path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.2c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"}),(0,s.jsx)("path",{d:"M9 18c-4.51 2-5-2-7-2"})]})}),(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("p",{className:"text-[10px] text-white/25 uppercase tracking-wider",children:"Gitea"}),(0,s.jsxs)("p",{className:"text-xs font-medium text-white/55 truncate group-hover:text-white/80 transition-colors font-mono",children:[r.lR.replace(/^https?:\/\//,""),"/",r.Qs]})]})]})]}),(0,s.jsxs)("form",{onSubmit:function(e){e.preventDefault();let a=new FormData(e.currentTarget),s=a.get("name"),n=a.get("email"),i=a.get("message");if(!s||!n||!i)return;let l=encodeURIComponent("Message from ".concat(s," via williammarch.xyz")),o=encodeURIComponent("From: ".concat(s," <").concat(n,">\n\n").concat(i));window.location.href="mailto:".concat(r.Ey.email,"?subject=").concat(l,"&body=").concat(o),t("sent")},className:"glass rounded-xl p-6 flex flex-col gap-4",noValidate:!0,children:[(0,s.jsxs)("div",{className:"grid sm:grid-cols-2 gap-4",children:[(0,s.jsxs)("label",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-white/30",children:"Name"}),(0,s.jsx)("input",{name:"name",type:"text",required:!0,placeholder:"Your name",autoComplete:"name",className:"bg-white/[0.03] border border-white/[0.08] rounded-lg px-3 py-2.5 text-sm text-white placeholder-white/20 outline-none transition-colors focus:border-white/[0.2] focus:ring-1 focus:ring-white/[0.1]"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-white/30",children:"Email"}),(0,s.jsx)("input",{name:"email",type:"email",required:!0,placeholder:"you@example.com",autoComplete:"email",className:"bg-white/[0.03] border border-white/[0.08] rounded-lg px-3 py-2.5 text-sm text-white placeholder-white/20 outline-none transition-colors focus:border-white/[0.2] focus:ring-1 focus:ring-white/[0.1]"})]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("span",{className:"text-[10px] font-semibold uppercase tracking-wider text-white/30",children:"Message"}),(0,s.jsx)("textarea",{name:"message",required:!0,placeholder:"What's on your mind?",rows:4,className:"bg-white/[0.03] border border-white/[0.08] rounded-lg px-3 py-2.5 text-sm text-white placeholder-white/20 outline-none resize-none transition-colors focus:border-white/[0.2] focus:ring-1 focus:ring-white/[0.1]"})]}),(0,s.jsx)("div",{className:"flex items-center gap-4",children:(0,s.jsxs)("button",{type:"submit",className:"btn btn-primary",children:["sent"===e?"Opening email…":"Send message",(0,s.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5","aria-hidden":"true",children:[(0,s.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,s.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})]})})]})]})]})})}},8599:function(e,t,a){"use strict";a.d(t,{default:function(){return i}});var s=a(7437),n=a(2265),r=a(1266);function i(){let[e,t]=(0,n.useState)(!1),[a,i]=(0,n.useState)(!1);(0,n.useEffect)(()=>{let e=()=>t(window.scrollY>24);return window.addEventListener("scroll",e,{passive:!0}),()=>window.removeEventListener("scroll",e)},[]);let l=[{href:"#about",label:"About"},{href:"#projects",label:"Projects"},{href:"#activity",label:"Activity"},{href:"#contact",label:"Contact"}];return(0,s.jsxs)("nav",{className:"".concat("fixed top-0 left-0 right-0 z-50 h-[60px] flex items-center transition-all duration-300"," ").concat(e?"bg-[rgba(7,7,7,0.85)] backdrop-blur-[20px] border-b border-white/[0.06]":"bg-transparent"),"aria-label":"Main navigation",children:[(0,s.jsxs)("div",{className:"w-full max-w-5xl mx-auto px-6 flex items-center justify-between gap-8",children:[(0,s.jsxs)("a",{href:"#",className:"flex items-center gap-2.5 group","aria-label":"William March",children:[(0,s.jsxs)("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none","aria-hidden":"true",children:[(0,s.jsx)("rect",{width:"26",height:"26",rx:"5",fill:"rgba(255,255,255,0.9)"}),(0,s.jsx)("path",{d:"M4 7.5L9 19L13 9.5L17 19L22 7.5",stroke:"#070707",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round"})]}),(0,s.jsx)("span",{className:"text-sm font-semibold text-white/80 group-hover:text-white transition-colors duration-150 tracking-tight",children:"William March"})]}),(0,s.jsx)("ul",{className:"hidden md:flex items-center gap-7",role:"list",children:l.map(e=>(0,s.jsx)("li",{children:(0,s.jsx)("a",{href:e.href,className:"text-sm text-white/40 hover:text-white/80 transition-colors duration-150 font-medium",children:e.label})},e.href))}),(0,s.jsx)("div",{className:"hidden md:flex items-center gap-3",children:(0,s.jsxs)("a",{href:"".concat(r.lR,"/").concat(r.Qs),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-xs text-white/40 hover:text-white/70 transition-colors duration-150 font-mono","aria-label":"Gitea profile",children:[(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8","aria-hidden":"true",children:[(0,s.jsx)("path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.2c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"}),(0,s.jsx)("path",{d:"M9 18c-4.51 2-5-2-7-2"})]}),"gitea"]})}),(0,s.jsx)("button",{className:"md:hidden p-1.5 rounded-md text-white/50 hover:text-white/80 hover:bg-white/[0.05] transition-all",onClick:()=>i(!a),"aria-label":"Toggle menu","aria-expanded":a,children:(0,s.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:a?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,s.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),(0,s.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),(0,s.jsx)("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})})})]}),a&&(0,s.jsx)("div",{className:"absolute top-[60px] left-0 right-0 bg-[#0f0f0f] border-b border-white/[0.06] px-6 py-4 md:hidden",children:l.map(e=>(0,s.jsx)("a",{href:e.href,onClick:()=>i(!1),className:"block py-2.5 text-sm text-white/60 hover:text-white transition-colors",children:e.label},e.href))})]})}},8061:function(e,t,a){"use strict";a.d(t,{default:function(){return o}});var s=a(7437),n=a(2265),r=a(2041),i=a(1266);let l={python:"#3572A5",javascript:"#f1e05a",typescript:"#3178c6",go:"#00add8",rust:"#dea584","c++":"#f34b7d",c:"#555",html:"#e34c26",css:"#563d7c",shell:"#89e051",ruby:"#701516",java:"#b07219"};function o(){let[e,t]=(0,n.useState)(null),[a,o]=(0,n.useState)(null);return(0,n.useEffect)(()=>{(0,r.uE)(i.Ey.repoLimit).then(t).catch(e=>o(e.message))},[]),(0,s.jsx)("section",{id:"projects",className:"py-24 px-6 bg-[#0a0a0a]","aria-labelledby":"projects-heading",children:(0,s.jsxs)("div",{className:"max-w-5xl mx-auto",children:[(0,s.jsx)("span",{className:"label",children:"Gitea \xb7 Public repos"}),(0,s.jsxs)("div",{className:"flex items-end justify-between mb-10",children:[(0,s.jsx)("h2",{id:"projects-heading",className:"text-[clamp(1.8rem,4vw,2.5rem)] font-black tracking-tight text-white",children:"Recent Projects"}),(0,s.jsxs)("a",{href:"".concat(i.lR,"/").concat(i.Qs),target:"_blank",rel:"noopener noreferrer",className:"hidden sm:flex items-center gap-1.5 text-xs text-white/30 hover:text-white/60 transition-colors font-mono",children:["All repos",(0,s.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M7 17L17 7M7 7h10v10"})})]})]}),!e&&!a&&(0,s.jsx)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4",children:[...Array(6)].map((e,t)=>(0,s.jsxs)("div",{className:"glass rounded-2xl p-5 flex flex-col gap-3",children:[(0,s.jsx)("div",{className:"skel h-4 w-1/2"}),(0,s.jsx)("div",{className:"skel h-3 w-5/6"}),(0,s.jsx)("div",{className:"skel h-3 w-3/4"}),(0,s.jsx)("div",{className:"skel h-3 w-1/3 mt-auto"})]},t))}),a&&(0,s.jsxs)("div",{className:"glass rounded-2xl p-10 text-center",children:[(0,s.jsx)("p",{className:"text-white/30 text-sm mb-1",children:"Could not load repositories"}),(0,s.jsx)("p",{className:"text-white/20 text-xs font-mono",children:a})]}),e&&(0,s.jsx)("div",{className:"grid sm:grid-cols-2 lg:grid-cols-3 gap-4","aria-live":"polite",children:e.map(e=>(0,s.jsxs)("a",{href:e.html_url,target:"_blank",rel:"noopener noreferrer",className:"glass rounded-2xl p-5 flex flex-col gap-4 group transition-all duration-200 hover:border-white/[0.14] hover:shadow-[0_0_0_1px_rgba(0,0,0,0.6),0_16px_48px_rgba(0,0,0,0.6)] hover:-translate-y-[2px]","aria-label":"".concat(e.name,": ").concat(e.description||"No description"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsx)("div",{className:"p-1.5 rounded-md bg-white/[0.04] border border-white/[0.07]","aria-hidden":"true",children:(0,s.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"rgba(255,255,255,0.4)",strokeWidth:"1.8",children:[(0,s.jsx)("path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.2c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"}),(0,s.jsx)("path",{d:"M9 18c-4.51 2-5-2-7-2"})]})}),(0,s.jsx)("svg",{className:"text-white/20 group-hover:text-white/40 transition-colors",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:(0,s.jsx)("path",{d:"M7 17L17 7M7 7h10v10"})})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-sm font-semibold text-white mb-1 truncate",children:e.name}),(0,s.jsx)("p",{className:"text-xs text-white/35 leading-relaxed line-clamp-2",children:e.description||(0,s.jsx)("span",{className:"italic text-white/20",children:"No description"})})]}),(0,s.jsxs)("div",{className:"flex items-center gap-4 mt-auto",children:[e.language&&(0,s.jsxs)("span",{className:"flex items-center gap-1.5 text-xs text-white/30",children:[(0,s.jsx)("span",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{background:l[(e.language||"").toLowerCase()]||"#555"},"aria-hidden":"true"}),e.language]}),(0,s.jsxs)("span",{className:"flex items-center gap-1 text-xs text-white/25","aria-label":"".concat(e.stars_count," stars"),children:[(0,s.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:(0,s.jsx)("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})}),e.stars_count]}),(0,s.jsx)("span",{className:"text-xs text-white/20 ml-auto tabular-nums",children:function(e){let t=Math.floor((Date.now()-new Date(e).getTime())/6e4);if(t<60)return"".concat(t,"m ago");let a=Math.floor(t/60);if(a<24)return"".concat(a,"h ago");let s=Math.floor(a/24);return s<30?"".concat(s,"d ago"):"".concat(Math.floor(s/30),"mo ago")}(e.updated)})]})]},e.id))})]})})}},1266:function(e,t,a){"use strict";a.d(t,{Ey:function(){return d},JQ:function(){return c},Qs:function(){return o},lR:function(){return l}});var s,n,r,i=a(357);let l=null!==(s=i.env.NEXT_PUBLIC_GITEA_URL)&&void 0!==s?s:"https://loud-cool-pigeon.01b529f7.katapult.cloud",o=null!==(n=i.env.NEXT_PUBLIC_GITEA_USERNAME)&&void 0!==n?n:"m0dus",c=null!==(r=i.env.NEXT_PUBLIC_GITEA_TOKEN)&&void 0!==r?r:"",d={name:"William March",title:"Software Engineer",tagline:"Building precise, purposeful, open-source software.",about1:"I'm a software engineer focused on writing clean, reliable code. I care about open-source tools that solve real problems — the kind that make other engineers' lives easier.",about2:"From small CLI utilities to complex systems, I approach every project with the same level of craft. Good code reads like good writing: clear, intentional, and easy to reason about.",skills:["Go","Python","TypeScript","Rust","Linux","Docker","PostgreSQL","Git","Nix"],email:"william@williammarch.xyz",repoLimit:6,commitFetchRepos:4}},2041:function(e,t,a){"use strict";a.d(t,{J6:function(){return i},h5:function(){return o},uE:function(){return r},vZ:function(){return c}});var s=a(1266);async function n(e){let t=await fetch("".concat(s.lR,"/api/v1").concat(e),{headers:function(){let e={Accept:"application/json"};return s.JQ&&(e.Authorization="token ".concat(s.JQ)),e}()});if(!t.ok)throw Error("Gitea API ".concat(e,": HTTP ").concat(t.status));return t.json()}async function r(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;return n("/users/".concat(s.Qs,"/repos?limit=").concat(e,"&sort=newest"))}async function i(){return n("/users/".concat(s.Qs,"/heatmap"))}async function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5;return n("/repos/".concat(s.Qs,"/").concat(e,"/commits?limit=").concat(t))}async function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,a=await Promise.allSettled(e.slice(0,4).map(e=>l(e.name,t).then(t=>t.map(t=>({...t,_repo:e.name,_repoUrl:e.html_url}))))),s=[];return a.forEach(e=>{"fulfilled"===e.status&&s.push(...e.value)}),s.sort((e,t)=>new Date(t.created).getTime()-new Date(e.created).getTime()).slice(0,15)}function c(e){let t=Date.now()/1e3-31536e3,a=e.filter(e=>e.timestamp>t),s=a.reduce((e,t)=>e+t.contributions,0),n=a.filter(e=>e.contributions>0).length,r=new Set;a.forEach(e=>{let t=new Date(1e3*e.timestamp);r.add(t.toISOString().split("T")[0])});let i=new Date;i.setHours(0,0,0,0);let l=0,o=new Date(i);for(r.has(o.toISOString().split("T")[0])||o.setDate(o.getDate()-1);r.has(o.toISOString().split("T")[0]);)l++,o.setDate(o.getDate()-1);let c=0,d=0,h=Array.from(r).sort();for(let e=0;e<h.length;e++){if(0===e){d=1;continue}let t=new Date(h[e-1]);t.setDate(t.getDate()+1),t.toISOString().split("T")[0]===h[e]?d++:d=1,d>c&&(c=d)}return d>c&&(c=d),{total:s,currentStreak:l,longestStreak:c,activeDays:n}}},357:function(e,t,a){"use strict";var s,n;e.exports=(null==(s=a.g.process)?void 0:s.env)&&"object"==typeof(null==(n=a.g.process)?void 0:n.env)?a.g.process:a(8081)},8081:function(e){!function(){var t={229:function(e){var t,a,s,n=e.exports={};function r(){throw Error("setTimeout has not been defined")}function i(){throw Error("clearTimeout has not been defined")}function l(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(a){try{return t.call(null,e,0)}catch(a){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:r}catch(e){t=r}try{a="function"==typeof clearTimeout?clearTimeout:i}catch(e){a=i}}();var o=[],c=!1,d=-1;function h(){c&&s&&(c=!1,s.length?o=s.concat(o):d=-1,o.length&&x())}function x(){if(!c){var e=l(h);c=!0;for(var t=o.length;t;){for(s=o,o=[];++d<t;)s&&s[d].run();d=-1,t=o.length}s=null,c=!1,function(e){if(a===clearTimeout)return clearTimeout(e);if((a===i||!a)&&clearTimeout)return a=clearTimeout,clearTimeout(e);try{a(e)}catch(t){try{return a.call(null,e)}catch(t){return a.call(this,e)}}}(e)}}function u(e,t){this.fun=e,this.array=t}function m(){}n.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var a=1;a<arguments.length;a++)t[a-1]=arguments[a];o.push(new u(e,t)),1!==o.length||c||l(x)},u.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=m,n.addListener=m,n.once=m,n.off=m,n.removeListener=m,n.removeAllListeners=m,n.emit=m,n.prependListener=m,n.prependOnceListener=m,n.listeners=function(e){return[]},n.binding=function(e){throw Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw Error("process.chdir is not supported")},n.umask=function(){return 0}}},a={};function s(e){var n=a[e];if(void 0!==n)return n.exports;var r=a[e]={exports:{}},i=!0;try{t[e](r,r.exports,s),i=!1}finally{i&&delete a[e]}return r.exports}s.ab="//";var n=s(229);e.exports=n}()}},function(e){e.O(0,[971,23,744],function(){return e(e.s=9407)}),_N_E=e.O()}]);