UNPKG

@europeana/portal

Version:
2 lines 18.1 kB
(window.webpackJsonp=window.webpackJsonp||[]).push([[55,102],{1127:function(t,e,n){"use strict";n.r(e);n(10),n(43),n(46),n(34),n(60),n(30),n(15),n(64);var r=n(176),o=n.n(r),l=n(720),c=n(724),d=n(739),m={name:"BlogPost",components:{AuthoredHead:function(){return n.e(7).then(n.bind(null,1160))},BlogAuthor:function(){return n.e(119).then(n.bind(null,1180))},RelatedCategoryTags:function(){return n.e(11).then(n.bind(null,904))},ClientOnly:o.a,SocialShareModal:l.a,ShareButton:c.a,BrowseSections:d.default,RelatedCollections:function(){return n.e(3).then(n.bind(null,742))}},props:{datePublished:{type:String,default:""},title:{type:String,required:!0},description:{type:String,default:""},body:{type:Object,default:null},identifier:{type:String,required:!0},hero:{type:Object,default:null},authors:{type:Array,default:function(){return[]}},tags:{type:Array,default:function(){return[]}},relatedLink:{type:Array,default:function(){return[]}}}},h=(n(964),n(59)),f={name:"BlogPostPage",components:{BlogPost:Object(h.a)(m,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("AuthoredHead",{attrs:{title:t.title,description:t.description,hero:t.hero,"context-label":t.$tc("blog.posts",1)}}),t._v(" "),n("b-container",[n("b-row",{staticClass:"justify-content-center"},[n("b-col",{staticClass:"col-lg-8",attrs:{cols:"12"}},[n("article",[n("div",{staticClass:"font-small font-weight-bold d-block"},[t.datePublished?n("time",{staticClass:"d-inline-block",attrs:{"data-qa":"date",datetime:t.datePublished}},[t._v("\n "+t._s(t.$t("blog.published",{date:t.$d(new Date(t.datePublished),"short")}))+"\n ")]):t._e(),t._v(" "),t.authors?n("span",[t._v("\n "+t._s(t.$t("blog.by"))+"\n ")]):t._e(),t._v(" "),t._l(t.authors,(function(t,e){return[n("BlogAuthor",{key:e,staticClass:"author d-inline",attrs:{name:t.name,organisation:t.affiliation,url:t.url}})]}))],2),t._v(" "),n("ShareButton",{staticClass:"my-4"}),t._v(" "),n("SocialShareModal",{attrs:{"media-url":t.hero?t.hero.image.url:null}}),t._v(" "),n("BrowseSections",{staticClass:"authored-section",attrs:{sections:t.body.items,"rich-text-is-card":!1,"data-qa":"blog-sections"}})],1),t._v(" "),t.tags?n("RelatedCategoryTags",{attrs:{tags:t.tags}}):t._e(),t._v(" "),n("client-only",[n("RelatedCollections",{attrs:{"entity-uris":t.relatedLink,title:t.$t("youMightAlsoLike")}})],1)],1)],1),t._v(" "),n("b-row",{staticClass:"footer-margin"})],1)],1)}),[],!1,null,"1f8f05c6",null).exports,ContentWarningModal:function(){return n.e(8).then(n.bind(null,1165))}},beforeRouteLeave:function(t,e,n){this.$store.commit("breadcrumb/clearBreadcrumb"),n()},asyncData:function(t){var e=t.params,n=t.query,r=t.error,o=t.app,l=t.store,c=t.redirect,d={identifier:e.pathMatch,locale:o.i18n.isoLocale(),preview:"preview"===n.mode};return o.$contentful.query("blogPostPage",d).then((function(t){return t.data.data})).then((function(data){if(0===data.blogPostingCollection.items.length)return c(302,"/blog");var t=data.blogPostingCollection.items[0];return l.commit("breadcrumb/setBreadcrumbs",[{text:o.i18n.t("blog.blog"),to:"/blog"},{text:t.name,active:!0}]),{post:t}})).catch((function(t){r({statusCode:500,message:t.toString()})}))},data:function(){return{post:null,error:null}},head:function(){return{title:this.$pageHeadTitle(this.post.name),meta:[{hid:"og:type",property:"og:type",content:"article"},{hid:"title",name:"title",content:this.post.name},{hid:"og:title",property:"og:title",content:this.post.name}].concat(this.post.description?[{hid:"description",name:"description",content:this.post.description},{hid:"og:description",property:"og:description",content:this.post.description}]:[]).concat(this.post.primaryImageOfPage?[{hid:"og:image",property:"og:image",content:this.post.primaryImageOfPage.image.url},{hid:"og:image:alt",property:"og:image:alt",content:this.post.primaryImageOfPage.image.description||""}]:[])}},computed:{hero:function(){return this.post.primaryImageOfPage||null}}},y=Object(h.a)(f,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"text-page white-page figure-attribution",attrs:{"data-qa":"blog post"}},[t.post.contentWarning?n("ContentWarningModal",{attrs:{title:t.post.contentWarning.name,description:t.post.contentWarning.description,"page-slug":"blog/"+t.post.identifier}}):t._e(),t._v(" "),n("BlogPost",{attrs:{"date-published":t.post.datePublished,title:t.post.name,description:t.post.description,body:t.post.hasPartCollection,identifier:t.post.identifier,hero:t.hero,authors:t.post.authorCollection.items.length>0?t.post.authorCollection.items:null,tags:t.post.categoriesCollection&&t.post.categoriesCollection.items,"related-link":t.post.relatedLink}})],1)}),[],!1,null,null,null);e.default=y.exports},706:function(t,e,n){var content=n(709);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(138).default)("688b9c6f",content,!0,{sourceMap:!1})},707:function(t,e,n){"use strict";n(16),n(15),n(13),n(10),n(19),n(14),n(20);var r=n(2),o=n(108);function l(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function c(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?l(Object(source),!0).forEach((function(e){Object(r.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):l(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var d={name:"SocialShare",props:{mediaUrl:{type:String,default:""},withText:{type:Boolean,default:!1}},computed:c(c({},Object(o.b)({shareUrl:"http/canonicalUrlWithoutLocale"})),{},{networks:function(){return[{identifier:"facebook",name:"Facebook",url:"https://www.facebook.com/sharer/sharer.php?display=page&u=".concat(this.shareUrl)},{identifier:"twitter",name:"Twitter",url:"https://twitter.com/intent/tweet?text=".concat(this.shareUrl)},{identifier:"pinterest",name:"Pinterest",url:"https://pinterest.com/pin/create/link/?url=".concat(this.shareUrl)+(this.mediaUrl?"&media=".concat(this.mediaUrl):"")}]}})},m=(n(708),n(59)),component=Object(m.a)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",t._l(t.networks,(function(e,r){return n("b-link",{key:r,class:"social-share mr-1 "+e.identifier,attrs:{title:t.$t("actions.shareOn",{social:e.name}),href:e.url,"data-qa":"share "+e.identifier+" button"},nativeOn:{click:function(n){t.$matomo&&t.$matomo.trackEvent("Item_share","Click social share button",e.url)}}},[n("span",{class:"icon-"+e.identifier}),t._v(" "),t.withText?n("span",{staticClass:"text"},[t._v(t._s(e.name)+"\n ")]):t._e()])})),1)}),[],!1,null,"a553b8a4",null);e.a=component.exports},708:function(t,e,n){"use strict";n(706)},709:function(t,e,n){var r=n(137)(!1);r.push([t.i,"a[data-v-a553b8a4]{align-items:center;background:transparent;border:1px solid #1a1a1a;border-radius:50%;color:#1a1a1a;display:inline-flex;height:calc(2.5rem - 1px);justify-content:center;text-decoration:none;transition:background .25s;width:calc(2.5rem - 1px)}a [class^=icon][data-v-a553b8a4]{color:#1a1a1a;font-size:1.25rem}a[data-v-a553b8a4]:hover{background:#1a1a1a}a:hover [class^=icon][data-v-a553b8a4]{color:#fff}",""]),t.exports=r},710:function(t,e,n){var content=n(719);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(138).default)("7d1c1bc9",content,!0,{sourceMap:!1})},713:function(t,e,n){var content=n(722);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(138).default)("2ac4ab00",content,!0,{sourceMap:!1})},718:function(t,e,n){"use strict";n(710)},719:function(t,e,n){var r=n(137)(!1);r.push([t.i,'#share-modal .modal-content .modal-body .icon-wrapper>div{display:flex;justify-content:space-between}#share-modal .modal-content .modal-body a{border-radius:.25rem;width:calc(33.3333333333% - 10px);height:3rem;margin-right:0 !important;justify-content:flex-start;padding-left:1rem}#share-modal .modal-content .modal-body a.facebook{border:solid 1px #4064ac}#share-modal .modal-content .modal-body a.facebook span{color:#4064ac}#share-modal .modal-content .modal-body a.twitter{border:solid 1px #1c9ceb}#share-modal .modal-content .modal-body a.twitter span{color:#1c9ceb}#share-modal .modal-content .modal-body a.pinterest{border:solid 1px #ba0a21}#share-modal .modal-content .modal-body a.pinterest span{color:#ba0a21}#share-modal .modal-content .modal-body a:hover{background:#fff}#share-modal .modal-content .modal-body a span.text{font-family:"Open Sans","Arial",sans-serif;font-weight:600;padding-left:.75rem}@media(max-width: 576px){#share-modal .modal-content .modal-body .icon-wrapper>div{flex-direction:column}#share-modal .modal-content .modal-body .icon-wrapper>div a{width:100%;margin-bottom:10px}}',""]),t.exports=r},720:function(t,e,n){"use strict";var r={name:"SocialShareModal",components:{SocialShare:n(707).a},props:{mediaUrl:{type:String,default:null}}},o=(n(718),n(59)),component=Object(o.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("b-modal",{attrs:{id:"share-modal",title:t.$t("actions.share"),"hide-header-close":"","hide-footer":"","data-qa":"share modal"}},[n("div",{staticClass:"icon-wrapper"},[n("SocialShare",{attrs:{"media-url":t.mediaUrl,"with-text":""}})],1),t._v(" "),t._t("default"),t._v(" "),n("b-button",{staticClass:"mt-4",attrs:{variant:"outline-primary"},on:{click:function(e){return t.$bvModal.hide("share-modal")}}},[t._v("\n "+t._s(t.$t("actions.close"))+"\n ")])],2)}),[],!1,null,null,null);e.a=component.exports},721:function(t,e,n){"use strict";n(713)},722:function(t,e,n){var r=n(137)(!1);r.push([t.i,".icon-share[data-v-8c644634]{font-size:1.125rem;line-height:1rem}",""]),t.exports=r},723:function(t,e){},724:function(t,e,n){"use strict";var r={},o=(n(721),n(59)),l=n(723),c=n.n(l),component=Object(o.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("b-button",{directives:[{name:"b-modal",rawName:"v-b-modal.share-modal",modifiers:{"share-modal":!0}}],staticClass:"share-button d-inline-flex align-items-center",attrs:{"data-qa":"share button"}},[n("span",{staticClass:"icon-share d-inline-flex pr-1"}),t._v("\n "+t._s(t.$t("actions.share"))+"\n")])}),[],!1,null,"8c644634",null);"function"==typeof c.a&&c()(component);e.a=component.exports},728:function(t,e,n){var content=n(736);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(138).default)("2c019ec8",content,!0,{sourceMap:!1})},735:function(t,e,n){"use strict";n(728)},736:function(t,e,n){var r=n(137)(!1);r.push([t.i,"[data-v-57cf4cac] .attribution::after{padding-top:.2rem}",""]),t.exports=r},739:function(t,e,n){"use strict";n.r(e);n(16),n(15),n(19),n(14),n(20);var r=n(2),o=n(23);n(75),n(10),n(43),n(46),n(30),n(47),n(13),n(58),n(62),n(34);function l(object,t){var e=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(object,t).enumerable}))),e.push.apply(e,n)}return e}function c(t){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?l(Object(source),!0).forEach((function(e){Object(r.a)(t,e,source[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(source)):l(Object(source)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(source,e))}))}return t}var d={components:{CompareImageSlider:function(){return n.e(88).then(n.bind(null,1173))},ContentCardSection:function(){return Promise.all([n.e(0),n.e(18)]).then(n.bind(null,1085))},LatestSection:function(){return Promise.all([n.e(0),n.e(93)]).then(n.bind(null,1174))},HTMLEmbed:function(){return n.e(112).then(n.bind(null,758))},ImageWithAttribution:function(){return n.e(15).then(n.bind(null,1175))},CallToAction:function(){return n.e(121).then(n.bind(null,905))},RichText:function(){return Promise.all([n.e(0),n.e(103)]).then(n.bind(null,907))},AutomatedCardGroup:function(){return Promise.all([n.e(0),n.e(18),n.e(117)]).then(n.bind(null,1123))},PrimaryCallToAction:function(){return Promise.all([n.e(0),n.e(92)]).then(n.bind(null,1176))}},props:{richTextIsCard:{type:Boolean,default:!0},sections:{type:Array,default:function(){return[]}}},data:function(){return{content:this.sections}},fetch:function(){var t=this;return Object(o.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.sectionsWithLatestCardGroups(t.sections);case 2:t.content=e.sent;case 3:case"end":return e.stop()}}),e)})))()},methods:{sectionsWithLatestCardGroups:function(t){var e=this;return Object(o.a)(regeneratorRuntime.mark((function n(){var content,r,o,l,d,i,m;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(content=[].concat(t),0!==(r=content.filter((function(t){return t&&"LatestCardGroup"===t.__typename})).map((function(t){return t.genre}))).length){n.next=4;break}return n.abrupt("return",content);case 4:return o={locale:e.$i18n.isoLocale(),preview:"preview"===e.$route.query.mode,exhibitions:r.includes("Exhibitions"),blogPosts:r.includes("Blog posts"),galleries:r.includes("Galleries"),limit:4},n.prev=5,n.next=8,e.$contentful.query("latestCardGroups",o);case 8:d=n.sent,l=d.data,n.next=15;break;case 12:return n.prev=12,n.t0=n.catch(5),n.abrupt("return",content);case 15:i=0;case 16:if(!(i<content.length)){n.next=32;break}if(!content[i]||"LatestCardGroup"!==content[i].__typename){n.next=29;break}m={},n.t1=content[i].genre,n.next="Exhibitions"===n.t1?22:"Blog posts"===n.t1?24:"Galleries"===n.t1?26:28;break;case 22:return m=l.data.exhibitionPageCollection,n.abrupt("break",28);case 24:return m=l.data.blogPostingCollection,n.abrupt("break",28);case 26:return m=l.data.imageGalleryCollection,n.abrupt("break",28);case 28:content[i]=c(c({},content[i]),m);case 29:i++,n.next=16;break;case 32:return n.abrupt("return",content);case 33:case"end":return n.stop()}}),n,null,[[5,12]])})))()},contentType:function(section,t){return section&&section.__typename===t},attributionFields:function(t){return{name:null==t?void 0:t.name,creator:null==t?void 0:t.creator,provider:null==t?void 0:t.provider,rightsStatement:null==t?void 0:t.license,url:null==t?void 0:t.url}},imageCompareImage:function(section,t){var e,n,r;return null===(e=section.hasPartCollection)||void 0===e||null===(n=e.items)||void 0===n||null===(r=n[t])||void 0===r?void 0:r.image}}},m=(n(735),n(59)),component=Object(m.a)(d,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"figure-attribution"},t._l(t.content,(function(section,e){return n("div",{key:e},[t.contentType(section,"ContentTypeRichText")?n("RichText",{attrs:{text:section.text,"rich-text-is-card":t.richTextIsCard}}):t.contentType(section,"CardGroup")?n("ContentCardSection",{attrs:{section:section}}):t.contentType(section,"LatestCardGroup")&&section.total?n("LatestSection",{attrs:{category:section.genre,total:section.total,cards:section.items}}):t.contentType(section,"AutomatedCardGroup")?n("AutomatedCardGroup",{attrs:{"section-type":section.genre,"more-button":section.moreButton}}):t.contentType(section,"Embed")?n("HTMLEmbed",{attrs:{html:section.embed}}):t.contentType(section,"ImageComparison")?n("CompareImageSlider",{attrs:{"left-image-src":t.imageCompareImage(section,0)?t.imageCompareImage(section,0).url:null,"left-image-content-type":t.imageCompareImage(section,0)?t.imageCompareImage(section,0).contentType:null,"left-image-attribution":t.attributionFields(section.hasPartCollection.items[0]),"left-image-width":t.imageCompareImage(section,0)?t.imageCompareImage(section,0).width:null,"left-image-height":t.imageCompareImage(section,0)?t.imageCompareImage(section,0).height:null,"right-image-src":t.imageCompareImage(section,1)?t.imageCompareImage(section,1).url:null,"right-image-content-type":t.imageCompareImage(section,1)?t.imageCompareImage(section,1).contentType:null,"right-image-attribution":t.attributionFields(section.hasPartCollection.items[1]),"right-image-width":t.imageCompareImage(section,1)?t.imageCompareImage(section,1).width:null,"right-image-height":t.imageCompareImage(section,1)?t.imageCompareImage(section,1).height:null}}):t.contentType(section,"ImageWithAttribution")?n("ImageWithAttribution",{attrs:{src:section.image?section.image.url:null,"content-type":section.image?section.image.contentType:null,width:section.image?section.image.width:null,height:section.image?section.image.height:null,alt:section.image&&section.image.description?section.image.description:"",attribution:t.attributionFields(section),"rights-statement":section.license}}):t.contentType(section,"Link")?n("CallToAction",{attrs:{text:section.text,url:section.url}}):t.contentType(section,"PrimaryCallToAction")?n("PrimaryCallToAction",{attrs:{text:section.text,link:section.relatedLink}}):t._e()],1)})),0)}),[],!1,null,"57cf4cac",null);e.default=component.exports},859:function(t,e,n){var content=n(965);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[t.i,content,""]]),content.locals&&(t.exports=content.locals);(0,n(138).default)("d2044bae",content,!0,{sourceMap:!1})},964:function(t,e,n){"use strict";n(859)},965:function(t,e,n){var r=n(137)(!1);r.push([t.i,'.author~.author[data-v-1f8f05c6]::before{content:", "}[data-v-1f8f05c6] .related-collections.container{padding:0}[data-v-1f8f05c6] .related-collections .badge-pill{margin-top:.25rem;margin-right:.5rem}',""]),t.exports=r}}]); //# sourceMappingURL=2c03739.js.map