2 lines
9.4 KiB
JavaScript
2 lines
9.4 KiB
JavaScript
import{M as C}from"./MainNavbar-5-nqk6c_.js";import{i as y,r as l,o as r,c as d,b as e,a as i,w as v,p as b,j as x,t as a,l as p,Z as L,F as _,d as M,e as E}from"./app-lT3z3TR3.js";import{F as D}from"./v3-B5UP5GZw.js";import{C as I}from"./ClientScrollTimeline-BxA_EWwM.js";import{B as F,C as A}from"./SearchModal-YI3bdWA9.js";import{A as q,a as j,b as T}from"./AdminIndexHeaderTitle-DyC17FG6.js";import{A as P}from"./AdminIndexHeader-Ci_3kRvq.js";import{C as $,a as H}from"./ClientPostSearch-85XLLeIC.js";import{C as V}from"./ClientPost-KvELvIac.js";import{C as z}from"./ClientEventSelectDate-Dy72p0i3.js";import{C as O}from"./ClientEventFilter-CNRvs5cm.js";import{M as G}from"./MainPageNavbar-BfM50q-7.js";import{_ as w}from"./_plugin-vue_export-helper-DlAUqK2U.js";/* empty css */import"./SortingByFilter-CjZ8gKSr.js";const W={name:"EventListBreadcrumbs",components:{BaseIcon:F,Link:y},data(){return{}},methods:{textLimit(s,t){if(s.length>t){let n;return n=s.substring(0,t),n+"..."}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 n=document.getElementById("open-mobile-nav"),c=n.querySelector("#nav-section-accordion-"+s.data.slug),g=n.querySelector("#nav-section-accordion-btn-"+s.data.slug);c.classList.contains("active")||g.click();const o=n.querySelector("#nav-sub-section-accordion-"+t.data.slug),m=n.querySelector("#nav-sub-section-accordion-btn-"+t.data.slug);o.classList.contains("active")&&m.click(),this.highlightNavItem(o)},toggleMobileNavSection(s){const t=document.getElementById("open-mobile-nav"),n=t.querySelector("#nav-section-accordion-"+s.data.slug),c=t.querySelector("#nav-section-accordion-btn-"+s.data.slug);n.classList.contains("active")&&c.click(),this.openMobileNavMenu(),this.highlightNavItem(n)},toggleDesktopNavSubSection(s,t){const n=document.getElementById("desktop-nav"),c=n.querySelector("#nav-sub-section-title-"+t.data.slug);n.querySelector("#nav-section-btn-"+s.data.slug).click(),this.highlightNavItem(c)},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},eventTitle:{type:String}}},Y={class:"flex justify-between pb-4 items-center"},Z={class:"flex w-full sm:items-center gap-x-5 sm:gap-x-3"},J={class:"grow"},K={class:"grid sm:flex sm:justify-between sm:items-center gap-2"},Q={key:0,class:"flex items-center whitespace-normal min-w-0 flex-wrap gap-y-2","aria-label":"Breadcrumb"},R={class:"text-sm"},U={key:0,class:"text-sm"},X={key:1,class:"text-sm"},ee={class:"text-sm"},te={key:1,class:"flex items-center whitespace-nowrap min-w-0 flex-wrap","aria-label":"Breadcrumb"},se={class:"text-sm"},ne={class:"text-sm"};function ie(s,t,n,c,g,o){const m=l("BaseIcon"),u=l("Link");return r(),d("div",Y,[e("div",Z,[e("div",J,[e("div",K,[n.breadcrumbs?(r(),d("ol",Q,[e("li",R,[i(u,{href:s.route("index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:v(()=>[i(m,{class:"size-5",name:"home"})]),_:1},8,["href"])]),n.breadcrumbs.mainSection?(r(),d("li",U,[e("span",{class:"flex items-center text-gray-500 hover:text-primaryBlue cursor-pointer",onClick:t[0]||(t[0]=b(f=>o.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)),x(" "+a(o.textLimit(this.breadcrumbs.mainSection.data.title,25)),1)])])):p("",!0),n.breadcrumbs.subSection?(r(),d("li",X,[e("span",{class:"flex items-center text-gray-500 hover:text-primaryBlue cursor-pointer",onClick:t[1]||(t[1]=b(f=>o.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)),x(" "+a(o.textLimit(this.breadcrumbs.subSection.data.title,25)),1)])])):p("",!0),e("li",ee,[i(u,{href:s.route("client.event.index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:v(()=>[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)),x(" "+a(o.textLimit("Мероприятия",30)),1)]),_:1},8,["href"])])])):p("",!0),n.breadcrumbs?p("",!0):(r(),d("ol",te,[e("li",se,[i(u,{href:s.route("index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:v(()=>[i(m,{class:"size-5",name:"home"})]),_:1},8,["href"])]),e("li",ne,[i(u,{href:s.route("client.event.index"),class:"flex items-center text-gray-500 hover:text-blue-600"},{default:v(()=>[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)),x(" "+a(o.textLimit("Мероприятия",30)),1)]),_:1},8,["href"])])]))])])])])}const oe=w(W,[["render",ie]]),le={name:"Index",components:{EventListBreadcrumbs:oe,MainPageNavBar:G,ClientEventFilter:O,ClientEventSelectDate:z,AdminIndexHeaderTitle:q,AdminIndexHeader:P,AdminIndexFilter:j,AdminIndexSearch:T,ClientFooterDown:A,ClientScrollTimeline:I,ClientPostFilter:$,Link:y,MainNavbar:C,FsLightbox:D,Head:L,ClientPost:V,ClientPostSearch:H},props:{events:{type:Array},currentDate:{type:String},eventDates:{type:Array},navigation:{type:Array},filters:{type:Array},categories:{type:Array},breadcrumbs:{type:Object}},methods:{}},ae={class:"flex flex-col h-screen"},re={class:"flex-grow"},ce={class:"relative mx-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10"},de={class:"px-4 pt-6 lg:pt-10 pb-12 sm:px-6 lg:px-8 mx-auto"},me={class:"space-y-5 md:space-y-4"},ue={class:"flex items-center w-full justify-center"},ve={class:"my-10 justify-center flex gap-x-3 items-center"},ge={class:"shadow-sm w-[35px]"},he={class:"block w-[35px] h-[27px] bg-white text-center font-medium"},xe={class:"font-light text-xl"},pe={class:"space-y-5 md:space-y-4"},fe={class:"grid gap-y-10 mt-10"},be={class:"grow"},_e={class:"flex flex-col h-full"},ye={class:"mb-3"},we={class:"inline-flex items-center gap-1.5 py-1.5 px-3 rounded-md text-[12px] text-gray-600"},ke={class:"inline-flex items-center gap-1.5 py-1.5 px-3 rounded-md text-xs font-medium bg-[#E9F2FE] text-blue-600"},Be={class:"text-lg sm:text-2xl font-semibold text-gray-800 group-hover:text-blue-600"};function Se(s,t,n,c,g,o){const m=l("Head"),u=l("MainPageNavBar"),f=l("EventListBreadcrumbs"),k=l("ClientEventFilter"),B=l("ClientEventSelectDate"),S=l("Link"),N=l("ClientFooterDown");return r(),d(_,null,[i(m,null,{default:v(()=>t[0]||(t[0]=[e("title",null,"Мероприятия",-1),e("meta",{name:"description",content:"Your page description"},null,-1)])),_:1}),i(u,{class:"border-b",sections:s.$page.props.navigation},null,8,["sections"]),e("div",ae,[e("main",re,[e("div",ce,[e("div",de,[e("div",null,[i(f,{breadcrumbs:n.breadcrumbs},null,8,["breadcrumbs"]),e("div",me,[e("div",ue,[t[1]||(t[1]=e("h1",{class:"block text-brand-primary text-center mb-3 mt-2 mr-4 text-3xl font-semibold tracking-tight dark:text-white lg:text-[40px] lg:leading-tight"}," Мероприятия НТГСПИ ",-1)),i(k,{is_online_filter:n.filters.is_online_filter,categories:this.categories,category_filter:n.filters.category_filter,"sorting-by_filter":n.filters.sortingBy_filter},null,8,["is_online_filter","categories","category_filter","sorting-by_filter"])]),e("div",ve,[t[3]||(t[3]=e("h3",{class:"font-light text-xl"},"Мероприятия на ",-1)),e("div",ge,[t[2]||(t[2]=e("div",{class:"block w-[35px] h-[8px] bg-red-400 rounded-t"},null,-1)),e("div",he,a(n.currentDate.day),1)]),e("h3",xe,a(n.currentDate.month),1)]),e("div",pe,[e("div",null,[i(B,{"current-date":n.currentDate.fullDate,dates:n.eventDates},null,8,["current-date","dates"])])])]),e("div",fe,[(r(!0),d(_,null,M(n.events.data,h=>(r(),E(S,{class:"group sm:flex rounded-xl",href:s.route("client.event.show",h.slug)},{default:v(()=>[e("div",be,[e("div",_e,[e("div",ye,[e("p",we,a(h.event_time_start),1),e("p",ke,a(h.category),1)]),e("h3",Be,a(h.title),1),t[4]||(t[4]=e("p",{class:"mt-2 text-gray-600"}," Great news we're eager to share. ",-1))])])]),_:2},1032,["href"]))),256))])])])])]),i(N)])],64)}const Ve=w(le,[["render",Se]]);export{Ve as default};
|