-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
1 lines (1 loc) · 2.1 KB
/
index.js
1
(function(){"use strict";function f(r,e,n,s,a,l,c,v){var t=typeof r=="function"?r.options:r;e&&(t.render=e,t.staticRenderFns=n,t._compiled=!0),s&&(t.functional=!0),l&&(t._scopeId="data-v-"+l);var o;if(c?(o=function(i){i=i||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,!i&&typeof __VUE_SSR_CONTEXT__<"u"&&(i=__VUE_SSR_CONTEXT__),a&&a.call(this,i),i&&i._registeredComponents&&i._registeredComponents.add(c)},t._ssrRegister=o):a&&(o=v?function(){a.call(this,(t.functional?this.parent:this).$root.$options.shadowRoot)}:a),o)if(t.functional){t._injectStyles=o;var k=t.render;t.render=function(C,_){return o.call(_),k(C,_)}}else{var u=t.beforeCreate;t.beforeCreate=u?[].concat(u,o):[o]}return{exports:r,options:t}}const p={data(){return{news:[]}},created(){this.apiRequests()},computed:{console:()=>console,window:()=>window},methods:{async apiRequests(){try{this.news=await this.$api.get("getAllNews/4")}catch(r){console.error("Error in apiRequests:",r)}}}};var d=function(){var e=this,n=e._self._c;return n("div",{staticClass:"news-container"},[n("k-view",{staticClass:"k-news-view"},[n("a",{staticClass:"news-link",on:{click:e.open}},[e.content.name?n("k-header",{staticClass:"news-title"},[e._v(e._s(e.content.name))]):n("k-header",{staticClass:"news-title"},[e._v(e._s(e.$t("pixelopen.news.blueprints.blocks.title")))])],1),e.news.length&&e.content.show_image?n("k-items",{attrs:{items:e.news.slice(0,e.content.pagination),layout:"cards"},scopedSlots:e._u([{key:"default",fn:function(s){return[n("k-item",{attrs:{layout:"cards",text:s.item.title,info:s.item.description,link:s.item.url,image:{cover:!0,back:"blue-200",src:s.item.cover}}})]}}],null,!1,3350029546)}):e.news.length&&!e.content.show_image?n("k-items",{attrs:{items:e.news.slice(0,e.content.pagination)},scopedSlots:e._u([{key:"default",fn:function(s){return[n("k-item",{attrs:{text:s.item.title,info:s.item.description,link:s.item.url}})]}}])}):n("div",[e._v(e._s(e.$t("pixelopen.news.blueprints.sections.empty")))])],1)],1)},m=[],w=f(p,d,m,!1,null,null,null,null);const h=w.exports;panel.plugin("pixelopen/news",{blocks:{news:h}})})();