mirror of
https://github.com/NotXia/notxia.github.io.git
synced 2025-12-14 19:01:51 +01:00
2 lines
6.9 KiB
JavaScript
2 lines
6.9 KiB
JavaScript
import{i as C,_ as D}from"./5XfhJFCT.js";import{d as w,u as B,r as x,g as M,o as S,a as j,b as L,c,e as d,f as e,h as k,w as p,v as _,i as n,t as y,j as N,k as P,l as R,m as v,n as U,p as r,F as E}from"./BerSmlZi.js";import{_ as F}from"./C_GD9Inf.js";const I=""+new URL("picture-dark.lZoHd34_.png",import.meta.url).href,T=""+new URL("picture-light.Cu7IiVnU.png",import.meta.url).href,V=""+new URL("picture-bright.BMg2juJv.png",import.meta.url).href,z=""+new URL("picture-nolight.BjyWP7L-.png",import.meta.url).href,O={class:"relative"},X={class:"flex items-center h-60 w-60"},Y={src:I,alt:"",class:"max-h-full max-w-full"},A={src:T,alt:"",class:"max-h-full max-w-full"},G={src:V,alt:"",class:"max-h-full max-w-full"},H={src:z,alt:"",class:"max-h-full max-w-full"},W={key:0,class:"absolute bottom-0 left-0 w-full"},J={class:"w-fit mx-auto px-2 pt-1 mb-1 bg-gray-200 dark:bg-gray-700"},Z=w({__name:"ProfilePicture",setup($){const{t:l}=B(),s=x(M()),i=x("");return S(()=>{var f;let a=(f=document.querySelector("html"))!=null&&f.classList.contains("dark")?"dark1":"light1",t={dark1:{image:"dark",message:"",expect:"dark",next:"bright"},bright:{image:"bright",message:"that's bright",expect:"light",next:"dark2"},dark2:{image:"dark",message:"better",expect:"dark",next:"light_final"},light1:{image:"light",message:"",expect:"light",next:"nolights"},nolights:{image:"no light",message:"where lights",expect:"dark",next:"light2"},light2:{image:"light",message:"here lights",expect:"light",next:"dark_final"},dark_final:{image:"dark",message:"",expect:"dark",next:"light_final"},light_final:{image:"light",message:"",expect:"light",next:"dark_final"}};function o(){var m,b,g;s.value=(m=t[a])==null?void 0:m.image,i.value=((b=t[a])==null?void 0:b.message)!==""?l((g=t[a])==null?void 0:g.message):""}function u(){var m;a=(m=t[a])==null?void 0:m.next}o();let h=new MutationObserver(function(m){var g,q;if(!((g=j().name)!=null&&g.toString().startsWith("about"))){h.disconnect();return}const b=(q=document.querySelector("html"))==null?void 0:q.classList.contains("dark");t[t[a].next].expect===(b?"dark":"light")&&(u(),o(),a==="bright"?L("picture-bright"):a==="nolights"&&L("picture-nolights"))});h.observe(document.querySelector("html"),{attributes:!0,attributeFilter:["class"]})}),(a,t)=>(d(),c("div",O,[e("div",X,[p(e("img",Y,null,512),[[_,n(s)==="dark"]]),p(e("img",A,null,512),[[_,n(s)==="light"]]),p(e("img",G,null,512),[[_,n(s)==="bright"]]),p(e("img",H,null,512),[[_,n(s)==="no light"]])]),n(i)?(d(),c("div",W,[e("p",J,y(n(i)),1)])):k("",!0)]))}}),K={class:"h-full w-fit"},Q={key:0,class:"flex h-full w-full items-center justify-center"},ee={id:"gr_grid_widget_1673812364",class:"h-full"},te=w({__name:"Goodreads",setup($){const l=x(!0);return S(()=>{var a;document.querySelector("#script-goodreads")&&((a=document.querySelector("#script-goodreads"))==null||a.remove());let s=document.createElement("script");s.src="https://www.goodreads.com/review/grid_widget/158866642?cover_size=medium&hide_link=true&hide_title=true&num_books=20&order=d&shelf=currently-reading&sort=date_updated&widget_id=1673812364",s.id="script-goodreads",s.type="text/javascript",document.getElementsByTagName("head")[0].appendChild(s);let i=new MutationObserver(function(t){document.querySelectorAll("#gr_grid_widget_1673812364 > * img").forEach(o=>o.src=o.src.replace("_SX98_","_SY475_")),i.disconnect(),l.value=!1});i.observe(document.querySelector("#gr_grid_widget_1673812364"),{childList:!0})}),(s,i)=>(d(),c("div",K,[n(l)?(d(),c("div",Q,i[0]||(i[0]=[e("span",{class:"animate-ping absolute inline-flex h-5 w-5 rounded-full bg-slate-800 dark:bg-slate-200 opacity-75"},null,-1)]))):k("",!0),p(e("div",ee,null,512),[[_,!n(l)]])]))}}),ae={class:"flex flex-col md:flex-row md:justify-between items-center h-full"},se={class:"text-xl order-2 md:order-1 [&>*>p]:mb-2"},ie={class:"text-5xl font-bold mb-5"},oe={key:0},re={key:1},ne={class:"order-1 mb-3 ml-0 md:order-2 md:mb-0 md:ml-10"},le={class:"mt-5"},ce={class:"text-center text-xl"},de={class:"flex justify-center h-48"},pe=w({__name:"about",setup($){const{t:l,locale:s}=B(),i=x(s.value);return N({title:l("title_about")}),P(()=>{const a=new Date,t=new Date(2001,8,29),o=a.getMonth()-t.getMonth();let u=a.getFullYear()-t.getFullYear();return(o<0||o===0&&a.getDate()<t.getDate())&&u--,u}),S(()=>{C()}),R(s,()=>{i.value=s.value}),(a,t)=>{const o=D,u=Z,h=te,f=F;return d(),c(E,null,[v(o),v(f,null,{default:U(()=>[e("main",null,[e("div",ae,[e("div",se,[e("h1",ie,y(a.$t("about me")),1),n(i)==="it"?(d(),c("div",oe,t[0]||(t[0]=[e("p",null,[r(" Mi chiamo "),e("span",{"data-popover-target":"popover-name",class:"underline decoration-dashed decoration-slate-900/70 dark:decoration-slate-50/70"},"Tian Cheng"),r(", spesso conosciuto come "),e("span",{"data-popover-target":"popover-surname",class:"underline decoration-dashed decoration-slate-900/70 dark:decoration-slate-50/70"},"Xia"),r(" (cognome) o Riccardo. Studio artificial intelligence all'Università di Bologna e al momento i miei interessi sono orientati verso l'ambito NLP. ")],-1),e("p",null,[r(" Oltre a premere tasti sulla tastiera, mi piace leggere, sperimentare in cucina "),e("span",{class:"text-xs"},"(preferibilmente con un estintore nei paraggi)"),r(", giocare a giochi strategici e spendere decisamente troppo tempo sul mio home server. ")],-1),e("p",null," Dovrei probabilmente scrivere qualcos'altro, ma sono terribile a scrivere biografie, quindi tieni una ciambella 🍩. ",-1)]))):k("",!0),n(i)==="en"?(d(),c("div",re,t[1]||(t[1]=[e("p",null,[r(" My name is "),e("span",{"data-popover-target":"popover-name",class:"underline decoration-dashed decoration-slate-900/70 dark:decoration-slate-50/70"},"Tian Cheng"),r(", frequently known as "),e("span",{"data-popover-target":"popover-surname",class:"underline decoration-dashed decoration-slate-900/70 dark:decoration-slate-50/70"},"Xia"),r(" (surname) or Riccardo. I am an artificial intelligence student at the University of Bologna and currently my interests are focused on natural language processing. ")],-1),e("p",null,[r(" Aside from pressing keys on a keyboard, I like reading, cooking "),e("span",{class:"text-xs"},"(preferably with a fire extinguisher nearby)"),r(", playing strategic games and spending way too much time on my home server. ")],-1),e("p",null," I should probably write some more about me, but I'm terrible at writing biographies, so here's a donut 🍩. ",-1)]))):k("",!0)]),e("div",ne,[v(u)])]),e("div",le,[e("p",ce,y(a.$t("reading")),1),e("div",de,[v(h)])])])]),_:1}),t[2]||(t[2]=e("div",{"data-popover":"",id:"popover-name",role:"tooltip",class:"absolute z-10 invisible inline-block transition-opacity duration-500 opacity-0"},[e("div",{class:"text-lg px-3 py-2 bg-slate-200 dark:bg-slate-800 rounded"}," 天成 ")],-1)),t[3]||(t[3]=e("div",{"data-popover":"",id:"popover-surname",role:"tooltip",class:"absolute z-10 invisible inline-block transition-opacity duration-500 opacity-0"},[e("div",{class:"text-lg px-3 py-2 bg-slate-200 dark:bg-slate-800 rounded"}," 夏 ")],-1))],64)}}});export{pe as default};
|