diff --git a/landing/app-landing.react.js b/landing/app-landing.react.js index 9a654cb4b..51894b69d 100644 --- a/landing/app-landing.react.js +++ b/landing/app-landing.react.js @@ -1,47 +1,42 @@ // @flow import * as React from 'react'; import { assetMetaData } from './asset-meta-data'; import HeroContent from './hero-content.react'; import InfoBlock from './info-block.react'; import css from './landing.css'; import Picture from './Picture.react'; import StarBackground from './star-background.react'; import usePreloadAssets from './use-pre-load-assets.react'; -type AppLandingProps = { - +onRequestAccess: (e: Event) => Promise, -}; - -function AppLanding(props: AppLandingProps): React.Node { - const { onRequestAccess } = props; +function AppLanding(): React.Node { usePreloadAssets(assetMetaData); const [ hero, federated, customizable, encrypted, sovereign, openSource, lessNoisy, ] = assetMetaData; return (
- +
); } export default AppLanding; diff --git a/landing/header.css b/landing/header.css index 82b329345..c58bba9e2 100644 --- a/landing/header.css +++ b/landing/header.css @@ -1,105 +1,92 @@ nav.wrapper { transition-property: max-width; transition: 300ms; max-width: 1850px; margin-left: auto; margin-right: auto; display: grid; padding: 16px 0; align-items: center; grid-template-columns: 40px repeat(12, 1fr) 40px; column-gap: 1.5%; - grid-template-areas: '. logo logo . . . page_nav page_nav . cta_btn cta_btn sIcons sIcons .'; + grid-template-areas: '. logo logo . . . page_nav page_nav . . . sIcons sIcons .'; } .logo { grid-area: logo; } .logo h1 { font-size: 28px; font-weight: 500; color: var(--logo-color); } .tab { font-size: 24px; font-weight: 500; color: #808080; font-family: 'IBM Plex Sans', sans-serif; transition: 150ms; transition-property: color; } .tab:hover { color: #ffffff; } .page_nav { grid-area: page_nav; display: flex; justify-content: space-evenly; min-width: 225px; } -div.button_container { - grid-area: cta_btn; - display: flex; - width: 100%; - justify-content: flex-end; -} - .social_icons_container { grid-area: sIcons; display: flex; justify-content: space-evenly; } .social_icon { font-size: 20px; } @media screen and (max-width: 1099px) { nav.wrapper { grid-template-columns: 16px repeat(12, 1fr) 16px; grid-template-areas: '. logo logo page_nav page_nav page_nav page_nav page_nav page_nav page_nav page_nav sIcons sIcons .'; } .logo { min-width: 85px; } .page_nav { justify-content: center; gap: 12px; } - .request_access, - div.button_container, - button.request_access { - display: none; - } - .social_icon { display: block; } } @media screen and (max-width: 480px) { nav.wrapper { grid-template-columns: 16px repeat(6, 1fr) 16px; grid-template-rows: 1fr 1fr; column-gap: 1.5%; row-gap: 25px; grid-template-areas: '. logo logo . . sIcons sIcons .' '. page_nav page_nav page_nav page_nav page_nav page_nav .'; } .page_nav { grid-area: page_nav; display: flex; justify-content: center; gap: 40px; min-width: 225px; } } diff --git a/landing/header.react.js b/landing/header.react.js index 2945c4d7d..7e288eed1 100644 --- a/landing/header.react.js +++ b/landing/header.react.js @@ -1,70 +1,60 @@ // @flow import { faTwitter, faGithub } from '@fortawesome/free-brands-svg-icons'; import { faExternalLinkAlt } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import * as React from 'react'; import { NavLink } from 'react-router-dom'; import { isDev } from 'lib/utils/dev-utils.js'; -import Button from './button.react.js'; import css from './header.css'; -type HeaderProps = { - +onRequestAccess: (e: Event) => Promise, -}; - const iconProps = { size: 'lg', color: '#ebedee', }; const navLinkProps = { className: css.tab, activeStyle: { color: 'white', }, }; -function Header(props: HeaderProps): React.Node { - const { onRequestAccess } = props; - +function Header(): React.Node { let launchAppIcon; if (isDev) { launchAppIcon = ( ); } return ( ); } export default Header; diff --git a/landing/hero-content.css b/landing/hero-content.css index 119a1d2ec..f109abdae 100644 --- a/landing/hero-content.css +++ b/landing/hero-content.css @@ -1,73 +1,52 @@ .cycling_header { --smallest-font-size: 30px; --largest-font-size: 72px; --font-scale: calc(1rem + 2vw); font-weight: bold; font-family: 'iA Writer Duo S', monospace; padding-bottom: 16px; font-size: clamp( var(--smallest-font-size), var(--font-scale), var(--largest-font-size) ); } .sub_heading { color: var(--sub-heading-color); --smallest-font-size: 16px; --largest-font-size: 50px; --font-scale: calc(0.75rem + 1.25vw); font-size: clamp( var(--smallest-font-size), var(--font-scale), var(--largest-font-size) ); margin-bottom: 60px; } form { width: 92%; } @media (max-width: 1099px) { form { width: 100%; } } .cycling_content, .sub_heading { font-family: 'iA Writer Duo S', monospace; text-align: left; line-height: 1.35; letter-spacing: -0.01em; } .cycling_content { background: var(--sub-heading-color); } .contentWrapper { flex-basis: 300px; } - -button.request_access { - display: none; -} - -@media screen and (max-width: 1099px) { - button.request_access { - display: none; - all: unset; - border-radius: 4px; - font-size: 16px; - font-weight: 500; - background-color: var(--btn-bg); - color: var(--btn-color); - justify-content: center; - padding: 12px 18px; - transition: 300ms; - flex-basis: 48px; - text-align: center; - } -} diff --git a/landing/hero-content.react.js b/landing/hero-content.react.js index 53cc51dcc..ad51b7322 100644 --- a/landing/hero-content.react.js +++ b/landing/hero-content.react.js @@ -1,44 +1,36 @@ // @flow import * as React from 'react'; import TextLoop from 'react-text-loop'; import { assetMetaData } from './asset-meta-data'; import css from './hero-content.css'; import SubscriptionForm from './subscription-form.react'; -type HeroContentProps = { - +onRequestAccess: (e: Event) => Promise, -}; - -function HeroContent(props: HeroContentProps): React.Node { - const { onRequestAccess } = props; +function HeroContent(): React.Node { const [hero] = assetMetaData; return (

{'Comm is crypto-native\nchat for '} DAOs venture funds open source gaming guilds social clubs

(think "Web3 Discord")

-
); } export default HeroContent; diff --git a/landing/landing.react.js b/landing/landing.react.js index 6cd5839fa..507a08e9d 100644 --- a/landing/landing.react.js +++ b/landing/landing.react.js @@ -1,81 +1,67 @@ // @flow import * as React from 'react'; import { useRouteMatch } from 'react-router-dom'; import { isDev } from 'lib/utils/dev-utils'; import AppLanding from './app-landing.react'; import Footer from './footer.react'; import Header from './header.react'; import Keyservers from './keyservers.react'; import Privacy from './privacy.react'; import QR from './qr.react'; import Support from './support.react'; import Team from './team.react'; import Terms from './terms.react'; import useScrollToTopOnNavigate from './use-scroll-to-top-on-navigate.react'; import './reset.css'; import './global.css'; function Landing(): React.Node { useScrollToTopOnNavigate(); const onPrivacy = useRouteMatch({ path: '/privacy' }); const onTerms = useRouteMatch({ path: '/terms' }); const onSupport = useRouteMatch({ path: '/support' }); const onKeyservers = useRouteMatch({ path: '/keyservers' }); const onQR = useRouteMatch({ path: '/qr' }); const onTeam = useRouteMatch({ path: '/team' }); - const scrollToSubscriptionForm = React.useCallback(async (e: Event) => { - e.preventDefault(); - window?.scrollTo(0, document.body?.scrollHeight); - document.getElementById('subscription-form')?.focus(); - }, []); - const activePage = React.useMemo(() => { if (onPrivacy) { return ; } else if (onTerms) { return ; } else if (onSupport) { return ; } else if (onKeyservers) { return ; } else if (onQR) { return ; } else if (isDev && onTeam) { return ; } else { - return ; + return ; } - }, [ - onKeyservers, - onPrivacy, - onSupport, - onTerms, - onTeam, - onQR, - scrollToSubscriptionForm, - ]); + }, [onKeyservers, onPrivacy, onSupport, onTerms, onTeam, onQR]); let header; if (!onQR) { - header =
; + header =
; } let footer; if (!onQR) { footer =