mirror of
https://github.com/NotXia/notxia.github.io.git
synced 2025-12-15 19:22:21 +01:00
2 lines
7.2 KiB
JavaScript
2 lines
7.2 KiB
JavaScript
import{i as P,_ as B}from"./gp3R1XhC.js";import{d as y,u as N,r as b,g as C,o as $,a as D,b as L,c,e as d,f as e,w as g,v as p,h as r,t as k,i as w,j as I,k as M,l as T,m as x,n as j,F as R,p as s}from"./DsR9bTA4.js";import{_ as U}from"./CDMOTDx0.js";const E=""+new URL("picture-dark.lZoHd34_.png",import.meta.url).href,F=""+new URL("picture-light.Cu7IiVnU.png",import.meta.url).href,A=""+new URL("picture-bright.BMg2juJv.png",import.meta.url).href,V=""+new URL("picture-nolight.BjyWP7L-.png",import.meta.url).href,z={class:"relative"},J={class:"flex items-center h-60 w-60"},O={src:E,alt:"",class:"max-h-full max-w-full"},X={src:F,alt:"",class:"max-h-full max-w-full"},Y={src:A,alt:"",class:"max-h-full max-w-full"},G={src:V,alt:"",class:"max-h-full max-w-full"},H={key:0,class:"absolute bottom-0 left-0 w-full"},W={class:"w-fit mx-auto px-2 pt-1 mb-1 bg-gray-200 dark:bg-gray-700"},Z=y({__name:"ProfilePicture",setup(S){const{t:l}=N(),a=b(C()),i=b("");return $(()=>{var f;let t=(f=document.querySelector("html"))!=null&&f.classList.contains("dark")?"dark1":"light1",o={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 n(){var m,v,_;a.value=(m=o[t])==null?void 0:m.image,i.value=((v=o[t])==null?void 0:v.message)!==""?l((_=o[t])==null?void 0:_.message):""}function u(){var m;t=(m=o[t])==null?void 0:m.next}n();let h=new MutationObserver(function(m){var _,q;if(!((_=D().name)!=null&&_.toString().startsWith("about"))){h.disconnect();return}const v=(q=document.querySelector("html"))==null?void 0:q.classList.contains("dark");o[o[t].next].expect===(v?"dark":"light")&&(u(),n(),t==="bright"?L("picture-bright"):t==="nolights"&&L("picture-nolights"))});h.observe(document.querySelector("html"),{attributes:!0,attributeFilter:["class"]})}),(t,o)=>(c(),d("div",z,[e("div",J,[g(e("img",O,null,512),[[p,r(a)==="dark"]]),g(e("img",X,null,512),[[p,r(a)==="light"]]),g(e("img",Y,null,512),[[p,r(a)==="bright"]]),g(e("img",G,null,512),[[p,r(a)==="no light"]])]),r(i)?(c(),d("div",H,[e("p",W,k(r(i)),1)])):w("",!0)]))}}),K={class:"h-full w-fit"},Q={key:0,class:"flex h-full w-full items-center justify-center"},ee=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),te=[ee],se={id:"gr_grid_widget_1673812364",class:"h-full"},ae=y({__name:"Goodreads",setup(S){const l=b(!0);return $(()=>{var t;document.querySelector("#script-goodreads")&&((t=document.querySelector("#script-goodreads"))==null||t.remove());let a=document.createElement("script");a.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",a.id="script-goodreads",a.type="text/javascript",document.getElementsByTagName("head")[0].appendChild(a);let i=new MutationObserver(function(o){document.querySelectorAll("#gr_grid_widget_1673812364 > * img").forEach(n=>n.src=n.src.replace("_SX98_","_SY475_")),i.disconnect(),l.value=!1});i.observe(document.querySelector("#gr_grid_widget_1673812364"),{childList:!0})}),(a,i)=>(c(),d("div",K,[r(l)?(c(),d("div",Q,te)):w("",!0),g(e("div",se,null,512),[[p,!r(l)]])]))}}),oe={class:"flex flex-col md:flex-row md:justify-between items-center h-full"},ie={class:"text-xl order-2 md:order-1 [&>*>p]:mb-2"},ne={class:"text-5xl font-bold mb-5"},re={key:0},le=e("p",null,[s(" Mi chiamo "),e("span",{"data-popover-target":"popover-name",class:"underline decoration-dashed decoration-slate-900/70 dark:decoration-slate-50/70"},"Tian Cheng"),s(", spesso conosciuto come "),e("span",{"data-popover-target":"popover-surname",class:"underline decoration-dashed decoration-slate-900/70 dark:decoration-slate-50/70"},"Xia"),s(" (cognome) o Riccardo. Studio artificial intelligence all'Università di Bologna e al momento i miei interessi sono orientati verso l'ambito NLP. ")],-1),ce=e("p",null,[s(" Oltre a premere tasti sulla tastiera, mi piace leggere, sperimentare in cucina "),e("span",{class:"text-xs"},"(preferibilmente con un estintore nei paraggi)"),s(" e giocare a giochi strategici. ")],-1),de=e("p",null,[s(" Secondo "),e("a",{class:"hover:underline italic",href:"https://www.16personalities.com"},"16Personalities"),s(" sono un "),e("a",{class:"font-mono hover:underline",href:"https://www.16personalities.com/profiles/6b57f54bf1242"},"Architetto (INTJ)"),s(". Devo dire che la descrizione è decisamente accurata. ")],-1),ue=[le,ce,de],me={key:1},_e=e("p",null,[s(" 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"),s(", frequently known as "),e("span",{"data-popover-target":"popover-surname",class:"underline decoration-dashed decoration-slate-900/70 dark:decoration-slate-50/70"},"Xia"),s(" (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),ge=e("p",null,[s(" Aside from pressing keys on a keyboard, I like reading, cooking "),e("span",{class:"text-xs"},"(preferably with a fire extinguisher nearby)"),s(" and playing strategic games. ")],-1),pe=e("p",null,[s(" According to "),e("a",{class:"hover:underline italic",href:"https://www.16personalities.com"},"16Personalities"),s(", I'm an "),e("a",{class:"font-mono hover:underline",href:"https://www.16personalities.com/profiles/6b57f54bf1242"},"Architect (INTJ)"),s(". I must admit that the description is quite accurate. ")],-1),he=[_e,ge,pe],fe={class:"order-1 mb-3 ml-0 md:order-2 md:mb-0 md:ml-10"},ve={class:"mt-5"},xe={class:"text-center text-xl"},be={class:"flex justify-center h-48"},we=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),ke=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),qe=y({__name:"about",setup(S){const{t:l,locale:a}=N(),i=b(a.value);return I({title:l("title_about")}),M(()=>{const t=new Date,o=new Date(2001,8,29),n=t.getMonth()-o.getMonth();let u=t.getFullYear()-o.getFullYear();return(n<0||n===0&&t.getDate()<o.getDate())&&u--,u}),$(()=>{P()}),T(a,()=>{i.value=a.value}),(t,o)=>{const n=B,u=Z,h=ae,f=U;return c(),d(R,null,[x(n),x(f,null,{default:j(()=>[e("main",null,[e("div",oe,[e("div",ie,[e("h1",ne,k(t.$t("about me")),1),r(i)==="it"?(c(),d("div",re,ue)):w("",!0),r(i)==="en"?(c(),d("div",me,he)):w("",!0)]),e("div",fe,[x(u)])]),e("div",ve,[e("p",xe,k(t.$t("reading")),1),e("div",be,[x(h)])])])]),_:1}),we,ke],64)}}});export{qe as default};
|