Files
ntspi-app/public/build/assets/Show-DUD4FiTp.js
T
2024-10-28 12:57:16 +05:00

2 lines
16 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{i as _,Z as N,r as h,o as n,c as a,b as t,a as l,w as x,j as p,t as r,l as v,F as f,p as k,d as b,n as y,T as j,e as B}from"./app-lT3z3TR3.js";import{F as L}from"./v3-B5UP5GZw.js";import{M as C}from"./MainNavbar-5-nqk6c_.js";import{C as M,B as P,s as D}from"./SearchModal-YI3bdWA9.js";import{a as q,c as z,b as $,P as H}from"./PageNavigateLinks-DI4_-k66.js";import{P as R}from"./PageSubSectionLinks-CCuKIYQx.js";import{_ as S}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{P as O}from"./PostBuilder-BfOHHDzX.js";import{F as V}from"./FacultyBuilder-B9Cf6PY4.js";import{M as W}from"./MainPageNavbar-BfM50q-7.js";/* empty css */import"./PageSkeleton-BoZKiMn9.js";import"./ClientImageSlider-CGZZYYI8.js";import"./PageTabBuilder-CXLfoCo_.js";import"./HeadingBlock-DZAeIVzd.js";import"./ParagraphBlock-_EhfXk9v.js";import"./ImageBlock-cPU_Sbw4.js";import"./FileBlock-BU1S9yFx.js";import"./PersonBlock-MXpsfzV_.js";import"./StepperBlock-DhPHG4yx.js";import"./VideoBlock-BcEyk91j.js";import"./PostListBlock-Vo9iG3Sb.js";const Y={name:"ClientFacultyWorkerCard",data(){return{toggler:!1}},props:{worker:{type:Object}},components:{ClientFooterDown:M,MainNavbar:C,Link:_,FsLightbox:L,Head:N}},A={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"},Z={class:"flex items-center gap-y-4 gap-x-4 flex-wrap"},G=["src"],J={class:"grow"},K={key:0,class:"text-xs text-gray-500 mt-2"},Q={class:"text-xs text-gray-500 mt-2"},U={class:"text-xs text-gray-500 mt-2"};function X(s,e,o,u,c,i){const d=h("Link"),g=h("FsLightbox");return n(),a(f,null,[t("div",A,[t("div",Z,[t("img",{onClick:e[0]||(e[0]=w=>c.toggler=!c.toggler),loading:"lazy",class:"rounded-xl md:w-[150px]",src:"/storage/"+o.worker.photo,alt:"Image Description"},null,8,G),t("div",J,[l(d,{href:s.route("client.person.show",o.worker.id),class:"font-medium text-gray-800 hover:text-gray-500 underline"},{default:x(()=>[p(r(o.worker.position)+": "+r(o.worker.name),1)]),_:1},8,["href"]),o.worker.academicTitle!==null?(n(),a("p",K," Ученая степень: "+r(o.worker.academicTitle),1)):v("",!0),t("p",Q," Контактный телефон: "+r(o.worker.contactPhone),1),t("p",U," Электронная почта: "+r(o.worker.contactEmail),1),e[1]||(e[1]=t("p",{class:"text-xs text-gray-500 mt-2"}," Кабинет: 207В ",-1))])])]),l(g,{class:"",toggler:c.toggler,sources:["/storage/"+o.worker.photo]},null,8,["toggler","sources"])],64)}const tt=S(Y,[["render",X]]),et={name:"FacultyItemBreadcrumbs",components:{BaseIcon:P,Link:_},data(){return{}},methods:{textLimit(s,e){if(s.length>e){let o;return o=s.substring(0,e),o+"..."}return s},isMobileDevice(){return window.innerWidth<1024},handleSectionClick(s){this.isMobileDevice()?this.toggleMobileNavSection(s):this.toggleDesktopNavSection(s)},handleSubSectionClick(s,e){this.isMobileDevice()?this.toggleMobileNavSubSection(s,e):this.toggleDesktopNavSubSection(s,e)},highlightNavItem(s){s.classList.add("animate-pulse"),setTimeout(()=>{s.classList.remove("animate-pulse")},4e3)},openMobileNavMenu(){document.getElementById("open-mobile-btn").click()},toggleMobileNavSubSection(s,e){this.openMobileNavMenu();const o=document.getElementById("open-mobile-nav"),u=o.querySelector("#nav-section-accordion-"+s.data.slug),c=o.querySelector("#nav-section-accordion-btn-"+s.data.slug);u.classList.contains("active")||c.click();const i=o.querySelector("#nav-sub-section-accordion-"+e.data.slug),d=o.querySelector("#nav-sub-section-accordion-btn-"+e.data.slug);i.classList.contains("active")&&d.click(),this.highlightNavItem(i)},toggleMobileNavSection(s){const e=document.getElementById("open-mobile-nav"),o=e.querySelector("#nav-section-accordion-"+s.data.slug),u=e.querySelector("#nav-section-accordion-btn-"+s.data.slug);o.classList.contains("active")&&u.click(),this.openMobileNavMenu(),this.highlightNavItem(o)},toggleDesktopNavSubSection(s,e){const o=document.getElementById("desktop-nav"),u=o.querySelector("#nav-sub-section-title-"+e.data.slug);o.querySelector("#nav-section-btn-"+s.data.slug).click(),this.highlightNavItem(u)},toggleDesktopNavSection(s){const e=document.getElementById("desktop-nav");e.querySelector("#nav-section-menu-"+s.data.slug),e.querySelector("#nav-section-btn-"+s.data.slug).click()}},props:{breadcrumbs:{type:Object},facultyTitle:{type:String}}},st={class:"flex justify-between pb-4 items-center"},ot={class:"flex w-full sm:items-center gap-x-5 sm:gap-x-3"},it={class:"grow"},nt={class:"grid sm:flex sm:justify-between sm:items-center gap-2"},lt={key:0,class:"flex items-center whitespace-normal min-w-0 flex-wrap gap-y-2","aria-label":"Breadcrumb"},rt={class:"text-sm"},at={key:0,class:"text-sm"},ct={key:1,class:"text-sm"},dt={class:"text-sm"},ut={class:"text-sm"},mt={key:1,class:"flex items-center text-ellipsis overflow-hidden whitespace-nowrap min-w-0 flex-wrap","aria-label":"Breadcrumb"},ht={class:"text-sm"},gt={class:"text-sm"},xt={class:"text-sm"};function pt(s,e,o,u,c,i){const d=h("BaseIcon"),g=h("Link");return n(),a("div",st,[t("div",ot,[t("div",it,[t("div",nt,[o.breadcrumbs?(n(),a("ol",lt,[t("li",rt,[l(g,{href:s.route("index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:x(()=>[l(d,{class:"size-5",name:"home"})]),_:1},8,["href"])]),o.breadcrumbs.mainSection?(n(),a("li",at,[t("span",{class:"flex items-center text-gray-500 hover:text-primaryBlue cursor-pointer",onClick:e[0]||(e[0]=k(w=>i.handleSectionClick(this.breadcrumbs.mainSection),["prevent"]))},[e[2]||(e[2]=t("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"},[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)),p(" "+r(i.textLimit(this.breadcrumbs.mainSection.data.title,25)),1)])])):v("",!0),o.breadcrumbs.subSection?(n(),a("li",ct,[t("span",{class:"flex items-center text-gray-500 hover:text-primaryBlue cursor-pointer",onClick:e[1]||(e[1]=k(w=>i.handleSubSectionClick(this.breadcrumbs.mainSection,this.breadcrumbs.subSection),["prevent"]))},[e[3]||(e[3]=t("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"},[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)),p(" "+r(i.textLimit(this.breadcrumbs.subSection.data.title,25)),1)])])):v("",!0),t("li",dt,[l(g,{href:s.route("client.faculty.index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:x(()=>[e[4]||(e[4]=t("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"},[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)),p(" "+r(i.textLimit("Факультеты",30)),1)]),_:1},8,["href"])]),t("li",ut,[l(g,{href:this.$inertia.page.props.ziggy.location,class:"flex items-center text-gray-500 hover:text-blue-600"},{default:x(()=>[e[5]||(e[5]=t("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"},[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)),p(" "+r(o.facultyTitle),1)]),_:1},8,["href"])])])):v("",!0),o.breadcrumbs?v("",!0):(n(),a("ol",mt,[t("li",ht,[l(g,{href:s.route("index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:x(()=>[l(d,{class:"size-5",name:"home"})]),_:1},8,["href"])]),t("li",gt,[l(g,{href:s.route("client.faculty.index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:x(()=>[e[6]||(e[6]=t("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"},[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)),p(" "+r(i.textLimit("Факультеты",30)),1)]),_:1},8,["href"])]),t("li",xt,[l(g,{href:this.$inertia.page.props.ziggy.location,class:"flex items-center text-gray-500 hover:text-blue-600"},{default:x(()=>[e[7]||(e[7]=t("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"},[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)),p(" "+r(o.facultyTitle),1)]),_:1},8,["href"])])]))])])])])}const vt=S(et,[["render",pt]]),ft={name:"Page",data(){return{scrollTop:!1,currentNavSection:null}},props:{faculty:{type:Object},faculties:{type:Object}},components:{FacultyItemBreadcrumbs:vt,MainPageNavBar:W,FacultyBuilder:V,PostBuilder:O,ClientFacultyWorkerCard:tt,PageTitle:q,PageSubSectionLinks:R,PageBuilder:z,PageBreadcrumbs:$,PageNavigateLinks:H,ClientFooterDown:M,MainNavbar:C,Link:_,FsLightbox:L,Head:N},methods:{textLimit(s,e){if(s.length>e){let o;return o=s.substring(0,e),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 D(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"),e=document.querySelector("#visor");let o=null;const u=e.getBoundingClientRect();if(u.top>window.scrollY){this.currentNavSection=null,o=null;return}for(let c=0;c<s.length;c++){const i=s[c],d=i.getBoundingClientRect();if(d.top>=0&&d.bottom<=window.innerHeight&&d.bottom>=u.top&&d.top<=u.bottom){i!==o&&(this.currentNavSection=i.id,o=i);break}}})},beforeDestroy(){window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("scroll",this.onScroll)},computed:{}},wt={class:"flex flex-col h-screen justify-between"},yt={class:"relative mx-auto mb-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10"},bt={class:"sticky top-[110px] hidden h-[calc(100vh-110px)] max-w-[20%] md:flex md:shrink-0 md:flex-col md:justify-between"},kt={key:0,class:"styled-scrollbar flex h-[calc(100vh-200px)] flex-col overflow-y-scroll pr-2 pb-4"},_t={class:"flex gap-x-1"},St={class:"px-0.5 last-of-type:mb-0 mb-8"},Bt=["href"],Nt={class:"order-last hidden w-56 shrink-0 lg:block"},Lt={class:"sticky top-[110px] h-[calc(100vh-110px)]"},Ct={class:"styled-scrollbar max-h-[70vh] space-y-1.5 overflow-y-auto py-2 text-sm"},Mt={class:"anchor-li"},Tt={class:"anchor-li"},Ft={class:"anchor-li"},It={class:"w-full min-w-0 mt-1 max-w-6xl px-1 md:px-6",style:{}},Et={class:"space-y-5 md:space-y-5"},jt={class:"flex justify-between items-center mb-6"},Pt={class:"flex w-full sm:items-center gap-x-5 sm:gap-x-3"},Dt={class:"grow"},qt={class:"grid sm:flex sm:justify-between sm:items-center gap-2"},zt={class:"space-y-3"},$t={class:"text-2xl mb-10 font-bold md:text-3xl"},Ht={id:"page-area",class:"space-y-5 md:space-y-5"},Rt={class:"grid sm:grid-cols-2 md:grid-cols-2 xl:grid-cols-2 gap-3 sm:gap-6"},Ot={class:"p-4 md:p-5"},Vt={class:"flex justify-between items-center gap-x-3"},Wt={class:"grow"},Yt={class:"group-hover:text-blue-600 font-semibold text-gray-800"},At={class:"space-y-3 md:space-y-4"};function Zt(s,e,o,u,c,i){const d=h("Head"),g=h("MainPageNavBar"),w=h("FacultyItemBreadcrumbs"),T=h("ClientFacultyWorkerCard"),F=h("Link"),I=h("FacultyBuilder"),E=h("ClientFooterDown");return n(),a(f,null,[l(d,null,{default:x(()=>[t("title",null,r(o.faculty.data.title),1),e[1]||(e[1]=t("meta",{name:"description",content:"Your page description"},null,-1))]),_:1}),t("div",wt,[l(g,{class:"border-b",sections:s.$page.props.navigation},null,8,["sections"]),t("div",yt,[e[9]||(e[9]=t("div",{class:"w-full h-[67px] pointer-events-none fixed",id:"visor"},null,-1)),t("div",bt,[this.faculties?(n(),a("nav",kt,[e[2]||(e[2]=t("div",{class:"text-gray-1000 mb-2 text-md font-medium"},"Факультеты",-1)),t("div",_t,[t("ul",St,[(n(!0),a(f,null,b(this.faculties.data,m=>(n(),a("li",{key:m.id,class:"my-1.5 flex"},[t("a",{class:y([{"text-white hover:text-gray-200 font-semibold bg-[#135aae]":i.isSameRoute(s.route("client.faculty.show",m.slug)),"text-gray-600 hover:text-[#2C6288]":!i.isSameRoute(s.route("client.faculty.show",m.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.faculty.show",m.slug)+"/"},r(m.title),11,Bt)]))),128))])])])):v("",!0)]),t("nav",Nt,[t("div",Lt,[e[4]||(e[4]=t("div",{class:"text-gray-1000 mb-2 text-md font-medium"},"На этой странице",-1)),t("ul",Ct,[t("li",Mt,[t("a",{class:y([{"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)]),t("li",Tt,[t("a",{class:y([{"translate-x-2 text-[#135aae]":this.currentNavSection==="department","bg-transperant text-gray-600 hover:text-gray-900":this.currentNavSection!=="department"},"duration-150 block py-1 px-2 leading-[1.6] rounded-md"]),href:"#department"},"Кафедры факультета",2)]),t("li",Ft,[t("a",{class:y([{"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)]),l(j,{name:"fade"},{default:x(()=>[c.scrollTop?(n(),a("li",{key:0,class:"anchor-li flex items-center py-2 border-t",onClick:e[0]||(e[0]=k((...m)=>i.scrollToTop&&i.scrollToTop(...m),["prevent"]))},e[3]||(e[3]=[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),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)]))):v("",!0)]),_:1})])])]),t("article",It,[t("div",Et,[t("div",jt,[t("div",Pt,[t("div",Dt,[t("div",qt,[l(w,{"faculty-title":o.faculty.data.title},null,8,["faculty-title"])])])])]),t("div",zt,[t("h1",$t,r(o.faculty.data.title),1)]),t("div",Ht,[e[6]||(e[6]=t("h2",{id:"persons",class:"font-bold text-xl"},"Состав",-1)),(n(!0),a(f,null,b(o.faculty.data.workers,m=>(n(),B(T,{worker:m},null,8,["worker"]))),256)),e[7]||(e[7]=t("h2",{id:"department",class:"font-bold text-xl"},"Кафедры факультета",-1)),t("div",Rt,[(n(!0),a(f,null,b(o.faculty.data.departments,m=>(n(),B(F,{href:s.route("client.department.show",{facultySlug:o.faculty.data.slug,departmentSlug:m.slug}),class:"flex justify-center items-center bg-white border shadow-sm rounded-xl hover:shadow-md focus:outline-none focus:shadow-md transition"},{default:x(()=>[t("div",Ot,[t("div",Vt,[t("div",Wt,[t("h3",Yt,r(m.title),1)]),e[5]||(e[5]=t("div",null,[t("svg",{class:"shrink-0 size-5 text-gray-800",xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[t("path",{d:"m9 18 6-6-6-6"})])],-1))])])]),_:2},1032,["href"]))),256))]),e[8]||(e[8]=t("h2",{id:"description",class:"font-bold text-xl"},"Описание",-1)),t("div",At,[l(I,{blocks:this.faculty.data.content},null,8,["blocks"])])])])])]),l(E)])],64)}const pe=S(ft,[["render",Zt]]);export{pe as default};