diff --git a/ui/components/demos/tap.js b/ui/components/demos/tap.js
index 37c039d..fe73870 100644
--- a/ui/components/demos/tap.js
+++ b/ui/components/demos/tap.js
@@ -1,12 +1,16 @@
// @flow
import * as React from 'react'
-// import styled from 'styled-components'
+import styled from 'styled-components'
import Role from '../role/demo'
const roles = [
'cute', 'vanity', 'brave', 'proud', 'wonderful', '日本語'
]
-export default () =>
+const DemoWrapper = styled.div`
+ text-align: center;
+`
+
+export default () =>
{ roles.map((v, i) => ) }
-
+
diff --git a/ui/components/demos/typing.js b/ui/components/demos/typing.js
index 4242072..4429ae2 100644
--- a/ui/components/demos/typing.js
+++ b/ui/components/demos/typing.js
@@ -2,6 +2,7 @@ import * as React from 'react'
import moment from 'moment'
import Typist from 'react-typist'
import styled from 'styled-components'
+import MediaQuery from '../../kit/media'
const Outer = styled.div`
--not-quite-black: #23272A;
@@ -17,6 +18,8 @@ const Outer = styled.div`
const Chat = styled.div`
padding: 10px 0;
+ font-size: 0.8em;
+ ${() => MediaQuery({ sm: 'font-size: 1em;' })}
& span {
display: inline-block;
margin-left: 5px;
@@ -27,6 +30,8 @@ const TextArea = styled.div`
background-color: hsla(218,5%,47%,.3);
border-radius: 5px;
padding: 10px;
+ font-size: 0.8em;
+ ${() => MediaQuery({ sm: 'font-size: 1em;' })}
& .Typist .Cursor {
diff --git a/ui/components/global-colors.js b/ui/components/global-colors.js
index 565a3ed..02a6b43 100644
--- a/ui/components/global-colors.js
+++ b/ui/components/global-colors.js
@@ -32,18 +32,12 @@ body {
-moz-osx-font-smoothing: grayscale;
/* prevent FOUC */
transition: opacity 0.2s ease-in-out;
- opacity: 0;
}
* {
box-sizing: border-box;
}
-
-.wf-active body, .force-active body {
- opacity: 1;
-}
-
.font-sans-serif {
font-family: sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
@@ -68,11 +62,13 @@ html {
}
body {
+ margin: 0;
+ padding: 0;
height: 100%;
overflow: auto;
color: var(--c-white);
background-color: var(--c-1);
- overflow-y: hidden;
+ /* overflow-y: hidden; */
}
h1,h2,h3,h4,h5,h6 {
diff --git a/ui/components/header/common.js b/ui/components/header/common.js
index 51fa98e..689c5ff 100644
--- a/ui/components/header/common.js
+++ b/ui/components/header/common.js
@@ -10,9 +10,13 @@ export type CommonProps = {
}
const Header = styled.div`
- ${({ noBackground }: any) => noBackground === false ? 'background-color: var(--c-dark);' : ''}
+ background-color: ${({ noBackground }: any) => noBackground === false ? 'var(--c-dark);' : 'var(--c-1);'}
position: relative;
transition: background-color 0.3s ease-in-out;
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
`
const HeaderInner = styled.div`
diff --git a/ui/components/layout.js b/ui/components/layout.js
index 42c54e8..d2ba8ba 100644
--- a/ui/components/layout.js
+++ b/ui/components/layout.js
@@ -6,25 +6,32 @@ import HeaderBar from '../containers/header-bar'
import { type User } from '../containers/user'
import styled from 'styled-components'
+const LayoutWrapper = styled.div`
+ transition: opacity: 0.1s ease-out;
+ opacity: 0;
+ .wf-active &, .force-active & {
+ opacity: 1;
+ }
+`
+
const ContentBox = styled.div`
margin: 0 auto;
width: 960px;
max-width: 100vw;
padding: 5px;
- /* padding-top: 50px; */
- overflow-y: scroll;
- max-height: calc(100vh - 50px);
+ padding-top: 50px;
+ /* max-height: calc(100vh - 50px); */
`
const Layout = ({ children, user, noBackground }: {children: React.Element, user: User, noBackground: boolean }) => <>
-
+
{children}
-
+
>
export default Layout
diff --git a/ui/pages/_app.js b/ui/pages/_app.js
index 6a89e16..1e8ac00 100644
--- a/ui/pages/_app.js
+++ b/ui/pages/_app.js
@@ -4,12 +4,23 @@ import App, { Container } from 'next/app'
import Head from 'next/head'
import Layout from '../components/layout'
import { withCookies } from '../config/rpc'
-import ErrorP from './_error'
+import ErrorP, { Overlay } from './_error'
+import styled from 'styled-components'
type NextPage = React.Component & React.StatelessFunctionalComponent & {
getInitialProps: (ctx: any, ...args: any) => any
}
+const MissingJS = styled.noscript`
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+ width: 100vw;
+ font-size: 1.3em;
+ padding: 1em;
+`
+
class RoleypolyApp extends App {
static async getInitialProps ({ Component, ctx }: { Component: NextPage, ctx: {[x:string]: any}}) {
// Fix for next/error rendering instead of our error page.
@@ -50,15 +61,17 @@ class RoleypolyApp extends App {
// Fix for next/error rendering instead of our error page.
// Who knows why this would ever happen.
const ErrorCaughtComponent = (Component.displayName === 'ErrorPage' || Component.constructor.name === 'ErrorPage') ? ErrorP : Component
- return (
-
- Hey there... Unfortunately, we require JS for this app to work. Please take this rose as retribution. 🌹
-
-
- Roleypoly
-
-
-
-
-
-
-
-
-
- )
+ ` }} />
+
+
+
+
+
}
}
diff --git a/ui/pages/_error.js b/ui/pages/_error.js
index 9a8535d..89a02f8 100644
--- a/ui/pages/_error.js
+++ b/ui/pages/_error.js
@@ -2,11 +2,11 @@ import * as React from 'react'
import styled from 'styled-components'
import MediaQuery from '../kit/media'
-const Overlay = styled.div`
+export const Overlay = styled.div`
opacity: 0.6;
pointer-events: none;
position: fixed;
- top: 50px;
+ top: 0;
bottom: 0;
left: 0;
right: 0;
diff --git a/ui/pages/index.js b/ui/pages/index.js
index 83ea762..7491948 100644
--- a/ui/pages/index.js
+++ b/ui/pages/index.js
@@ -5,6 +5,77 @@ import redirect from '../lib/redirect'
// import Nav from '../components/nav'
import TypingDemo from '../components/demos/typing'
import TapDemo from '../components/demos/tap'
+import styled from 'styled-components'
+import MediaQuery from '../kit/media'
+
+const HeroBig = styled.h1`
+ color: var(--c-7);
+ font-size: 1.8em;
+`
+
+const HeroSmol = styled.h1`
+ color: var(--c-5);
+ font-size: 1.1em;
+`
+
+const Hero = styled.div`
+ padding: 2em 0;
+ text-align: center;
+`
+
+const Footer = styled.p`
+ text-align: center;
+ font-size: 0.7em;
+ opacity: 0.3;
+ transition: opacity 0.3s ease-in-out;
+
+ &:hover {
+ opacity: 1;
+ }
+
+ &:active {
+ opacity: 1;
+ }
+`
+
+const FooterLink = styled.a`
+ font-style: none;
+ color: var(--c-7);
+ text-decoration: none;
+ transition: color 0.3s ease-in-out;
+
+ &:hover {
+ color: var(--c-5);
+ }
+`
+
+const DemoArea = styled.div`
+ display: flex;
+ flex-direction: column;
+ ${() => MediaQuery({ md: `flex-direction: row;` })}
+
+ & > div {
+ flex: 1;
+ padding: 10px;
+ }
+
+ & > div > p {
+ text-align: center;
+ }
+`
+
+const Wrapper = styled.div`
+ flex-wrap: wrap;
+ ${() => MediaQuery({
+ md: `
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 80vh;
+ min-height: 500px;
+ `
+ })}
+`
export default class Home extends React.Component {
static async getInitialProps (ctx, rpc) {
@@ -17,16 +88,31 @@ export default class Home extends React.Component {
render () {
return
-
A bot to tame your self-assignable Discord roles.
-
-
-
What is this? 2005?
-
-
-
+
+
+
+ Discord roles for humans.
+ Ditch bot commands once and for all.
+
+
+
+
+
What is this? 2005?
+
+
+
+
+
+
+ © {new Date().getFullYear()}
+ Made with ♡
+
+ GitHub -
+ Discord
+
}
}
diff --git a/ui/static/flags.svg b/ui/static/flags.svg
new file mode 100644
index 0000000..e6d7e4b
--- /dev/null
+++ b/ui/static/flags.svg
@@ -0,0 +1,35 @@
+
+
+
+ Trans
+ Created with Sketch.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file