1
1
mirror of https://github.com/jxnblk/mdx-deck.git synced 2024-11-26 00:35:02 +03:00

Edit aspect ratio themes

This commit is contained in:
Brent Jackson 2019-04-21 17:44:52 -04:00
parent 5e5fcd4e4e
commit 8ca3ce1517
4 changed files with 33 additions and 3 deletions

View File

@ -5,6 +5,7 @@ Default
```mdx ```mdx
export { default as theme } from 'mdx-deck/themes export { default as theme } from 'mdx-deck/themes
' '
``` ```
@ -15,6 +16,7 @@ Big
```mdx ```mdx
export { big as theme } from 'mdx-deck/themes export { big as theme } from 'mdx-deck/themes
' '
``` ```
@ -25,6 +27,7 @@ Book
```mdx ```mdx
export { book as theme } from 'mdx-deck/themes export { book as theme } from 'mdx-deck/themes
' '
``` ```
@ -35,6 +38,7 @@ Code
```mdx ```mdx
export { code as theme } from 'mdx-deck/themes export { code as theme } from 'mdx-deck/themes
' '
``` ```
@ -45,6 +49,7 @@ Comic
```mdx ```mdx
export { comic as theme } from 'mdx-deck/themes export { comic as theme } from 'mdx-deck/themes
' '
``` ```
@ -55,6 +60,7 @@ Condensed
```mdx ```mdx
export { condensed as theme } from 'mdx-deck/themes export { condensed as theme } from 'mdx-deck/themes
' '
``` ```
@ -65,6 +71,7 @@ Dark
```mdx ```mdx
export { dark as theme } from 'mdx-deck/themes export { dark as theme } from 'mdx-deck/themes
' '
``` ```
@ -75,6 +82,7 @@ Future
```mdx ```mdx
export { future as theme } from 'mdx-deck/themes export { future as theme } from 'mdx-deck/themes
' '
``` ```
@ -85,6 +93,7 @@ Hack
```mdx ```mdx
export { hack as theme } from 'mdx-deck/themes export { hack as theme } from 'mdx-deck/themes
' '
``` ```
@ -100,6 +109,7 @@ Notes
```mdx ```mdx
export { notes as theme } from 'mdx-deck/themes export { notes as theme } from 'mdx-deck/themes
' '
``` ```
@ -115,6 +125,7 @@ Script
```mdx ```mdx
export { script as theme } from 'mdx-deck/themes export { script as theme } from 'mdx-deck/themes
' '
``` ```
@ -125,6 +136,7 @@ Swiss
```mdx ```mdx
export { swiss as theme } from 'mdx-deck/themes export { swiss as theme } from 'mdx-deck/themes
' '
``` ```
@ -135,6 +147,7 @@ Yellow
```mdx ```mdx
export { yellow as theme } from 'mdx-deck/themes export { yellow as theme } from 'mdx-deck/themes
' '
``` ```
@ -144,6 +157,7 @@ Poppins
```mdx ```mdx
export { poppins as theme } from 'mdx-deck/themes export { poppins as theme } from 'mdx-deck/themes
' '
``` ```
@ -153,6 +167,7 @@ Syntax Highlighter
```mdx ```mdx
export { syntaxHighlighter as theme } from 'mdx-deck/themes export { syntaxHighlighter as theme } from 'mdx-deck/themes
' '
``` ```
@ -162,5 +177,20 @@ Syntax Highlighter Prism
```mdx ```mdx
export { syntaxHighlighterPrism as theme } from 'mdx-deck/themes export { syntaxHighlighterPrism as theme } from 'mdx-deck/themes
'
```
Aspect 16:9
```mdx
export { aspect as theme } from '@mdx-deck/themes
'
```
Aspect 4:3
```mdx
export { aspect43 as theme } from '@mdx-deck/themes
' '
``` ```

View File

@ -4,7 +4,7 @@ import styled from '@emotion/styled'
import FluidFontSize from './FluidFontSize' import FluidFontSize from './FluidFontSize'
const getPadding = ratio => const getPadding = ratio =>
ratio > 1 ? (1 - ratio) * 100 + '%' : ratio * 100 + '%' ratio > 1 ? (1 / ratio) * 100 + '%' : ratio * 100 + '%'
const paddingBottom = props => ({ const paddingBottom = props => ({
paddingBottom: getPadding(props.theme.aspectRatio), paddingBottom: getPadding(props.theme.aspectRatio),

View File

@ -3,5 +3,5 @@ import aspect from './aspect'
export default theme => export default theme =>
merge(theme, aspect(theme), { merge(theme, aspect(theme), {
aspectRatio: 9 / 16, aspectRatio: 4 / 3,
}) })

View File

@ -8,7 +8,7 @@ export default theme => {
} }
return merge(theme, { return merge(theme, {
aspectRatio: 9 / 16, aspectRatio: 16 / 9,
css: { css: {
fontSize: '1em', fontSize: '1em',
}, },