Files
ntspi-app/public/build/assets/Show-Cr8RQpg7.js
T
2024-10-04 12:48:19 +05:00

2 lines
9.8 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 C,Z as S,r as m,o as l,c as a,b as t,a as u,w as x,g as v,t as c,f as y,F as p,d as f,n as w,T as M,l as b,e as k}from"./app-C722ecVx.js";import{F as L}from"./v3-918lQ39M.js";import{M as B}from"./MainNavbar-CK8Gfm-M.js";import{C as T}from"./ClientFooterDown-nb4a-O5q.js";import{s as E}from"./SearchModal-72Hbiqqz.js";import{a as D,c as H,b as R,P as z}from"./PageNavigateLinks-DFdi5-l_.js";import{P as V}from"./PageSubSectionLinks-CqbXfgxJ.js";import{_ as F}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{P as O}from"./PostBuilder-B7-qAkNW.js";import{F as W}from"./FacultyBuilder-DSUoeSuY.js";import{M as Y}from"./MainPageNavbar-DcM2ZJ6Y.js";/* empty css */import"./PageTabBuilder-CRT8Vrz4.js";import"./ClientImageSlider-DIxDD91b.js";import"./PostItemBlock-BZ4FcbP2.js";const q={name:"ClientFacultyWorkerCard",data(){return{toggler:!1}},props:{worker:{type:Object}},components:{ClientFooterDown:T,MainNavbar:B,Link:C,FsLightbox:L,Head:S}},I={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"},A={class:"flex items-center gap-y-4 gap-x-4 flex-wrap"},Z=["src"],G={class:"grow"},J={key:0,class:"text-xs text-gray-500 mt-2"},K={class:"text-xs text-gray-500 mt-2"},Q={class:"text-xs text-gray-500 mt-2"};function U(o,e,s,g,i,n){const d=m("Link"),h=m("FsLightbox");return l(),a(p,null,[t("div",I,[t("div",A,[t("img",{onClick:e[0]||(e[0]=_=>i.toggler=!i.toggler),loading:"lazy",class:"rounded-xl md:w-[150px]",src:"/storage/"+s.worker.photo,alt:"Image Description"},null,8,Z),t("div",G,[u(d,{href:o.route("client.person.show",s.worker.id),class:"font-medium text-gray-800 hover:text-gray-500 underline"},{default:x(()=>[v(c(s.worker.position)+": "+c(s.worker.name),1)]),_:1},8,["href"]),s.worker.academicTitle!==null?(l(),a("p",J," Ученая степень: "+c(s.worker.academicTitle),1)):y("",!0),t("p",K," Контактный телефон: "+c(s.worker.contactPhone),1),t("p",Q," Электронная почта: "+c(s.worker.contactEmail),1),e[1]||(e[1]=t("p",{class:"text-xs text-gray-500 mt-2"}," Кабинет: 207В ",-1))])])]),u(h,{class:"",toggler:i.toggler,sources:["/storage/"+s.worker.photo]},null,8,["toggler","sources"])],64)}const X=F(q,[["render",U]]),$={name:"Page",data(){return{scrollTop:!1,currentNavSection:null}},props:{faculty:{type:Object},faculties:{type:Object}},components:{MainPageNavBar:Y,FacultyBuilder:W,PostBuilder:O,ClientFacultyWorkerCard:X,PageTitle:D,PageSubSectionLinks:V,PageBuilder:H,PageBreadcrumbs:R,PageNavigateLinks:z,ClientFooterDown:T,MainNavbar:B,Link:C,FsLightbox:L,Head:S},methods:{textLimit(o,e){if(o.length>e){let s;return s=o.substring(0,e),s+"..."}return o},openEditorImagesOnSlide:function(o){this.slide=o,this.toggler=!this.toggler},isSameRoute(o){if(this.$page.props.ziggy.location===o)return!0},generateSlug:function(o){return E(o,{lower:!0,strict:!0,locale:"ru"})},onScroll(o){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 o=document.querySelectorAll("h2"),e=document.querySelector("#visor");let s=null;const g=e.getBoundingClientRect();if(g.top>window.scrollY){this.currentNavSection=null,s=null;return}for(let i=0;i<o.length;i++){const n=o[i],d=n.getBoundingClientRect();if(d.top>=0&&d.bottom<=window.innerHeight&&d.bottom>=g.top&&d.top<=g.bottom){n!==s&&(this.currentNavSection=n.id,s=n);break}}})},beforeDestroy(){window.removeEventListener("scroll",this.handleScroll),window.removeEventListener("scroll",this.onScroll)},computed:{}},tt={class:"flex flex-col h-screen justify-between"},et={class:"relative mx-auto mb-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10"},st={class:"sticky top-[110px] hidden h-[calc(100vh-110px)] max-w-[20%] md:flex md:shrink-0 md:flex-col md:justify-between"},ot={key:0,class:"styled-scrollbar flex h-[calc(100vh-200px)] flex-col overflow-y-scroll pr-2 pb-4"},rt={class:"flex gap-x-1"},lt={class:"px-0.5 last-of-type:mb-0 mb-8"},nt=["href"],it={class:"order-last hidden w-56 shrink-0 lg:block"},at={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"},dt={class:"anchor-li"},mt={class:"anchor-li"},ut={class:"w-full min-w-0 mt-1 max-w-6xl px-1 md:px-6",style:{}},gt={class:"space-y-5 md:space-y-5"},pt={class:"flex justify-between items-center mb-6"},xt={class:"flex w-full sm:items-center gap-x-5 sm:gap-x-3"},ht={class:"grow"},ft={class:"grid sm:flex sm:justify-between sm:items-center gap-2"},wt={class:"flex items-center whitespace-normal min-w-0","aria-label":"Breadcrumb"},vt={class:"text-sm"},yt={class:"space-y-3"},_t={class:"text-2xl mb-10 font-bold md:text-3xl"},bt={id:"page-area",class:"space-y-5 md:space-y-5"},kt={class:"grid sm:grid-cols-2 md:grid-cols-2 xl:grid-cols-2 gap-3 sm:gap-6"},Ct={class:"p-4 md:p-5"},St={class:"flex justify-between items-center gap-x-3"},Lt={class:"grow"},Bt={class:"group-hover:text-blue-600 font-semibold text-gray-800"},Tt={class:"space-y-3 md:space-y-4"};function Ft(o,e,s,g,i,n){const d=m("Head"),h=m("MainPageNavBar"),_=m("ClientFacultyWorkerCard"),N=m("Link"),P=m("FacultyBuilder"),j=m("ClientFooterDown");return l(),a(p,null,[u(d,null,{default:x(()=>[t("title",null,c(s.faculty.data.title),1),e[2]||(e[2]=t("meta",{name:"description",content:"Your page description"},null,-1))]),_:1}),t("div",tt,[u(h,{class:"border-b",sections:o.$page.props.navigation},null,8,["sections"]),t("div",et,[e[11]||(e[11]=t("div",{class:"w-full h-[67px] pointer-events-none fixed",id:"visor"},null,-1)),t("div",st,[this.faculties?(l(),a("nav",ot,[e[3]||(e[3]=t("div",{class:"text-gray-1000 mb-2 text-md font-medium"},"Факультеты",-1)),t("div",rt,[t("ul",lt,[(l(!0),a(p,null,f(this.faculties.data,r=>(l(),a("li",{key:r.id,class:"my-1.5 flex"},[t("a",{class:w([{"text-white hover:text-gray-200 font-semibold bg-[#135aae]":n.isSameRoute(o.route("client.faculty.show",r.slug)),"text-gray-600 hover:text-[#2C6288]":!n.isSameRoute(o.route("client.faculty.show",r.id))},"relative duration-300 flex w-full rounded-md cursor-pointer items-center px-2 py-1 text-left text-sm"]),href:o.route("client.faculty.show",r.slug)+"/"},c(r.title),11,nt)]))),128))])])])):y("",!0)]),t("nav",it,[t("div",at,[e[5]||(e[5]=t("div",{class:"text-gray-1000 mb-2 text-md font-medium"},"На этой странице",-1)),t("ul",ct,[t("li",dt,[t("a",{class:w([{"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",mt,[t("a",{class:w([{"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)]),u(M,{name:"fade"},{default:x(()=>[i.scrollTop?(l(),a("li",{key:0,class:"anchor-li flex items-center py-2 border-t",onClick:e[0]||(e[0]=b((...r)=>n.scrollToTop&&n.scrollToTop(...r),["prevent"]))},e[4]||(e[4]=[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)]))):y("",!0)]),_:1})])])]),t("article",ut,[t("div",gt,[t("div",pt,[t("div",xt,[t("div",ht,[t("div",ft,[t("ol",wt,[e[7]||(e[7]=t("li",{class:"text-sm"},[t("span",{class:"flex items-center text-gray-500 hover:text-blue-600"},[v(" Главная "),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)),t("li",vt,[t("span",{class:"flex items-center text-gray-500 hover:text-blue-600",onClick:e[1]||(e[1]=b(()=>{},["prevent"]))},e[6]||(e[6]=[v(" Факультеты "),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)]))])])])])])]),t("div",yt,[t("h1",_t,c(s.faculty.data.title),1)]),t("div",bt,[e[9]||(e[9]=t("h2",{id:"persons",class:"font-bold text-xl"},"Состав",-1)),(l(!0),a(p,null,f(s.faculty.data.workers,r=>(l(),k(_,{worker:r},null,8,["worker"]))),256)),e[10]||(e[10]=t("h2",{id:"department",class:"font-bold text-xl"},"Кафедры факультета",-1)),t("div",kt,[(l(!0),a(p,null,f(s.faculty.data.departments,r=>(l(),k(N,{href:o.route("client.department.show",{facultySlug:s.faculty.data.slug,departmentSlug:r.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",Ct,[t("div",St,[t("div",Lt,[t("h3",Bt,c(r.title),1)]),e[8]||(e[8]=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))]),t("div",Tt,[u(P,{blocks:this.faculty.data.content},null,8,["blocks"])])])])])]),u(j)])],64)}const At=F($,[["render",Ft]]);export{At as default};