-
Notifications
You must be signed in to change notification settings - Fork 685
Expand file tree
/
Copy pathIndexLayout.js
More file actions
1 lines (1 loc) · 1.79 KB
/
IndexLayout.js
File metadata and controls
1 lines (1 loc) · 1.79 KB
1
import{d as y,y as k,z as S,i as t,A as w,B as L,l as B,o,D as I,p as z,w as c,r as s,G as C,H as N,s as u,a as n,u as p,c as v,m,b as A,I as V,t as $,_ as D}from"./cp3.js";import{A as H}from"./AppLayout.js";const P={class:"index-grid"},T=["aria-label"],E=["aria-expanded"],G=["name"],M={key:1,id:"nav-container"},Q={id:"content-pane",class:"bg-white border border-border-subtle rounded-sm shadow-sm @container",tabindex:"-1"},R=y({__name:"IndexLayout",props:{title:{},pageTitle:{},debug:{}},setup(d){const x=k(),r=S("(min-width: 768px)"),e=L("expanded"),b=u(()=>{const{default:a,...i}=x;return i}),_=u(()=>e.value==="expanded"?t("Hide sidebar"):t("Show sidebar"));function f(){e.value=e.value==="expanded"?"collapsed":"expanded"}const h=[{label:t("Skip to secondary navigation"),url:"#secondary-nav"},{label:t("Skip to content"),url:"#content-pane"}];return w(r,a=>{e.value=a?"expanded":"collapsed"},{immediate:!0}),(a,i)=>(o(),B(H,{"full-width":!0,title:d.title,debug:d.debug,"additional-skip-links":h},I({default:c(()=>[n("div",P,[n("nav",{id:"secondary-nav","aria-label":p(t)("Secondary"),tabindex:"-1"},[p(r)?m("",!0):(o(),v("craft-button",{key:0,type:"button","aria-controls":"nav-container","aria-expanded":e.value==="expanded",onClick:f,align:"start",class:"text-sm py-0 min-h-0"},[n("craft-icon",{slot:"suffix",name:e.value==="expanded"?"chevron-up":"chevron-down",style:V({fontSize:"0.8em",position:"relative",insetBlockStart:e.value==="expanded"?"1px":0})},null,12,G),A(" "+$(_.value),1)],8,E)),e.value==="expanded"?(o(),v("div",M,[s(a.$slots,"interior-nav",{state:e.value},void 0,!0)])):m("",!0)],8,T),n("div",Q,[s(a.$slots,"default",{},void 0,!0)])])]),_:2},[z(b.value,(j,l)=>({name:l,fn:c(g=>[s(a.$slots,l,C(N(g||{})),void 0,!0)])}))]),1032,["title","debug"]))}}),J=D(R,[["__scopeId","data-v-491f5c16"]]);export{J as I};