2 lines
7.4 KiB
JavaScript
2 lines
7.4 KiB
JavaScript
import{i as T,Z as C,r as m,o as l,c as n,a as d,w as x,b as t,F as g,d as f,f as p,n as v,T as L,j as w,g as _,t as a}from"./app-DmJ8GS-7.js";import{F as N}from"./v3-rkPj73qv.js";import{M as B}from"./MainNavbar-CBx37KIe.js";import{C as F}from"./ClientFooterDown-D8UuGhzW.js";import{s as M}from"./SearchModal.vue_vue_type_style_index_0_scoped_a4fc4416_lang-CbsljUTZ.js";import{_ as j}from"./_plugin-vue_export-helper-DlAUqK2U.js";/* empty css */const E={name:"Show",data(){return{scrollTop:!1,currentNavSection:null}},props:{division:{type:Object},divisions:{type:Object}},components:{ClientFooterDown:F,MainNavbar:B,Link:T,FsLightbox:N,Head:C},methods:{textLimit(e,i){if(e.length>i){let o;return o=e.substring(0,i),o+"..."}return e},openEditorImagesOnSlide:function(e){this.slide=e,this.toggler=!this.toggler},isSameRoute(e){if(this.$page.props.ziggy.location===e)return!0},generateSlug:function(e){return M(e,{lower:!0,strict:!0,locale:"ru"})},onScroll(e){window.top.scrollY>100?this.scrollTop=!0:this.scrollTop=!1},scrollToTop(){window.scrollTo(0,0)}},mounted(){window.addEventListener("scroll",this.onScroll),window.addEventListener("scroll",()=>{const e=document.querySelectorAll("h2"),i=document.querySelector("#visor");let o=null;const u=i.getBoundingClientRect();if(u.top>window.scrollY){this.currentNavSection=null,o=null;return}for(let h=0;h<e.length;h++){const r=e[h],c=r.getBoundingClientRect();if(c.top>=0&&c.bottom<=window.innerHeight&&c.bottom>=u.top&&c.top<=u.bottom){r!==o&&(this.currentNavSection=r.id,o=r);break}}})},beforeDestroy(){window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("scroll",this.onScroll)},computed:{}},D=t("meta",{name:"description",content:"Your page description"},null,-1),R=t("div",{class:"w-full h-[67px] fixed",id:"visor"},null,-1),z={class:"relative mx-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10"},H={class:"sticky top-[110px] hidden h-[calc(100vh-110px)] max-w-[20%] md:flex md:shrink-0 md:flex-col md:justify-between"},V={key:0,class:"styled-scrollbar flex h-[calc(100vh-200px)] flex-col overflow-y-scroll pr-2 pb-4"},I=t("div",{class:"text-gray-1000 mb-2 text-md font-medium"},"Подразделения",-1),O={class:"flex gap-x-1"},Y={class:"px-0.5 last-of-type:mb-0 mb-8"},q=["href"],P={class:"order-last hidden w-56 shrink-0 lg:block"},A={class:"sticky top-[110px] h-[calc(100vh-110px)]"},Z=t("div",{class:"text-gray-1000 mb-2 text-md font-medium"},"На этой странице",-1),G={class:"styled-scrollbar max-h-[70vh] space-y-1.5 overflow-y-auto py-2 text-sm"},J={key:0,class:"anchor-li"},K=t("button",{class:"bg-transperant text-gray-600 cursor-pointer hover:text-gray-900 duration-300 block px-2 leading-[1.6] rounded-md"},"К началу",-1),Q=t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-[17px] text-gray-600"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 11.25l-3-3m0 0l-3 3m3-3v7.5M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1),U=[K,Q],W={class:"w-full min-w-0 mt-1 max-w-6xl px-1 md:px-6",style:{}},X={class:"space-y-5 md:space-y-5"},$={class:"flex justify-between items-center mb-6"},tt={class:"flex w-full sm:items-center gap-x-5 sm:gap-x-3"},et={class:"grow"},st={class:"grid sm:flex sm:justify-between sm:items-center gap-2"},ot={class:"flex items-center whitespace-normal min-w-0","aria-label":"Breadcrumb"},it=t("li",{class:"text-sm"},[t("span",{class:"flex items-center text-gray-500 hover:text-blue-600"},[_(" Главная "),t("svg",{class:"flex-shrink-0 mx-3 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})])])],-1),lt={class:"text-sm"},nt=t("svg",{class:"flex-shrink-0 mx-3 overflow-visible h-2.5 w-2.5 text-gray-400",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M5 1L10.6869 7.16086C10.8637 7.35239 10.8637 7.64761 10.6869 7.83914L5 14",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round"})],-1),rt={class:"space-y-3"},at={class:"text-2xl mb-10 font-bold md:text-3xl"},ct={id:"page-area",class:"space-y-5 md:space-y-5"},dt={key:0,id:"persons",class:"font-bold text-xl"},ht={class:"flex flex-col rounded-xl p-4 md:p-6 bg-white border border-gray-200 dark:bg-slate-900 dark:border-gray-700"},mt={class:"flex items-center gap-x-4"},pt=["src"],ut={class:"grow"},xt={key:0,class:"text-xs text-gray-500 mt-2"},gt={class:"text-xs text-gray-500 mt-2"},_t={class:"text-xs text-gray-500 mt-2"},ft=t("p",{class:"text-xs text-gray-500 mt-2"}," Кабинет: 207В ",-1);function vt(e,i,o,u,h,r){const c=m("Head"),y=m("MainNavbar"),b=m("Link"),k=m("ClientFooterDown"),S=m("FsLightbox");return l(),n(g,null,[d(c,null,{default:x(()=>[t("title",null,a(o.division.data.title),1),D]),_:1}),d(y,{class:"border-b",sections:e.$page.props.navigation},null,8,["sections"]),R,t("div",z,[t("div",H,[this.divisions?(l(),n("nav",V,[I,t("div",O,[t("ul",Y,[(l(!0),n(g,null,f(this.divisions.data,s=>(l(),n("li",{key:s.id,class:"my-1.5 flex"},[t("a",{class:v([{"text-white hover:text-gray-200 font-semibold bg-[#135aae]":r.isSameRoute(e.route("client.division.show",s.slug)),"text-gray-600 hover:text-[#2C6288]":!r.isSameRoute(e.route("client.division.show",s.id))},"relative duration-300 flex w-full rounded-md cursor-pointer items-center px-2 py-1 text-left text-sm"]),href:e.route("client.division.show",s.slug)+"/"},a(s.title),11,q)]))),128))])])])):p("",!0)]),t("nav",P,[t("div",A,[Z,t("ul",G,[o.division.data.workers.length>0?(l(),n("li",J,[t("a",{class:v([{"translate-x-2 text-[#135aae]":this.currentNavSection==="persons","bg-transperant text-gray-600 hover:text-gray-900":this.currentNavSection!=="persons"},"duration-150 block py-1 px-2 leading-[1.6] rounded-md"]),href:"#persons"},"Состав",2)])):p("",!0),d(L,{name:"fade"},{default:x(()=>[h.scrollTop?(l(),n("li",{key:0,class:"anchor-li flex items-center py-2 border-t",onClick:i[0]||(i[0]=w((...s)=>r.scrollToTop&&r.scrollToTop(...s),["prevent"]))},U)):p("",!0)]),_:1})])])]),t("article",W,[t("div",X,[t("div",$,[t("div",tt,[t("div",et,[t("div",st,[t("ol",ot,[it,t("li",lt,[t("span",{class:"flex items-center text-gray-500 hover:text-blue-600",onClick:i[1]||(i[1]=w(()=>{},["prevent"]))},[_(" Факультеты "),nt])])])])])])]),t("div",rt,[t("h1",at,a(o.division.data.title),1)]),t("div",ct,[o.division.data.workers.length>0?(l(),n("h2",dt,"Состав")):p("",!0),(l(!0),n(g,null,f(o.division.data.workers,s=>(l(),n("div",ht,[t("div",mt,[t("img",{loading:"lazy",class:"rounded-xl w-[150px]",src:"/storage/"+s.details.photo,alt:"Image Description"},null,8,pt),t("div",ut,[d(b,{href:e.route("client.person.show",s.id),class:"font-medium text-gray-800 hover:text-gray-500 underline"},{default:x(()=>[_(a(s.administrativePosition)+": "+a(s.name),1)]),_:2},1032,["href"]),s.details.academicTitle?(l(),n("p",xt," Ученая степень: "+a(s.details.academicTitle),1)):p("",!0),t("p",gt," Контактный телефон: "+a(s.details.contactPhone),1),t("p",_t," Электронная почта: "+a(s.details.contactEmail),1),ft])])]))),256))])])])]),d(k),d(S,{class:"z-1000",slide:e.slide,toggler:e.toggler,sources:e.editorImages},null,8,["slide","toggler","sources"])],64)}const Lt=j(E,[["render",vt]]);export{Lt as default};
|