From c831c3d7f0f295a85cb26e410cd3f439986948fe Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 7 Dec 2021 10:56:19 +0200 Subject: [PATCH 01/18] feedback fixes --- .../components/MMatchLeaderboard/index.jsx | 22 ++++++++------- .../components/MMatchLeaderboard/style.scss | 27 ++++++++++++++++--- 2 files changed, 36 insertions(+), 13 deletions(-) diff --git a/src/shared/components/MMatchLeaderboard/index.jsx b/src/shared/components/MMatchLeaderboard/index.jsx index a3dd95e5a9..24c5c112b0 100644 --- a/src/shared/components/MMatchLeaderboard/index.jsx +++ b/src/shared/components/MMatchLeaderboard/index.jsx @@ -94,6 +94,7 @@ export default class MMLeaderboard extends Component {
{`Avatar
{member.rank}
+ {member.createdBy}
{member.createdBy} @@ -106,6 +107,7 @@ export default class MMLeaderboard extends Component {
{`Avatar
{data[2].rank}
+ {data[2].createdBy}
{data[2].createdBy} @@ -135,15 +137,17 @@ export default class MMLeaderboard extends Component { ))} { data.length > 10 && ( - - See Full Leaderbord - +
+ + See Full Leaderbord + +
)}
)} diff --git a/src/shared/components/MMatchLeaderboard/style.scss b/src/shared/components/MMatchLeaderboard/style.scss index 8b85fdacea..b4fdab78a0 100644 --- a/src/shared/components/MMatchLeaderboard/style.scss +++ b/src/shared/components/MMatchLeaderboard/style.scss @@ -126,7 +126,7 @@ $light-gray: #d4d4d4; @media screen and (max-width: 768px) { flex-direction: column; align-items: center; - padding: 0 20px; + padding: 0 45px; } .top3 { @@ -179,6 +179,12 @@ $light-gray: #d4d4d4; .topMemberPhotoAndPlace { position: relative; + > a { + @media screen and (min-width: 768px) { + display: none; + } + } + .topMemberPhoto { width: 75px; height: 75px; @@ -225,6 +231,10 @@ $light-gray: #d4d4d4; a { font-size: 16px; + + @media screen and (max-width: 768px) { + display: none; + } } .topMemberScore { @@ -265,18 +275,21 @@ $light-gray: #d4d4d4; } a { - margin-right: 50px; + margin-right: 20px; flex: 1; + font-weight: 500; } - .followerScore { + .followerScore, + span { font-weight: 500; + color: #2a2a2a; } } } .followersRight { - margin-left: 65px; + margin-left: 60px; @media screen and (max-width: 768px) { margin-left: 0; @@ -286,6 +299,12 @@ $light-gray: #d4d4d4; > div:nth-child(3) { margin-bottom: 12px; } + + .moreBtn { + @media screen and (max-width: 768px) { + text-align: center; + } + } } } } From 531474b95cc6d33e0ea1f09ff1781504e0b77d0e Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 7 Dec 2021 11:43:04 +0200 Subject: [PATCH 02/18] mm lb final tweaks --- src/shared/components/MMatchLeaderboard/style.scss | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/shared/components/MMatchLeaderboard/style.scss b/src/shared/components/MMatchLeaderboard/style.scss index b4fdab78a0..d339be44fd 100644 --- a/src/shared/components/MMatchLeaderboard/style.scss +++ b/src/shared/components/MMatchLeaderboard/style.scss @@ -178,6 +178,12 @@ $light-gray: #d4d4d4; .topMemberPhotoAndPlace { position: relative; + display: flex; + + @media screen and (min-width: 768px) { + flex-direction: column; + align-items: center; + } > a { @media screen and (min-width: 768px) { @@ -198,7 +204,7 @@ $light-gray: #d4d4d4; position: absolute; width: 25px; height: 25px; - bottom: 15px; + bottom: 8px; right: 0; border-radius: 50%; display: flex; @@ -206,6 +212,10 @@ $light-gray: #d4d4d4; align-content: center; font-size: 16px; font-weight: 500; + + @media screen and (min-width: 768px) { + bottom: 32px; + } } .topMemberRank1 { @@ -241,6 +251,7 @@ $light-gray: #d4d4d4; font-weight: 500; font-size: 16px; text-align: center; + margin-bottom: 18px; @media screen and (max-width: 768px) { margin-bottom: 0; @@ -255,6 +266,7 @@ $light-gray: #d4d4d4; justify-content: center; @media screen and (max-width: 768px) { + margin-top: 20px; margin-bottom: 0; flex-direction: column; } From af997e1c38f392aabcda8a024d3833ffc7cd393e Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 7 Dec 2021 12:01:29 +0200 Subject: [PATCH 03/18] fix broken media query --- src/shared/components/MMatchLeaderboard/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/MMatchLeaderboard/style.scss b/src/shared/components/MMatchLeaderboard/style.scss index d339be44fd..9ef866d532 100644 --- a/src/shared/components/MMatchLeaderboard/style.scss +++ b/src/shared/components/MMatchLeaderboard/style.scss @@ -180,7 +180,7 @@ $light-gray: #d4d4d4; position: relative; display: flex; - @media screen and (min-width: 768px) { + @media screen and (max-width: 768px) { flex-direction: column; align-items: center; } From 68bb16c194bdeab0d38b2f925c6d4033d9de3a30 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 7 Dec 2021 12:14:33 +0200 Subject: [PATCH 04/18] nowrap handls in leaderboard --- src/shared/components/MMatchLeaderboard/style.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/components/MMatchLeaderboard/style.scss b/src/shared/components/MMatchLeaderboard/style.scss index 9ef866d532..b2e07e7bff 100644 --- a/src/shared/components/MMatchLeaderboard/style.scss +++ b/src/shared/components/MMatchLeaderboard/style.scss @@ -290,6 +290,7 @@ $light-gray: #d4d4d4; margin-right: 20px; flex: 1; font-weight: 500; + white-space: nowrap; } .followerScore, From 3ed127160b43812ed80c67903d82e3a0599a6748 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 7 Dec 2021 12:42:20 +0200 Subject: [PATCH 05/18] fixed media typo --- src/shared/components/MMatchLeaderboard/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shared/components/MMatchLeaderboard/style.scss b/src/shared/components/MMatchLeaderboard/style.scss index b2e07e7bff..c6ee0ee37a 100644 --- a/src/shared/components/MMatchLeaderboard/style.scss +++ b/src/shared/components/MMatchLeaderboard/style.scss @@ -213,7 +213,7 @@ $light-gray: #d4d4d4; font-size: 16px; font-weight: 500; - @media screen and (min-width: 768px) { + @media screen and (max-width: 768px) { bottom: 32px; } } From 742884cf7cb3de66d06fdd20f2364f95c4949550 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 7 Dec 2021 21:36:19 +0200 Subject: [PATCH 06/18] more fixes mm board --- src/shared/components/MMatchLeaderboard/style.scss | 3 ++- src/shared/components/buttons/themed/tc.scss | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shared/components/MMatchLeaderboard/style.scss b/src/shared/components/MMatchLeaderboard/style.scss index c6ee0ee37a..a9a26d8d28 100644 --- a/src/shared/components/MMatchLeaderboard/style.scss +++ b/src/shared/components/MMatchLeaderboard/style.scss @@ -121,7 +121,7 @@ $light-gray: #d4d4d4; .podiumTheme { display: block; - padding: 0 40px; + padding: 0 35px; @media screen and (max-width: 768px) { flex-direction: column; @@ -311,6 +311,7 @@ $light-gray: #d4d4d4; > div:nth-child(3) { margin-bottom: 12px; + margin-left: -9px; } .moreBtn { diff --git a/src/shared/components/buttons/themed/tc.scss b/src/shared/components/buttons/themed/tc.scss index 55df1ef13f..0bd5412629 100644 --- a/src/shared/components/buttons/themed/tc.scss +++ b/src/shared/components/buttons/themed/tc.scss @@ -8,6 +8,7 @@ text-transform: uppercase !important; margin: 0 !important; white-space: nowrap !important; + letter-spacing: 0.8px; } @mixin primary-green { @@ -110,6 +111,7 @@ text-transform: uppercase !important; margin: 0 !important; white-space: nowrap !important; + letter-spacing: 0.8px } @mixin secondary-gray { @@ -137,6 +139,7 @@ text-transform: uppercase !important; margin: 0 !important; white-space: nowrap !important; + letter-spacing: 0.8px } @mixin warn-red { From 5f99d1e40cf138760d5ac425a5d00ae989a7a436 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Tue, 7 Dec 2021 21:59:15 +0200 Subject: [PATCH 07/18] fixed tests --- src/shared/components/buttons/themed/tc.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/components/buttons/themed/tc.scss b/src/shared/components/buttons/themed/tc.scss index 0bd5412629..2edf7eacc7 100644 --- a/src/shared/components/buttons/themed/tc.scss +++ b/src/shared/components/buttons/themed/tc.scss @@ -111,7 +111,7 @@ text-transform: uppercase !important; margin: 0 !important; white-space: nowrap !important; - letter-spacing: 0.8px + letter-spacing: 0.8px; } @mixin secondary-gray { @@ -139,7 +139,7 @@ text-transform: uppercase !important; margin: 0 !important; white-space: nowrap !important; - letter-spacing: 0.8px + letter-spacing: 0.8px; } @mixin warn-red { From 508f02e7c658b607113c7875f6830fab8944d69f Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Wed, 8 Dec 2021 09:04:18 +0200 Subject: [PATCH 08/18] webp images support --- .../components/Contentful/Image/Image.jsx | 56 ++++++++++++------- .../components/Contentful/Image/index.jsx | 21 +++++-- .../components/TopcoderFooter/index.jsx | 2 +- 3 files changed, 51 insertions(+), 28 deletions(-) diff --git a/src/shared/components/Contentful/Image/Image.jsx b/src/shared/components/Contentful/Image/Image.jsx index c45e077ffd..17a8d48053 100644 --- a/src/shared/components/Contentful/Image/Image.jsx +++ b/src/shared/components/Contentful/Image/Image.jsx @@ -1,3 +1,4 @@ +/* eslint-disable max-len */ /** * The core image rendering. */ @@ -68,12 +69,13 @@ export class ImageInner extends React.Component { theme, id, image, - imageSource, + imageSources, clipSvg, animation, } = this.props; - const imageUrl = _.get(imageSource, 'file.url'); + // const imageUrl = _.get(imageSources.source, 'file.url'); + // const contentType = _.get(imageSources, 'file.contentType'); const clipSvgUrl = _.get(clipSvg, 'file.url'); const imgStyle = image.extraStylesForImage ? fixStyle(image.extraStylesForImage) : {}; if (clipSvgUrl) { @@ -96,25 +98,37 @@ export class ImageInner extends React.Component { )} { animation.animateOnScroll ? ( - {image.alt + + + { imageSources.sourceMobile && } + { imageSources.sourcePolyfill && } + { imageSources.sourcePolyfillMobile && } + {image.alt + ) : ( - {image.alt + + + { imageSources.sourceMobile && } + { imageSources.sourcePolyfill && } + { imageSources.sourcePolyfillMobile && } + {image.alt + ) }
@@ -130,7 +144,7 @@ ImageInner.defaultProps = { ImageInner.propTypes = { id: PT.string.isRequired, image: PT.shape().isRequired, - imageSource: PT.shape().isRequired, + imageSources: PT.shape().isRequired, clipSvg: PT.shape(), theme: PT.shape({ 'img-wrap': PT.string, diff --git a/src/shared/components/Contentful/Image/index.jsx b/src/shared/components/Contentful/Image/index.jsx index e24a1eb694..6c0a286ecc 100644 --- a/src/shared/components/Contentful/Image/index.jsx +++ b/src/shared/components/Contentful/Image/index.jsx @@ -7,7 +7,6 @@ import LoadingIndicator from 'components/LoadingIndicator'; import PT from 'prop-types'; import React from 'react'; import _ from 'lodash'; -import { useMediaQuery } from 'react-responsive'; import Image from './Image'; import defaultTheme from './themes/default.scss'; @@ -18,7 +17,7 @@ export default function ImageLoader(props) { const { id, preview, spaceName, environment, } = props; - const isTabletOrMobile = useMediaQuery({ maxWidth: 768 }); + // const isTabletOrMobile = useMediaQuery({ maxWidth: 768 }); return ( { const { fields } = data.entries.items[id]; - const imgId = _.get(fields, isTabletOrMobile && fields.sourceMobile ? 'sourceMobile.sys.id' : 'source.sys.id'); + const imgId = _.get(fields, 'source.sys.id'); + const imgIdMobile = _.get(fields, 'sourceMobile.sys.id'); + const imgIdPolyfill = _.get(fields, 'sourcePolyfill.sys.id'); + const imgIdPolyfillMobile = _.get(fields, 'sourceMobilePolyfill.sys.id'); const clipSvgId = _.get(fields, 'clipSvg.sys.id'); - const assetIds = _.compact([imgId, clipSvgId]); + const assetIds = _.compact( + [imgId, imgIdMobile, imgIdPolyfill, imgIdPolyfillMobile, clipSvgId], + ); const animationId = _.get(fields, 'animationOnScroll.sys.id'); const entryIds = []; if (animationId) { @@ -45,8 +49,13 @@ export default function ImageLoader(props) { environment={environment} render={(assetData) => { const { items } = assetData.assets; - const imgFields = _.get(items, [imgId, 'fields']); const clipSvgFields = _.get(items, [clipSvgId, 'fields']); + const imageSources = { + source: _.get(items, [imgId, 'fields']), + sourceMobile: _.get(items, [imgIdMobile, 'fields']), + sourcePolyfill: _.get(items, [imgIdPolyfill, 'fields']), + sourcePolyfillMobile: _.get(items, [imgIdPolyfillMobile, 'fields']), + }; let animation = {}; if (animationId) { animation = { ...assetData.entries.items[animationId].fields }; @@ -54,7 +63,7 @@ export default function ImageLoader(props) { return ( HELP CENTER
- ABOUT + ABOUT
From c1df4a4dfa57535844c3eaa4cbea0ed71aed093e Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Wed, 8 Dec 2021 09:32:05 +0200 Subject: [PATCH 09/18] feed utm & footer url bug --- .../shared/components/__snapshots__/TopcoderFooter.jsx.snap | 2 +- src/server/routes/feeds.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/__tests__/shared/components/__snapshots__/TopcoderFooter.jsx.snap b/__tests__/shared/components/__snapshots__/TopcoderFooter.jsx.snap index bc62da49cb..dafcdedca0 100644 --- a/__tests__/shared/components/__snapshots__/TopcoderFooter.jsx.snap +++ b/__tests__/shared/components/__snapshots__/TopcoderFooter.jsx.snap @@ -495,7 +495,7 @@ exports[`Matches shallow shapshot 1`] = ` className="src-shared-components-TopcoderFooter-___style__mobile-navi-col___3BcW4" > ABOUT diff --git a/src/server/routes/feeds.js b/src/server/routes/feeds.js index c6046f2743..f1396f4bb5 100644 --- a/src/server/routes/feeds.js +++ b/src/server/routes/feeds.js @@ -45,7 +45,7 @@ routes.get('/thrive', async (req, res, next) => { feed.item({ title: entry.fields.title, description: ReactDOMServer.renderToString(md(entry.fields.content)), - url: `https://topcoder.com/thrive/articles/${entry.fields.slug || encodeURIComponent(entry.fields.title)}?utm_source=community&utm_campaign=thrive-feed&utm_medium=promotion`, + url: `https://topcoder.com/thrive/articles/${entry.fields.slug || encodeURIComponent(entry.fields.title)}?utm_source=thrive&utm_campaign=thrive-feed&utm_medium=rss-feed`, date: entry.fields.creationDate, categories: entry.fields.tags, author: entry.fields.contentAuthor[0].fields.name, From fad1e8553d109b6525d806438167e1039ae9a4cd Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Wed, 8 Dec 2021 09:32:37 +0200 Subject: [PATCH 10/18] webp images --- .../components/Contentful/Image/Image.jsx | 24 ------------- .../Image/__snapshots__/Image.jsx.snap | 34 ------------------- .../components/Contentful/Image/Image.jsx | 4 +-- 3 files changed, 2 insertions(+), 60 deletions(-) delete mode 100644 __tests__/shared/components/Contentful/Image/Image.jsx delete mode 100644 __tests__/shared/components/Contentful/Image/__snapshots__/Image.jsx.snap diff --git a/__tests__/shared/components/Contentful/Image/Image.jsx b/__tests__/shared/components/Contentful/Image/Image.jsx deleted file mode 100644 index 098c1f7572..0000000000 --- a/__tests__/shared/components/Contentful/Image/Image.jsx +++ /dev/null @@ -1,24 +0,0 @@ -import React from 'react'; -import Renderer from 'react-test-renderer/shallow'; -import { ImageInner } from 'components/Contentful/Image/Image'; - -test('Matches shallow shapshot', () => { - const renderer = new Renderer(); - const MOCK_PROPS = { - id: '1', - image: {}, - imageSource: { - file: { - url: 'https://www.topcoder.com', - }, - }, - clipSvg: { - file: { - url: 'https://www.topcoder.com', - }, - }, - theme: {}, - }; - renderer.render(); - expect(renderer.getRenderOutput()).toMatchSnapshot(); -}); diff --git a/__tests__/shared/components/Contentful/Image/__snapshots__/Image.jsx.snap b/__tests__/shared/components/Contentful/Image/__snapshots__/Image.jsx.snap deleted file mode 100644 index 8540327616..0000000000 --- a/__tests__/shared/components/Contentful/Image/__snapshots__/Image.jsx.snap +++ /dev/null @@ -1,34 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Matches shallow shapshot 1`] = ` -
- - } - src="https://www.topcoder.com" - supportTest={[Function]} - uniquifyIDs={true} - wrapper={[Function]} - /> - -
-`; diff --git a/src/shared/components/Contentful/Image/Image.jsx b/src/shared/components/Contentful/Image/Image.jsx index 17a8d48053..392c03170c 100644 --- a/src/shared/components/Contentful/Image/Image.jsx +++ b/src/shared/components/Contentful/Image/Image.jsx @@ -101,7 +101,7 @@ export class ImageInner extends React.Component { { imageSources.sourceMobile && } - { imageSources.sourcePolyfill && } + { imageSources.sourcePolyfill && } { imageSources.sourcePolyfillMobile && } { imageSources.sourceMobile && } - { imageSources.sourcePolyfill && } + { imageSources.sourcePolyfill && } { imageSources.sourcePolyfillMobile && } Date: Wed, 8 Dec 2021 15:32:59 +0200 Subject: [PATCH 11/18] fixed media for picture --- src/shared/components/Contentful/Image/Image.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/components/Contentful/Image/Image.jsx b/src/shared/components/Contentful/Image/Image.jsx index 392c03170c..f80ec0a217 100644 --- a/src/shared/components/Contentful/Image/Image.jsx +++ b/src/shared/components/Contentful/Image/Image.jsx @@ -101,7 +101,7 @@ export class ImageInner extends React.Component { { imageSources.sourceMobile && } - { imageSources.sourcePolyfill && } + { imageSources.sourcePolyfill && } { imageSources.sourcePolyfillMobile && } { imageSources.sourceMobile && } - { imageSources.sourcePolyfill && } + { imageSources.sourcePolyfill && } { imageSources.sourcePolyfillMobile && } Date: Wed, 8 Dec 2021 16:16:16 +0200 Subject: [PATCH 12/18] pref polyfill src as falback --- src/shared/components/Contentful/Image/Image.jsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/shared/components/Contentful/Image/Image.jsx b/src/shared/components/Contentful/Image/Image.jsx index f80ec0a217..431289a83b 100644 --- a/src/shared/components/Contentful/Image/Image.jsx +++ b/src/shared/components/Contentful/Image/Image.jsx @@ -101,7 +101,6 @@ export class ImageInner extends React.Component { { imageSources.sourceMobile && } - { imageSources.sourcePolyfill && } { imageSources.sourcePolyfillMobile && } { imageSources.sourceMobile && } - { imageSources.sourcePolyfill && } { imageSources.sourcePolyfillMobile && } Date: Wed, 8 Dec 2021 17:13:30 +0200 Subject: [PATCH 13/18] lazy load images --- src/shared/components/Contentful/Image/Image.jsx | 2 ++ src/shared/components/Contentful/Tabs/themes/vertical.scss | 1 + 2 files changed, 3 insertions(+) diff --git a/src/shared/components/Contentful/Image/Image.jsx b/src/shared/components/Contentful/Image/Image.jsx index 431289a83b..c2799c04e6 100644 --- a/src/shared/components/Contentful/Image/Image.jsx +++ b/src/shared/components/Contentful/Image/Image.jsx @@ -114,6 +114,7 @@ export class ImageInner extends React.Component { data-aos-mirror={animation.animateOnScrollMirror} data-aos-anchor-placement={animation.animateOnScrollAnchor} data-aos-offset={animation.animateOnScrollOffset} + loading="lazy" /> ) : ( @@ -125,6 +126,7 @@ export class ImageInner extends React.Component { src={imageSources.sourcePolyfill ? imageSources.sourcePolyfill.file.url : imageSources.source.file.url} alt={image.alt || image.name} style={imgStyle} + loading="lazy" /> ) diff --git a/src/shared/components/Contentful/Tabs/themes/vertical.scss b/src/shared/components/Contentful/Tabs/themes/vertical.scss index 47d6f38857..15a269006a 100644 --- a/src/shared/components/Contentful/Tabs/themes/vertical.scss +++ b/src/shared/components/Contentful/Tabs/themes/vertical.scss @@ -53,6 +53,7 @@ li.tab { padding-right: 20px; border-bottom: 5px solid $gray-border-color; min-width: auto !important; + white-space: nowrap; &:first-child { padding-left: 7px; From 42c9ad1d35dbf1fb7d2256b8723fac63275c5385 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Wed, 8 Dec 2021 18:00:18 +0200 Subject: [PATCH 14/18] feed date fix --- src/server/routes/feeds.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/routes/feeds.js b/src/server/routes/feeds.js index f1396f4bb5..678205e96f 100644 --- a/src/server/routes/feeds.js +++ b/src/server/routes/feeds.js @@ -46,7 +46,7 @@ routes.get('/thrive', async (req, res, next) => { title: entry.fields.title, description: ReactDOMServer.renderToString(md(entry.fields.content)), url: `https://topcoder.com/thrive/articles/${entry.fields.slug || encodeURIComponent(entry.fields.title)}?utm_source=thrive&utm_campaign=thrive-feed&utm_medium=rss-feed`, - date: entry.fields.creationDate, + date: entry.sys.createdAt, categories: entry.fields.tags, author: entry.fields.contentAuthor[0].fields.name, }); From df1586d3b56a0bf3c6c3881d0812c244c58c1b4a Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Thu, 9 Dec 2021 13:55:54 +0200 Subject: [PATCH 15/18] webp final using images API --- .../components/Contentful/Image/Image.jsx | 19 ++++++++----------- .../components/Contentful/Image/index.jsx | 6 +----- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/src/shared/components/Contentful/Image/Image.jsx b/src/shared/components/Contentful/Image/Image.jsx index c2799c04e6..f3757ec5d3 100644 --- a/src/shared/components/Contentful/Image/Image.jsx +++ b/src/shared/components/Contentful/Image/Image.jsx @@ -73,9 +73,6 @@ export class ImageInner extends React.Component { clipSvg, animation, } = this.props; - - // const imageUrl = _.get(imageSources.source, 'file.url'); - // const contentType = _.get(imageSources, 'file.contentType'); const clipSvgUrl = _.get(clipSvg, 'file.url'); const imgStyle = image.extraStylesForImage ? fixStyle(image.extraStylesForImage) : {}; if (clipSvgUrl) { @@ -99,11 +96,11 @@ export class ImageInner extends React.Component { { animation.animateOnScroll ? ( - - { imageSources.sourceMobile && } - { imageSources.sourcePolyfillMobile && } + + { imageSources.sourceMobile && } + {image.alt ) : ( - - { imageSources.sourceMobile && } - { imageSources.sourcePolyfillMobile && } + + { imageSources.sourceMobile && } + {image.alt Date: Thu, 9 Dec 2021 14:01:52 +0200 Subject: [PATCH 16/18] mobile or use w from api --- .../components/Contentful/Image/Image.jsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/shared/components/Contentful/Image/Image.jsx b/src/shared/components/Contentful/Image/Image.jsx index f3757ec5d3..713c854e17 100644 --- a/src/shared/components/Contentful/Image/Image.jsx +++ b/src/shared/components/Contentful/Image/Image.jsx @@ -97,8 +97,13 @@ export class ImageInner extends React.Component { animation.animateOnScroll ? ( - { imageSources.sourceMobile && } - + { + imageSources.sourceMobile ? ( + + ) : ( + + ) + } {image.alt - { imageSources.sourceMobile && } - + { + imageSources.sourceMobile ? ( + + ) : ( + + ) + } {image.alt Date: Fri, 10 Dec 2021 12:57:22 +0200 Subject: [PATCH 17/18] feed draft bug --- src/server/routes/feeds.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/server/routes/feeds.js b/src/server/routes/feeds.js index 678205e96f..9e1810e9cd 100644 --- a/src/server/routes/feeds.js +++ b/src/server/routes/feeds.js @@ -26,6 +26,7 @@ routes.get('/thrive', async (req, res, next) => { limit: 20, order: '-sys.createdAt', include: 2, + 'sys.firstPublishedAt[exists]': true, }); const feed = new RSS({ title: 'Topcoder Thrive', From bbb0b2f5f28824f38f897c8b274c8819aa197398 Mon Sep 17 00:00:00 2001 From: Kiril Kartunov Date: Fri, 10 Dec 2021 13:14:33 +0200 Subject: [PATCH 18/18] add feed url to details page --- src/shared/components/Contentful/Article/Article.jsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/shared/components/Contentful/Article/Article.jsx b/src/shared/components/Contentful/Article/Article.jsx index e87248eb3e..f00c373f90 100644 --- a/src/shared/components/Contentful/Article/Article.jsx +++ b/src/shared/components/Contentful/Article/Article.jsx @@ -170,6 +170,7 @@ class Article extends React.Component { +
{/* Banner */}