parent
280a4f5a50
commit
6683223a49
11 changed files with 114 additions and 12 deletions
@ -0,0 +1,46 @@ |
||||
.tips { |
||||
display: flex; |
||||
align-items: center; |
||||
justify-content: center; |
||||
position: absolute; |
||||
top: 0; |
||||
left: 0; |
||||
width: 100vw; |
||||
user-select: none; |
||||
height: 100vh; |
||||
z-index: 2000; |
||||
background: rgba(0,0,0,0.5); |
||||
backdrop-filter: blur(6px); |
||||
|
||||
.inner { |
||||
background: color(mainBackground); |
||||
box-shadow: 0 0 2rem rgba(0,0,0,0.6); |
||||
text-transform: uppercase; |
||||
width: 80%; |
||||
height: 70%; |
||||
max-width: 800px; |
||||
max-height: 600px; |
||||
border-radius: 1rem; |
||||
padding: 0 4rem; |
||||
text-align: center; |
||||
opacity: 0.9; |
||||
|
||||
h1 { |
||||
font-family: "Iosevka", sans-serif; |
||||
font-weight: normal; |
||||
font-size: 2rem; |
||||
} |
||||
|
||||
article { |
||||
display: grid; |
||||
grid-template-columns: 3fr 1fr; |
||||
text-align: left; |
||||
line-height: 2rem; |
||||
|
||||
kbd { |
||||
font-size: 1rem; |
||||
text-align: right; |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,33 @@ |
||||
import React, {Fragment} from "react"; |
||||
|
||||
const Cheatsheet = Object.freeze([ |
||||
["Start presentation", "F5"], |
||||
["Stop presentation", "ESC"], |
||||
["Open file", "Ctrl+O"], |
||||
["Next slide", "→, Page up"], |
||||
["Last slide", "←, Page down"], |
||||
["Black screen out", "B"], |
||||
["Show/Hide tips", "TAB"] |
||||
]); |
||||
|
||||
const Tips = ({show}) => { |
||||
return ( |
||||
show ? |
||||
<section className="tips"> |
||||
<section className="inner"> |
||||
<h1>Cheatsheet</h1> |
||||
<article> |
||||
{Cheatsheet.map(([description, key]) => ( |
||||
<Fragment key={key}> |
||||
<label>{description}</label> |
||||
<kbd>{key}</kbd> |
||||
</Fragment> |
||||
))} |
||||
</article> |
||||
</section> |
||||
</section> |
||||
: null |
||||
); |
||||
}; |
||||
|
||||
export default Tips; |
Loading…
Reference in new issue