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

2 lines
9.0 KiB
JavaScript

import{M as S}from"./MainNavbar-CBx37KIe.js";import{i as h,o as n,c as i,t as l,g as f,j,b as e,F as u,d as b,r as a,f as z,a as r,h as k,Z as F,w as N}from"./app-DmJ8GS-7.js";import{F as w}from"./v3-rkPj73qv.js";import{C as A}from"./ClientScrollTimeline-zadrTdrA.js";import{C as M}from"./ClientFooterDown-D8UuGhzW.js";import{C as V}from"./ClientImageSlider-CnDaATj1.js";import"./SearchModal.vue_vue_type_style_index_0_scoped_a4fc4416_lang-CbsljUTZ.js";import{_ as p}from"./_plugin-vue_export-helper-DlAUqK2U.js";import{e as D}from"./PostBuilder-BKbcwEtd.js";/* empty css */import"./PageTabBuilder-CCvtc7Um.js";const G={name:"PostTitle",components:{Link:h},data(){return{}},methods:{textLimit(o,s){if(o.length>s){let t;return t=o.substring(0,s),t+"..."}return o}},props:{header:{type:String}}},O={class:"text-brand-primary text-2xl mb-3 mt-2 md:text-3xl font-semibold tracking-tight dark:text-white lg:text-[40px] lg:leading-tight"};function R(o,s,t,g,d,m){return n(),i("h1",O,l(t.header),1)}const H=p(G,[["render",R]]),E={name:"PostBackButton",components:{Link:h},data(){return{}},methods:{textLimit(o,s){if(o.length>s){let t;return t=o.substring(0,s),t+"..."}return o},back(){this.$page.props.urlPrev!=="empty"&&this.$inertia.visit(this.$page.props.urlPrev)}},props:{title:{type:String}}},I=e("svg",{class:"flex-shrink-0 size-4",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"},[e("path",{d:"m15 18-6-6 6-6"})],-1);function Y(o,s,t,g,d,m){return n(),i("a",{href:"#",onClick:s[0]||(s[0]=j((...c)=>this.back&&this.back(...c),["prevent"])),class:"inline-flex items-center gap-x-1.5 text-sm text-gray-600 decoration-2 hover:underline dark:text-blue-500"},[I,f(" "+l(t.title),1)])}const Z=p(E,[["render",Y]]),q={name:"PostAuthorsList",components:{Link:h},data(){return{}},methods:{textLimit(o,s){if(o.length>s){let t;return t=o.substring(0,s),t+"..."}return o}},props:{authors:{type:Array}}},J={class:"col-start-2"},K={class:"hs-tooltip inline-block"},Q={type:"button",class:"hs-tooltip-toggle underline hover:text-blue-400 duration-300"},U={class:"hs-tooltip-content hs-tooltip-shown:opacity-100 hs-tooltip-shown:visible opacity-0 transition-opacity inline-block absolute duration-300 invisible z-10 py-1 px-2 bg-gray-900 text-xs font-medium text-white rounded shadow-sm dark:bg-neutral-700",role:"tooltip"},W=e("br",null,null,-1);function X(o,s,t,g,d,m){return n(),i("div",J,[e("div",K,[e("button",Q,[f(" Над статьей работали "),e("span",U,[(n(!0),i(u,null,b(t.authors,c=>(n(),i(u,null,[f(l(c)+" ",1),W],64))),256))])])])])}const tt=p(q,[["render",X]]),et={name:"PostTimeRead",components:{Link:h},data(){return{}},methods:{textLimit(o,s){if(o.length>s){let t;return t=o.substring(0,s),t+"..."}return o}},props:{time:{type:String}}},ot={class:"block"};function st(o,s,t,g,d,m){return n(),i("span",ot,"Чтение займет "+l(t.time)+" Минуты",1)}const nt=p(et,[["render",st]]),it={name:"PostGallery",components:{Link:h,FsLightbox:w},data(){return{toggler:!1,slide:1,domainPath:null}},methods:{textLimit(o,s){if(o.length>s){let t;return t=o.substring(0,s),t+"..."}return o},openLightboxOnSlide:function(o){this.slide=o,this.toggler=!this.toggler}},mounted(){this.domainPath=window.location.origin},props:{images:{type:Array},title:{type:String}}},at={key:0,class:"grid gap-4 border-t border-gray-300 py-4"},rt={class:"relative"},lt=["src"],dt={class:"absolute inset-x-0 bottom-5 flex flex-col justify-center items-center"},ct={class:"text-white text-sm lg:text-xl text-center"},mt={class:"text-gray-300 text-sm"},ut={id:"modal-post-gallery",class:"hs-overlay hidden size-full fixed top-0 start-0 z-[80] overflow-x-hidden overflow-y-auto pointer-events-none",role:"dialog",tabindex:"-1","aria-labelledby":"modal-post-gallery-label"},ht={class:"hs-overlay-open:mt-0 hs-overlay-open:opacity-100 hs-overlay-open:duration-500 mt-10 opacity-0 transition-all max-w-full max-h-full h-full md:hs-overlay-open:mt-10 md:mt-0 md:max-w-lg md:max-h-none md:h-auto md:mx-auto"},pt={class:"flex flex-col bg-white pointer-events-auto max-w-full max-h-full h-full md:max-w-lg md:max-h-none md:h-auto md:border md:rounded-xl md:shadow-sm dark:bg-neutral-800 md:dark:border-neutral-700"},gt={class:"flex justify-between items-center py-3 px-4 border-b dark:border-neutral-700"},_t={id:"modal-post-gallery-label",class:"font-bold text-gray-800 dark:text-white"},xt=k('<button type="button" class="size-8 inline-flex justify-center items-center gap-x-2 rounded-full border border-transparent bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 disabled:opacity-50 disabled:pointer-events-none dark:bg-neutral-700 dark:hover:bg-neutral-600 dark:text-neutral-400 dark:focus:bg-neutral-600" aria-label="Close" data-hs-overlay="#modal-post-gallery"><span class="sr-only">Close</span><svg class="shrink-0 size-4" 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"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg></button>',1),ft={class:"p-4 overflow-y-auto"},bt={class:"grid grid-cols-2 sm:grid-cols-3 gap-3"},vt={class:"group block relative overflow-hidden rounded-lg"},yt=["onClick","src"],kt=k('<div class="absolute bottom-1 end-1 opacity-0 group-hover:opacity-100 transition"><div class="flex items-center gap-x-1 py-1 px-2 bg-white border border-gray-200 text-gray-800 rounded-lg"><svg class="shrink-0 size-3" 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"><circle cx="11" cy="11" r="8"></circle><path d="m21 21-4.3-4.3"></path></svg><span class="text-xs">Открыть</span></div></div>',1);function wt(o,s,t,g,d,m){const c=a("FsLightbox");return n(),i(u,null,[t.images.length?(n(),i("div",at,[e("div",rt,[e("img",{loading:"lazy",class:"filter brightness-[0.8] w-full max-h-[500px] object-cover rounded-lg hover:opacity-95 hover:duration-200 transition",src:"/storage/"+t.images[0],"data-hs-overlay":"#modal-post-gallery",alt:""},null,8,lt),e("div",dt,[e("p",ct,l(t.title),1),e("span",mt,l(t.images.length)+" фотографий",1)])])])):z("",!0),e("div",ut,[e("div",ht,[e("div",pt,[e("div",gt,[e("h3",_t," Галлерея: "+l(t.title),1),xt]),e("div",ft,[e("div",bt,[(n(!0),i(u,null,b(t.images,(_,x)=>(n(),i("div",vt,[e("img",{loading:"lazy",onClick:v=>m.openLightboxOnSlide(x+1),class:"w-full size-40 object-cover bg-gray-100 rounded-lg",src:"/storage/"+_},null,8,yt),kt]))),256))])])])])]),r(c,{class:"",slide:d.slide,toggler:d.toggler,sources:t.images.map(_=>d.domainPath+"/storage/"+_)},null,8,["slide","toggler","sources"])],64)}const $t=p(it,[["render",wt]]),Pt={name:"Show",components:{PostGallery:$t,PostBuilder:D,PostTimeRead:nt,PostAuthorsList:tt,PostBackButton:Z,PostTitle:H,ClientImageSlider:V,ClientFooterDown:M,ClientScrollTimeline:A,Link:h,MainNavbar:S,FsLightbox:w,Head:F},data(){return{blocks:this.post.data.content}},props:{post:{type:Object},navigation:{type:Object}}},Lt=e("meta",{name:"description",content:"Your page description"},null,-1),Ct={class:"relative mx-auto mt-[67px] max-w-screen-xl px-4 py-10 md:flex md:flex-row md:py-10"},Bt={class:"max-w-3xl lg:pt-10 pb-12 sm:px-6 lg:px-8 mx-auto"},Tt={class:"space-y-5 md:space-y-10"},St={class:"space-y-3"},jt={class:"flex space-x-3 text-gray-500"},zt={class:"flex items-center gap-3"},Ft={class:"md:flex md:items-center space-y-2 md:space-y-0 md:space-x-4 text-sm"},Nt={class:"block text-gray-500"},At={class:"space-y-3 md:space-y-4"},Mt=["href"];function Vt(o,s,t,g,d,m){const c=a("Head"),_=a("ClientScrollTimeline"),x=a("MainNavbar"),v=a("PostBackButton"),$=a("PostTitle"),P=a("PostAuthorsList"),L=a("PostTimeRead"),C=a("PostBuilder"),B=a("PostGallery"),T=a("ClientFooterDown");return n(),i(u,null,[r(c,null,{default:N(()=>[e("title",null,l(t.post.data.title),1),Lt]),_:1}),r(_),r(x,{sections:o.$page.props.navigation},null,8,["sections"]),e("div",Ct,[e("div",Bt,[e("div",null,[e("div",Tt,[e("div",St,[r(v,{title:"Назад"}),r($,{header:t.post.data.title},null,8,["header"])]),e("div",jt,[e("div",zt,[e("div",Ft,[r(P,{authors:t.post.data.authors},null,8,["authors"]),e("time",Nt,"Опубликовано "+l(t.post.data.created_post),1),r(L,{time:t.post.data.reading_time},null,8,["time"])])])]),e("div",At,[r(C,{blocks:this.blocks},null,8,["blocks"])]),e("div",null,[r(B,{title:t.post.data.title,images:t.post.data.gallery},null,8,["title","images"])]),e("div",null,[(n(!0),i(u,null,b(t.post.data.tags,y=>(n(),i("a",{href:o.route("client.post.index",{"tag[]":y.slug}),class:"m-1 inline-flex items-center gap-1.5 py-2 px-3 rounded-full text-sm bg-gray-100 text-gray-800 hover:bg-gray-200 focus:outline-none focus:bg-gray-200 dark:bg-neutral-800 dark:text-neutral-200 dark:hover:bg-neutral-700 dark:focus:bg-neutral-700"},l(y.name),9,Mt))),256))])])])])]),r(T)],64)}const Kt=p(Pt,[["render",Vt]]);export{Kt as default};