Files
ntspi-app/public/build/assets/Show-CRjgBead.js
T
2024-09-19 16:06:49 +05:00

2 lines
11 KiB
JavaScript

import{M as v}from"./MainNavbar-CBx37KIe.js";import{i as w,Z as b,r as u,o as l,c as r,a as c,w as k,b as t,t as i,F as g,d as x,f as h,h as C,n as L}from"./app-DmJ8GS-7.js";import{F as S}from"./v3-rkPj73qv.js";import{C as j}from"./ClientScrollTimeline-zadrTdrA.js";import{C as I}from"./ClientFooterDown-D8UuGhzW.js";import{_ as N}from"./_plugin-vue_export-helper-DlAUqK2U.js";import"./SearchModal.vue_vue_type_style_index_0_scoped_a4fc4416_lang-CbsljUTZ.js";/* empty css */const M={name:"Show",components:{ClientFooterDown:I,ClientScrollTimeline:j,Link:w,MainNavbar:v,FsLightbox:S,Head:b},data(){return{blocks:this.blocksWithSlideNumber,userData:this.$page.props.auth.user,toggler:!1,togglerGallery:!1,editorImages:[],galleryImages:[],slide:1,gallerySlide:1}},props:{post:{type:Array},mainSections:{type:Array}},methods:{textLimit(e,n){if(e.length>n){let o;return o=e.substring(0,n),o+"..."}return e},openEditorImagesOnSlide:function(e){this.slide=e,this.toggler=!this.toggler},openGalleryImagesOnSlide:function(e){this.gallerySlide=e,this.togglerGallery=!this.togglerGallery}},mounted(){this.editorImages=this.blocksWithSlideNumber.filter(e=>e.type==="image").map(e=>e.data.file.url),this.galleryImages=this.post.data.gallery.images.map(e=>e.path)},computed:{blocksWithSlideNumber(){let e=1;return this.post.data.content.blocks.map(n=>(n.type==="image"&&(n.slideNumber=e,e++),n))}}},B=t("meta",{name:"description",content:"Your page description"},null,-1),F={class:"relative mx-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10"},z={class:"max-w-3xl px-4 pt-6 lg:pt-10 pb-12 sm:px-6 lg:px-8 mx-auto"},G={class:"space-y-5 md:space-y-4"},V={class:"space-y-3"},A={class:"text-2xl font-bold md:text-3xl dark:text-white"},D={class:"flex justify-between border-t border-b border-gray-300 py-4 items-center mb-6"},H={class:"flex w-full sm:items-center gap-x-5 sm:gap-x-3"},O={class:"grow"},T={class:"grid sm:flex sm:justify-between sm:items-center gap-2"},W={class:"flex items-center whitespace-nowrap min-w-0","aria-label":"Breadcrumb"},E=C('<li class="text-sm"><a class="flex items-center text-gray-500 hover:text-blue-600" href="#"> Главная <svg class="flex-shrink-0 mx-3 overflow-visible h-2.5 w-2.5 text-gray-400 dark:text-gray-600" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><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"></path></svg></a></li><li class="text-sm"><a class="flex items-center text-gray-500 hover:text-blue-600" href="#"> Новости <svg class="flex-shrink-0 mx-3 overflow-visible h-2.5 w-2.5 text-gray-400 dark:text-gray-600" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><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"></path></svg></a></li>',2),Z={class:"text-sm font-semibold text-gray-800 truncate dark:text-gray-200","aria-current":"page"},q={class:"flex items-center"},Y={class:"block text-xs text-gray-500 mr-3"},J={class:"inline-block relative pr-6 last:pr-0 last-of-type:before:hidden before:absolute before:top-1/2 before:right-2 before:-translate-y-1/2 before:w-1 before:h-1 before:bg-gray-300 before:rounded-full dark:text-gray-400 dark:before:bg-gray-600"},K={class:"hs-tooltip [--trigger:hover] [--placement:bottom]"},P={class:"hs-tooltip-toggle sm:mb-1 block text-left cursor-pointer"},Q={class:"font-normal text-sm text-gray-800 dark:text-gray-200 underline hover:text-gray-500"},R={class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 transition-opacity inline-block absolute invisible z-10 max-w-xs cursor-default bg-gray-900 divide-y divide-gray-700 shadow-lg rounded-xl dark:bg-black",role:"tooltip"},U={class:"p-4 sm:p-5"},X={class:"mb-2 flex w-full sm:items-center gap-x-5 sm:gap-x-3"},$={class:"grow"},tt={class:"text-lg font-semibold text-gray-200"},et=t("p",{class:"text-sm text-gray-400"}," Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. ",-1),st={key:0},ot=["onClick","src","alt"],lt={class:"mt-3 text-sm text-center text-gray-500"},rt={key:1},it={class:"text-[16px] text-gray-800 dark:text-gray-200 text-justify leading-7"},at={key:2,class:""},nt=["innerHTML"],dt={key:3},ct={class:"flex border rounded-lg px-4 py-2 items-center justify-between"},gt={class:"flex items-center"},ht=t("div",{class:"w-[35px] h-[35px] bg-black flex justify-center items-center rounded-xl mr-2"},[t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M18.375 12.739l-7.693 7.693a4.5 4.5 0 01-6.364-6.364l10.94-10.94A3 3 0 1119.5 7.372L8.552 18.32m.009-.01l-.01.01m5.699-9.941l-7.81 7.81a1.5 1.5 0 002.112 2.13",stroke:"white"})])],-1),mt=["href"],ut=t("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"w-6 h-6"},[t("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"})],-1),xt=[ut],pt={key:0,class:"grid gap-4 border-t border-gray-300 py-4"},_t={class:"relative"},ft=["src"],yt={class:"absolute inset-x-0 bottom-5 flex flex-col justify-center items-center"},vt={class:"text-white text-sm lg:text-xl text-center"},wt={class:"text-gray-400 text-sm"},bt={style:{"z-index":"1000"},id:"hs-large-modal",class:"hs-overlay hidden w-full h-full fixed top-0 left-0 z-[60] overflow-x-hidden overflow-y-auto"},kt={class:"hs-overlay-open:mt-7 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-0 opacity-0 ease-out transition-all lg:max-w-4xl lg:w-full m-3 lg:mx-auto"},Ct={class:"flex flex-col bg-white border shadow-sm rounded-xl dark:bg-gray-800 dark:border-gray-700 dark:shadow-slate-700/[.7]"},Lt={class:"flex justify-between items-center py-3 px-4 border-b dark:border-gray-700"},St={class:"font-bold text-gray-800 dark:text-white"},jt=t("button",{type:"button",class:"hs-dropdown-toggle inline-flex flex-shrink-0 justify-center items-center h-8 w-8 rounded-md text-gray-500 hover:text-gray-400 focus:outline-none focus:ring-2 focus:ring-gray-400 focus:ring-offset-2 focus:ring-offset-white transition-all text-sm dark:focus:ring-gray-700 dark:focus:ring-offset-gray-800","data-hs-overlay":"#hs-large-modal"},[t("span",{class:"sr-only"},"Close"),t("svg",{class:"w-3.5 h-3.5",width:"8",height:"8",viewBox:"0 0 8 8",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[t("path",{d:"M0.258206 1.00652C0.351976 0.912791 0.479126 0.860131 0.611706 0.860131C0.744296 0.860131 0.871447 0.912791 0.965207 1.00652L3.61171 3.65302L6.25822 1.00652C6.30432 0.958771 6.35952 0.920671 6.42052 0.894471C6.48152 0.868271 6.54712 0.854471 6.61352 0.853901C6.67992 0.853321 6.74572 0.865971 6.80722 0.891111C6.86862 0.916251 6.92442 0.953381 6.97142 1.00032C7.01832 1.04727 7.05552 1.1031 7.08062 1.16454C7.10572 1.22599 7.11842 1.29183 7.11782 1.35822C7.11722 1.42461 7.10342 1.49022 7.07722 1.55122C7.05102 1.61222 7.01292 1.6674 6.96522 1.71352L4.31871 4.36002L6.96522 7.00648C7.05632 7.10078 7.10672 7.22708 7.10552 7.35818C7.10442 7.48928 7.05182 7.61468 6.95912 7.70738C6.86642 7.80018 6.74102 7.85268 6.60992 7.85388C6.47882 7.85498 6.35252 7.80458 6.25822 7.71348L3.61171 5.06702L0.965207 7.71348C0.870907 7.80458 0.744606 7.85498 0.613506 7.85388C0.482406 7.85268 0.357007 7.80018 0.264297 7.70738C0.171597 7.61468 0.119017 7.48928 0.117877 7.35818C0.116737 7.22708 0.167126 7.10078 0.258206 7.00648L2.90471 4.36002L0.258206 1.71352C0.164476 1.61976 0.111816 1.4926 0.111816 1.36002C0.111816 1.22744 0.164476 1.10028 0.258206 1.00652Z",fill:"currentColor"})])],-1),It={class:"p-4 overflow-y-auto"},Nt={class:"grid grid-cols-2 md:grid-cols-3 gap-4"},Mt=["onClick","src"];function Bt(e,n,o,Ft,a,d){const _=u("Head"),f=u("MainNavbar"),p=u("FsLightbox"),y=u("ClientFooterDown");return l(),r(g,null,[c(_,null,{default:k(()=>[t("title",null,i(o.post.data.title),1),B]),_:1}),c(f,{class:"border-b",sections:this.mainSections},null,8,["sections"]),t("div",F,[t("div",z,[t("div",null,[t("div",G,[t("div",V,[t("h2",A,i(o.post.data.title),1)]),t("div",D,[t("div",H,[t("div",O,[t("div",T,[t("ol",W,[E,t("li",Z,i(d.textLimit(o.post.data.title,15)),1)]),t("div",q,[t("ul",Y,[t("li",J," Опубликовано: "+i(o.post.data.created_post),1)]),t("div",K,[t("div",P,[t("span",Q,i(o.post.data.authors.length===0?"":d.textLimit(o.post.data.authors[0].name,10)),1),t("div",R,[t("div",U,[t("div",X,[t("div",$,[t("p",tt,i(o.post.data.authors.length===0?"":o.post.data.authors[0].name),1)])]),et])])])])])])])])]),(l(!0),r(g,null,x(d.blocksWithSlideNumber,s=>(l(),r(g,null,[s.type==="image"?(l(),r("div",st,[t("figure",null,[t("img",{loading:"lazy",onClick:m=>d.openEditorImagesOnSlide(s.slideNumber),src:s.data.file.url,class:"w-full max-h-[500px] object-cover rounded-lg hover:opacity-95 hover:duration-200 transition",alt:s.data.caption},null,8,ot),t("figcaption",lt,i(s.data.caption),1)])])):h("",!0),s.type==="paragraph"?(l(),r("div",rt,[t("p",it,i(s.data.text),1)])):h("",!0),s.type==="list"?(l(),r("div",at,[t("ul",{class:L(["list-inside",{"list-disc":s.data.style==="unordered"}])},[(l(!0),r(g,null,x(s.data.items,m=>(l(),r("li",{class:"text-[16px] text-gray-800 dark:text-gray-200 text-justify leading-7",innerHTML:m},null,8,nt))),256))],2)])):h("",!0),s.type==="attaches"?(l(),r("div",dt,[t("div",ct,[t("div",gt,[ht,t("div",null,i(s.data.title),1)]),t("a",{href:s.data.file.url,download:"",type:"button",class:"w-[35px] h-[35px] flex bg-gray-100 rounded-lg justify-center items-center hover:bg-gray-200 duration-200"},xt,8,mt)])])):h("",!0)],64))),256)),a.galleryImages.length?(l(),r("div",pt,[t("div",_t,[t("img",{class:"filter brightness-[0.7] w-full max-h-[500px] object-cover rounded-lg hover:opacity-95 hover:duration-200 transition",src:a.galleryImages[0],"data-hs-overlay":"#hs-large-modal",alt:""},null,8,ft),t("div",yt,[t("p",vt,i(o.post.data.title),1),t("span",wt,i(a.galleryImages.length)+" фотографий",1)])])])):h("",!0)])])]),t("div",bt,[t("div",kt,[t("div",Ct,[t("div",Lt,[t("h3",St," Галлерея: "+i(o.post.data.title),1),jt]),t("div",It,[t("div",Nt,[(l(!0),r(g,null,x(a.galleryImages.slice(),(s,m)=>(l(),r("div",null,[t("img",{loading:"lazy",onClick:zt=>d.openGalleryImagesOnSlide(m+1),class:"h-[200px] w-full object-cover rounded-lg hover:scale-[1.05] hover:opacity-95 hover:duration-200 transition",src:s,alt:""},null,8,Mt)]))),256))])])])])]),c(p,{class:"z-1100",slide:a.gallerySlide,toggler:a.togglerGallery,sources:a.galleryImages},null,8,["slide","toggler","sources"]),c(p,{class:"z-1000",slide:a.slide,toggler:a.toggler,sources:a.editorImages},null,8,["slide","toggler","sources"])]),c(y)],64)}const Et=N(M,[["render",Bt]]);export{Et as default};