3 lines
16 KiB
JavaScript
3 lines
16 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/HeadingBlock-DbGhNdUV.js","assets/SearchModal-YI3bdWA9.js","assets/_plugin-vue_export-helper-DlAUqK2U.js","assets/app-lT3z3TR3.js","assets/app-CUj9x2C4.css","assets/SearchModal-XsSd7Wc_.css","assets/ParagraphBlock-CY6u9Wiw.js","assets/ParagraphBlock-DFLxgZzs.css","assets/ClientImageSlider-CGZZYYI8.js","assets/v3-B5UP5GZw.js","assets/ImageBlock-BGzd5IG-.js","assets/FormBlock-CjbQ7Xd1.css","assets/FileBlock-nf933WYq.js","assets/PersonBlock-BB-W9rc6.js","assets/StepperBlock-Cu2GWV_C.js","assets/StepperBlock-DNUyIEMk.css","assets/VideoBlock-D_jPywlE.js","assets/TabBlock-DmUdJI4Y.js","assets/PageTabBuilder-CXLfoCo_.js","assets/HeadingBlock-DZAeIVzd.js","assets/ParagraphBlock-_EhfXk9v.js","assets/ImageBlock-cPU_Sbw4.js","assets/FileBlock-BU1S9yFx.js","assets/PersonBlock-MXpsfzV_.js","assets/PersonBlock-BcupJ_c5.css","assets/StepperBlock-DhPHG4yx.js","assets/VideoBlock-BcEyk91j.js","assets/PostListBlock-Vo9iG3Sb.js","assets/PostListBlock-C5UxMLFg.js","assets/PageItemBlock-BdYSYA-n.js","assets/PostItemBlock-B3bvWdQ2.js","assets/FormBlock-C_74keKQ.js","assets/FormBuilder-C25m8kmA.js","assets/FormBuilder-BDwIWzAo.css"])))=>i.map(i=>d[i]);
|
||
import{f as T,o as n,c as l,d as y,e as C,g as D,F as f,_ as m,i as B,r as x,b as e,a,w as g,p as k,j as _,t as d,l as h,Z as I,n as b,T as M}from"./app-lT3z3TR3.js";import{F as P}from"./v3-B5UP5GZw.js";import{B as R,C as O,s as V}from"./SearchModal-YI3bdWA9.js";import{_ as S}from"./_plugin-vue_export-helper-DlAUqK2U.js";/* empty css */import{M as A}from"./MainPageNavbar-BfM50q-7.js";const q={name:"DivisionBuilder",components:{},methods:{getComponent(s){return T({heading:()=>m(()=>import("./HeadingBlock-DbGhNdUV.js"),__vite__mapDeps([0,1,2,3,4,5])),paragraph:()=>m(()=>import("./ParagraphBlock-CY6u9Wiw.js"),__vite__mapDeps([6,1,2,3,4,5,7])),images:()=>m(()=>import("./ClientImageSlider-CGZZYYI8.js"),__vite__mapDeps([8,9,3,4,2])),image:()=>m(()=>import("./ImageBlock-BGzd5IG-.js"),__vite__mapDeps([10,1,2,3,4,5,9,11])),files:()=>m(()=>import("./FileBlock-nf933WYq.js"),__vite__mapDeps([12,1,2,3,4,5,9,11])),person:()=>m(()=>import("./PersonBlock-BB-W9rc6.js"),__vite__mapDeps([13,1,2,3,4,5,9,11])),stepper:()=>m(()=>import("./StepperBlock-Cu2GWV_C.js"),__vite__mapDeps([14,1,2,3,4,5,9,15])),video:()=>m(()=>import("./VideoBlock-D_jPywlE.js"),__vite__mapDeps([16,1,2,3,4,5,9])),tabs:()=>m(()=>import("./TabBlock-DmUdJI4Y.js"),__vite__mapDeps([17,1,2,3,4,5,18,19,20,7,8,9,21,11,22,23,24,25,15,26,27])),postsList:()=>m(()=>import("./PostListBlock-C5UxMLFg.js"),__vite__mapDeps([28,1,2,3,4,5,11])),postItem:()=>m(()=>import("./PageItemBlock-BdYSYA-n.js"),__vite__mapDeps([29,1,2,3,4,5])),pageItem:()=>m(()=>import("./PostItemBlock-B3bvWdQ2.js"),__vite__mapDeps([30,1,2,3,4,5,11])),customForm:()=>m(()=>import("./FormBlock-C_74keKQ.js"),__vite__mapDeps([31,1,2,3,4,5,9,32,33,11]))}[s]||null)}},props:{blocks:{type:Object}}};function j(s,t,o,u,v,i){return n(!0),l(f,null,y(o.blocks,(c,p)=>(n(),C(D(i.getComponent(c.type)),{key:p,block:c},null,8,["block"]))),128)}const z=S(q,[["render",j]]),F={name:"DivisionItemBreadcrumbs",components:{BaseIcon:R,Link:B},data(){return{}},methods:{textLimit(s,t){if(s.length>t){let o;return o=s.substring(0,t),o+"..."}return s},isMobileDevice(){return window.innerWidth<1024},handleSectionClick(s){this.isMobileDevice()?this.toggleMobileNavSection(s):this.toggleDesktopNavSection(s)},handleSubSectionClick(s,t){this.isMobileDevice()?this.toggleMobileNavSubSection(s,t):this.toggleDesktopNavSubSection(s,t)},highlightNavItem(s){s.classList.add("animate-pulse"),setTimeout(()=>{s.classList.remove("animate-pulse")},4e3)},openMobileNavMenu(){document.getElementById("open-mobile-btn").click()},toggleMobileNavSubSection(s,t){this.openMobileNavMenu();const o=document.getElementById("open-mobile-nav"),u=o.querySelector("#nav-section-accordion-"+s.data.slug),v=o.querySelector("#nav-section-accordion-btn-"+s.data.slug);u.classList.contains("active")||v.click();const i=o.querySelector("#nav-sub-section-accordion-"+t.data.slug),c=o.querySelector("#nav-sub-section-accordion-btn-"+t.data.slug);i.classList.contains("active")&&c.click(),this.highlightNavItem(i)},toggleMobileNavSection(s){const t=document.getElementById("open-mobile-nav"),o=t.querySelector("#nav-section-accordion-"+s.data.slug),u=t.querySelector("#nav-section-accordion-btn-"+s.data.slug);o.classList.contains("active")&&u.click(),this.openMobileNavMenu(),this.highlightNavItem(o)},toggleDesktopNavSubSection(s,t){const o=document.getElementById("desktop-nav"),u=o.querySelector("#nav-sub-section-title-"+t.data.slug);o.querySelector("#nav-section-btn-"+s.data.slug).click(),this.highlightNavItem(u)},toggleDesktopNavSection(s){const t=document.getElementById("desktop-nav");t.querySelector("#nav-section-menu-"+s.data.slug),t.querySelector("#nav-section-btn-"+s.data.slug).click()}},props:{breadcrumbs:{type:Object},divisionTitle:{type:String}}},$={class:"flex justify-between pb-4 items-center"},H={class:"flex w-full sm:items-center gap-x-5 sm:gap-x-3"},Y={class:"grow"},W={class:"grid sm:flex sm:justify-between sm:items-center gap-2"},Z={key:0,class:"flex items-center whitespace-normal min-w-0 flex-wrap gap-y-2","aria-label":"Breadcrumb"},G={class:"text-sm"},J={key:0,class:"text-sm"},K={key:1,class:"text-sm"},Q={class:"text-sm"},U={class:"text-sm"},X={key:1,class:"flex items-center text-ellipsis overflow-hidden whitespace-nowrap min-w-0 flex-wrap","aria-label":"Breadcrumb"},ee={class:"text-sm"},te={class:"text-sm"},se={class:"text-sm"};function oe(s,t,o,u,v,i){const c=x("BaseIcon"),p=x("Link");return n(),l("div",$,[e("div",H,[e("div",Y,[e("div",W,[o.breadcrumbs?(n(),l("ol",Z,[e("li",G,[a(p,{href:s.route("index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:g(()=>[a(c,{class:"size-5",name:"home"})]),_:1},8,["href"])]),o.breadcrumbs.mainSection?(n(),l("li",J,[e("span",{class:"flex items-center text-gray-500 hover:text-primaryBlue cursor-pointer",onClick:t[0]||(t[0]=k(w=>i.handleSectionClick(this.breadcrumbs.mainSection),["prevent"]))},[t[2]||(t[2]=e("svg",{class:"flex-shrink-0 mx-2 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"},[e("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)),_(" "+d(i.textLimit(this.breadcrumbs.mainSection.data.title,25)),1)])])):h("",!0),o.breadcrumbs.subSection?(n(),l("li",K,[e("span",{class:"flex items-center text-gray-500 hover:text-primaryBlue cursor-pointer",onClick:t[1]||(t[1]=k(w=>i.handleSubSectionClick(this.breadcrumbs.mainSection,this.breadcrumbs.subSection),["prevent"]))},[t[3]||(t[3]=e("svg",{class:"flex-shrink-0 mx-2 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"},[e("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)),_(" "+d(i.textLimit(this.breadcrumbs.subSection.data.title,25)),1)])])):h("",!0),e("li",Q,[a(p,{href:s.route("client.division.index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:g(()=>[t[4]||(t[4]=e("svg",{class:"flex-shrink-0 mx-2 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"},[e("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)),_(" "+d(i.textLimit("Подразделения института",30)),1)]),_:1},8,["href"])]),e("li",U,[a(p,{href:this.$inertia.page.props.ziggy.location,class:"flex items-center text-gray-500 hover:text-blue-600"},{default:g(()=>[t[5]||(t[5]=e("svg",{class:"flex-shrink-0 mx-2 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"},[e("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)),_(" "+d(o.divisionTitle),1)]),_:1},8,["href"])])])):h("",!0),o.breadcrumbs?h("",!0):(n(),l("ol",X,[e("li",ee,[a(p,{href:s.route("index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:g(()=>[a(c,{class:"size-5",name:"home"})]),_:1},8,["href"])]),e("li",te,[a(p,{href:s.route("client.division.index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:g(()=>[t[6]||(t[6]=e("svg",{class:"flex-shrink-0 mx-2 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"},[e("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)),_(" "+d(i.textLimit("Подразделения института",30)),1)]),_:1},8,["href"])]),e("li",se,[a(p,{href:this.$inertia.page.props.ziggy.location,class:"flex items-center text-gray-500 hover:text-blue-600"},{default:g(()=>[t[7]||(t[7]=e("svg",{class:"flex-shrink-0 mx-2 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"},[e("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)),_(" "+d(o.divisionTitle),1)]),_:1},8,["href"])])]))])])])])}const ie=S(F,[["render",oe]]),ne={name:"Show",data(){return{scrollTop:!1,currentNavSection:null}},props:{division:{type:Object},divisions:{type:Object}},components:{DivisionItemBreadcrumbs:ie,DivisionBuilder:z,MainPageNavBar:A,ClientFooterDown:O,Link:B,FsLightbox:P,Head:I},methods:{textLimit(s,t){if(s.length>t){let o;return o=s.substring(0,t),o+"..."}return s},openEditorImagesOnSlide:function(s){this.slide=s,this.toggler=!this.toggler},isSameRoute(s){if(this.$page.props.ziggy.location===s)return!0},generateSlug:function(s){return V(s,{lower:!0,strict:!0,locale:"ru"})},onScroll(s){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 s=document.querySelectorAll("h2"),t=document.querySelector("#visor");let o=null;const u=t.getBoundingClientRect();if(u.top>window.scrollY){this.currentNavSection=null,o=null;return}for(let v=0;v<s.length;v++){const i=s[v],c=i.getBoundingClientRect();if(c.top>=0&&c.bottom<=window.innerHeight&&c.bottom>=u.top&&c.top<=u.bottom){i!==o&&(this.currentNavSection=i.id,o=i);break}}})},beforeDestroy(){window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("scroll",this.onScroll)},computed:{}},le={class:"flex flex-col h-screen"},re={class:"flex-grow"},ae={class:"relative mb-auto mx-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10"},ce={class:"sticky top-[110px] hidden h-[calc(100vh-110px)] max-w-[20%] md:flex md:shrink-0 md:flex-col md:justify-between"},de={key:0,class:"styled-scrollbar flex h-[calc(100vh-200px)] flex-col overflow-y-scroll pr-2 pb-4"},me={class:"flex gap-x-1"},ue={class:"px-0.5 last-of-type:mb-0 mb-8"},he=["href"],ve={class:"order-last hidden w-56 shrink-0 lg:block"},pe={class:"sticky top-[110px] h-[calc(100vh-110px)]"},ge={class:"styled-scrollbar max-h-[70vh] space-y-1.5 overflow-y-auto py-2 text-sm"},xe={key:0,class:"anchor-li"},_e={key:1,class:"anchor-li"},fe={class:"w-full min-w-0 mt-1 max-w-6xl px-1 md:px-6",style:{}},we={class:"space-y-5 md:space-y-5"},be={class:"flex justify-between items-center mb-6"},ye={class:"flex w-full sm:items-center gap-x-5 sm:gap-x-3"},ke={class:"grow"},Se={class:"grid sm:flex sm:justify-between sm:items-center gap-2"},Be={class:"space-y-3"},Le={class:"text-2xl mb-10 font-bold md:text-3xl"},Ne={id:"page-area",class:"space-y-5 md:space-y-5"},Ee={key:0,id:"persons",class:"font-bold text-xl"},Te={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"},Ce={class:"flex items-center gap-x-4"},De=["src"],Ie={class:"grow"},Me={key:0,class:"text-xs text-gray-500 mt-2"},Pe={class:"text-xs text-gray-500 mt-2"},Re={class:"text-xs text-gray-500 mt-2"},Oe={key:1,id:"description",class:"font-bold text-xl"};function Ve(s,t,o,u,v,i){const c=x("Head"),p=x("MainPageNavBar"),w=x("DivisionItemBreadcrumbs"),L=x("Link"),N=x("DivisionBuilder"),E=x("ClientFooterDown");return n(),l(f,null,[a(c,null,{default:g(()=>[e("title",null,d(o.division.data.title),1),t[1]||(t[1]=e("meta",{name:"description",content:"Your page description"},null,-1))]),_:1}),e("div",le,[a(p,{class:"border-b",sections:s.$page.props.navigation},null,8,["sections"]),e("main",re,[e("div",ae,[t[6]||(t[6]=e("div",{class:"w-full h-[67px] fixed pointer-events-none",id:"visor"},null,-1)),e("div",ce,[this.divisions?(n(),l("nav",de,[t[2]||(t[2]=e("div",{class:"text-gray-1000 mb-2 text-md font-medium"},"Подразделения",-1)),e("div",me,[e("ul",ue,[(n(!0),l(f,null,y(this.divisions.data,r=>(n(),l("li",{key:r.id,class:"my-1.5 flex"},[e("a",{class:b([{"text-white hover:text-gray-200 font-semibold bg-[#135aae]":i.isSameRoute(s.route("client.division.show",r.slug)),"text-gray-600 hover:text-[#2C6288]":!i.isSameRoute(s.route("client.division.show",r.id))},"relative duration-300 flex w-full rounded-md cursor-pointer items-center px-2 py-1 text-left text-sm"]),href:s.route("client.division.show",r.slug)+"/"},d(r.title),11,he)]))),128))])])])):h("",!0)]),e("nav",ve,[e("div",pe,[t[4]||(t[4]=e("div",{class:"text-gray-1000 mb-2 text-md font-medium"},"На этой странице",-1)),e("ul",ge,[o.division.data.workers.length>0?(n(),l("li",xe,[e("a",{class:b([{"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)])):h("",!0),o.division.data.description.length>0?(n(),l("li",_e,[e("a",{class:b([{"translate-x-2 text-[#135aae]":this.currentNavSection==="description","bg-transperant text-gray-600 hover:text-gray-900":this.currentNavSection!=="description"},"duration-150 block py-1 px-2 leading-[1.6] rounded-md"]),href:"#description"},"Описание",2)])):h("",!0),a(M,{name:"fade"},{default:g(()=>[v.scrollTop?(n(),l("li",{key:0,class:"anchor-li flex items-center py-2 border-t",onClick:t[0]||(t[0]=k((...r)=>i.scrollToTop&&i.scrollToTop(...r),["prevent"]))},t[3]||(t[3]=[e("button",{class:"bg-transperant text-gray-600 cursor-pointer hover:text-gray-900 duration-300 block px-2 leading-[1.6] rounded-md"},"К началу",-1),e("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"},[e("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)]))):h("",!0)]),_:1})])])]),e("main",fe,[e("div",we,[e("div",be,[e("div",ye,[e("div",ke,[e("div",Se,[a(w,{"division-title":o.division.data.title},null,8,["division-title"])])])])]),e("div",Be,[e("h1",Le,d(o.division.data.title),1)]),e("div",Ne,[o.division.data.workers.length>0?(n(),l("h2",Ee,"Состав")):h("",!0),(n(!0),l(f,null,y(o.division.data.workers,r=>(n(),l("div",Te,[e("div",Ce,[e("img",{loading:"lazy",class:"rounded-xl w-[150px]",src:"/storage/"+r.details.photo,alt:"Image Description"},null,8,De),e("div",Ie,[a(L,{href:s.route("client.person.show",r.id),class:"font-medium text-gray-800 hover:text-gray-500 underline"},{default:g(()=>[_(d(r.administrativePosition)+": "+d(r.name),1)]),_:2},1032,["href"]),r.details.academicTitle?(n(),l("p",Me," Ученая степень: "+d(r.details.academicTitle),1)):h("",!0),e("p",Pe," Контактный телефон: "+d(r.details.contactPhone),1),e("p",Re," Электронная почта: "+d(r.details.contactEmail),1),t[5]||(t[5]=e("p",{class:"text-xs text-gray-500 mt-2"}," Кабинет: 207В ",-1))])])]))),256)),o.division.data.description.length>0?(n(),l("h2",Oe,"Описание")):h("",!0),a(N,{blocks:o.division.data.description},null,8,["blocks"])])])])])]),a(E)])],64)}const He=S(ne,[["render",Ve]]);export{He as default};
|