mirror of
https://github.com/roleypoly/roleypoly-v1.git
synced 2025-06-16 18:29:08 +00:00
[ui] add media query template literals, convert everything to the superior.
This commit is contained in:
parent
c40c04e55e
commit
f2bb6a7b18
10 changed files with 90 additions and 45 deletions
|
@ -1,6 +1,6 @@
|
|||
import * as React from 'react'
|
||||
import styled from 'styled-components'
|
||||
import MediaQuery from '../kit/media'
|
||||
import { md } from '../kit/media'
|
||||
|
||||
export const Overlay = styled.div`
|
||||
opacity: 0.6;
|
||||
|
@ -23,9 +23,12 @@ const ResponsiveSplitter = styled.div`
|
|||
line-height: 1.6;
|
||||
font-size: 1.3em;
|
||||
flex-direction: column;
|
||||
${() => MediaQuery({
|
||||
md: `flex-direction: row; min-height: 100vh; position: relative; top: -50px;`
|
||||
})}
|
||||
${md`
|
||||
flex-direction: row;
|
||||
min-height: 100vh;
|
||||
position: relative;
|
||||
top: -50px;
|
||||
`}
|
||||
|
||||
& > div {
|
||||
margin: 1rem;
|
||||
|
@ -33,7 +36,7 @@ const ResponsiveSplitter = styled.div`
|
|||
|
||||
& section {
|
||||
text-align: center;
|
||||
${() => MediaQuery({ md: `text-align: left;` })}
|
||||
${md`text-align: left;`}
|
||||
}
|
||||
`
|
||||
|
||||
|
@ -46,9 +49,7 @@ const Code = styled.h1`
|
|||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 4em;
|
||||
${() => MediaQuery({
|
||||
md: `font-size: 2em;`
|
||||
})}
|
||||
${md`font-size: 2em;`}
|
||||
`
|
||||
|
||||
export default class CustomErrorPage extends React.Component {
|
||||
|
|
|
@ -6,7 +6,7 @@ import redirect from '../lib/redirect'
|
|||
import TypingDemo from '../components/demos/typing'
|
||||
import TapDemo from '../components/demos/tap'
|
||||
import styled from 'styled-components'
|
||||
import MediaQuery from '../kit/media'
|
||||
import { md } from '../kit/media'
|
||||
|
||||
const HeroBig = styled.h1`
|
||||
color: var(--c-7);
|
||||
|
@ -52,7 +52,7 @@ const FooterLink = styled.a`
|
|||
const DemoArea = styled.div`
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
${() => MediaQuery({ md: `flex-direction: row;` })}
|
||||
${md`flex-direction: row;`}
|
||||
|
||||
& > div {
|
||||
flex: 1;
|
||||
|
@ -66,15 +66,13 @@ const DemoArea = styled.div`
|
|||
|
||||
const Wrapper = styled.div`
|
||||
flex-wrap: wrap;
|
||||
${() => MediaQuery({
|
||||
md: `
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 80vh;
|
||||
min-height: 500px;
|
||||
`
|
||||
})}
|
||||
${md`
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 80vh;
|
||||
min-height: 500px;
|
||||
`}
|
||||
`
|
||||
|
||||
export default class Home extends React.Component {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue