diff --git a/landing/asset-meta-data.js b/landing/asset-meta-data.js index 7f645d4c0..d4a0a455a 100644 --- a/landing/asset-meta-data.js +++ b/landing/asset-meta-data.js @@ -1,14 +1,94 @@ // @flow +import classNames from 'classnames'; +import * as React from 'react'; + +import css from './landing.css'; +import typography from './typography.css'; + +const paragraphClassName = classNames([typography.subheading2, css.paragraph]); + export type ImageAsset = { +alt: string, +url: string, }; +export type Asset = { + +containerClassName: string, + +colorHeader: boolean, + +headerTextContent: string, + +infoBlockContent: React.Node, + +navLinkDestination: string, + +linkTextContent: string, +}; + export const assetsCacheURLPrefix = 'https://dh9fld3hutpxf.cloudfront.net'; -export const imageAssetMetaData = [ +export const imageAssetMetaData: $ReadOnlyArray = [ { alt: 'hero image showcasing Comm', url: `${assetsCacheURLPrefix}/hero`, }, ]; + +export const assetMetaData: $ReadOnlyArray = [ + { + containerClassName: css.keyserverInfo, + colorHeader: true, + headerTextContent: 'Own your data with keyservers', + infoBlockContent: ( + <> +

+ Comm’s central innovation is the idea of the keyserver: a + personal, private server. +

+

+ E2E-encrypted apps today are limited because they have to do + everything locally, on the user’s device. In contrast, + unencrypted apps are able to rely on servers in the cloud to handle + queries and background processing, in turn allowing these apps to + support more sophisticated functionality. +

+

+ But what if people had their own servers? Keyservers enable Comm to + offer the best of both worlds: Signal-level privacy with a + Telegram-level feature set. +

+ + ), + navLinkDestination: '/keyservers', + linkTextContent: 'Learn more about keyservers', + }, + { + containerClassName: css.teamInfo, + colorHeader: false, + headerTextContent: 'Our story and vision', + infoBlockContent: ( + <> +

+ Comm was founded by  + + Ashoat + + +  after his experiences trying to add E2E encryption to a social + calendaring app exposed the limits of contemporary cryptographic + approaches. He realized why E2E apps were so limited in + functionality: the lack of a server layer meant that everything had + to be done on a phone. + +

+

+ Comm’s vision is a world where people own their own data. We + believe that in the future, everybody will have a server. +

+ + ), + navLinkDestination: '/team', + linkTextContent: 'Learn more about our team', + }, +]; diff --git a/landing/landing.css b/landing/landing.css index 600331bc7..0c879a803 100644 --- a/landing/landing.css +++ b/landing/landing.css @@ -1,27 +1,56 @@ .container { background: radial-gradient(ellipse at bottom, #1f252e, #111827) fixed; font-family: var(--sans-serif); -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; color: white; word-break: break-word; height: 100%; position: relative; z-index: var(--landing-page-z-index); } .innerContainer { background-color: var(--page-background); margin: 0; padding: 0; height: 100%; overflow: auto; } .innerContainerMobileNav { overflow-y: hidden; } .pageContentContainer { position: relative; } + +.keyserverInfo { + display: flex; + flex-direction: column; + align-items: center; + background-color: var(--light-dark-page-background); +} + +.teamInfo { + display: flex; + flex-direction: column; + align-items: center; +} + +.paragraph { + color: var(--white-100); + margin-bottom: 40px; +} + +.link { + color: inherit; + text-decoration: underline; + transition: color 150ms; +} + +.link:hover { + color: var(--violet-dark-100); + transition: color 150ms; +} diff --git a/landing/use-pre-load-image-assets.react.js b/landing/use-pre-load-image-assets.react.js index b633df588..fcc2dd960 100644 --- a/landing/use-pre-load-image-assets.react.js +++ b/landing/use-pre-load-image-assets.react.js @@ -1,32 +1,32 @@ // @flow import * as React from 'react'; import { type ImageAsset } from './asset-meta-data.js'; -function usePreloadImageAssets(assets: ImageAsset[]) { +function usePreloadImageAssets(assets: $ReadOnlyArray) { React.useEffect(() => { const testWEBP = 'UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA'; const testImg = new Image(); // preload webp if supported testImg.onload = () => { for (const { url } of assets) { const image = new Image(); image.src = `${url}.webp`; } }; // preload png if webp not supported testImg.onerror = () => { for (const { url } of assets) { const image = new Image(); image.src = `${url}.png`; } }; testImg.src = `data:image/webp;base64,${testWEBP}`; }, [assets]); } export default usePreloadImageAssets;