HugoDzz's picture
feat: responsive design
7895b26
raw
history blame
6.7 kB
import{S as oe,i as ce,s as ne,k as a,q as b,a as A,l as i,m as n,r as g,h as r,c as z,n as l,b as G,G as t,H as le,I as fe,o as ue,J as ie,K as de,L as pe,u as he}from"../chunks/index.0d3f7c7a.js";import{p as me}from"../chunks/stores.bd2e29f1.js";const xe=""+new URL("../assets/preview.69504cb0.png",import.meta.url).href;function se(V){let e,s,f,h,o,d,m,k,v,S,y,w,c,_,u;return{c(){e=a("div"),s=a("iframe"),h=A(),o=a("div"),d=A(),m=a("div"),k=A(),v=a("div"),S=A(),y=a("div"),w=A(),c=a("div"),_=a("p"),u=b("Use arrow keys. SPACE to fire."),this.h()},l(x){e=i(x,"DIV",{class:!0});var p=n(e);s=i(p,"IFRAME",{src:!0,frameborder:!0,title:!0,height:!0,width:!0,class:!0}),n(s).forEach(r),h=z(p),o=i(p,"DIV",{class:!0}),n(o).forEach(r),d=z(p),m=i(p,"DIV",{class:!0}),n(m).forEach(r),k=z(p),v=i(p,"DIV",{class:!0}),n(v).forEach(r),S=z(p),y=i(p,"DIV",{class:!0}),n(y).forEach(r),p.forEach(r),w=z(x),c=i(x,"DIV",{class:!0});var D=n(c);_=i(D,"P",{});var L=n(_);u=g(L,"Use arrow keys. SPACE to fire."),L.forEach(r),D.forEach(r),this.h()},h(){ie(s.src,f="game/index.html")||l(s,"src",f),l(s,"frameborder","0"),l(s,"title","Spaceship Drift"),l(s,"height","512"),l(s,"width","512"),l(s,"class",""),l(o,"class","h-[3px] bg-[#0C0F19] w-[3px] z-10 absolute -top-[3px] -left-[3px]"),l(m,"class","h-[3px] bg-[#0C0F19] w-[3px] z-10 absolute -bottom-[3px] -left-[3px]"),l(v,"class","h-[3px] bg-[#0C0F19] w-[3px] z-10 absolute -top-[3px] -right-[3px]"),l(y,"class","h-[3px] bg-[#0C0F19] w-[3px] z-10 absolute -bottom-[3px] -right-[3px]"),l(e,"class","relative mt-10 border-slate-800 border-[3px]"),l(c,"class","flex flex-row justify-center items-center text-[9px] mt-4 text-slate-500")},m(x,p){G(x,e,p),t(e,s),t(e,h),t(e,o),t(e,d),t(e,m),t(e,k),t(e,v),t(e,S),t(e,y),G(x,w,p),G(x,c,p),t(c,_),t(_,u)},d(x){x&&r(e),x&&r(w),x&&r(c)}}}function re(V){let e,s,f,h,o,d,m,k,v,S=V[1]?"Copied!":"Copy the link for later",y,w,c;return{c(){e=a("div"),s=a("img"),h=A(),o=a("p"),d=b("Looks like you're on mobile! Please visit on your laptop."),m=A(),k=a("button"),v=a("p"),y=b(S),this.h()},l(_){e=i(_,"DIV",{class:!0});var u=n(e);s=i(u,"IMG",{src:!0,alt:!0,class:!0,height:!0,width:!0}),h=z(u),o=i(u,"P",{class:!0});var x=n(o);d=g(x,"Looks like you're on mobile! Please visit on your laptop."),x.forEach(r),m=z(u),k=i(u,"BUTTON",{class:!0});var p=n(k);v=i(p,"P",{class:!0});var D=n(v);y=g(D,S),D.forEach(r),p.forEach(r),u.forEach(r),this.h()},h(){ie(s.src,f=xe)||l(s,"src",f),l(s,"alt","Preview of the game"),l(s,"class","w-60 border-slate-800 border-[2px]"),l(s,"height","64"),l(s,"width","64"),l(o,"class","text-xs text-slate-500 mt-6"),l(v,"class","mt-1"),l(k,"class","flex flex-row justify-center items-center px-3 py-5 text-xs w-full bg-slate-800 mt-6"),l(e,"class","flex flex-col justify-center items-center mt-10 text-center")},m(_,u){G(_,e,u),t(e,s),t(e,h),t(e,o),t(o,d),t(e,m),t(e,k),t(k,v),t(v,y),w||(c=de(k,"click",pe(V[2])),w=!0)},p(_,u){u&2&&S!==(S=_[1]?"Copied!":"Copy the link for later")&&he(y,S)},d(_){_&&r(e),w=!1,c()}}}function ae(V){let e,s,f,h;return{c(){e=a("p"),s=b("It's all about "),f=a("a"),h=b("game feel"),this.h()},l(o){e=i(o,"P",{class:!0});var d=n(e);s=g(d,"It's all about "),f=i(d,"A",{href:!0,target:!0,class:!0});var m=n(f);h=g(m,"game feel"),m.forEach(r),d.forEach(r),this.h()},h(){l(f,"href","https://arxiv.org/pdf/2011.09201.pdf"),l(f,"target","_blank"),l(f,"class","tex-center underline"),l(e,"class","text-center mt-2 text-[9px] text-slate-500")},m(o,d){G(o,e,d),t(e,s),t(e,f),t(f,h)},d(o){o&&r(e)}}}function ve(V){let e,s,f,h,o,d,m,k,v,S,y,w,c,_,u,x,p,D,L,R,T,B,J,F,K,N,H,O,U,I=!V[0]&&se(),E=V[0]&&re(V),P=!V[0]&&ae();return{c(){e=a("div"),s=a("div"),f=a("h1"),h=b("Spaceship freeride"),o=A(),d=a("p"),m=b("Take a break and enjoy a little freeride."),k=A(),I&&I.c(),v=A(),E&&E.c(),S=A(),P&&P.c(),y=A(),w=a("div"),c=a("p"),_=b("Made by "),u=a("a"),x=b("Hugo"),p=b(`
with
`),D=a("a"),L=b("Godot"),R=b(`,
`),T=a("a"),B=b("Svelte"),J=b(`,
`),F=a("a"),K=b("Scenario"),N=b(`, and
`),H=a("a"),O=b("Pixelicious"),this.h()},l(j){e=i(j,"DIV",{class:!0});var C=n(e);s=i(C,"DIV",{class:!0});var q=n(s);f=i(q,"H1",{class:!0});var W=n(f);h=g(W,"Spaceship freeride"),W.forEach(r),o=z(q),d=i(q,"P",{class:!0});var Q=n(d);m=g(Q,"Take a break and enjoy a little freeride."),Q.forEach(r),q.forEach(r),k=z(C),I&&I.l(C),v=z(C),E&&E.l(C),S=z(C),P&&P.l(C),y=z(C),w=i(C,"DIV",{class:!0});var X=n(w);c=i(X,"P",{});var M=n(c);_=g(M,"Made by "),u=i(M,"A",{href:!0,target:!0,class:!0});var Y=n(u);x=g(Y,"Hugo"),Y.forEach(r),p=g(M,`
with
`),D=i(M,"A",{href:!0,target:!0,class:!0});var Z=n(D);L=g(Z,"Godot"),Z.forEach(r),R=g(M,`,
`),T=i(M,"A",{href:!0,target:!0,class:!0});var $=n(T);B=g($,"Svelte"),$.forEach(r),J=g(M,`,
`),F=i(M,"A",{href:!0,target:!0,class:!0});var ee=n(F);K=g(ee,"Scenario"),ee.forEach(r),N=g(M,`, and
`),H=i(M,"A",{href:!0,target:!0,class:!0});var te=n(H);O=g(te,"Pixelicious"),te.forEach(r),M.forEach(r),X.forEach(r),C.forEach(r),this.h()},h(){l(f,"class","text-xl capitalize"),l(d,"class","text-xs"),l(s,"class","flex flex-col justify-center items-center space-y-4 text-center sm:mt-20 mt-12"),l(u,"href","https://www.hugoduprez.com/"),l(u,"target","_blank"),l(u,"class","underline"),l(D,"href","https://godotengine.org/"),l(D,"target","_blank"),l(D,"class","underline"),l(T,"href","https://svelte.dev/"),l(T,"target","_blank"),l(T,"class","underline"),l(F,"href","https://www.scenario.com/"),l(F,"target","_blank"),l(F,"class","underline"),l(H,"href","https://www.pixelicious.xyz/"),l(H,"target","_blank"),l(H,"class","underline"),l(w,"class",U="flex flex-row justify-center items-center text-center "+(V[0]?"mt-20":"fixed bottom-6")+" text-[9px] text-slate-500"),l(e,"class","flex flex-col justify-center text-slate-100 font-Hellovetica items-center p-4 w-full")},m(j,C){G(j,e,C),t(e,s),t(s,f),t(f,h),t(s,o),t(s,d),t(d,m),t(e,k),I&&I.m(e,null),t(e,v),E&&E.m(e,null),t(e,S),P&&P.m(e,null),t(e,y),t(e,w),t(w,c),t(c,_),t(c,u),t(u,x),t(c,p),t(c,D),t(D,L),t(c,R),t(c,T),t(T,B),t(c,J),t(c,F),t(F,K),t(c,N),t(c,H),t(H,O)},p(j,[C]){j[0]?I&&(I.d(1),I=null):I||(I=se(),I.c(),I.m(e,v)),j[0]?E?E.p(j,C):(E=re(j),E.c(),E.m(e,S)):E&&(E.d(1),E=null),j[0]?P&&(P.d(1),P=null):P||(P=ae(),P.c(),P.m(e,y)),C&1&&U!==(U="flex flex-row justify-center items-center text-center "+(j[0]?"mt-20":"fixed bottom-6")+" text-[9px] text-slate-500")&&l(w,"class",U)},i:le,o:le,d(j){j&&r(e),I&&I.d(),E&&E.d(),P&&P.d()}}}function _e(V,e,s){let f;fe(V,me,m=>s(3,f=m));let h=!1,o=!1;ue(()=>{window.innerWidth<768&&s(0,h=!0)});function d(){navigator.clipboard.writeText(f.url.toString()),s(1,o=!0)}return[h,o,d]}class we extends oe{constructor(e){super(),ce(this,e,_e,ve,ne,{})}}export{we as component};