mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
1 line
No EOL
11 KiB
JavaScript
Vendored
1 line
No EOL
11 KiB
JavaScript
Vendored
(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{"+nCD":function(t,e,n){Vue.component("discover-component",n("RlRG").default)},3:function(t,e,n){t.exports=n("+nCD")},"57Sm":function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.discover-bar[data-v-54e44e3a]::-webkit-scrollbar { \n display: none;\n}\n.card-disc[data-v-54e44e3a] {\n flex: 0 0 160px;\n width:160px;\n height:100px;\n background-size: cover !important;\n}\n.post-icon[data-v-54e44e3a] {\n color: #fff;\n position:relative;\n margin-top: 10px;\n z-index: 9;\n opacity: 0.6;\n text-shadow: 3px 3px 16px #272634;\n}\n",""])},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var o,s=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(s)?t:(o=0===s.indexOf("//")?s:0===s.indexOf("/")?n+s:r+s.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")})}},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=(i=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),s=r.sources.map(function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"});return[n].concat(s).concat([o]).join("\n")}var i;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var s=this[o][0];"number"==typeof s&&(r[s]=!0)}for(o=0;o<t.length;o++){var i=t[o];"number"==typeof i[0]&&r[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),e.push(i))}},e}},"KHd+":function(t,e,n){"use strict";function r(t,e,n,r,o,s,i,a){var c,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),r&&(l.functional=!0),s&&(l._scopeId="data-v-"+s),i?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},l._ssrRegister=c):o&&(c=a?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var f=l.render;l.render=function(t,e){return c.call(e),f(t,e)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,c):[c]}return{exports:t,options:l}}n.d(e,"a",function(){return r})},PeFa:function(t,e,n){var r=n("57Sm");"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(t.exports=r.locals)},RlRG:function(t,e,n){"use strict";n.r(e);var r={data:function(){return{config:{},posts:{},trending:{},categories:{},allCategories:{}}},mounted:function(){this.fetchData(),this.fetchCategories()},methods:{followUser:function(t,e){axios.post("/i/follow",{item:t}).then(function(t){var n=$(e.target);n.addClass("btn-outline-secondary").removeClass("btn-primary"),n.text("Unfollow")}).catch(function(t){t.response.data.message&&swal("Error",t.response.data.message,"error")})},fetchData:function(){var t=this;axios.get("/api/v2/config").then(function(e){var n=e.data;t.config=n}),axios.get("/api/v2/discover/posts").then(function(e){var n=e.data;t.posts=n.posts,t.posts.length>1&&($(".section-explore .loader").hide(),$(".section-explore .row.d-none").removeClass("d-none"))})},fetchCategories:function(){var t=this;axios.get("/api/v2/discover/categories").then(function(e){t.allCategories=e.data,t.categories=e.data})}}},o=(n("cyEJ"),n("KHd+")),s=Object(o.a)(r,function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"container"},[t.categories.length>0?n("section",{staticClass:"d-none d-md-flex mb-md-2 pt-2 discover-bar",staticStyle:{width:"auto",overflow:"auto hidden"}},[1==t.config.ab.loops?n("a",{staticClass:"text-decoration-none bg-transparent border border-success rounded d-inline-flex align-items-center justify-content-center mr-3 card-disc",attrs:{href:"/discover/loops"}},[n("p",{staticClass:"text-success lead font-weight-bold mb-0"},[t._v("Loops")])]):t._e(),t._v(" "),t._l(t.categories,function(e,r){return n("a",{key:r+"_cat_",staticClass:"bg-dark rounded d-inline-flex align-items-end justify-content-center mr-3 box-shadow card-disc",style:"background: linear-gradient(rgba(0, 0, 0, 0.3),rgba(0, 0, 0, 0.3)),url("+e.thumb+");",attrs:{href:e.url}},[n("p",{staticClass:"text-white font-weight-bold",staticStyle:{"text-shadow":"3px 3px 16px #272634"}},[t._v(t._s(e.name))])])})],2):t._e(),t._v(" "),n("section",{staticClass:"mb-5 section-explore"},[n("div",{staticClass:"profile-timeline"},[t._m(0),t._v(" "),n("div",{staticClass:"row d-none"},t._l(t.posts,function(e){return n("div",{staticClass:"col-4 p-0 p-sm-2 p-md-3"},[n("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:e.url}},[n("div",{staticClass:"square"},["photo:album"==e.type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-images fa-2x"})]):t._e(),t._v(" "),"video"==e.type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-video fa-2x"})]):t._e(),t._v(" "),"video:album"==e.type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-film fa-2x"})]):t._e(),t._v(" "),n("div",{staticClass:"square-content",style:{"background-image":"url("+e.thumb+")"}})])])])}),0)])]),t._v(" "),t._m(1)])},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"loader text-center"},[e("div",{staticClass:"lds-ring"},[e("div"),e("div"),e("div"),e("div")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("section",{staticClass:"mb-5"},[e("p",{staticClass:"lead text-center"},[this._v("To view more posts, check the "),e("a",{staticClass:"font-weight-bold",attrs:{href:"/"}},[this._v("home")]),this._v(" or "),e("a",{staticClass:"font-weight-bold",attrs:{href:"/timeline/public"}},[this._v("local")]),this._v(" timelines.")])])}],!1,null,"54e44e3a",null);e.default=s.exports},"aET+":function(t,e,n){var r,o,s={},i=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=r.apply(this,arguments)),o}),a=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var r=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}}(),c=null,l=0,f=[],u=n("9tPo");function d(t,e){for(var n=0;n<t.length;n++){var r=t[n],o=s[r.id];if(o){o.refs++;for(var i=0;i<o.parts.length;i++)o.parts[i](r.parts[i]);for(;i<r.parts.length;i++)o.parts.push(g(r.parts[i],e))}else{var a=[];for(i=0;i<r.parts.length;i++)a.push(g(r.parts[i],e));s[r.id]={id:r.id,refs:1,parts:a}}}}function p(t,e){for(var n=[],r={},o=0;o<t.length;o++){var s=t[o],i=e.base?s[0]+e.base:s[0],a={css:s[1],media:s[2],sourceMap:s[3]};r[i]?r[i].parts.push(a):n.push(r[i]={id:i,parts:[a]})}return n}function h(t,e){var n=a(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=f[f.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),f.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var o=a(t.insertAt.before,n);n.insertBefore(e,o)}}function v(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=f.indexOf(t);e>=0&&f.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return n.nc}();r&&(t.attrs.nonce=r)}return b(e,t.attrs),h(t,e),e}function b(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function g(t,e){var n,r,o,s;if(e.transform&&t.css){if(!(s="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=s}if(e.singleton){var i=l++;n=c||(c=m(e)),r=C.bind(null,n,i,!1),o=C.bind(null,n,i,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),h(t,e),e}(e),r=function(t,e,n){var r=n.css,o=n.sourceMap,s=void 0===e.convertToAbsoluteUrls&&o;(e.convertToAbsoluteUrls||s)&&(r=u(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([r],{type:"text/css"}),a=t.href;t.href=URL.createObjectURL(i),a&&URL.revokeObjectURL(a)}.bind(null,n,e),o=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(e),r=function(t,e){var n=e.css,r=e.media;r&&t.setAttribute("media",r);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){v(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=i()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=p(t,e);return d(n,e),function(t){for(var r=[],o=0;o<n.length;o++){var i=n[o];(a=s[i.id]).refs--,r.push(a)}t&&d(p(t,e),e);for(o=0;o<r.length;o++){var a;if(0===(a=r[o]).refs){for(var c=0;c<a.parts.length;c++)a.parts[c]();delete s[a.id]}}}};var y,x=(y=[],function(t,e){return y[t]=e,y.filter(Boolean).join("\n")});function C(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=x(e,o);else{var s=document.createTextNode(o),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(s,i[e]):t.appendChild(s)}}},cyEJ:function(t,e,n){"use strict";var r=n("PeFa");n.n(r).a}},[[3,0]]]); |