diff --git a/src/common/assets/images/fallback.svg b/src/common/assets/images/fallback.svg new file mode 100644 index 0000000..fe7589f --- /dev/null +++ b/src/common/assets/images/fallback.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/common/assets/images/featured/airswap_banner.png b/src/common/assets/images/featured/airswap_banner.png new file mode 100644 index 0000000..0725d8e Binary files /dev/null and b/src/common/assets/images/featured/airswap_banner.png differ diff --git a/src/common/assets/images/featured/airswap_logo.png b/src/common/assets/images/featured/airswap_logo.png new file mode 100644 index 0000000..2f7bf05 Binary files /dev/null and b/src/common/assets/images/featured/airswap_logo.png differ diff --git a/src/common/assets/images/featured/cryptokitties_logo.png b/src/common/assets/images/featured/cryptokitties_logo.png new file mode 100644 index 0000000..9f4b443 Binary files /dev/null and b/src/common/assets/images/featured/cryptokitties_logo.png differ diff --git a/src/common/assets/images/featured/crytokittes_banner.png b/src/common/assets/images/featured/crytokittes_banner.png new file mode 100644 index 0000000..23c8d8d Binary files /dev/null and b/src/common/assets/images/featured/crytokittes_banner.png differ diff --git a/src/common/assets/images/featured/kyber_banner.png b/src/common/assets/images/featured/kyber_banner.png new file mode 100644 index 0000000..9a6b940 Binary files /dev/null and b/src/common/assets/images/featured/kyber_banner.png differ diff --git a/src/common/assets/images/featured/kyber_logo.png b/src/common/assets/images/featured/kyber_logo.png new file mode 100644 index 0000000..0cf3494 Binary files /dev/null and b/src/common/assets/images/featured/kyber_logo.png differ diff --git a/src/common/components/FeatureDapps/FeatureDapps.jsx b/src/common/components/FeatureDapps/FeatureDapps.jsx new file mode 100644 index 0000000..a69e83f --- /dev/null +++ b/src/common/components/FeatureDapps/FeatureDapps.jsx @@ -0,0 +1,40 @@ +import React from 'react' +import ReactImageFallback from 'react-image-fallback' +import styles from './FeatureDapps.module.scss' +import fallbackBanner from '../../assets/images/fallback.svg' +import icon from '../../assets/images/icon.svg' + +const FeatureDapps = props => { + return ( + <> +
+ {props.featured.map((dapp, index) => ( +
+ +
+ +
+

{dapp.name}

+ + {dapp.description} + +
+
+
+ ))} +
+ + ) +} + +export default FeatureDapps diff --git a/src/common/components/FeatureDapps/FeatureDapps.module.scss b/src/common/components/FeatureDapps/FeatureDapps.module.scss new file mode 100644 index 0000000..6bba1f8 --- /dev/null +++ b/src/common/components/FeatureDapps/FeatureDapps.module.scss @@ -0,0 +1,66 @@ +@import '../../../common/styles/variables'; + +.grid { + display: grid; + grid-template-columns: 1fr 1fr 1fr; + grid-template-rows: unset; + margin: 0 calculateRem(10) calculateRem(30) calculateRem(10); + overflow-x: scroll; + overflow-y: hidden; + -webkit-overflow-scrolling: touch; + + @media (min-width: $desktop) { + grid-template-columns: 1fr 1fr 1fr; + grid-template-rows: unset; + overflow-x: hidden; + } +} + +.dapp { + font-family: $font; + background: $background; + display: flex; + flex-direction: column; + margin: 0 calculateRem(20) calculateRem(20) calculateRem(20); +} + +.banner { + max-width: calculateRem(400); + max-height: calculateRem(400); + width: 70vw; + margin-top: calculateRem(30); + margin-right: calculateRem(16); + border-radius: 1%; +} + +.dapp_details { + display: flex; + flex-direction: row; +} + +.dapp_details__image { + max-width: calculateRem(40); + max-height: calculateRem(40); + margin-top: calculateRem(10); + margin-right: calculateRem(16); + border-radius: 50%; +} + +.dapp_details__header { + color: $headline-color; + font-size: calculateRem(15); + line-height: calculateRem(22); + margin-bottom: calculateRem(2); + margin-top: calculateRem(12); + font-weight: 500; +} + +.dapp_details__description { + color: $text-color; + font-size: calculateRem(13); + line-height: calculateRem(18); + margin-bottom: calculateRem(2); + margin-top: 0; + max-height: calculateRem(40); + overflow-y: hidden; +} diff --git a/src/common/components/FeatureDapps/index.js b/src/common/components/FeatureDapps/index.js new file mode 100644 index 0000000..6a15461 --- /dev/null +++ b/src/common/components/FeatureDapps/index.js @@ -0,0 +1,3 @@ +import FeatureDapps from './FeatureDapps' + +export default FeatureDapps diff --git a/src/common/data/featured.js b/src/common/data/featured.js new file mode 100644 index 0000000..776d43c --- /dev/null +++ b/src/common/data/featured.js @@ -0,0 +1,29 @@ +import CryptoKittiesBanner from '../assets/images/featured/crytokittes_banner.png' +import CryptoKittiesLogo from '../assets/images/featured/cryptokitties_logo.png' +import AirswapBanner from '../assets/images/featured/airswap_banner.png' +import AirswapLogo from '../assets/images/featured/airswap_logo.png' +import KyberBanner from '../assets/images/featured/kyber_banner.png' +import KyberLogo from '../assets/images/featured/kyber_logo.png' + +const featuredDapps = [ + { + name: 'CryptoKittes', + description: 'Get purring with two new crypto influencer Kitties', + banner: CryptoKittiesBanner, + icon: CryptoKittiesLogo, + }, + { + name: 'Airswap', + description: 'Get purring with two new crypto influencer Kitties', + banner: AirswapBanner, + icon: AirswapLogo, + }, + { + name: 'Kyber', + description: 'Get purring with two new crypto influencer Kitties', + banner: KyberBanner, + icon: KyberLogo, + }, +] + +export default featuredDapps diff --git a/src/modules/Categories/Categories.jsx b/src/modules/Categories/Categories.jsx index a88f381..9f04b92 100644 --- a/src/modules/Categories/Categories.jsx +++ b/src/modules/Categories/Categories.jsx @@ -12,7 +12,7 @@ const Categories = props => { return ( <>
-

Discover DApps

+

Categories

diff --git a/src/modules/Home/Home.jsx b/src/modules/Home/Home.jsx index aa4c679..929bf66 100644 --- a/src/modules/Home/Home.jsx +++ b/src/modules/Home/Home.jsx @@ -1,9 +1,11 @@ import React from 'react' import RecentlyAdded from '../RecentlyAdded' -import HighestRanked from '../HighestRanked' import Categories from '../Categories' +import FeaturedDapps from '../../common/components/FeatureDapps' import Footer from '../Footer' import LoadingHome from '../LoadingHome' +import featured from '../../common/data/featured' +import styles from './Home.module.scss' class Home extends React.Component { constructor(props) { @@ -29,8 +31,11 @@ class Home extends React.Component { <> {loaded && ( <> +
+

Discover

+
+ -