Files
ntspi-app/public/build/assets/PageItemBlock-P5qrDAqd.js
T
2024-10-04 16:05:23 +05:00

2 lines
3.3 KiB
JavaScript

import"./SearchModal-BTKERLZv.js";import{j as n,i as a,o as r,c as i,h as c,b as e,t as o,f as d}from"./app-CBssobj-.js";import{_ as u}from"./_plugin-vue_export-helper-DlAUqK2U.js";const h={name:"PageItemBlock",components:{axios:n,Link:a},data(){return{page:null,breadcrumbs:null,loading:!0}},methods:{getPage(l){n.get(route("client.widget.page.single",l)).then(s=>{this.page=s.data.data.page,this.breadcrumbs=s.data.data.breadcrumbs,this.loading=!1}).catch(s=>{console.error("Ошибка:",s),this.loading=!1})}},mounted(){this.getPage(this.block.data.page)},props:{block:{type:Object}}},m={key:0,class:"flex flex-col space-y-4"},p={key:1,class:"w-full px-2 sm:px-3 lg:px-4mx-auto"},g=["href"],x={class:"p-4 md:p-5"},f={class:"flex items-center gap-x-5"},w={class:"grow"},b={key:0,class:"flex items-center whitespace-nowrap"},_={class:"inline-flex items-center"},v={class:"flex items-center text-sm text-gray-500 hover:text-blue-600 focus:outline-none focus:text-blue-600",href:"#"},k={class:"inline-flex items-center"},y={class:"flex items-center text-sm text-gray-500 hover:text-blue-600 focus:outline-none focus:text-blue-600",href:"#"},B={class:"inline-flex items-center"},j={class:"flex items-center text-sm text-gray-500 hover:text-blue-600 focus:outline-none focus:text-blue-600",href:"#"},C={class:"mt-1 group-hover:text-blue-600 font-semibold text-gray-700"};function P(l,s,S,V,t,z){return t.loading?(r(),i("div",m,s[0]||(s[0]=[c('<div class="flex animate-pulse"><div class="ms-4 mt-2 w-full border px-4 py-4 rounded-xl shadow-sm"><p class="h-4 bg-gray-200 rounded-full" style="width:40%;"></p><ul class="mt-5 space-y-3 flex flex-col"><li class="w-full h-4 bg-gray-200 rounded-full"></li><li class="w-full h-4 bg-gray-200 rounded-full"></li></ul></div></div>',1)]))):(r(),i("div",p,[e("a",{class:"group flex flex-col bg-white border shadow-sm rounded-xl hover:shadow-md focus:outline-none focus:shadow-md transition",href:t.page.is_url?t.page.path:l.route("page.view",t.page.path)+"/"},[e("div",x,[e("div",f,[s[3]||(s[3]=e("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"mt-1 shrink-0 size-7 text-gray-600"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 14.25v-2.625a3.375 3.375 0 0 0-3.375-3.375h-1.5A1.125 1.125 0 0 1 13.5 7.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 0 0-9-9Z"})],-1)),e("div",w,[t.breadcrumbs?(r(),i("ol",b,[e("li",_,[e("span",v,o(t.breadcrumbs.mainSection),1),s[1]||(s[1]=e("svg",{class:"shrink-0 mx-2 size-4 text-gray-400",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:"m9 18 6-6-6-6"})],-1))]),e("li",k,[e("span",y,o(t.breadcrumbs.mainSection),1),s[2]||(s[2]=e("svg",{class:"shrink-0 mx-2 size-4 text-gray-400",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:"m9 18 6-6-6-6"})],-1))]),e("li",B,[e("span",j,o(t.breadcrumbs.page),1)])])):d("",!0),e("h3",C,o(t.page.title),1)])])])],8,g)]))}const M=u(h,[["render",P]]);export{M as default};