You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
10 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4560],{94543:function(n,e,t){var i=t(7297),r=t(85893),o=t(45697),a=t.n(o),s=t(87379),d=t(41664),c=t.n(d),l=t(36434),u=t(94586),m=t(29059);function f(){var n=(0,i.Z)(["\n color: #333;\n font-size: 1em;\n padding: 0 1em;\n text-align: left;\n"]);return f=function(){return n},n}function h(){var n=(0,i.Z)(["\n position: relative;\n text-align: center;\n width: calc((100% - 2em) / 3);\n height: 120px;\n overflow: hidden;\n margin-bottom: 1em;\n background-color: #fff;\n border: 1px solid ",";\n\n @media screen and (min-width: 64em) {\n &:nth-child(3n + 3) {\n margin-right: 0;\n }\n }\n @media screen and (max-width: 64em) {\n width: calc(50% - 1em);\n }\n @media screen and (min-width: 48em) {\n margin-right: 1em;\n }\n @media screen and (max-width: 48em) {\n width: 100%;\n }\n"]);return h=function(){return n},n}function g(){var n=(0,i.Z)(["\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: space-between;\n transition: border 500ms;\n\n &:hover {\n border-color: #fa6831;\n }\n"]);return g=function(){return n},n}function p(){var n=(0,i.Z)(["\n width: 120px;\n"]);return p=function(){return n},n}var x=s.default.div.withConfig({componentId:"sc-1eedbcab-0"})(f()),v=s.default.article.withConfig({componentId:"sc-1eedbcab-1"})(h(),(0,u.E)("lightGrey")),w=s.default.a.withConfig({componentId:"sc-1eedbcab-2"})(g()),b=s.default.img.withConfig({componentId:"sc-1eedbcab-3"})(p());function j(n){var e=n.title,t=n.media,i=n.slug,o=n.count,a=n.language,s=n.customUrl,d=void 0!==s&&s,u=n.translation_status,f=(0,l.hw)(t.image.thumbnail||t.image.original);return(0,r.jsx)(v,{children:(0,r.jsx)(c(),{href:d||(0,l.Y4)({item:{slug:i,type:"category"}}),passHref:!0,children:(0,r.jsxs)(w,{children:[(0,r.jsx)(x,{children:(0,r.jsxs)("h4",{children:[(0,l.Hl)(e)," (",o,")",(0,r.jsx)("br",{}),(0,r.jsx)(m.Z,{language:a,status:u})]})}),t&&(0,r.jsx)(b,{src:f,width:"300",alt:e})]})})})}j.propTypes={title:a().string.isRequired,count:a().number.isRequired,language:a().string.isRequired,slug:a().string.isRequired,media:a().object,translation_status:a().object,customUrl:a().string},e.ZP=j},74886:function(n,e,t){t.d(e,{Z:function(){return b}});var i=t(7297),r=t(85893),o=(t(67294),t(45697)),a=t.n(o),s=t(87379),d="app.component.Expandable",c={show:"".concat(d,".show"),hide:"".concat(d,".hide")},l=t(26349),u=t(94586),m=t(38421);function f(){var n=(0,i.Z)(["\n position: relative;\n border-color: ",";\n ","\n padding: 1em 0.5em;\n margin: 2px 0;\n cursor: pointer;\n vertical-align: middle;\n transition: margin-bottom 300ms;\n ","\n"]);return f=function(){return n},n}function h(){var n=(0,i.Z)(["\n position: relative;\n display: inline-block;\n margin-left: 20px;\n transform: rotate(90deg) scale(",");\n transition: transform 200ms;\n color: ",";\n ","\n"]);return h=function(){return n},n}function g(){var n=(0,i.Z)(["\n position: absolute;\n right: 1em;\n top: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n font-size: 0.8em;\n"]);return g=function(){return n},n}var p=s.default.div.withConfig({componentId:"sc-2f3f31b1-0"})(f(),(0,u.E)("lightGrey"),(function(n){return n.withBox?"\n background-color: white;\n border-width: 1px;\n border-style: solid;":""}),(function(n){return n.expanded&&"margin-bottom: 1em;"})),x=(0,s.default)(m.Z).withConfig({componentId:"sc-2f3f31b1-1"})(h(),(function(n){return n.size}),(function(n){return n.color}),(function(n){return n.expanded?"transform: rotate(270deg) scale(".concat(n.size,");"):""})),v=s.default.div.withConfig({componentId:"sc-2f3f31b1-2"})(g()),w=function(n){var e=n.title,t=n.children,i=n.onClick,o=n.expanded,a=n.withBox,s=void 0===a||a,d=n.arrowColor,u=void 0===d?"#e0e0e0":d,m=n.arrowSize,f=void 0===m?1:m,h=n.showLabel,g=void 0!==h&&h;return(0,r.jsxs)(p,{onClick:i,expanded:o,withBox:s,children:[e||t,(0,r.jsxs)(v,{children:[g&&(o?(0,r.jsx)(l.Z,{index:c.hide}):(0,r.jsx)(l.Z,{index:c.show})),(0,r.jsx)(x,{expanded:o,color:u,size:f})]})]})};w.propTypes={title:a().string,onClick:a().func.isRequired,expanded:a().bool.isRequired,children:a().node,withBox:a().bool,arrowColor:a().string,arrowSize:a().number,showLabel:a().bool};var b=w},238:function(n,e,t){t.d(e,{Fg:function(){return w}});var i=t(7297),r=t(85893),o=(t(67294),t(45697)),a=t.n(o),s=t(87379),d=t(41664),c=t.n(d),l=t(8293),u=t(36434),m=t(94586),f=t(29059);function h(){var n=(0,i.Z)(["\n color: #333;\n font-size: 1em;\n padding: 0 1em;\n text-align: left;\n"]);return h=function(){return n},n}function g(){var n=(0,i.Z)(["\n position: relative;\n text-align: center;\n width: calc((100% - 2em) / 3);\n margin-right: 1em;\n margin-bottom: 1em;\n background-color: #fff;\n border: 1px solid ",";\n\n @media screen and (min-width: 48em) {\n &:nth-child(3n + 3) {\n margin-right: 0;\n }\n }\n @media screen and (min-width: 32em) and (max-width: 48em) {\n width: calc((100% - 1em) / 2);\n &:nth-child(2n + 2) {\n margin-right: 0;\n }\n }\n @media screen and (max-width: 32em) {\n width: 100%;\n margin-right: 0;\n }\n"]);return g=function(){return n},n}function p(){var n=(0,i.Z)(["\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: space-between;\n transition: border 500ms;\n border-radius: 4px;\n &:hover {\n border-color: #fa6831;\n }\n"]);return p=function(){return n},n}var x=s.default.div.withConfig({componentId:"sc-dd1d2ec5-0"})(h()),v=s.default.article.withConfig({componentId:"sc-dd1d2ec5-1"})(g(),(0,m.E)("lightGrey")),w=s.default.a.withConfig({componentId:"sc-dd1d2ec5-2"})(p());function b(n){var e=n.title,t=n.content,i=n.status,o=n.translation_status,a=n.media,s=n.slug,d=n.language,m=n.type,h=void 0===m?"guides":m;return(0,r.jsxs)(v,{children:["private"===i&&(0,r.jsx)(l.OE,{status:i}),(0,r.jsx)(c(),{href:(0,u.Y4)({item:{slug:s,type:h}}),passHref:!0,children:(0,r.jsxs)(w,{children:[(0,r.jsxs)(x,{children:[(0,r.jsxs)("h4",{children:[(0,u.Hl)(e),(0,r.jsx)(f.Z,{language:d,status:o})]}),(0,u.Hl)(t)]}),a&&a.image&&(0,r.jsx)(l.Ee,{image:a.image,size:"thumbnail",alt:e,noMargin:!0,styleObject:{borderBottomRightRadius:"4px",borderTopRightRadius:"4px",width:"80px",height:"80px",objectFit:"cover",flexShrink:0}})]})})]})}b.propTypes={title:a().string.isRequired,content:a().string.isRequired,language:a().string.isRequired,slug:a().string.isRequired,media:a().object},e.ZP=b},20581:function(n,e,t){t.d(e,{Z:function(){return v}});var i=t(7297),r=t(85893),o=t(67294),a=t(45697),s=t.n(a),d=t(87379),c="app.component.InfiniteScroll",l={loadMore:"".concat(c,".loadMore"),loading:"".concat(c,".loading"),noMore:"".concat(c,".noMore")},u=t(76957),m=t(26349),f=t(8293),h=t(61590);function g(){var n=(0,i.Z)(["\n text-align: center;\n margin: 1em 0;\n"]);return g=function(){return n},n}var p=d.default.div.withConfig({componentId:"sc-fa5079ec-0"})(g());function x(n){var e=n.setPage,t=n.page,i=n.swrKey,a=n.totalPages,s=n.isLoading,d=(0,o.useRef)(null);return(0,h.RF)((function(n){n.prevPos;var i=n.currPos;s||a===t||a<=t||t<2||i.y<window.innerHeight/1.2&&e(t+1)}),[t,s],d,!1,200),a<2?null:(0,r.jsxs)(p,{ref:d,style:{fontStyle:a===t?"italic":"normal"},children:[i&&(0,r.jsx)(u.Dc,{swrKey:i}),s||a!==t?(0,r.jsx)(f.ei,{onClick:function(){e(t+1)},children:s?(0,r.jsx)(m.Z,{index:l.loading}):(0,r.jsx)(m.Z,{index:l.loadMore})}):(0,r.jsx)(m.Z,{index:l.noMore})]})}x.propTypes={setPage:s().func,page:s().number,totalPages:s().number,isLoading:s().bool};var v=x},87802:function(n,e,t){t.d(e,{Z:function(){return E}});var i=t(7297),r=t(85893),o=t(67294),a=t(45697),s=t.n(a),d=t(87379),c=t(88500),l=t.n(c),u=t(96486),m=t(11163),f="app.containers.ForumWidget",h={topPosts:"".concat(f,".topPosts"),visitForum:"".concat(f,".visitForum"),updated:"".concat(f,".updated"),by:"".concat(f,".by")},g=t(26349),p=t(8293),x=t(40039),v=t(94586),w=t(36434);function b(){var n=(0,i.Z)(["\n width: 80px;\n height: auto;\n border-radius: 50%;\n margin-right: 1.2em;\n"]);return b=function(){return n},n}function j(){var n=(0,i.Z)(["\n color: ",";\n display: flex;\n justify-content: space-between;\n width: 150px;\n font-size: 1.1em;\n margin-left: auto;\n @media screen and (max-width: 48em) {\n width: 60%;\n margin: auto;\n margin-top: 1em;\n }\n"]);return j=function(){return n},n}function y(){var n=(0,i.Z)(["\n font-weight: normal;\n font-size: 1.1em;\n margin: 5px 0;\n color: #333;\n"]);return y=function(){return n},n}function Z(){var n=(0,i.Z)(["\n display: flex;\n align-items: center;\n width: 100%;\n flex-wrap: wrap;\n @media screen and (max-width: 48em) {\n justify-content: center;\n text-align: center;\n }\n"]);return Z=function(){return n},n}var C=d.default.img.withConfig({componentId:"sc-283742a-0"})(b()),k=d.default.div.withConfig({componentId:"sc-283742a-1"})(j(),(0,v.E)("grey")),R=d.default.h3.withConfig({componentId:"sc-283742a-2"})(y()),I=d.default.div.withConfig({componentId:"sc-283742a-3"})(Z()),q=function(n){var e=n.topics,t=(0,m.useRouter)().locale;return l().locale(t),(null===e||void 0===e?void 0:e.length)?e.map((function(n){var e="object"===typeof n&&"data"in n?n.data:n;return(0,r.jsx)(p.HC,{children:(0,r.jsx)("a",{href:e.url,target:"_blank",rel:"noreferrer noopener",style:{padding:"0 0.5em",display:"block"},children:(0,r.jsxs)(I,{children:[(0,r.jsx)(C,{src:!e.avatar||e.avatar.startsWith("http:")?"/img/avatar.jpg":e.avatar,alt:e.title}),(0,r.jsxs)("div",{children:[(0,r.jsx)(R,{children:e.title}),(0,r.jsxs)(p.h_,{children:[(0,r.jsx)(g.Z,{index:h.updated})," ",l()(e.lastupdate).fromNow(),(0,w.fp)(h.by)&&(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)(g.Z,{index:h.by})]}),": ",e.nicename]})]}),(0,r.jsxs)(k,{children:[(0,r.jsxs)("span",{children:[(0,r.jsx)(x.qt,{})," ",e.postcount]}),(0,r.jsxs)("span",{children:[(0,r.jsx)(x.tE,{})," ",e.viewscount]})]})]})})},e.topicid)})):(0,r.jsx)("p",{style:{textAlign:"center"},children:"Nothing found."})};function z(n){var e=n.items,t=(0,o.useCallback)((function(){return window.open("https://forum.prusa3d.com","_blank")}));return!e||(null===e||void 0===e?void 0:e.empty)?null:(0,r.jsxs)(p.im,{children:[(0,r.jsx)(p.H2,{center:!0,children:(0,r.jsx)(g.Z,{index:h.topPosts})}),(0,r.jsx)(p.JX,{padding:!0,children:(0,r.jsx)(p.aV,{children:(0,r.jsx)(q,{topics:e})})}),(0,r.jsx)("div",{style:{textAlign:"center"},children:(0,r.jsx)(p.ei,{onClick:t,children:(0,r.jsx)(g.Z,{index:h.visitForum})})})]})}z.propTypes={search:s().string,data:s().object,tag:s().oneOfType([s().object,s().bool])};var E=o.memo(z,(function(n,e){return(0,u.isEqual)(n.items,e.items)}))}}]);
//# sourceMappingURL=4560-3505c3af0a5d7e74.js.map