-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle variables in summary section'
- Loading branch information
kristinegusta
committed
Aug 30, 2023
1 parent
925755b
commit 0358480
Showing
10 changed files
with
27 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
var n=require("react"),e=require("styled-components"),t=require("react-router-dom"),r=require("react-content-loader");function i(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var a=/*#__PURE__*/i(e);function o(n,e){return e||(e=n.slice(0)),n.raw=e,n}var l,u,d,c,s,f,m,p,g,x,b,w,y,v="(min-width: 525px)",k="(min-width: 768px)",A="(min-width: 1024px)",z="(min-width: 1440px)",S="(min-width: 2560px)",F=function(n){return h(Fragment,null,h(_,{textAlign:n.textAlign},n.subtitle),h(j,{textAlign:n.textAlign},n.title),h(C,null,n.content,n.link?h("a",{href:n.link},n.linkText):null))},_=a.default.h4(l||(l=o(["\n color: #f09125;\n text-transform: uppercase;\n text-align: ",";\n margin: 0.5rem 0;\n"])),function(n){return"left"===n.textAlign?"left":"center"}),j=a.default.h2(u||(u=o(["\n font-size: 28px;\n text-align: ",";\n max-width: ",";\n margin: ",";\n @media "," {\n margin: ",";\n }\n"])),function(n){return"left"===n.textAlign?"left":"center"},function(n){return"left"===n.textAlign?"unset":"650px"},function(n){return"left"===n.textAlign?"0 0 1.5rem 0":"0 auto 1.5rem auto"},A,function(n){return"left"===n.textAlign?"0 0 1.5rem 0":"0 auto 3rem auto"}),C=a.default.div(d||(d=o(["\n width: 100%;\n @media "," {\n max-width: 65ch;\n }\n"])),k),M=function(n){return h(T,{className:n.name,color:n.color,border:n.border},h(q,null,n.children))},T=a.default.div(c||(c=o(["\n background-color: ",";\n\n color: ",";\n border-top: ",";\n\n z-index: 5;\n position: relative;\n padding: 5rem 0;\n\n @media "," {\n padding: 8rem 0;\n }\n @media "," {\n padding: 9rem 0;\n }\n"])),function(n){return"dark"===n.color?"#001C3D":"lightGrey"===n.color?"#FAFBFC":"darkGrey"===n.color?"#F5F6FA":"white"},function(n){return"dark"===n.color?"white":"#091E42"},function(n){return"top"===n.border?"1px solid #d5d5d5":"none"},z,S),q=a.default.div(s||(s=o(["\n margin: 0 auto;\n padding: 0 16px;\n\n @media "," {\n max-width: 650px;\n }\n @media "," {\n max-width: 800px;\n }\n @media "," {\n max-width: 1000px;\n }\n @media "," {\n max-width: 1100px;\n }\n @media "," {\n max-width: 1300px;\n }\n"])),v,k,A,z,S);function D(n){var e,t,r,i=(t=(e=n.date.split("-"))[0],r=e[2],["January","February","March","April","May","June","July","August","September","October","November","December"][Number(e[1])-1]+" "+Number(r)+", "+t);return h(E,{to:"/blog/"+n.id},h(L,null,h(B,null,h(R,null,n.type),h(G,null,i)),h(J,null,n.title),h(P,null,n.summary)))}var E=a.default(t.Link)(f||(f=o(["\n transition: all 0.5s ease;\n padding-right: 0.625rem;\n padding-left: 0.625rem;\n @media "," {\n flex: 0 0 33.3333%;\n max-width: 33.3333%;\n }\n &:hover {\n opacity: 0.6;\n }\n"])),v),L=a.default.div(m||(m=o(["\n max-width: 100%;\n margin-bottom: 50px;\n"])));a.default.div(p||(p=o(["\n // background-image: url(",");\n width: 100%;\n height: 150px;\n background-size: contain;\n background-repeat: no-repeat;\n margin-bottom: 16px;\n background-position: center;\n"])),function(n){return n.background});var N,R=a.default.h5(g||(g=o(["\n font-size: 0.6875rem;\n font-weight: 500;\n color: #6a6788;\n text-transform: uppercase;\n letter-spacing: 1.1px;\n transition: color 0.25s ease;\n"]))),J=a.default.h4(x||(x=o(["\n font-size: 1.5rem;\n font-weight: 700;\n color: #050038;\n letter-spacing: -0.5px;\n margin: 8px 0;\n"]))),P=a.default.p(b||(b=o(["\n font-size: 1em;\n font-weight: 600;\n color: rgb(106, 103, 136);\n"]))),B=a.default.div(w||(w=o(["\n display: flex;\n justify-content: space-between;\n"]))),G=a.default.p(y||(y=o(["\n font-size: 0.8rem;\n color: rgb(106, 103, 136);\n"]))),H=function(n){return h("section",null,Array.from({length:n.count},function(n,e){return h(r.Code,{key:e,style:{width:"100%",marginTop:"3rem"}})}))};function O(n){return h(I,{size:n.size},n.errorMessage)}var U,I=a.default.div(N||(N=o(["\n color: red;\n font-size: 1.2rem;\n text-align: center;\n height: ",";\n display: flex;\n justify-content: center;\n align-items: center;\n"])),function(n){return"small"===n.size?"300px":"50vh"});function K(n){return h(V,{to:"/blog",align:n.align},"Read all articles & news")}var Q,V=a.default(t.Link)(U||(U=o(["\n display: flex;\n justify-content: center;\n align-items: center;\n margin: ",";\n width: 300px;\n color: var(--dark-blue);\n text-decoration: none;\n padding: 10px 10px;\n border: 2px solid var(--dark-orange);\n border-radius: 4px;\n &:hover {\n border: 2px solid var(--light-blue);\n }\n"])),function(n){return"center"==n.align?"0 auto":"100px 0 0 0 "}),W=""+window.env.REACT_APP_DATAHUB_HC_URL,X=a.default.div(Q||(Q=o(["\n margin-top: 3rem;\n @media "," {\n display: flex;\n justify-content: space-between;\n }\n"])),v);exports.SummarySection=function(){var e=n.useState(),t=e[0],r=e[1],i=n.useState(!0),a=i[0],o=i[1],l=n.useState(null),u=l[0],d=l[1];return n.useEffect(function(){return fetch(W+"/help_backend/confluence_documents/blog/label/blog/latest/3").then(function(n){if(n.status>=200&&n.status<300)return n.json();throw new O("Server Error")}).then(function(n){o(!1),r(n)}).catch(function(n){o(!1),d("Oops! Something went wrong. Please try again later.")}),function(){r(),o(!0)}},[]),h(M,{name:"blog"},h(F,{textAlign:"center",subtitle:"Latest articles",title:"Stay tuned for Maastricht Data Repository’s news and useful features"}),u?h(O,{errorMessage:u,size:"small"}):a?h(H,{count:1}):h(X,null,t.map(function(n,e){return h(D,{key:e,id:n.id,type:n.article_type,title:n.title,date:n.date,summary:n.summary})})),h(K,{align:"center"}))},exports.Title=F; | ||
var n=require("react"),e=require("styled-components"),t=require("react-router-dom"),r=require("react-content-loader");function i(n){return n&&"object"==typeof n&&"default"in n?n:{default:n}}var a=/*#__PURE__*/i(e);function o(n,e){return e||(e=n.slice(0)),n.raw=e,n}var l,u,d,c,s,f,m,p,g,x,b,w,y,v="(min-width: 525px)",k="(min-width: 768px)",A="(min-width: 1024px)",z="(min-width: 1440px)",S="(min-width: 2560px)",F=function(n){return h(Fragment,null,h(j,{textAlign:n.textAlign},n.subtitle),h(M,{textAlign:n.textAlign},n.title),h(q,null,n.content,n.link?h("a",{href:n.link},n.linkText):null))},j=a.default.h4(l||(l=o(["\n color: #f09125;\n text-transform: uppercase;\n text-align: ",";\n margin: 0.5rem 0;\n"])),function(n){return"left"===n.textAlign?"left":"center"}),M=a.default.h2(u||(u=o(["\n font-size: 28px;\n text-align: ",";\n max-width: ",";\n margin: ",";\n @media "," {\n margin: ",";\n }\n"])),function(n){return"left"===n.textAlign?"left":"center"},function(n){return"left"===n.textAlign?"unset":"650px"},function(n){return"left"===n.textAlign?"0 0 1.5rem 0":"0 auto 1.5rem auto"},A,function(n){return"left"===n.textAlign?"0 0 1.5rem 0":"0 auto 3rem auto"}),q=a.default.div(d||(d=o(["\n width: 100%;\n @media "," {\n max-width: 65ch;\n }\n"])),k),C=function(n){return h(N,{className:n.name,color:n.color,border:n.border},h(D,null,n.children))},N=a.default.div(c||(c=o(["\n background-color: ",";\n\n color: ",";\n border-top: ",";\n\n z-index: 5;\n position: relative;\n padding: 5rem 0;\n\n @media "," {\n padding: 8rem 0;\n }\n @media "," {\n padding: 9rem 0;\n }\n"])),function(n){return"dark"===n.color?"#001C3D":"lightGrey"===n.color?"#FAFBFC":"darkGrey"===n.color?"#F5F6FA":"white"},function(n){return"dark"===n.color?"white":"#091E42"},function(n){return"top"===n.border?"1px solid #d5d5d5":"none"},z,S),D=a.default.div(s||(s=o(["\n margin: 0 auto;\n padding: 0 16px;\n\n @media "," {\n max-width: 650px;\n }\n @media "," {\n max-width: 800px;\n }\n @media "," {\n max-width: 1000px;\n }\n @media "," {\n max-width: 1100px;\n }\n @media "," {\n max-width: 1300px;\n }\n"])),v,k,A,z,S);function E(n){var e,t,r,i=(t=(e=n.date.split("-"))[0],r=e[2],["January","February","March","April","May","June","July","August","September","October","November","December"][Number(e[1])-1]+" "+Number(r)+", "+t);return h(J,{to:"/blog/"+n.id},h(L,null,h(R,null,h(_,null,n.type),h(B,null,i)),h(G,null,n.title),h(O,null,n.summary)))}var J=a.default(t.Link)(f||(f=o(["\n transition: all 0.5s ease;\n padding-right: 0.625rem;\n padding-left: 0.625rem;\n @media "," {\n flex: 0 0 33.3333%;\n max-width: 33.3333%;\n }\n &:hover {\n opacity: 0.6;\n }\n"])),v),L=a.default.div(m||(m=o(["\n max-width: 100%;\n margin-bottom: 50px;\n"])));a.default.div(p||(p=o(["\n // background-image: url(",");\n width: 100%;\n height: 150px;\n background-size: contain;\n background-repeat: no-repeat;\n margin-bottom: 16px;\n background-position: center;\n"])),function(n){return n.background});var T,_=a.default.h5(g||(g=o(["\n font-size: 0.6875rem;\n font-weight: 500;\n color: #6a6788;\n text-transform: uppercase;\n letter-spacing: 1.1px;\n transition: color 0.25s ease;\n"]))),G=a.default.h4(x||(x=o(["\n font-size: 1.5rem;\n font-weight: 700;\n color: #050038;\n letter-spacing: -0.5px;\n margin: 8px 0;\n"]))),O=a.default.p(b||(b=o(["\n font-size: 1em;\n font-weight: 600;\n color: rgb(106, 103, 136);\n"]))),R=a.default.div(w||(w=o(["\n display: flex;\n justify-content: space-between;\n"]))),B=a.default.p(y||(y=o(["\n font-size: 0.8rem;\n color: rgb(106, 103, 136);\n"]))),P=function(n){return h("section",null,Array.from({length:n.count},function(n,e){return h(r.Code,{key:e,style:{width:"100%",marginTop:"3rem"}})}))};function U(n){return h(I,{size:n.size},n.errorMessage)}var H,I=a.default.div(T||(T=o(["\n color: red;\n font-size: 1.2rem;\n text-align: center;\n height: ",";\n display: flex;\n justify-content: center;\n align-items: center;\n"])),function(n){return"small"===n.size?"300px":"50vh"});function K(n){return h(V,{to:"/blog",align:n.align},"Read all articles & news")}var Q,V=a.default(t.Link)(H||(H=o(["\n display: flex;\n justify-content: center;\n align-items: center;\n margin: ",";\n width: 300px;\n color: var(--dark-blue);\n text-decoration: none;\n padding: 10px 10px;\n border: 2px solid var(--dark-orange);\n border-radius: 4px;\n &:hover {\n border: 2px solid var(--light-blue);\n }\n"])),function(n){return"center"==n.align?"0 auto":"100px 0 0 0 "}),W=a.default.div(Q||(Q=o(["\n margin-top: 3rem;\n @media "," {\n display: flex;\n justify-content: space-between;\n }\n"])),v);exports.SummarySection=function(){var e=n.useState(),t=e[0],r=e[1],i=n.useState(!0),a=i[0],o=i[1],l=n.useState(null),u=l[0],d=l[1];return n.useEffect(function(){var n;return fetch(n.helpCenterUrl+"/help_backend/confluence_documents/blog/label/"+n.label+"/latest/3").then(function(n){if(n.status>=200&&n.status<300)return n.json();throw new U("Server Error")}).then(function(n){o(!1),r(n)}).catch(function(n){o(!1),d("Oops! Something went wrong. Please try again later.")}),function(){r(),o(!0)}},[]),h(C,{name:"blog"},h(F,{textAlign:"center",subtitle:"Latest articles",title:"Stay tuned for Maastricht Data Repository’s news and useful features"}),u?h(U,{errorMessage:u,size:"small"}):a?h(P,{count:1}):h(W,null,t.map(function(n,e){return h(E,{key:e,id:n.id,type:n.article_type,title:n.title,date:n.date,summary:n.summary})})),h(K,{align:"center"}))},exports.Title=F; | ||
//# sourceMappingURL=index.cjs.map |
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.