PageSourceSearch

https://jinjiang.dev/assets/chunks/theme.DER8ZZz3.js

js jinjiang.dev collected 2026-10-03 22:47:16 UTC 6,426 bytes, 1 lines download raw bytes

1import{d as g,u as _,r as T,o as l,c as p,a as e,b as m,t as M,e as f,f as y,_ as E,g as $,h as j,i as C,j as S,k,F as B}from"./framework.BGGANGYN.js";const N="/assets/avatar.png",D={class:"home-page"},R={class:"home-hero"},V={class:"home-hero-main home-hero-main--portrait"},F={class:"home-hero-copy"},L={class:"home-intro"},P={class:"work-index","aria-labelledby":"work-index-title"},H=g({__name:"Home",setup(t){const{frontmatter:s}=_();return(o,a)=>{const i=T("Content");return l(),p("div",D,[e("header",R,[e("div",V,[e("div",F,[a[0]||(a[0]=e("p",{class:"terminal-kicker"},[e("span",null,"$"),m(" open dev://jinjiang")],-1)),a[1]||(a[1]=e("h1",null,[m("Jinjiang's"),e("br"),m("Dev Space")],-1)),e("p",L,M(f(s).description),1)]),a[2]||(a[2]=e("figure",{class:"home-portrait"},[e("img",{src:N,width:"400",height:"400",alt:"Black-and-white illustrated portrait of Jinjiang Zhao smiling with his arms crossed",decoding:"async",fetchpriority:"high"})],-1))]),a[3]||(a[3]=e("dl",{class:"home-signals","aria-label":"Profile summary"},[e("div",null,[e("dt",null,"Focus"),e("dd",null,"FRONTEND")]),e("div",null,[e("dt",null,"Practice"),e("dd",null,"OPEN SOURCE")]),e("div",null,[e("dt",null,"Based in"),e("dd",null,"SINGAPORE")])],-1))]),e("section",P,[a[4]||(a[4]=e("header",{class:"work-index-header"},[e("div",null,[e("span",null,"INDEX / SELECTED"),e("h2",{id:"work-index-title"},"Things I build")]),e("a",{href:"https://github.com/Jinjiang",target:"_blank",rel:"noopener noreferrer"},"GitHub profile ↗")],-1)),y(i,{class:"prose"})])])}}}),J={},O={class:"not-found"};function U(t,s){return l(),p("section",O,[...s[0]||(s[0]=[e("p",null,[e("span",null,"ERROR"),m(" / 404")],-1),e("h1",null,[m("This path leads"),e("br"),m("nowhere.")],-1),e("p",null,"The page may have moved, or this experiment has not been built yet.",-1),e("a",{href:"/"},"← Back to dev space",-1)])])}const A=E(J,[["render",U]]),I=["data-theme"],G=["aria-pressed"],z=["aria-pressed"],X=["aria-pressed"],Z=g({__name:"ThemeSwitch",props:{theme:{}},emits:["change"],setup(t,{emit:s}){const o=s,a=(i,n)=>{const d=n.currentTarget.getBoundingClientRect();o("change",i,{x:d.left+d.width/2,y:d.top+d.height/2})};return(i,n)=>(l(),p("div",{class:"theme-switch",role:"group","aria-label":"Color theme","data-theme":t.theme},[e("button",{type:"button","aria-pressed":t.theme==="dark","aria-label":"Use dark theme",title:"Dark theme",onClick:n[0]||(n[0]=r=>a("dark",r))},[...n[3]||(n[3]=[e("svg",{viewBox:"0 0 24 24","aria-hidden":"true"},[e("path",{d:"M20 15.2A8.4 8.4 0 0 1 8.8 4 8.5 8.5 0 1 0 20 15.2Z"})],-1)])],8,G),e("button",{type:"button","aria-pressed":t.theme==="light","aria-label":"Use light theme",title:"Light theme",onClick:n[1]||(n[1]=r=>a("light",r))},[...n[4]||(n[4]=[e("svg",{viewBox:"0 0 24 24","aria-hidden":"true"},[e("circle",{cx:"12",cy:"12",r:"3.5"}),e("path",{d:"M12 2v2.5M12 19.5V22M2 12h2.5M19.5 12H22M4.9 4.9l1.8 1.8M17.3 17.3l1.8 1.8M19.1 4.9l-1.8 1.8M6.7 17.3l-1.8 1.8"})],-1)])],8,z),e("button",{type:"button","aria-pressed":t.theme==="system","aria-label":"Use system theme",title:"System theme",onClick:n[2]||(n[2]=r=>a("system",r))},[...n[5]||(n[5]=[e("svg",{viewBox:"0 0 24 24","aria-hidden":"true"},[e("rect",{x:"3",y:"4",width:"18",height:"13",rx:"2"}),e("path",{d:"M8 21h8M12 17v4"})],-1)])],8,X)],8,I))}}),q={class:"site-header"},W=g({__name:"SiteHeader",props:{theme:{}},emits:["themeChange"],setup(t,{emit:s}){const o=s;return(a,i)=>(l(),p("header",q,[i[1]||(i[1]=$('<a class="site-identity" href="/" aria-label="Jinjiang&#39;s Dev Space home"><strong>jinjiang</strong><span>: // dev</span></a><nav class="site-nav" aria-label="Primary navigation"><a href="https://jinjiang.dev/resume/" target="_blank" rel="noopener noreferrer">résumé</a><a href="https://jiongks.name/" target="_blank" rel="noopener noreferrer">中文</a><a href="https://github.com/Jinjiang" target="_blank" rel="noopener noreferrer">github</a></nav>',2)),y(Z,{theme:t.theme,onChange:i[0]||(i[0]=(n,r)=>o("themeChange",n,r))},null,8,["theme"])]))}}),c=S("dark");let h,u;function Y(t){return t!=="system"||typeof window>"u"?t==="system"?"dark":t:window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
1k":"light"}function w(t){var o;if(typeof document>"u")return;const s=Y(t);document.documentElement.dataset.themeMode=t,document.documentElement.dataset.theme=s,document.documentElement.style.colorScheme=s,(o=document.querySelector('meta[name="theme-color"]'))==null||o.setAttribute("content",s==="dark"?"#07110e":"#f5f6f0")}function v(t){c.value=t,w(t);try{window.localStorage.setItem("resume-theme",t)}catch{}}function x(t){u&&window.clearTimeout(u),u=window.setTimeout(()=>{delete document.documentElement.dataset.themeTransition},t)}function K(t,s){if(typeof window>"u"||!s){v(t);return}const o=document.documentElement,a=window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(!a&&"startViewTransition"in document){const i=Math.max(s.x,window.innerWidth-s.x),n=Math.max(s.y,window.innerHeight-s.y),r=Math.hypot(i,n);document.startViewTransition(()=>v(t)).ready.then(()=>{o.animate({clipPath:[`circle(0 at ${s.x}px ${s.y}px)`,`circle(${r}px at ${s.x}px ${s.y}px)`]},{duration:380,easing:"cubic-bezier(0.22, 1, 0.36, 1)",pseudoElement:"::view-transition-new(root)"})}).catch(()=>{});return}o.dataset.themeTransition="user",v(t),x(a?0:260)}function b(){c.value==="system"&&(document.documentElement.dataset.themeTransition="system",w("system"),x(250))}function Q(){return j(()=>{const t=document.documentElement.dataset.themeMode;c.value=t==="light"||t==="system"?t:"dark",w(c.value),h=window.matchMedia("(prefers-color-scheme: dark)"),h.addEventListener("change",b)}),C(()=>{h==null||h.removeEventListener("change",b),u&&window.clearTimeout(u)}),{theme:c,setTheme:K}}const ee={class:"site-page"},te={id:"main-content",class:"site-main",tabindex:"-1"},ne=g({__name:"Layout",setup(t){const{page:s}=_(),{theme:o,setTheme:a}=Q();return(i,n)=>(l(),p(B,null,[n[2]||(n[2]=e("a",{class:"skip-link",href:"#main-content"},"Skip to content",-1)),e("div",ee,[y(W,{theme:f(o),onThemeChange:n[0]||(n[0]=(r,d)=>f(a)(r,d))},null,8,["theme"]),e("main",te,[f(s).isNotFound?(l(),k(A,{key:0})):(l(),k(H,{key:1}))]),n[1]||(n[1]=e("footer",{class:"site-footer"},[e("p",null,[e("span",null,"jinjiang.dev"),m(" · Code, systems, and open source")]),e("a",{href:"mailto:[email protected]"},"Get in touch ↗")],-1))])],64))}}),ae={Layout:ne};export{ae as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.