diff --git a/components/util/flex.module.scss b/components/util/flex.module.scss new file mode 100644 index 0000000000000000000000000000000000000000..b652fe9b50356bb71c18bd6f331200936466834b --- /dev/null +++ b/components/util/flex.module.scss @@ -0,0 +1,8 @@ +.columns { + display: flex; + flex-direction: row; +} + +.column { + flex: 1; +} diff --git a/next-env.d.ts b/next-env.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..7b7aa2c7727d88b33b62bee640d607d57cc79599 --- /dev/null +++ b/next-env.d.ts @@ -0,0 +1,2 @@ +/// <reference types="next" /> +/// <reference types="next/types/global" /> diff --git a/package.json b/package.json index 96f01c8da192917793a930d970b2ea27cb701581..153ca1cb39983a32fc2df78c897c6468aede0333 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,15 @@ "start": "next start" }, "dependencies": { + "classnames": "^2.2.6", "next": "9.4.4", "react": "16.13.1", - "react-dom": "16.13.1" + "react-dom": "16.13.1", + "sass": "^1.26.9" + }, + "devDependencies": { + "@types/node": "^14.0.14", + "@types/react": "^16.9.41", + "typescript": "^3.9.5" } } diff --git a/pages/_app.tsx b/pages/_app.tsx new file mode 100644 index 0000000000000000000000000000000000000000..4a403271c5c36a64cfee8b7413ff2d0aaaa88c1f --- /dev/null +++ b/pages/_app.tsx @@ -0,0 +1,9 @@ +import { AppProps } from 'next/app' + +import './global.scss'; + +function App({ Component, pageProps }: AppProps) { + return <Component {...pageProps} /> +} + +export default App diff --git a/pages/global.scss b/pages/global.scss new file mode 100644 index 0000000000000000000000000000000000000000..324c07d1eaf4a90b7aa76d1ff7b75260d52bc29c --- /dev/null +++ b/pages/global.scss @@ -0,0 +1,15 @@ +@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;700&display=swap'); + +html, body { + margin: 0; + background-color: #ff4754; + font-family: 'Open Sans', sans-serif; +} + +html { + box-sizing: border-box; +} + +*, *:before, *:after { + box-sizing: inherit; +} diff --git a/pages/index.js b/pages/index.js deleted file mode 100644 index 1379c5f92dabbcfc18e5f501a853ffa0bb34bed7..0000000000000000000000000000000000000000 --- a/pages/index.js +++ /dev/null @@ -1,209 +0,0 @@ -import Head from 'next/head' - -export default function Home() { - return ( - <div className="container"> - <Head> - <title>Create Next App</title> - <link rel="icon" href="/favicon.ico" /> - </Head> - - <main> - <h1 className="title"> - Welcome to <a href="https://nextjs.org">Next.js!</a> - </h1> - - <p className="description"> - Get started by editing <code>pages/index.js</code> - </p> - - <div className="grid"> - <a href="https://nextjs.org/docs" className="card"> - <h3>Documentation →</h3> - <p>Find in-depth information about Next.js features and API.</p> - </a> - - <a href="https://nextjs.org/learn" className="card"> - <h3>Learn →</h3> - <p>Learn about Next.js in an interactive course with quizzes!</p> - </a> - - <a - href="https://github.com/vercel/next.js/tree/master/examples" - className="card" - > - <h3>Examples →</h3> - <p>Discover and deploy boilerplate example Next.js projects.</p> - </a> - - <a - href="https://vercel.com/import?filter=next.js&utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app" - className="card" - > - <h3>Deploy →</h3> - <p> - Instantly deploy your Next.js site to a public URL with Vercel. - </p> - </a> - </div> - </main> - - <footer> - <a - href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app" - target="_blank" - rel="noopener noreferrer" - > - Powered by{' '} - <img src="/vercel.svg" alt="Vercel Logo" className="logo" /> - </a> - </footer> - - <style jsx>{` - .container { - min-height: 100vh; - padding: 0 0.5rem; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - } - - main { - padding: 5rem 0; - flex: 1; - display: flex; - flex-direction: column; - justify-content: center; - align-items: center; - } - - footer { - width: 100%; - height: 100px; - border-top: 1px solid #eaeaea; - display: flex; - justify-content: center; - align-items: center; - } - - footer img { - margin-left: 0.5rem; - } - - footer a { - display: flex; - justify-content: center; - align-items: center; - } - - a { - color: inherit; - text-decoration: none; - } - - .title a { - color: #0070f3; - text-decoration: none; - } - - .title a:hover, - .title a:focus, - .title a:active { - text-decoration: underline; - } - - .title { - margin: 0; - line-height: 1.15; - font-size: 4rem; - } - - .title, - .description { - text-align: center; - } - - .description { - line-height: 1.5; - font-size: 1.5rem; - } - - code { - background: #fafafa; - border-radius: 5px; - padding: 0.75rem; - font-size: 1.1rem; - font-family: Menlo, Monaco, Lucida Console, Liberation Mono, - DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace; - } - - .grid { - display: flex; - align-items: center; - justify-content: center; - flex-wrap: wrap; - - max-width: 800px; - margin-top: 3rem; - } - - .card { - margin: 1rem; - flex-basis: 45%; - padding: 1.5rem; - text-align: left; - color: inherit; - text-decoration: none; - border: 1px solid #eaeaea; - border-radius: 10px; - transition: color 0.15s ease, border-color 0.15s ease; - } - - .card:hover, - .card:focus, - .card:active { - color: #0070f3; - border-color: #0070f3; - } - - .card h3 { - margin: 0 0 1rem 0; - font-size: 1.5rem; - } - - .card p { - margin: 0; - font-size: 1.25rem; - line-height: 1.5; - } - - .logo { - height: 1em; - } - - @media (max-width: 600px) { - .grid { - width: 100%; - flex-direction: column; - } - } - `}</style> - - <style jsx global>{` - html, - body { - padding: 0; - margin: 0; - font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, - Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, - sans-serif; - } - - * { - box-sizing: border-box; - } - `}</style> - </div> - ) -} diff --git a/pages/index.module.scss b/pages/index.module.scss new file mode 100644 index 0000000000000000000000000000000000000000..0810549bc024e90cbc2a3bb34ffe09c524768c5d --- /dev/null +++ b/pages/index.module.scss @@ -0,0 +1,67 @@ +.hero { + height: 100vh; + max-width: 1800px; + margin: 0 auto; + display: flex; + flex-direction: column; + + background-color: #ff4754; + color: whitesmoke; + + > .body { + flex-grow: 1; + } + + .heroText { + display: flex; + justify-content: center; + align-items: center; + } + + .primary { + max-width: 560px; + + h2 { + font-size: 2.2em; + font-weight: 700; + } + + h3 { + font-size: 1.2em; + font-weight: 400; + margin: 0; + } + } + + .heroFix { + min-height: 128px; + } + + .link { + display: block; + margin-top: 4em; + + color: white; + text-decoration: none; + + span { + font-weight: 400; + border-bottom: 2px solid white; + } + } +} + +// will be moved to its own component +.nav { + width: 100%; + min-height: 128px; + padding: 40px; + + flex: 0 1; + + display: flex; + + .logo { + height: 48px; + } +} diff --git a/pages/index.tsx b/pages/index.tsx new file mode 100644 index 0000000000000000000000000000000000000000..cab15dd6d368ebdf9207f0e8b24d468b78501d72 --- /dev/null +++ b/pages/index.tsx @@ -0,0 +1,38 @@ +import Head from 'next/head' +import classNames from 'classnames'; + +import styles from './index.module.scss'; +import flex from '../components/util/flex.module.scss'; + +export default function Home() { + return ( + <div> + <Head> + <title>Revolt</title> + <link rel="icon" href="/favicon.ico" /> + </Head> + + <main> + <div className={styles.hero}> + <div className={styles.nav}> + <img className={styles.logo} src="/logo.svg" /> + </div> + <div className={classNames(styles.body, flex.columns)}> + <div className={classNames(flex.column, styles.heroText)}> + <div className={styles.primary}> + <h2>Don't bother with chat apps that don't respect your privacy.</h2> + <h3>Communication is critical.</h3> + <h3>Privacy is essential.</h3> + <a className={styles.link} href="https://discord.gg/epCDgeK"><h2><span>Join Discord server for updates.</span></h2></a> + </div> + </div> + <div className={classNames(flex.column, styles.heroImage)}> + + </div> + </div> + <div className={styles.heroFix}></div> + </div> + </main> + </div> + ) +} diff --git a/public/logo.svg b/public/logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..3b99f7fab30eb921f71d99ac689fb5bc8d67bee4 --- /dev/null +++ b/public/logo.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="193.733" height="37.438" viewBox="0 0 193.733 37.438"><path d="M23.393,1.382c0,2.787-1.52,4.46-4.764,4.46H13.258V-2.977H18.63C21.873-2.977,23.393-1.254,23.393,1.382Zm-24-11.555,5.2,7.213V25.4h8.666V11.973h2.078l7.4,13.43h9.781l-8.21-14.089A10.355,10.355,0,0,0,32.212,1.027c0-6.183-4.358-11.2-13.075-11.2Zm60.035,0H37.634V25.4H59.426V18.46H46.3v-7.8H57.906V3.966H46.3V-2.969H59.426Zm20.981,26.86-8.818-26.86H62.365L74.984,25.4H85.83L98.449-10.173H89.276Zm56.659-9.173c0-10.693-8.058-18.194-18.194-18.194-10.085,0-18.3,7.5-18.3,18.194a17.9,17.9,0,0,0,18.3,18.244A17.815,17.815,0,0,0,137.066,7.514Zm-27.62,0c0-6.335,3.649-10.338,9.426-10.338,5.676,0,9.376,4,9.376,10.338,0,6.233-3.7,10.338-9.376,10.338C113.095,17.852,109.446,13.747,109.446,7.514ZM141.88-10.173V25.4H161.9v-6.95H150.545V-10.173Zm22.248,7.2h9.426V25.4h8.666V-2.975h9.426v-7.2H164.128Z" transform="translate(1.586 11.18)" fill="#fff" stroke="#fff" stroke-width="1"/></svg> \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..48ca14af0b88755b88b926e8055cc367cbccd2dc --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], + "allowJs": true, + "skipLibCheck": true, + "strict": false, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve" + }, + "exclude": [ + "node_modules" + ], + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx" + ] +} diff --git a/yarn.lock b/yarn.lock index f22d40fed46b0923dfa91bc388727763133991d0..3f799794d63121714048e4e75ae115d147ab667f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1031,11 +1031,29 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.5.tgz#dcce4430e64b443ba8945f0290fb564ad5bac6dd" integrity sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ== +"@types/node@^14.0.14": + version "14.0.14" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.0.14.tgz#24a0b5959f16ac141aeb0c5b3cd7a15b7c64cbce" + integrity sha512-syUgf67ZQpaJj01/tRTknkMNoBBLWJOBODF0Zm4NrXmiSuxjymFrxnTu1QVYRubhVkRcZLYZG8STTwJRdVm/WQ== + +"@types/prop-types@*": + version "15.7.3" + resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.3.tgz#2ab0d5da2e5815f94b0b9d4b95d1e5f243ab2ca7" + integrity sha512-KfRL3PuHmqQLOG+2tGpRO26Ctg+Cq1E01D2DMriKEATHgWLfeNDmq9e29Q9WIky0dQ3NPkd1mzYH8Lm936Z9qw== + "@types/q@^1.5.1": version "1.5.4" resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24" integrity sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug== +"@types/react@^16.9.41": + version "16.9.41" + resolved "https://registry.yarnpkg.com/@types/react/-/react-16.9.41.tgz#925137ee4d2ff406a0ecf29e8e9237390844002e" + integrity sha512-6cFei7F7L4wwuM+IND/Q2cV1koQUvJ8iSV+Gwn0c3kvABZ691g7sp3hfEQHOUBJtccl1gPi+EyNjMIl9nGA0ug== + dependencies: + "@types/prop-types" "*" + csstype "^2.2.0" + "@webassemblyjs/ast@1.9.0": version "1.9.0" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" @@ -1766,7 +1784,7 @@ chokidar@2.1.8, chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" -chokidar@^3.3.0, chokidar@^3.4.0: +"chokidar@>=2.0.0 <4.0.0", chokidar@^3.3.0, chokidar@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.4.0.tgz#b30611423ce376357c765b9b8f904b9fba3c0be8" integrity sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ== @@ -1811,7 +1829,7 @@ class-utils@^0.3.5: isobject "^3.0.0" static-extend "^0.1.1" -classnames@2.2.6: +classnames@2.2.6, classnames@^2.2.6: version "2.2.6" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce" integrity sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q== @@ -2204,6 +2222,11 @@ csso@^4.0.2: dependencies: css-tree "1.0.0-alpha.39" +csstype@^2.2.0: + version "2.6.10" + resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.6.10.tgz#e63af50e66d7c266edb6b32909cfd0aabe03928b" + integrity sha512-D34BqZU4cIlMCY93rZHbrq9pjTAQJ3U8S8rfBqjwHxkGPThWFjzZDQpgMJY0QViLxth6ZKYiwFBo14RdN44U/w== + cyclist@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" @@ -4773,6 +4796,13 @@ sass-loader@8.0.2: schema-utils "^2.6.1" semver "^6.3.0" +sass@^1.26.9: + version "1.26.9" + resolved "https://registry.yarnpkg.com/sass/-/sass-1.26.9.tgz#73c10cbb88c12b22a9e0107725bfd62296f4978f" + integrity sha512-t8AkRVi+xvba4yZiLWkJdgJHBFCB3Dh4johniQkPy9ywkgFHNasXFEFP+RG/F6LhQ+aoE4aX+IorIWQjS0esVw== + dependencies: + chokidar ">=2.0.0 <4.0.0" + sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" @@ -5330,6 +5360,11 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= +typescript@^3.9.5: + version "3.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.5.tgz#586f0dba300cde8be52dd1ac4f7e1009c1b13f36" + integrity sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ== + unicode-canonical-property-names-ecmascript@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz#2619800c4c825800efdd8343af7dd9933cbe2818"