@mjhls/mjh-framework 1.0.196 → 1.0.197

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
7
7
  var React = require('react');
8
8
  var React__default = _interopDefault(React);
9
9
  var PropTypes = _interopDefault(require('prop-types'));
10
- var require$$1 = _interopDefault(require('react-dom'));
10
+ var reactDom = _interopDefault(require('react-dom'));
11
11
  var Container = _interopDefault(require('react-bootstrap/Container'));
12
12
  var Row = _interopDefault(require('react-bootstrap/Row'));
13
13
  var Col = _interopDefault(require('react-bootstrap/Col'));
@@ -7194,7 +7194,7 @@ var InfiniteScroll = /** @class */ (function (_super) {
7194
7194
 
7195
7195
  var visibilitySensor = createCommonjsModule(function (module, exports) {
7196
7196
  (function webpackUniversalModuleDefinition(root, factory) {
7197
- module.exports = factory(React__default, require$$1);
7197
+ module.exports = factory(React__default, reactDom);
7198
7198
  })(commonjsGlobal, function(__WEBPACK_EXTERNAL_MODULE__1__, __WEBPACK_EXTERNAL_MODULE__2__) {
7199
7199
  return /******/ (function(modules) { // webpackBootstrap
7200
7200
  /******/ // The module cache
@@ -8502,7 +8502,7 @@ var _react2 = _interopRequireDefault(React__default);
8502
8502
 
8503
8503
 
8504
8504
 
8505
- var _reactDom2 = _interopRequireDefault(require$$1);
8505
+ var _reactDom2 = _interopRequireDefault(reactDom);
8506
8506
 
8507
8507
 
8508
8508
 
@@ -29399,6 +29399,16 @@ var fbsHero = function fbsHero(props) {
29399
29399
  function urlFor(source) {
29400
29400
  return builder.image(source);
29401
29401
  }
29402
+
29403
+ var topArticleThumbnail = '';
29404
+ var topArticleAltText = topArticle.title;
29405
+ if (topArticle.thumbnail && topArticle.thumbnail.asset) {
29406
+ topArticleThumbnail = urlFor(topArticle.thumbnail.asset).width(600).url();
29407
+ topArticleAltText = topArticle.thumbnail.asset.originalFileName;
29408
+ } else if (props.thumbnail) {
29409
+ topArticleThumbnail = props.thumbnail;
29410
+ }
29411
+
29402
29412
  return React__default.createElement(
29403
29413
  'div',
29404
29414
  { className: 'article-hero' },
@@ -29411,7 +29421,7 @@ var fbsHero = function fbsHero(props) {
29411
29421
  React__default.createElement(
29412
29422
  'div',
29413
29423
  { className: 'fbs-top-article--img' },
29414
- React__default.createElement('img', { src: urlFor(topArticle.thumbnail.asset).width(600).url(), alt: topArticle.thumbnail.asset.originalFileName })
29424
+ React__default.createElement('img', { src: topArticleThumbnail, alt: topArticleAltText })
29415
29425
  ),
29416
29426
  React__default.createElement(
29417
29427
  'div',
@@ -29426,7 +29436,7 @@ var fbsHero = function fbsHero(props) {
29426
29436
  null,
29427
29437
  moment(topArticle.published).format('MMMM DD, YYYY hh:mma')
29428
29438
  ),
29429
- React__default.createElement(
29439
+ topArticle.authorMapping && topArticle.authorMapping[0] && React__default.createElement(
29430
29440
  'p',
29431
29441
  null,
29432
29442
  'By ',
@@ -29443,10 +29453,19 @@ var fbsHero = function fbsHero(props) {
29443
29453
  'div',
29444
29454
  { className: 'fbs-sub-article-container' },
29445
29455
  subArticles.map(function (article, index) {
29456
+ var articleThumbnail = '';
29457
+ var articleAltText = article.title;
29458
+ if (article.thumbnail && article.thumbnail.asset) {
29459
+ articleThumbnail = urlFor(article.thumbnail.asset).width(250).url();
29460
+ articleAltText = article.thumbnail.asset.originalFileName;
29461
+ } else if (props.thumbnail) {
29462
+ articleThumbnail = props.thumbnail;
29463
+ }
29464
+
29446
29465
  return React__default.createElement(
29447
29466
  'a',
29448
29467
  { key: index, href: '/view/' + article.url.current, className: 'fbs-sub-article' },
29449
- React__default.createElement('img', { src: urlFor(article.thumbnail.asset).width(250).url() }),
29468
+ React__default.createElement('img', { src: articleThumbnail, alt: articleAltText }),
29450
29469
  React__default.createElement(
29451
29470
  'div',
29452
29471
  null,
@@ -29460,14 +29479,14 @@ var fbsHero = function fbsHero(props) {
29460
29479
  null,
29461
29480
  moment(article.published).format('MMMM DD, YYYY hh:mma')
29462
29481
  ),
29463
- React__default.createElement(
29482
+ article.authorMapping && article.authorMapping[0] && React__default.createElement(
29464
29483
  'p',
29465
29484
  null,
29466
29485
  'By ',
29467
29486
  React__default.createElement(
29468
29487
  'b',
29469
29488
  null,
29470
- topArticle.authorMapping[0].displayName
29489
+ article.authorMapping[0].displayName
29471
29490
  )
29472
29491
  )
29473
29492
  )
@@ -29477,7 +29496,7 @@ var fbsHero = function fbsHero(props) {
29477
29496
  React__default.createElement(
29478
29497
  'style',
29479
29498
  { jsx: 'true' },
29480
- '\n .article-hero {\n margin-bottom: 1rem;\n border-bottom: 1px solid #ddd;\n padding-bottom: 0.5rem;\n }\n .fbs-top-article {\n width: 100%;\n margin-bottom: 1rem;\n padding-bottom: 1rem;\n border-bottom: 1px solid #ddd;\n }\n .fbs-top-article img {\n width: 100%;\n height: auto;\n max-height: 375px;\n object-fit: cover;\n }\n .fbs-top-article--body {\n }\n .fbs-top-article--body h1 {\n color: #252525!important;\n font-size: 1.6rem;\n font-weight: bold;\n text-align: center;\n margin-top: 1rem;\n }\n .fbs-top-article--body p {\n text-align: center;\n margin-bottom: 0;\n color: #252525;\n }\n .fbs-top-article--body p:first-of-type {\n \n font-size: 0.9rem;\n }\n .fbs-sub-article-container {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n\n padding-top: 1.75rem;\n margin-left: -1rem;\n margin-rigth: -1rem;\n }\n .fbs-sub-article {\n width: calc(50% - 2rem);\n min-width: 350px;\n display: flex;\n flex-direction: row;\n flex: 1 1 auto;\n margin: 0 1rem 1.75rem;\n }\n .fbs-sub-article img {\n margin-right: 1rem;\n width: 100px;\n max-height: 100px;\n object-fit: cover;\n }\n .fbs-sub-article p {\n margin-bottom: 0;\n font-size: 0.8rem;\n color: #252525;\n }\n .fbs-sub-article .fbs-sub-article--title {\n font-weight: bold;\n font-size: 1rem;\n color: #252525;\n }\n \n '
29499
+ '\n .article-hero {\n margin-bottom: 1rem;\n border-bottom: 1px solid #ddd;\n padding-bottom: 0.5rem;\n }\n .fbs-top-article {\n width: 100%;\n margin-bottom: 1rem;\n padding-bottom: 1rem;\n border-bottom: 1px solid #ddd;\n }\n .fbs-top-article img {\n width: 100%;\n height: auto;\n max-height: 375px;\n object-fit: cover;\n }\n \n .fbs-top-article--body {\n }\n .fbs-top-article--body h1 {\n color: #252525 !important;\n font-size: 1.6rem;\n font-weight: bold;\n text-align: center;\n margin-top: 1rem;\n }\n .fbs-top-article--body p {\n text-align: center;\n margin-bottom: 0;\n color: #252525;\n }\n .fbs-top-article--body p:first-of-type {\n font-size: 0.9rem;\n }\n .fbs-sub-article-container {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n\n padding-top: 1.75rem;\n margin-left: -1rem;\n margin-rigth: -1rem;\n }\n .fbs-sub-article {\n width: calc(50% - 2rem);\n min-width: 350px;\n display: flex;\n flex-direction: row;\n flex: 1 1 auto;\n margin: 0 1rem 1.75rem;\n }\n .fbs-sub-article img {\n margin-right: 1rem;\n width: 100px;\n max-height: 100px;\n object-fit: contain;\n }\n .fbs-sub-article p {\n margin-bottom: 0;\n font-size: 0.8rem;\n color: #252525;\n }\n .fbs-sub-article .fbs-sub-article--title {\n font-weight: bold;\n font-size: 1rem;\n color: #252525;\n }\n '
29481
29500
  )
29482
29501
  );
29483
29502
  };
@@ -29497,9 +29516,18 @@ var HorizontalHero = function HorizontalHero(props) {
29497
29516
  borderColor = _props$borderColor === undefined ? 'black' : _props$borderColor;
29498
29517
 
29499
29518
 
29519
+ var topArticleThumbnail = '';
29520
+ var topArticleAltText = topArticle.title;
29521
+ if (topArticle.thumbnail && topArticle.thumbnail.asset) {
29522
+ topArticleThumbnail = urlFor(topArticle.thumbnail.asset).width(350).url();
29523
+ topArticleAltText = topArticle.thumbnail.asset.originalFileName;
29524
+ } else if (props.thumbnail) {
29525
+ topArticleThumbnail = props.thumbnail;
29526
+ }
29527
+
29500
29528
  return React__default.createElement(
29501
29529
  'div',
29502
- { className: 'horizontal-hero-container' },
29530
+ { className: 'horizontal-hero-container', style: { borderRight: '3px solid ' + borderColor, borderTop: '3px solid ' + borderColor } },
29503
29531
  React__default.createElement(
29504
29532
  'div',
29505
29533
  { className: 'horizontal-hero-title' },
@@ -29516,7 +29544,7 @@ var HorizontalHero = function HorizontalHero(props) {
29516
29544
  React__default.createElement(
29517
29545
  'a',
29518
29546
  { href: '/view/' + topArticle.url.current, className: 'horizontal-hero-img' },
29519
- React__default.createElement('img', { src: urlFor(topArticle.thumbnail.asset).width(350).url() })
29547
+ React__default.createElement('img', { src: topArticleThumbnail, alt: topArticleAltText })
29520
29548
  ),
29521
29549
  React__default.createElement(
29522
29550
  'div',
@@ -29563,7 +29591,7 @@ var HorizontalHero = function HorizontalHero(props) {
29563
29591
  React__default.createElement(
29564
29592
  'style',
29565
29593
  { jsx: 'true' },
29566
- '\n .horizontal-hero-container {\n border-right: 3px solid ' + borderColor + ';\n border-top: 3px solid ' + borderColor + ';\n margin-bottom: 3rem;\n margin-top: 2rem;\n position: relative;\n }\n .horizontal-hero-title {\n position: absolute;\n top: -25px;\n background: white;\n z-index: 2;\n padding-right: 1.5rem;\n font-weight: bold;\n }\n .horizontal-hero-inner {\n display: flex;\n flex-direction: row;\n padding-top: 0.75rem;\n margin-top: 0.75rem;\n }\n\n .horizontal-articles-wrap {\n padding: 0 1rem;\n }\n\n .horizontal-hero-img {\n width: 33%;\n min-width: 200px;\n }\n .horizontal-hero-img img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n .horizontal-article {\n border-bottom: 1px solid #ccc;\n display: block;\n margin-bottom: 0.5rem;\n }\n .horizontal-article:hover {\n background: #eee;\n }\n .horizontal-article p {\n margin-bottom: 0.5rem;\n font-weight: bold;\n color: #252525;\n }\n .horizontal-view-more {\n position: absolute;\n right: 0;\n margin-top: 0.25rem;\n font-weight: bold;\n }\n .horizontal-view-more span {\n display: inline-block;\n color: rgb(81, 116, 153);\n font-size: 1.2rem;\n }\n @media screen and (max-width: 768px) {\n .horizontal-hero-img {\n display: none;\n }\n }\n '
29594
+ '\n .horizontal-hero-container {\n margin-bottom: 3rem;\n margin-top: 2rem;\n position: relative;\n }\n .horizontal-hero-title {\n position: absolute;\n top: -25px;\n background: white;\n z-index: 2;\n padding-right: 1.5rem;\n font-weight: bold;\n }\n .horizontal-hero-inner {\n display: flex;\n flex-direction: row;\n padding-top: 0.75rem;\n margin-top: 0.75rem;\n }\n\n .horizontal-articles-wrap {\n padding: 0 1rem;\n }\n\n .horizontal-hero-img {\n width: 33%;\n min-width: 200px;\n }\n .horizontal-hero-img img {\n width: 100%;\n height: 100%;\n object-fit: cover;\n }\n .horizontal-article {\n border-bottom: 1px solid #ccc;\n display: block;\n margin-bottom: 0.5rem;\n }\n .horizontal-article:hover {\n background: #eee;\n }\n .horizontal-article p {\n margin-bottom: 0.5rem;\n font-weight: bold;\n color: #252525;\n }\n .horizontal-view-more {\n position: absolute;\n right: 0;\n margin-top: 0.25rem;\n font-weight: bold;\n }\n .horizontal-view-more span {\n display: inline-block;\n color: rgb(81, 116, 153);\n font-size: 1.2rem;\n }\n @media screen and (max-width: 768px) {\n .horizontal-hero-img {\n display: none;\n }\n }\n '
29567
29595
  )
29568
29596
  );
29569
29597
  };
@@ -29579,13 +29607,21 @@ var OncliveHero = function OncliveHero(props) {
29579
29607
  'div',
29580
29608
  { className: 'article-group--container' },
29581
29609
  props.dataRecord.map(function (article, index) {
29610
+ var articleThumbnail = '';
29611
+ var articleAltText = article.title;
29612
+ if (article.thumbnail && article.thumbnail.asset) {
29613
+ articleThumbnail = urlFor(article.thumbnail.asset).width(250).url();
29614
+ articleAltText = article.thumbnail.asset.originalFileName;
29615
+ } else if (props.thumbnail) {
29616
+ articleThumbnail = props.thumbnail;
29617
+ }
29582
29618
  return React__default.createElement(
29583
29619
  'a',
29584
29620
  { key: index, href: '/view/' + article.url.current, className: 'article-group' },
29585
29621
  React__default.createElement(
29586
29622
  'figure',
29587
29623
  null,
29588
- React__default.createElement('img', { src: urlFor(article.thumbnail.asset).width(250).url(), alt: article.title })
29624
+ React__default.createElement('img', { src: articleThumbnail, alt: articleAltText })
29589
29625
  ),
29590
29626
  React__default.createElement(
29591
29627
  'div',
@@ -29597,7 +29633,7 @@ var OncliveHero = function OncliveHero(props) {
29597
29633
  ),
29598
29634
  React__default.createElement('div', null),
29599
29635
  moment(article.published).format('MMMM Do YYYY, h:mma'),
29600
- article.authorMapping[0].displayName && React__default.createElement(
29636
+ article.authorMapping && article.authorMapping[0] && article.authorMapping[0].displayName && React__default.createElement(
29601
29637
  'p',
29602
29638
  { className: 'mb-2' },
29603
29639
  'By ',
@@ -29618,7 +29654,7 @@ var OncliveHero = function OncliveHero(props) {
29618
29654
  React__default.createElement(
29619
29655
  'style',
29620
29656
  { jsx: 'true' },
29621
- '\n .article-group--container {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n }\n .article-group--container * {\n transition: all 0.13s ease;\n }\n .article-group {\n display: flex;\n flex-direction: row;\n flex: 1 1 auto;\n margin: 0.5rem 1rem;\n width: calc(50% - 2rem);\n background: #fff;\n min-width: 320px;\n transition: all 0.1s ease-out;\n border-top: 1px solid #eee;\n position: relative;\n overflow: hidden;\n }\n \n .article-group:nth-of-type(1) {\n width: 100%;\n }\n .article-group:nth-of-type(1) .article-group--body {\n }\n .article-group:nth-of-type(1) figure img {\n width: 225px;\n }\n .article-group:nth-of-type(1) .article-group--body h2 {\n font-size: 1.4rem;\n }\n .article-group:nth-of-type(1) .article-group--summary {\n display: block;\n }\n @media screen and (max-width: 1091px) {\n .article-group:nth-of-type(1) {\n width: 100%;\n }\n .article-group:nth-of-type(1) .article-group--summary {\n display: none;\n }\n .article-group:nth-of-type(1) figure img {\n width: 130px;\n }\n .article-group:nth-of-type(1) .article-group--body h2 {\n font-size: 1rem;\n }\n }\n .article-group figure {\n margin-bottom: 0;\n }\n .article-group figure img {\n height: 100%;\n width: 130px;\n\n object-fit: cover;\n }\n .article-group--body {\n padding-left: 1rem;\n }\n .article-group--body p {\n font-size: .9rem;\n }\n .article-group--body h2 {\n font-weight: bold;\n margin-top: 1rem;\n font-size: 1rem;\n padding-right: 0.5rem;\n }\n .article-group--summary {\n font-size: 1rem;\n display: none;\n }\n '
29657
+ '\n .article-group--container {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n }\n .article-group--container * {\n transition: all 0.13s ease;\n }\n .article-group {\n display: flex;\n flex-direction: row;\n flex: 1 1 auto;\n margin: 0.5rem 1rem;\n width: calc(50% - 2rem);\n background: #fff;\n min-width: 320px;\n transition: all 0.1s ease-out;\n border-top: 1px solid #eee;\n position: relative;\n overflow: hidden;\n }\n \n .article-group:nth-of-type(1) {\n width: 100%;\n }\n .article-group:nth-of-type(1) .article-group--body {\n }\n .article-group:nth-of-type(1) figure img {\n width: 225px;\n }\n .article-group:nth-of-type(1) .article-group--body h2 {\n font-size: 1.4rem;\n }\n .article-group:nth-of-type(1) .article-group--summary {\n display: block;\n }\n @media screen and (max-width: 1091px) {\n .article-group:nth-of-type(1) {\n width: 100%;\n }\n .article-group:nth-of-type(1) .article-group--summary {\n display: none;\n }\n .article-group:nth-of-type(1) figure img {\n width: 130px;\n }\n .article-group:nth-of-type(1) .article-group--body h2 {\n font-size: 1rem;\n }\n }\n .article-group figure {\n margin-bottom: 0;\n }\n .article-group figure img {\n height: 100%;\n width: 130px;\n object-fit: contain;\n }\n \n .article-group--body {\n padding-left: 1rem;\n }\n .article-group--body p {\n font-size: .9rem;\n }\n .article-group--body h2 {\n font-weight: bold;\n margin-top: 1rem;\n font-size: 1rem;\n padding-right: 0.5rem;\n }\n .article-group--summary {\n font-size: 1rem;\n display: none;\n }\n '
29622
29658
  )
29623
29659
  );
29624
29660
  };
@@ -29633,6 +29669,15 @@ var OncliveLargeHero = function OncliveLargeHero(props) {
29633
29669
  return builder.image(source);
29634
29670
  }
29635
29671
 
29672
+ var topArticleThumbnail = '';
29673
+ var topArticleAltText = topArticle.title;
29674
+ if (topArticle.thumbnail && topArticle.thumbnail.asset) {
29675
+ topArticleThumbnail = urlFor(topArticle.thumbnail.asset).width(550).url();
29676
+ topArticleAltText = topArticle.thumbnail.asset.originalFileName;
29677
+ } else if (props.thumbnail) {
29678
+ topArticleThumbnail = props.thumbnail;
29679
+ }
29680
+
29636
29681
  return React__default.createElement(
29637
29682
  'div',
29638
29683
  { className: 'article-hero-container' },
@@ -29642,8 +29687,7 @@ var OncliveLargeHero = function OncliveLargeHero(props) {
29642
29687
  React__default.createElement(
29643
29688
  'figure',
29644
29689
  null,
29645
- React__default.createElement('img', {
29646
- src: urlFor(topArticle.thumbnail.asset).width(500).url() })
29690
+ React__default.createElement('img', { src: topArticleThumbnail, alt: topArticleAltText })
29647
29691
  ),
29648
29692
  React__default.createElement(
29649
29693
  'div',
@@ -29669,16 +29713,21 @@ var OncliveLargeHero = function OncliveLargeHero(props) {
29669
29713
  'div',
29670
29714
  { className: 'sub-articles-container' },
29671
29715
  subArticles && subArticles.map(function (article, index) {
29716
+ var articleThumbnail = '';
29717
+ var articleAltText = article.title;
29718
+ if (article.thumbnail && article.thumbnail.asset) {
29719
+ articleThumbnail = urlFor(article.thumbnail.asset).width(250).url();
29720
+ articleAltText = article.thumbnail.asset.originalFileName;
29721
+ } else if (props.thumbnail) {
29722
+ articleThumbnail = props.thumbnail;
29723
+ }
29672
29724
  return React__default.createElement(
29673
29725
  'a',
29674
- { href: '/view/' + article.url.current, className: 'sub-article' },
29726
+ { key: index, href: '/view/' + article.url.current, className: 'sub-article' },
29675
29727
  React__default.createElement(
29676
29728
  'figure',
29677
29729
  null,
29678
- React__default.createElement('img', {
29679
- src: urlFor(article.thumbnail.asset).width(250).url(),
29680
- alt: article.title
29681
- })
29730
+ React__default.createElement('img', { src: articleThumbnail, alt: articleAltText })
29682
29731
  ),
29683
29732
  React__default.createElement(
29684
29733
  'div',
@@ -29690,7 +29739,7 @@ var OncliveLargeHero = function OncliveLargeHero(props) {
29690
29739
  ),
29691
29740
  React__default.createElement('div', null),
29692
29741
  moment(article.published).format('MMMM Do YYYY, h:mma'),
29693
- article.authorMapping[0].displayName && React__default.createElement(
29742
+ article.authorMapping && article.authorMapping[0] && article.authorMapping[0].displayName && React__default.createElement(
29694
29743
  'p',
29695
29744
  { className: 'mb-2' },
29696
29745
  'By ',
@@ -29739,10 +29788,18 @@ var VerticalHero = function VerticalHero(props) {
29739
29788
  )
29740
29789
  ),
29741
29790
  props.dataRecord.map(function (article, index) {
29791
+ var articleThumbnail = '';
29792
+ var articleAltText = article.title;
29793
+ if (article.thumbnail && article.thumbnail.asset) {
29794
+ articleThumbnail = urlFor(article.thumbnail.asset).width(500).url();
29795
+ articleAltText = article.thumbnail.asset.originalFileName;
29796
+ } else if (props.thumbnail) {
29797
+ articleThumbnail = props.thumbnail;
29798
+ }
29742
29799
  return index === 0 ? React__default.createElement(
29743
29800
  'a',
29744
29801
  { href: '/view/' + article.url.current, key: index, className: 'vertical-article' },
29745
- React__default.createElement('img', { src: urlFor(article.thumbnail.asset).width(500).url() }),
29802
+ React__default.createElement('img', { src: articleThumbnail, alt: articleAltText }),
29746
29803
  React__default.createElement(
29747
29804
  'h2',
29748
29805
  null,
@@ -29762,7 +29819,7 @@ var VerticalHero = function VerticalHero(props) {
29762
29819
  React__default.createElement(
29763
29820
  'style',
29764
29821
  { jsx: 'true' },
29765
- '\n .vertical-hero-container {\n display: flex;\n flex-direction: row;\n padding: 0.25rem;\n justify-content: space-between;\n width: 100%;\n flex: 1 1 auto;\n \n }\n .hero-title h2{\n font-size: 1.2rem;\n font-weight: bold;\n \n }\n .vertical-article {\n display: block;\n }\n .vertical-article img {\n width: 100%;\n height: auto;\n min-width: 200px;\n }\n .vertical-article h2 {\n font-size: .9rem;\n color: #252525;\n font-weight: bold;\n padding: 0.5rem .5rem 1rem;\n margin: 0.5rem;\n border-bottom: 1px solid #ccc;\n }\n \n '
29822
+ '\n .vertical-hero-container {\n display: flex;\n flex-direction: row;\n padding: 0.25rem;\n justify-content: space-between;\n width: 100%;\n flex: 1 1 auto;\n }\n .hero-title h2 {\n font-size: 1.2rem;\n font-weight: bold;\n }\n .vertical-article {\n display: block;\n }\n .vertical-article img {\n width: 100%;\n height: auto;\n min-width: 200px;\n }\n .vertical-article h2 {\n font-size: 0.9rem;\n color: #252525;\n font-weight: bold;\n padding: 0.5rem 0.5rem 1rem;\n margin: 0.5rem;\n border-bottom: 1px solid #ccc;\n }\n '
29766
29823
  )
29767
29824
  );
29768
29825
  };
@@ -29776,6 +29833,16 @@ var YahooHero = function YahooHero(props) {
29776
29833
  function urlFor(source) {
29777
29834
  return builder.image(source);
29778
29835
  }
29836
+
29837
+ var topArticleThumbnail = '';
29838
+ var topArticleAltText = topArticle.title;
29839
+ if (topArticle.thumbnail && topArticle.thumbnail.asset) {
29840
+ topArticleThumbnail = urlFor(topArticle.thumbnail.asset).width(600).url();
29841
+ topArticleAltText = topArticle.thumbnail.asset.originalFileName;
29842
+ } else if (props.thumbnail) {
29843
+ topArticleThumbnail = props.thumbnail;
29844
+ }
29845
+
29779
29846
  return React__default.createElement(
29780
29847
  'div',
29781
29848
  { className: 'article-hero' },
@@ -29788,7 +29855,7 @@ var YahooHero = function YahooHero(props) {
29788
29855
  React__default.createElement(
29789
29856
  'div',
29790
29857
  { className: 'yh-top-article--img' },
29791
- React__default.createElement('img', { src: urlFor(topArticle.thumbnail.asset).width(600).url(), alt: topArticle.thumbnail.asset.originalFileName })
29858
+ React__default.createElement('img', { src: topArticleThumbnail, alt: topArticleAltText })
29792
29859
  ),
29793
29860
  React__default.createElement('div', { className: 'yh-top-article--blur' }),
29794
29861
  React__default.createElement(
@@ -29816,10 +29883,19 @@ var YahooHero = function YahooHero(props) {
29816
29883
  'div',
29817
29884
  { className: 'yh-sub-article-container' },
29818
29885
  subArticles.map(function (article, index) {
29886
+ var articleThumbnail = '';
29887
+ var articleAltText = article.title;
29888
+ if (article.thumbnail && article.thumbnail.asset) {
29889
+ articleThumbnail = urlFor(article.thumbnail.asset).width(250).url();
29890
+ articleAltText = article.thumbnail.asset.originalFileName;
29891
+ } else if (props.thumbnail) {
29892
+ articleThumbnail = props.thumbnail;
29893
+ }
29894
+
29819
29895
  return React__default.createElement(
29820
29896
  'a',
29821
29897
  { href: '/view/' + article.url.current, key: index, className: 'yh-sub-article' },
29822
- React__default.createElement('img', { src: urlFor(article.thumbnail.asset).width(250).url() }),
29898
+ React__default.createElement('img', { src: articleThumbnail }),
29823
29899
  React__default.createElement(
29824
29900
  'h6',
29825
29901
  { className: 'yh-sub-article--title' },
@@ -29830,9 +29906,9 @@ var YahooHero = function YahooHero(props) {
29830
29906
  { className: 'yh-sub-article--info' },
29831
29907
  moment(article.published).format('MMMM DD, YYYY hh:mma')
29832
29908
  ),
29833
- React__default.createElement(
29909
+ article.authorMapping && article.authorMapping[0] && React__default.createElement(
29834
29910
  'p',
29835
- { className: 'yh-sub-article--info' },
29911
+ null,
29836
29912
  'By ',
29837
29913
  React__default.createElement(
29838
29914
  'b',
@@ -29846,7 +29922,7 @@ var YahooHero = function YahooHero(props) {
29846
29922
  React__default.createElement(
29847
29923
  'style',
29848
29924
  { jsx: 'true' },
29849
- '\n .yh-top-article {\n display: flex;\n flex-direction: row;\n position: relative;\n font-family: \'Roboto\', sans-serif;\n margin-bottom: 1rem;\n border-radius: 15px;\n overflow: hidden;\n min-height: 315px;\n }\n .yh-top-article--img {\n width: 100%;\n min-height: 240px;\n overflow: hidden;\n }\n .yh-top-article--img img {\n width: 100%;\n height: auto;\n min-height: 100%;\n max-height: 315px;\n object-fit: cover;\n }\n .yh-top-article--body {\n height: 100%;\n width: 40%;\n min-width: 320px;\n right: 0;\n position: absolute;\n color: white;\n padding: 1.75rem;\n height: 315px;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n flex-direction: column;\n }\n .yh-top-article--body h1 {\n color: white!important;\n font-size: 1.4rem;\n font-weight: 500;\n margin-bottom: 0.5rem;\n }\n .yh-top-article--body p {\n font-size: 0.9rem;\n margin-bottom: 0.5rem;\n }\n .yh-top-article--blur {\n height: 100%;\n width: 40%;\n right: 0;\n position: absolute;\n filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));\n background: rgba(0,0,0,.65);\n min-width: 320px;\n }\n .yh-sub-article-container {\n display: flex;\n justify-content: space-between;\n }\n .yh-sub-article {\n width: 23.25%;\n }\n .yh-sub-article p.yh-sub-article--title {\n font-weight: bold;\n }\n .yh-sub-article img {\n width: 100%;\n height: 150px;\n object-fit: cover;\n border-radius: 15px;\n }\n .yh-sub-article--title {\n font-weight: bold;\n margin-top: .25rem;\n font-size: 1rem;\n margin-bottom: .25rem;\n }\n .yh-sub-article--info {\n font-size: .8rem;\n margin-bottom: 0;\n \n }\n @media screen and (max-width: 968px) {\n .yh-sub-article-container {\n flex-wrap: wrap;\n }\n .yh-sub-article {\n width: 48%;\n margin-bottom: 1rem;\n }\n }\n '
29925
+ '\n .yh-top-article {\n display: flex;\n flex-direction: row;\n position: relative;\n font-family: \'Roboto\', sans-serif;\n margin-bottom: 1rem;\n border-radius: 15px;\n overflow: hidden;\n min-height: 315px;\n }\n .yh-top-article--img {\n width: 100%;\n min-height: 240px;\n overflow: hidden;\n }\n .yh-top-article--img img {\n width: 100%;\n height: auto;\n min-height: 100%;\n max-height: 315px;\n object-fit: cover;\n }\n .yh-top-article--body {\n height: 100%;\n width: 40%;\n min-width: 320px;\n right: 0;\n position: absolute;\n color: white;\n padding: 1.75rem;\n height: 315px;\n display: flex;\n align-items: flex-start;\n justify-content: center;\n flex-direction: column;\n }\n .yh-top-article--body h1 {\n color: white!important;\n font-size: 1.4rem;\n font-weight: 500;\n margin-bottom: 0.5rem;\n }\n .yh-top-article--body p {\n font-size: 0.9rem;\n margin-bottom: 0.5rem;\n }\n .yh-top-article--blur {\n height: 100%;\n width: 40%;\n right: 0;\n position: absolute;\n filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));\n background: rgba(0,0,0,.65);\n min-width: 320px;\n }\n .yh-sub-article-container {\n display: flex;\n justify-content: space-between;\n }\n .yh-sub-article {\n width: 23.25%;\n }\n .yh-sub-article p.yh-sub-article--title {\n font-weight: bold;\n }\n .yh-sub-article img {\n width: 100%;\n height: 150px;\n object-fit: cover;\n border-radius: 15px;\n }\n .yh-sub-article img[src=\'' + props.thumbnail + '\']{\n object-fit: contain;\n }\n .yh-sub-article--title {\n font-weight: bold;\n margin-top: .25rem;\n font-size: 1rem;\n margin-bottom: .25rem;\n }\n .yh-sub-article--info {\n font-size: .8rem;\n margin-bottom: 0;\n \n }\n @media screen and (max-width: 968px) {\n .yh-sub-article-container {\n flex-wrap: wrap;\n }\n .yh-sub-article {\n width: 48%;\n margin-bottom: 1rem;\n }\n }\n '
29850
29926
  )
29851
29927
  );
29852
29928
  };