2 lines
1.5 KiB
JavaScript
2 lines
1.5 KiB
JavaScript
import{i as l,o as r,c as i,b as o,t as c,F as m,d as u,n as d,f as p}from"./app-CBssobj-.js";import"./SearchModal-BTKERLZv.js";import{_ as h}from"./_plugin-vue_export-helper-DlAUqK2U.js";const f={name:"PageSubSectionLinks",components:{Link:l},data(){return{currentNavSection:null,scrollTop:!1}},methods:{textLimit(e,a){if(e.length>a){let s;return s=e.substring(0,a),s+"..."}return e},isSameRoute(e){if(this.$page.props.ziggy.location===this.$page.props.ziggy.url+"/"+e)return!0}},props:{subSectionPages:{type:Object},currentSection:{type:String}}},x={class:"sticky top-[100px] hidden h-[calc(100vh-121px)] max-w-[20%] min-w-[20%] md:flex md:shrink-0 md:flex-col md:justify-between"},_={key:0,class:"styled-scrollbar flex h-[calc(100vh-200px)] flex-col overflow-y-scroll pr-2 pb-4"},g={class:"text-gray-1000 mb-2 text-md font-medium"},y={class:"flex gap-x-1"},b={class:"px-0.5 last-of-type:mb-0 mb-8"},S=["href"];function v(e,a,s,k,w,n){return r(),i("div",x,[this.subSectionPages?(r(),i("nav",_,[o("div",g,c(s.currentSection),1),o("div",y,[o("ul",b,[(r(!0),i(m,null,u(this.subSectionPages.data,t=>(r(),i("li",{key:t.id,class:"my-1.5 flex"},[o("a",{class:d([{"text-white font-semibold bg-primaryBlue":n.isSameRoute(t.path),"text-gray-600 hover:text-[#2C6288]":!n.isSameRoute(t.path)},"relative duration-300 flex gap-x-1 w-full rounded-md cursor-pointer items-center px-2 py-1 text-left text-sm"]),href:t.is_url?t.path:e.route("page.view",t.path)+"/"},c(t.title),11,S)]))),128))])])])):p("",!0)])}const z=h(f,[["render",v]]);export{z as P};
|