UNPKG

@xcpcio/board-app

Version:
2 lines (1 loc) 2.11 kB
import{d as c,u as m,e as k,f as h,g as _,c as w,o as C,n as s,b as o,h as n,a as x,r as L,w as B,t as G,i as H,l as I}from"./index-CYsJ2gG-.js";import{G as R,X as y}from"./index-BNZRV8LR.js";import{_ as z}from"./_plugin-vue_export-helper-DlAUqK2U.js";const D={class:"right","print:op0":""},N=["title"],O=["title"],T=["href"],$=["href"],E=c({__name:"NavBar",props:{width:null},setup(u){const e=u,{t:i,locale:r}=m(),{y:d}=k(),g=_();function f(){window.scrollTo({top:0,behavior:"smooth"})}async function b(){const l=H,t=l[(l.indexOf(r.value)+1)%l.length];await I(t),r.value=t}const p=h(()=>g.fullPath.startsWith("/rating")?"/rating":"/");return(l,t)=>{const v=L("RouterLink");return C(),w("header",{class:s(["header z-40",[(e==null?void 0:e.width)??""]])},[o("button",{title:"Scroll to top",fixed:"","bottom-6":"","right-6":"","z-100":"","h-10":"","w-10":"","rounded-full":"",transition:"","duration-300":"","print:hidden":"","hover-bg-hex-8883":"","hover:op100":"",class:s(n(d)>300?"op30":"op0! pointer-events-none"),onClick:t[0]||(t[0]=a=>f())},t[3]||(t[3]=[o("div",{"i-ri-arrow-up-line":""},null,-1)]),2),o("nav",{class:s(["nav",[e!=null&&e.width?"":"fixed"]]),"text-xl":""},[t[9]||(t[9]=o("div",{class:"spacer"},null,-1)),o("div",D,[x(v,{"icon-btn":"",title:n(i)("button.home"),to:n(p),focusable:"false"},{default:B(()=>t[4]||(t[4]=[o("div",{"i-ion-balloon-sharp":""},null,-1)])),_:1},8,["title","to"]),o("a",{"icon-btn":"",title:n(i)("button.toggle_langs"),onClick:t[1]||(t[1]=a=>b())},t[5]||(t[5]=[o("div",{"i-carbon-language":""},null,-1)]),8,N),o("a",{"icon-btn":"",title:n(i)("button.toggle_dark"),onClick:t[2]||(t[2]=a=>("toggleDark"in l?l.toggleDark:n(G))())},t[6]||(t[6]=[o("div",{i:"carbon-sun dark:carbon-moon"},null,-1)]),8,O),o("a",{"icon-btn":"",rel:"noreferrer",href:n(R),target:"_blank",title:"GitHub"},t[7]||(t[7]=[o("div",{"i-carbon-logo-github":""},null,-1)]),8,T),o("a",{"icon-btn":"",rel:"noreferrer",href:n(y),target:"_blank",title:"GitHub"},t[8]||(t[8]=[o("div",{"i-simple-icons-githubsponsors":""},null,-1)]),8,$)])],2)],2)}}}),V=z(E,[["__scopeId","data-v-e157f5ef"]]);export{V as _};