diff --git a/packages/web/src/assets/img/publicSite/3lau@1x.jpg b/packages/web/src/assets/img/publicSite/3lau@1x.jpg deleted file mode 100644 index 75465e141a..0000000000 Binary files a/packages/web/src/assets/img/publicSite/3lau@1x.jpg and /dev/null differ diff --git a/packages/web/src/assets/img/publicSite/3lau@2x.jpg b/packages/web/src/assets/img/publicSite/3lau@2x.jpg deleted file mode 100644 index e8912b8cf6..0000000000 Binary files a/packages/web/src/assets/img/publicSite/3lau@2x.jpg and /dev/null differ diff --git a/packages/web/src/assets/img/publicSite/AudiusApp@2x.png b/packages/web/src/assets/img/publicSite/AudiusApp@2x.png old mode 100755 new mode 100644 index 76dd365827..546077c391 Binary files a/packages/web/src/assets/img/publicSite/AudiusApp@2x.png and b/packages/web/src/assets/img/publicSite/AudiusApp@2x.png differ diff --git a/packages/web/src/assets/img/publicSite/Hero-BG@1x.jpg b/packages/web/src/assets/img/publicSite/Hero-BG@1x.jpg old mode 100755 new mode 100644 index 50b69ac97f..64b6784c8b Binary files a/packages/web/src/assets/img/publicSite/Hero-BG@1x.jpg and b/packages/web/src/assets/img/publicSite/Hero-BG@1x.jpg differ diff --git a/packages/web/src/assets/img/publicSite/Hero-BG@2x.jpg b/packages/web/src/assets/img/publicSite/Hero-BG@2x.jpg new file mode 100644 index 0000000000..3afd69e0cd Binary files /dev/null and b/packages/web/src/assets/img/publicSite/Hero-BG@2x.jpg differ diff --git a/packages/web/src/assets/img/publicSite/Hero-BG@2x.png b/packages/web/src/assets/img/publicSite/Hero-BG@2x.png deleted file mode 100755 index 96fbd9bd08..0000000000 Binary files a/packages/web/src/assets/img/publicSite/Hero-BG@2x.png and /dev/null differ diff --git a/packages/web/src/assets/img/publicSite/Hero-BG@3x.jpg b/packages/web/src/assets/img/publicSite/Hero-BG@3x.jpg new file mode 100644 index 0000000000..3272de3691 Binary files /dev/null and b/packages/web/src/assets/img/publicSite/Hero-BG@3x.jpg differ diff --git a/packages/web/src/assets/img/publicSite/Hero-Background-mobile.jpg b/packages/web/src/assets/img/publicSite/Hero-Background-mobile.jpg deleted file mode 100644 index 94881d1e3d..0000000000 Binary files a/packages/web/src/assets/img/publicSite/Hero-Background-mobile.jpg and /dev/null differ diff --git a/packages/web/src/assets/img/publicSite/Hero-Background@1x.jpg b/packages/web/src/assets/img/publicSite/Hero-Background@1x.jpg deleted file mode 100644 index 37647095e7..0000000000 Binary files a/packages/web/src/assets/img/publicSite/Hero-Background@1x.jpg and /dev/null differ diff --git a/packages/web/src/assets/img/publicSite/Hero-Background@2x.jpg b/packages/web/src/assets/img/publicSite/Hero-Background@2x.jpg deleted file mode 100644 index 90bd174641..0000000000 Binary files a/packages/web/src/assets/img/publicSite/Hero-Background@2x.jpg and /dev/null differ diff --git a/packages/web/src/assets/img/publicSite/ImgArtist3LAU.jpg b/packages/web/src/assets/img/publicSite/ImgArtist3LAU.jpg index a027e4c59c..5dc642942b 100755 Binary files a/packages/web/src/assets/img/publicSite/ImgArtist3LAU.jpg and b/packages/web/src/assets/img/publicSite/ImgArtist3LAU.jpg differ diff --git a/packages/web/src/assets/img/publicSite/ImgArtistAlinaBaraz.jpg b/packages/web/src/assets/img/publicSite/ImgArtistAlinaBaraz.jpg index b44d56b980..b7fd063004 100755 Binary files a/packages/web/src/assets/img/publicSite/ImgArtistAlinaBaraz.jpg and b/packages/web/src/assets/img/publicSite/ImgArtistAlinaBaraz.jpg differ diff --git a/packages/web/src/assets/img/publicSite/ImgArtistDeadmau5.jpg b/packages/web/src/assets/img/publicSite/ImgArtistDeadmau5.jpg index 4d4a96769d..0245b2025b 100755 Binary files a/packages/web/src/assets/img/publicSite/ImgArtistDeadmau5.jpg and b/packages/web/src/assets/img/publicSite/ImgArtistDeadmau5.jpg differ diff --git a/packages/web/src/assets/img/publicSite/ImgArtistJasonDerulo.jpg b/packages/web/src/assets/img/publicSite/ImgArtistJasonDerulo.jpg index f8faba21d1..d5c33f6478 100755 Binary files a/packages/web/src/assets/img/publicSite/ImgArtistJasonDerulo.jpg and b/packages/web/src/assets/img/publicSite/ImgArtistJasonDerulo.jpg differ diff --git a/packages/web/src/assets/img/publicSite/ImgArtistKatyPerry.jpg b/packages/web/src/assets/img/publicSite/ImgArtistKatyPerry.jpg index 37c93062ad..5769f8eae0 100755 Binary files a/packages/web/src/assets/img/publicSite/ImgArtistKatyPerry.jpg and b/packages/web/src/assets/img/publicSite/ImgArtistKatyPerry.jpg differ diff --git a/packages/web/src/assets/img/publicSite/ImgArtistNas.jpg b/packages/web/src/assets/img/publicSite/ImgArtistNas.jpg index 355b74dbe4..842a7b98d4 100755 Binary files a/packages/web/src/assets/img/publicSite/ImgArtistNas.jpg and b/packages/web/src/assets/img/publicSite/ImgArtistNas.jpg differ diff --git a/packages/web/src/assets/img/publicSite/ImgArtistREZZ.jpg b/packages/web/src/assets/img/publicSite/ImgArtistREZZ.jpg index 5498fe7d63..1a5238454f 100755 Binary files a/packages/web/src/assets/img/publicSite/ImgArtistREZZ.jpg and b/packages/web/src/assets/img/publicSite/ImgArtistREZZ.jpg differ diff --git a/packages/web/src/assets/img/publicSite/ImgArtistSkrillex.jpg b/packages/web/src/assets/img/publicSite/ImgArtistSkrillex.jpg index 70e96ebc2f..91782c5086 100755 Binary files a/packages/web/src/assets/img/publicSite/ImgArtistSkrillex.jpg and b/packages/web/src/assets/img/publicSite/ImgArtistSkrillex.jpg differ diff --git a/packages/web/src/assets/img/publicSite/ImgArtistSteveAoki.jpg b/packages/web/src/assets/img/publicSite/ImgArtistSteveAoki.jpg index 476e60ceb6..0068c7bf73 100755 Binary files a/packages/web/src/assets/img/publicSite/ImgArtistSteveAoki.jpg and b/packages/web/src/assets/img/publicSite/ImgArtistSteveAoki.jpg differ diff --git a/packages/web/src/assets/img/publicSite/ImgArtistTheChainsmokers.jpg b/packages/web/src/assets/img/publicSite/ImgArtistTheChainsmokers.jpg index 3bf9505594..e54f89865f 100755 Binary files a/packages/web/src/assets/img/publicSite/ImgArtistTheChainsmokers.jpg and b/packages/web/src/assets/img/publicSite/ImgArtistTheChainsmokers.jpg differ diff --git a/packages/web/src/assets/img/publicSite/artist-blau@2x.jpg b/packages/web/src/assets/img/publicSite/artist-blau@2x.jpg deleted file mode 100644 index b491240325..0000000000 Binary files a/packages/web/src/assets/img/publicSite/artist-blau@2x.jpg and /dev/null differ diff --git a/packages/web/src/assets/img/publicSite/artist-deadmau5@1x.jpg b/packages/web/src/assets/img/publicSite/artist-deadmau5@1x.jpg deleted file mode 100644 index 145496c6f7..0000000000 Binary files a/packages/web/src/assets/img/publicSite/artist-deadmau5@1x.jpg and /dev/null differ diff --git a/packages/web/src/assets/img/publicSite/artist-deadmau5@2x.jpg b/packages/web/src/assets/img/publicSite/artist-deadmau5@2x.jpg deleted file mode 100644 index fbd192e9b1..0000000000 Binary files a/packages/web/src/assets/img/publicSite/artist-deadmau5@2x.jpg and /dev/null differ diff --git a/packages/web/src/assets/img/publicSite/artist-mrcarmack@2x.jpg b/packages/web/src/assets/img/publicSite/artist-mrcarmack@2x.jpg deleted file mode 100644 index 09a089d22b..0000000000 Binary files a/packages/web/src/assets/img/publicSite/artist-mrcarmack@2x.jpg and /dev/null differ diff --git a/packages/web/src/assets/img/publicSite/artist-rezz@2x.jpg b/packages/web/src/assets/img/publicSite/artist-rezz@2x.jpg deleted file mode 100644 index 40d8ea26c5..0000000000 Binary files a/packages/web/src/assets/img/publicSite/artist-rezz@2x.jpg and /dev/null differ diff --git a/packages/web/src/assets/img/publicSite/artist-staffordbros@2x.jpg b/packages/web/src/assets/img/publicSite/artist-staffordbros@2x.jpg deleted file mode 100644 index d8eda38e5d..0000000000 Binary files a/packages/web/src/assets/img/publicSite/artist-staffordbros@2x.jpg and /dev/null differ diff --git a/packages/web/src/assets/img/publicSite/downloadDesktop.svg b/packages/web/src/assets/img/publicSite/downloadDesktop.svg new file mode 100644 index 0000000000..e50cfc601c --- /dev/null +++ b/packages/web/src/assets/img/publicSite/downloadDesktop.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/web/src/assets/img/publicSite/downloadMobile.svg b/packages/web/src/assets/img/publicSite/downloadMobile.svg new file mode 100644 index 0000000000..d533b5a54b --- /dev/null +++ b/packages/web/src/assets/img/publicSite/downloadMobile.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/web/src/assets/img/publicSite/iconAudio.svg b/packages/web/src/assets/img/publicSite/iconAudio.svg index 2c5e488dc9..76403f1dc4 100644 --- a/packages/web/src/assets/img/publicSite/iconAudio.svg +++ b/packages/web/src/assets/img/publicSite/iconAudio.svg @@ -1,5 +1,4 @@ - - - - + + + diff --git a/packages/web/src/assets/img/publicSite/iconFree.svg b/packages/web/src/assets/img/publicSite/iconFree.svg index c8a00e78f1..ab30e11b71 100644 --- a/packages/web/src/assets/img/publicSite/iconFree.svg +++ b/packages/web/src/assets/img/publicSite/iconFree.svg @@ -1,5 +1,4 @@ - - - - + + + diff --git a/packages/web/src/assets/img/publicSite/iconRemix.svg b/packages/web/src/assets/img/publicSite/iconRemix.svg index 0cae7fa516..6863bec04c 100644 --- a/packages/web/src/assets/img/publicSite/iconRemix.svg +++ b/packages/web/src/assets/img/publicSite/iconRemix.svg @@ -1,3 +1,3 @@ - - + + diff --git a/packages/web/src/assets/img/publicSite/isItLove@1x.jpg b/packages/web/src/assets/img/publicSite/isItLove@1x.jpg deleted file mode 100644 index 57761d29ef..0000000000 Binary files a/packages/web/src/assets/img/publicSite/isItLove@1x.jpg and /dev/null differ diff --git a/packages/web/src/assets/img/publicSite/isItLove@2x.jpg b/packages/web/src/assets/img/publicSite/isItLove@2x.jpg deleted file mode 100644 index 27d1b9f418..0000000000 Binary files a/packages/web/src/assets/img/publicSite/isItLove@2x.jpg and /dev/null differ diff --git a/packages/web/src/assets/img/publicSite/staffordBrosPlaylist@1x.jpg b/packages/web/src/assets/img/publicSite/staffordBrosPlaylist@1x.jpg deleted file mode 100644 index 8018f7ecaa..0000000000 Binary files a/packages/web/src/assets/img/publicSite/staffordBrosPlaylist@1x.jpg and /dev/null differ diff --git a/packages/web/src/assets/img/publicSite/staffordBrosPlaylist@2x.jpg b/packages/web/src/assets/img/publicSite/staffordBrosPlaylist@2x.jpg deleted file mode 100644 index 25366f3719..0000000000 Binary files a/packages/web/src/assets/img/publicSite/staffordBrosPlaylist@2x.jpg and /dev/null differ diff --git a/packages/web/src/common/hooks/useMatchesBreakpoint.ts b/packages/web/src/common/hooks/useMatchesBreakpoint.ts new file mode 100644 index 0000000000..0387f96269 --- /dev/null +++ b/packages/web/src/common/hooks/useMatchesBreakpoint.ts @@ -0,0 +1,26 @@ +import { useCallback, useEffect, useState } from 'react' + +/** Returns whether the given media query is matched */ +export const useMatchesBreakpoint = ({ + mediaQuery, + initialValue = false +}: { + /** + * E.g. the return value of something like `window.matchMedia("(max-width: 900px)")` + */ + mediaQuery: MediaQueryList + initialValue?: boolean +}) => { + const [value, setValue] = useState(initialValue) + const handleChange = useCallback(() => { + setValue(mediaQuery.matches) + }, [mediaQuery]) + + useEffect(() => { + handleChange() + mediaQuery.addEventListener('change', handleChange) + return () => mediaQuery.removeEventListener('change', handleChange) + }, [handleChange, mediaQuery]) + + return value +} diff --git a/packages/web/src/common/store/pages/explore/sagas.ts b/packages/web/src/common/store/pages/explore/sagas.ts index 7b80c551d4..c6c4d8be0f 100644 --- a/packages/web/src/common/store/pages/explore/sagas.ts +++ b/packages/web/src/common/store/pages/explore/sagas.ts @@ -4,6 +4,7 @@ import { ID } from 'common/models/Identifiers' import { retrieveCollections } from 'common/store/cache/collections/utils' import { fetchUsers } from 'common/store/cache/users/sagas' import { waitForBackendSetup } from 'store/backend/sagas' +import { STATIC_EXPLORE_CONTENT_URL } from 'utils/constants' import { fetchExplore, @@ -12,10 +13,9 @@ import { } from './slice' const EXPLORE_CONTENT_URL = - process.env.REACT_APP_EXPLORE_CONTENT_URL || - 'https://download.audius.co/static-resources/explore-content.json' + process.env.REACT_APP_EXPLORE_CONTENT_URL || STATIC_EXPLORE_CONTENT_URL -const fetchExploreContent = async () => { +export const fetchExploreContent = async () => { return fetch(EXPLORE_CONTENT_URL).then(resp => resp.json()) } diff --git a/packages/web/src/components/app-redirect-popover/AppRedirectListener.tsx b/packages/web/src/components/app-redirect-popover/AppRedirectListener.tsx index 4985e505e7..6923278362 100644 --- a/packages/web/src/components/app-redirect-popover/AppRedirectListener.tsx +++ b/packages/web/src/components/app-redirect-popover/AppRedirectListener.tsx @@ -7,17 +7,17 @@ import { Dispatch } from 'redux' import { MobileOS } from 'common/models/OS' import { getMobileOS } from 'utils/clientUtil' -import { APP_REDIRECT } from 'utils/route' +import { + APP_REDIRECT, + ANDROID_PLAY_STORE_LINK, + IOS_WEBSITE_STORE_LINK, + IOS_APP_STORE_LINK +} from 'utils/route' type AppRedirectListenerProps = ReturnType const EMBED_HASH = '#embed' const NATIVE_MOBILE = process.env.REACT_APP_NATIVE_MOBILE -const IOS_APP_STORE_LINK = 'itms-apps://us/app/audius-music/id1491270519' -const ANDROID_PLAY_STORE_LINK = - 'https://play.google.com/store/apps/details?id=co.audius.app' -const IOS_WEBSITE_STORE_LINK = - 'https://apps.apple.com/us/app/audius-music/id1491270519' /** * `AppRedirectListener` listens to redirects from the `AppRedirectPopover`. diff --git a/packages/web/src/components/public-site/Footer.module.css b/packages/web/src/components/public-site/Footer.module.css index 89ccc6e18f..8ce84d9209 100644 --- a/packages/web/src/components/public-site/Footer.module.css +++ b/packages/web/src/components/public-site/Footer.module.css @@ -3,7 +3,7 @@ display: flex; justify-content: center; width: 100%; - padding: 49px 0px 39px; + padding: 49px 50px 39px; } .content { @@ -34,7 +34,7 @@ border: none; border-radius: 6px; background-color: var(--static-primary); - box-shadow: 0 10px 30px -2px rgba(89, 11, 151, 0.3); + box-shadow: 0 10px 30px -2px rgb(89 11 151 / 10%); padding: 12px 24px; display: inline-flex; justify-content: center; @@ -52,13 +52,13 @@ .startListeningButton:hover { transform: scale3d(1.03, 1.03, 1.03); background-color: #dc19f0; - box-shadow: 0 10px 20px -1px rgba(25, 0, 96, 0.5); + box-shadow: 0 10px 30px -1px rgb(25 0 96 / 20%); } .startListeningButton:active { transform: scale3d(0.99, 0.99, 0.99); background-color: #ba02ce; - box-shadow: 0 0 2px -1px rgba(25, 0, 96, 0.5); + box-shadow: 0 10px 30px -1px rgb(25 0 96 / 20%); } .arrowRight { @@ -124,7 +124,8 @@ align-items: center; flex-direction: column; align-self: baseline; - + margin-left: 16px; + margin-right: 16px; color: var(--static-neutral); font-size: var(--font-s); line-height: 20px; @@ -238,6 +239,8 @@ .isMobile .rightsContainer { width: 100%; order: 3; + margin-left: initial; + margin-right: initial; } .isMobile .socialLinks { diff --git a/packages/web/src/components/public-site/Footer.tsx b/packages/web/src/components/public-site/Footer.tsx index 0b06c68bba..c54f2fd778 100644 --- a/packages/web/src/components/public-site/Footer.tsx +++ b/packages/web/src/components/public-site/Footer.tsx @@ -21,8 +21,8 @@ import { AUDIUS_EXPLORE_LINK, AUDIUS_BLOG_LINK, AUDIUS_REMIX_CONTESTS_LINK, - APP_REDIRECT, - AUDIUS_DOCS_LINK + AUDIUS_DOCS_LINK, + DOWNLOAD_LINK } from 'utils/route' import styles from './Footer.module.css' @@ -79,7 +79,7 @@ const siteLinkRows = [ }, { text: 'Download App', - link: APP_REDIRECT + link: DOWNLOAD_LINK } ] ] diff --git a/packages/web/src/components/public-site/NavBanner.module.css b/packages/web/src/components/public-site/NavBanner.module.css index 3cb89a1181..830a0bb638 100644 --- a/packages/web/src/components/public-site/NavBanner.module.css +++ b/packages/web/src/components/public-site/NavBanner.module.css @@ -29,7 +29,6 @@ /* Left Icons */ .iconContainer { - flex: 1; display: inline-flex; justify-content: flex-start; align-items: center; @@ -65,10 +64,11 @@ /* Center Logo */ .centerLogo { - flex: 1; + flex-grow: 1; display: flex; justify-content: center; align-items: center; + padding-right: 12px; } .horizontalLogo { @@ -87,16 +87,14 @@ /* Right Links */ .linkContainer { - flex: 1; display: inline-flex; align-items: center; justify-content: flex-end; + color: var(--static-white); } -.token { +.rightLink { cursor: pointer; - color: var(--static-white); - font-family: Gilroy !important; font-size: var(--font-m); font-weight: var(--font-bold); letter-spacing: 0.2px; @@ -107,19 +105,19 @@ transform: scale3d(1, 1, 1); } -.token:hover { +.rightLink:hover { text-decoration: underline; opacity: 0.8; transform: scale3d(1.03, 1.03, 1.03); } -.token:active { +.rightLink:active { opacity: 0.8; transform: scale3d(0.99, 0.99, 0.99); } -.invertColors .token { - display: none; +.invertColors .linkContainer { + color: var(--static-secondary); } .startListening { @@ -128,8 +126,7 @@ display: flex; align-items: center; justify-content: center; - color: #480b79; - font-family: Gilroy !important; + color: #7e1bcc; font-size: var(--font-m); font-weight: var(--font-bold); letter-spacing: 0.2px; @@ -175,7 +172,7 @@ position: fixed; width: 100%; top: 0px; - padding: 16px; + padding: 0px 22px; height: 80px; display: inline-flex; align-items: center; @@ -194,14 +191,18 @@ } .kebabMenu { - position: absolute; - left: 24px; - top: 24px; height: 32px; width: 32px; + padding-right: 2px; +} + +.trendingIcon { + height: 28px; + width: 28px; } -.kebabMenu path { +.kebabMenu path, +.trendingIcon path { fill: var(--static-white); } diff --git a/packages/web/src/components/public-site/NavBanner.tsx b/packages/web/src/components/public-site/NavBanner.tsx index e8b9c7abac..4162d64610 100644 --- a/packages/web/src/components/public-site/NavBanner.tsx +++ b/packages/web/src/components/public-site/NavBanner.tsx @@ -9,21 +9,30 @@ import { import cn from 'classnames' import HorizontalLogo from 'assets/img/publicSite/Horizontal-Logo-Full-Color@2x.png' +import { useMatchesBreakpoint } from 'common/hooks/useMatchesBreakpoint' import { AUDIUS_LISTENING_LINK, AUDIUS_HOT_AND_NEW, AUDIUS_EXPLORE_LINK, - AUDIUS_ORG + AUDIUS_ORG, + AUDIUS_BLOG_LINK, + DOWNLOAD_START_LINK } from 'utils/route' import styles from './NavBanner.module.css' import { handleClickRoute } from './handleClickRoute' +const DESKTOP_NAV_BANNER_MIN_WIDTH = 1170 +const MOBILE_WIDTH_MEDIA_QUERY = window.matchMedia( + `(max-width: ${DESKTOP_NAV_BANNER_MIN_WIDTH}px)` +) const messages = { explore: 'Explore', trending: 'Trending', hotAndNew: 'Hot & New', token: 'Token', + blog: 'Blog', + download: 'Download', startListening: 'Start Listening' } @@ -36,6 +45,10 @@ type NavBannerProps = { } const NavBanner = (props: NavBannerProps) => { + const isNarrow = useMatchesBreakpoint({ + mediaQuery: MOBILE_WIDTH_MEDIA_QUERY, + initialValue: props.isMobile + }) const [isScrolling, setIsScrolling] = useState(false) const setScrolling = useCallback(() => { const scrollTop = window.pageYOffset || document.documentElement.scrollTop @@ -61,13 +74,23 @@ const NavBanner = (props: NavBannerProps) => { ) const onClickToken = handleClickRoute(AUDIUS_ORG, props.setRenderPublicSite) + const onClickBlog = handleClickRoute( + AUDIUS_BLOG_LINK, + props.setRenderPublicSite + ) + + const onClickDownload = handleClickRoute( + DOWNLOAD_START_LINK, + props.setRenderPublicSite + ) + useEffect(() => { setScrolling() window.addEventListener('scroll', setScrolling) return () => window.removeEventListener('scroll', setScrolling) }, [setScrolling]) - if (props.isMobile) { + if (props.isMobile || isNarrow) { return (
{ alt='Audius Logo' />
+ ) } @@ -133,9 +160,15 @@ const NavBanner = (props: NavBannerProps) => { />
-
+
+ {messages.blog} +
+
{messages.token}
+
+ {messages.download} +
{messages.startListening}
diff --git a/packages/web/src/components/public-site/NavOverlay.module.css b/packages/web/src/components/public-site/NavOverlay.module.css index e012cfd2a4..8eb6935bb2 100644 --- a/packages/web/src/components/public-site/NavOverlay.module.css +++ b/packages/web/src/components/public-site/NavOverlay.module.css @@ -21,7 +21,7 @@ width: calc(100vw + 30px); margin: -10px; filter: blur(5px); - background-size: 1000px; + background-size: cover; background-position: 50% 5%; } @@ -36,10 +36,10 @@ z-index: 2000; height: 100vh; width: 100vw; - padding: 24px 24px 54px; + padding: 24px; display: inline-flex; + justify-content: space-between; flex-direction: column; - align-items: center; } .iconContainer { @@ -49,6 +49,7 @@ } .iconClose { + position: absolute; width: 32px; height: 32px; } @@ -57,51 +58,51 @@ fill: var(--static-white); } -.centerLogo { - flex: 0 1 133px; - margin: 0px auto; -} - .horizontalLogo { - width: 182px; + width: 195px; margin: 0px auto; filter: brightness(0) invert(1); } -.startListeningButtonContainer { - flex: 0 1 143px; +.startListeningButtonContaier { + margin-top: 32px; } .startListeningButton { - border-radius: 9px; - background-color: var(--static-primary); - box-shadow: 0 5px 20px 0 rgba(25, 0, 96, 0.5); - padding: 16px 40px; - color: var(--static-white); - font-family: Gilroy; - font-size: var(--font-2xl); - font-weight: var(--font-bold); - letter-spacing: 0.3px; - line-height: 29px; + width: 100%; + padding: 13px 0px; + font-size: 18px; + font-weight: 700; + line-height: 22px; text-align: center; + border-radius: 6px; + background-color: #ffffff; + box-shadow: 0px 0px 1px -2px rgba(133, 129, 153, 0.1), + 0px 1px 0px -2px #e3e3e3, 1px 2px 5px rgba(133, 129, 153, 0.25); + color: #7e1bcc; + border: none; + transform: scale3d(1, 1, 1); } -.dappLinksContainer { - flex: 0 1 173px; +@media screen and (min-height: 705px) { + .dappLinksContainer { + margin-top: 56px; + } } .dappLinks { + height: 100%; display: inline-flex; flex-direction: column; - justify-content: space-between; - margin-bottom: 48px; - height: 125px; + justify-content: center; + align-items: flex-start; } .dappLink { display: inline-flex; align-items: center; justify-content: center; + margin-bottom: 32px; } .dappLinkIcon { @@ -116,26 +117,25 @@ .dappLinkText { margin-left: 16px; color: var(--static-white); - font-size: var(--font-2xl); - font-weight: var(--font-bold); - letter-spacing: 0.3px; + font-size: 24px; + line-height: 24px; + font-weight: 700; } .linksContainer { - flex: 1; - display: inline-flex; - flex-direction: column; - justify-content: space-between; + display: inline-grid; + grid-template-columns: repeat(3, 1fr); + flex-grow: 1; + align-content: flex-end; + row-gap: 16px; } .link { - font-size: var(--font-m); - font-weight: var(--font-bold); - letter-spacing: 0.2px; - line-height: 19px; - text-align: center; + font-size: 14px; + font-weight: 600; + line-height: 24px; color: var(--static-white); - font-family: Gilroy; + white-space: nowrap; } .iconsContainer { @@ -146,8 +146,8 @@ } .icon { - width: 24px; - height: 24px; + width: 32px; + height: 32px; } .icon path { diff --git a/packages/web/src/components/public-site/NavOverlay.tsx b/packages/web/src/components/public-site/NavOverlay.tsx index 29aa9deeeb..c283644716 100644 --- a/packages/web/src/components/public-site/NavOverlay.tsx +++ b/packages/web/src/components/public-site/NavOverlay.tsx @@ -1,31 +1,38 @@ -import { useState, useEffect } from 'react' +import { useEffect, useState } from 'react' import { - IconRemove, - IconInstagram, - IconTwitterBird, + IconCampFire, IconDiscord, + IconDownload, IconExplore, + IconFollow, + IconInstagram, + IconRemove, IconTrending, - IconCampFire + IconTwitterBird } from '@audius/stems' import cn from 'classnames' import ReactDOM from 'react-dom' -import HeroBackground from 'assets/img/publicSite/Hero-Background@2x.jpg' +import HeroBackground from 'assets/img/publicSite/Hero-BG@2x.jpg' import HorizontalLogo from 'assets/img/publicSite/Horizontal-Logo-Full-Color@2x.png' import { - AUDIUS_TWITTER_LINK, - AUDIUS_INSTAMGRAM_LINK, + AUDIUS_BLOG_LINK, AUDIUS_DISCORD_LINK, - AUDIUS_TEAM_LINK, - AUDIUS_DEV_STAKER_LINK, + AUDIUS_DOCS_LINK, + AUDIUS_EXPLORE_LINK, + AUDIUS_HOT_AND_NEW, + AUDIUS_INSTAMGRAM_LINK, AUDIUS_LISTENING_LINK, + AUDIUS_ORG, AUDIUS_PRESS_LINK, + AUDIUS_REMIX_CONTESTS_LINK, + AUDIUS_SIGN_UP_LINK, + AUDIUS_TEAM_LINK, + AUDIUS_TWITTER_LINK, + DOWNLOAD_START_LINK, PRIVACY_POLICY, - TERMS_OF_SERVICE, - AUDIUS_HOT_AND_NEW, - AUDIUS_EXPLORE_LINK + TERMS_OF_SERVICE } from 'utils/route' import styles from './NavOverlay.module.css' @@ -52,42 +59,64 @@ const socialLinks = [ const dappLinks = [ { - text: 'Explore', - icon: , - link: AUDIUS_EXPLORE_LINK + text: 'Sign Up', + icon: , + link: AUDIUS_SIGN_UP_LINK }, { text: 'Trending', icon: , link: AUDIUS_LISTENING_LINK }, + { + text: 'Explore', + icon: , + link: AUDIUS_EXPLORE_LINK + }, { text: 'Hot & New', icon: , link: AUDIUS_HOT_AND_NEW + }, + { + text: 'Download App', + icon: , + link: DOWNLOAD_START_LINK } ] const links = [ { - text: 'Dev & Stakers', - link: AUDIUS_DEV_STAKER_LINK + text: 'Blog', + link: AUDIUS_BLOG_LINK }, { - text: 'Team', - link: AUDIUS_TEAM_LINK - }, - { - text: 'Press', - link: AUDIUS_PRESS_LINK + text: 'Docs', + link: AUDIUS_DOCS_LINK }, { text: 'Privacy Policy', link: PRIVACY_POLICY }, + { + text: 'Remixes', + link: AUDIUS_REMIX_CONTESTS_LINK + }, + { + text: 'Team', + link: AUDIUS_TEAM_LINK + }, { text: 'Terms of Service', link: TERMS_OF_SERVICE + }, + { + text: 'Token', + link: AUDIUS_ORG + }, + { + text: 'Brand', + link: AUDIUS_PRESS_LINK } ] @@ -147,22 +176,12 @@ const NavOverlay = (props: NavOverlayProps) => { className={styles.iconClose} onClick={props.closeNavScreen} /> -
-
Audius Logo
-
-
- {messages.startListening} -
-
{dappLinks.map(({ icon, text, link }, idx) => ( @@ -178,6 +197,25 @@ const NavOverlay = (props: NavOverlayProps) => { ))}
+
+ +
+
+ {socialLinks.map(({ Icon, link }, idx) => ( + + + + ))} +
{links.map(({ text, link }, idx) => ( { {text} ))} -
- {socialLinks.map(({ Icon, link }, idx) => ( - - - - ))} -
, diff --git a/packages/web/src/components/public-site/handleClickRoute.ts b/packages/web/src/components/public-site/handleClickRoute.ts index c33b7a7b90..8b440956d9 100644 --- a/packages/web/src/components/public-site/handleClickRoute.ts +++ b/packages/web/src/components/public-site/handleClickRoute.ts @@ -3,6 +3,8 @@ import { MouseEvent } from 'react' import { AUDIUS_PRESS_LINK, COOKIE_POLICY, + DOWNLOAD_LINK, + DOWNLOAD_START_LINK, PRIVACY_POLICY, pushWindowRoute, TERMS_OF_SERVICE @@ -12,7 +14,9 @@ const LANDING_PAGE_ROUTES = new Set([ PRIVACY_POLICY, COOKIE_POLICY, TERMS_OF_SERVICE, - AUDIUS_PRESS_LINK + AUDIUS_PRESS_LINK, + DOWNLOAD_START_LINK, + DOWNLOAD_LINK ]) /** diff --git a/packages/web/src/pages/App.js b/packages/web/src/pages/App.js index 32b213fc5f..61b11427ac 100644 --- a/packages/web/src/pages/App.js +++ b/packages/web/src/pages/App.js @@ -149,7 +149,8 @@ import { AUDIO_NFT_PLAYLIST_PAGE, DEACTIVATE_PAGE, SUPPORTING_USERS_ROUTE, - TOP_SUPPORTERS_USERS_ROUTE + TOP_SUPPORTERS_USERS_ROUTE, + publicSiteRoutes } from 'utils/route' import { getTheme as getSystemTheme } from 'utils/theme/theme' @@ -515,6 +516,17 @@ class App extends Component { + {publicSiteRoutes.map(route => ( + // Redirect all public site routes to the corresponding pathname. + // This is necessary first because otherwise pathnames like + // legal/privacy-policy will match the track route. + + ))} + import('pages/privacy-policy-page/PrivacyPolicyPage') ) +const DownloadPage = lazy(() => import('pages/download-page/DownloadPage')) const TermsOfUsePage = lazy(() => import('pages/terms-of-use-page/TermsOfUsePage') ) @@ -130,6 +131,17 @@ const PublicSite = ({ return null }} /> + ( + + )} + /> void + setRenderPublicSite: (shouldRender: boolean) => void +} + +const os = getOS() +const iOSDownloadLink = getIOSAppLink() + +const DesktopDownloadButton = ({ os }: { os: OS }) => { + let platformName + if (os === OS.WIN) { + platformName = 'Windows' + } else if (os === OS.MAC) { + platformName = 'Mac' + } else { + platformName = 'Linux' + } + return ( +
+ +
+ ) +} + +const AppDownloadLink = ({ os }: { os: MobileOS }) => { + let platformName, downloadLink + if (os === MobileOS.IOS) { + platformName = 'iOS' + downloadLink = iOSDownloadLink + } else if (os === MobileOS.ANDROID) { + platformName = 'Android' + downloadLink = ANDROID_PLAY_STORE_LINK + } + + return ( + + ) +} + +const DownloadPage = (props: DownloadPageProps) => { + useEffect(() => { + document.documentElement.style.height = 'auto' + return () => { + document.documentElement.style.height = '' + } + }) + + const { search } = useLocation() + const { start_download } = queryString.parse(search) + + const downloadDesktopApp = useCallback(() => { + if (!os) return + DownloadApp.start(os) + }, []) + + useEffect(() => { + if (start_download) { + downloadDesktopApp() + } + }, [downloadDesktopApp, start_download]) + const [showCookieBanner, setShowCookieBanner] = useState(false) + useEffect(() => { + shouldShowCookieBanner().then(show => { + setShowCookieBanner(show) + }) + }, []) + + const onDismissCookiePolicy = useCallback(() => { + dismissCookieBanner() + setShowCookieBanner(false) + }, []) + + return ( + +
+ {showCookieBanner && ( + + )} + +
+ {start_download && os ? : null} +
+
+

{messages.downloadTitle}

+

{messages.downloadSubtitle}

+
+
+
+
+ +
+

{messages.getDesktopApp}

+ + {messages.getDesktopAppSubtitle} + +
+ + + +
+
+
+
+ +
+

{messages.getMobileApp}

+ + {messages.getMobileAppSubtitle} + +
+ + +
+
+
+
+ +
+
+
+
+ ) +} + +export default DownloadPage diff --git a/packages/web/src/pages/download-page/components/DownloadStartingMessage.module.css b/packages/web/src/pages/download-page/components/DownloadStartingMessage.module.css new file mode 100644 index 0000000000..9337054680 --- /dev/null +++ b/packages/web/src/pages/download-page/components/DownloadStartingMessage.module.css @@ -0,0 +1,19 @@ +.container { + flex-shrink: 0; + display: inline-flex; + flex-direction: column; + margin: 50px auto 50px; + font-size: 24px; + line-height: 34px; + font-weight: 500; + text-align: center; + width: 100%; +} + +.downloadStarting { + color: var(--static-secondary); +} + +.didntWork { + margin-top: 8px; +} diff --git a/packages/web/src/pages/download-page/components/DownloadStartingMessage.tsx b/packages/web/src/pages/download-page/components/DownloadStartingMessage.tsx new file mode 100644 index 0000000000..0de7d44d08 --- /dev/null +++ b/packages/web/src/pages/download-page/components/DownloadStartingMessage.tsx @@ -0,0 +1,17 @@ +import styles from './DownloadStartingMessage.module.css' + +const messages = { + downloadStarting: 'Your download should begin automatically.', + didntWork: 'Didn’t work? Try one of the links below!' +} + +const DownloadStartingMessage = () => { + return ( +
+

{messages.downloadStarting}

+

{messages.didntWork}

+
+ ) +} + +export default DownloadStartingMessage diff --git a/packages/web/src/pages/landing-page/components/ArtistTestimonials.module.css b/packages/web/src/pages/landing-page/components/ArtistTestimonials.module.css index 76c287dce6..f62a26098b 100644 --- a/packages/web/src/pages/landing-page/components/ArtistTestimonials.module.css +++ b/packages/web/src/pages/landing-page/components/ArtistTestimonials.module.css @@ -1,6 +1,8 @@ .container { flex-shrink: 0; margin: 44px 0px 100px; + padding-left: 100px; + padding-right: 100px; width: 100%; display: flex; justify-content: center; @@ -74,6 +76,7 @@ .artistsContainer { display: inline-flex; align-items: center; + justify-content: center; flex-wrap: wrap; width: 100%; margin: -34px 0 0 -60px; @@ -85,22 +88,19 @@ .artistContainer { display: inline-flex; flex-direction: column; - height: 200px; - width: 200px; - transition: all 0.25s ease-in-out; - transform: scale3d(1, 1, 1); - cursor: pointer; margin: 34px 0 0 60px; } -.artistContainer:hover { - transform: scale3d(1.1, 1.1, 1.1); +.artistImageWrapper { + border-radius: 50%; + height: 200px; + width: 200px; + overflow: hidden; } .artistImage { height: 100%; width: 100%; - border-radius: 50%; } .artistName { @@ -172,6 +172,10 @@ .mobileContainer .overflowArtistCard { display: inline-block; overflow: hidden; + height: 125px; + width: 125px; + border-radius: 50%; + border: solid 4px #ffffff; } .mobileContainer .overflowArtistCard:not(:first-child) { @@ -193,19 +197,9 @@ text-align: center; } -.mobileContainer .overflowArtistImage { - display: inline; - height: 120px; - width: 120px; - border-radius: 50%; - border: solid 4px #ffffff; -} - -.mobileContainer .artistImage { - display: block; - height: 150px; +.mobileContainer .artistImageWrapper { width: 150px; - border-radius: 50%; + height: 150px; margin-bottom: 8px; } diff --git a/packages/web/src/pages/landing-page/components/ArtistTestimonials.tsx b/packages/web/src/pages/landing-page/components/ArtistTestimonials.tsx index 7086a313c0..93f11f2bbe 100644 --- a/packages/web/src/pages/landing-page/components/ArtistTestimonials.tsx +++ b/packages/web/src/pages/landing-page/components/ArtistTestimonials.tsx @@ -12,7 +12,6 @@ import artistSkrillex from 'assets/img/publicSite/ImgArtistSkrillex.jpg' import artistSteveAoki from 'assets/img/publicSite/ImgArtistSteveAoki.jpg' import artistChainsmokers from 'assets/img/publicSite/ImgArtistTheChainsmokers.jpg' import dots2x from 'assets/img/publicSite/dots@2x.jpg' -import useCardWeight from 'hooks/useCardWeight' import useHasViewed from 'hooks/useHasViewed' import styles from './ArtistTestimonials.module.css' @@ -28,19 +27,12 @@ type AristProps = { } const Artist = (props: AristProps) => { - const [cardRef, onMove, onLeave] = useCardWeight({ - sensitivity: 5 - }) - return ( -
-
- +
+
+
+ +
{props.name}
@@ -54,11 +46,13 @@ type MobileArtistProps = { const MobileArtist = (props: MobileArtistProps) => { return (
- Audius Artist +
+ Audius Artist +
{props.name}
) @@ -69,7 +63,7 @@ const MobileOverflowArtist = (props: MobileArtistProps) => {
Audius Artist
@@ -173,7 +167,7 @@ const ArtistTestimonials = (props: ArtistTestimonialsProps) => {
- {artists.map((artist, idx) => ( + {artists.map(artist => ( ))}
diff --git a/packages/web/src/pages/landing-page/components/CTAListening.module.css b/packages/web/src/pages/landing-page/components/CTAListening.module.css index a1380c8633..3876c55ebc 100644 --- a/packages/web/src/pages/landing-page/components/CTAListening.module.css +++ b/packages/web/src/pages/landing-page/components/CTAListening.module.css @@ -15,7 +15,7 @@ align-items: center; z-index: 5; box-shadow: 0px 10px 50px -2px rgba(53, 5, 152, 0.25); - padding: 100px 0px; + padding: 100px; background: linear-gradient( 180deg, rgba(0, 0, 0, 0.25) 0%, @@ -121,6 +121,7 @@ width: 100%; margin-top: -10%; height: auto; + min-height: calc(100% + 500px); object-fit: cover; } @@ -133,6 +134,7 @@ .mobileContainer { position: relative; overflow: hidden; + width: 100%; } .mobileBgImage { @@ -153,6 +155,7 @@ } .mobileContainer .textContent { + max-width: unset; padding: 24px 24px 48px 24px; background: linear-gradient( 180deg, @@ -162,6 +165,18 @@ linear-gradient(0deg, rgba(175, 0, 255, 0.5), rgba(175, 0, 255, 0.5)); } +@media (min-width: 510px) { + .mobileContainer .textContent, + .mobileContainer .titlesContainer { + text-align: center; + } +} + +.mobileContainer .titlesContainer { + max-width: 700px; + margin: 0 auto; +} + .mobileContainer .title { color: #ffffff; font-size: 34px; diff --git a/packages/web/src/pages/landing-page/components/CTAListening.tsx b/packages/web/src/pages/landing-page/components/CTAListening.tsx index 66544a2aaa..7c4d57c6c4 100644 --- a/packages/web/src/pages/landing-page/components/CTAListening.tsx +++ b/packages/web/src/pages/landing-page/components/CTAListening.tsx @@ -7,11 +7,14 @@ import { useChain, useTrail, animated } from 'react-spring' import appImg from 'assets/img/publicSite/AudiusAppAlt@2x.png' import hqAudio from 'assets/img/publicSite/HQ-Audio@1x.jpg' +import { useMatchesBreakpoint } from 'common/hooks/useMatchesBreakpoint' import { handleClickRoute } from 'components/public-site/handleClickRoute' import { AUDIUS_LISTENING_LINK } from 'utils/route' import styles from './CTAListening.module.css' +const MOBILE_WIDTH_MEDIA_QUERY = window.matchMedia('(max-width: 1150px)') + const messages = { title1: '320kbps Streaming For Free', title2: 'The way your music should be heard.', @@ -27,6 +30,10 @@ type CTAListeningProps = { } const CTAListening = (props: CTAListeningProps) => { + const isNarrow = useMatchesBreakpoint({ + initialValue: props.isMobile, + mediaQuery: MOBILE_WIDTH_MEDIA_QUERY + }) const [hasViewed, setHasViewed] = useState(false) const containerRef = useRef(null) @@ -69,7 +76,7 @@ const CTAListening = (props: CTAListeningProps) => { return () => window.removeEventListener('scroll', refInView) }, [refInView]) - if (props.isMobile) { + if (props.isMobile || isNarrow) { return (
@@ -94,9 +101,11 @@ const CTAListening = (props: CTAListeningProps) => { alt='Audius mobile app' />
-
-
{messages.title1}
-
{messages.title2}
+
+
+
{messages.title1}
+
{messages.title2}
+
) @@ -157,13 +231,37 @@ const FeaturedContent = (props: FeaturedContentProps) => {
- {FALLBACK_PLAYLISTS.map(track => ( - - ))} + {trendingPlaylistsResponse.value == null || + trendingPlaylistsResponse.value.length < 4 + ? FALLBACK_PLAYLISTS.map(p => ( + + )) + : trendingPlaylistsResponse.value + .slice(0, 4) + .map(p => ( + + ))}
diff --git a/packages/web/src/pages/landing-page/components/Hero.module.css b/packages/web/src/pages/landing-page/components/Hero.module.css index ad29f5c100..65e981b77b 100644 --- a/packages/web/src/pages/landing-page/components/Hero.module.css +++ b/packages/web/src/pages/landing-page/components/Hero.module.css @@ -37,7 +37,7 @@ height: 100%; top: 0; left: 0; - background-color: rgb(76, 29, 133); + background-color: #7400ff; } .bgImageLoading { @@ -58,11 +58,13 @@ .foreground { height: auto; - min-height: calc(134vh + 100px); + min-height: calc(150vh + 300px); } .foregroundImg { height: 100vh; + min-height: 900px; + transform: rotate(8.5deg); } @media (max-width: 1387px) { @@ -119,6 +121,8 @@ 0px 42px 33px rgba(0, 0, 0, 0.05), 0px 22px 18px rgba(0, 0, 0, 0.04), 0px 12.5px 10px rgba(0, 0, 0, 0.035), 0px 7px 5px rgba(0, 0, 0, 0.03), 0px 2.8px 2.2px rgba(0, 0, 0, 0.02); + transform: translateZ(0); /*for older browsers*/ + will-change: transform; letter-spacing: 0.02em; } @@ -127,11 +131,13 @@ font-size: 28px; font-weight: 700; line-height: 44px; + margin-top: 16px; text-shadow: 0px 100px 80px rgba(0, 0, 0, 0.07), 0px 42px 33px rgba(0, 0, 0, 0.05), 0px 22px 18px rgba(0, 0, 0, 0.04), 0px 12.5px 10px rgba(0, 0, 0, 0.035), 0px 7px 5px rgba(0, 0, 0, 0.03), 0px 2.8px 2.2px rgba(0, 0, 0, 0.02); - margin-top: 16px; + transform: translateZ(0); /*for older browsers*/ + will-change: transform; margin-bottom: 72px; } diff --git a/packages/web/src/pages/landing-page/components/Hero.tsx b/packages/web/src/pages/landing-page/components/Hero.tsx index f365846e6d..10ef676353 100644 --- a/packages/web/src/pages/landing-page/components/Hero.tsx +++ b/packages/web/src/pages/landing-page/components/Hero.tsx @@ -6,13 +6,19 @@ import { Parallax, withController } from 'react-scroll-parallax' import HeroForeground from 'assets/img/publicSite/AudiusApp@2x.png' import HeroBackgroundMobile from 'assets/img/publicSite/Hero-BG@1x.jpg' -import HeroBackground from 'assets/img/publicSite/Hero-BG@2x.png' +import HeroBackground from 'assets/img/publicSite/Hero-BG@2x.jpg' +import HeroBackgroundXL from 'assets/img/publicSite/Hero-BG@3x.jpg' import { ReactComponent as AppStoreBadge } from 'assets/img/publicSite/app-store-badge.svg' import GlyphPattern1x from 'assets/img/publicSite/glyph-pattern@1x.png' import GlyphPattern2x from 'assets/img/publicSite/glyph-pattern@2x.png' import { ReactComponent as GooglePlayBadge } from 'assets/img/publicSite/google-play-badge.svg' import { handleClickRoute } from 'components/public-site/handleClickRoute' -import { APP_REDIRECT, AUDIUS_SIGN_UP_LINK } from 'utils/route' +import { getIOSAppLink } from 'utils/appLinks' +import { + APP_REDIRECT, + AUDIUS_SIGN_UP_LINK, + DOWNLOAD_START_LINK +} from 'utils/route' import styles from './Hero.module.css' @@ -29,6 +35,8 @@ type HeroProps = { setRenderPublicSite: (shouldRender: boolean) => void } & { parallaxController: any } +const iOSDownloadLink = getIOSAppLink() + export const Hero = (props: HeroProps) => { const { parallaxController, onImageLoad, isMobile } = props const onImgSet = useCallback(() => { @@ -74,11 +82,7 @@ export const Hero = (props: HeroProps) => {
- + { Foreground Audius Mobile App @@ -130,8 +133,8 @@ export const Hero = (props: HeroProps) => { {/* // @ts-ignore */} {