add space to shuffle

This commit is contained in:
Chuck Dries 2021-07-16 22:05:37 -07:00
parent a16e1b265c
commit 03e64ea6f5

View File

@ -122,6 +122,10 @@ const IndexPage = ({
React.useEffect(() => { React.useEffect(() => {
const keyListener = (e) => { const keyListener = (e) => {
switch (e.code) { switch (e.code) {
case "Space": {
shuffleImage(image);
return;
}
case "ArrowRight": { case "ArrowRight": {
if (imageIndex === images.length - 1) { if (imageIndex === images.length - 1) {
setImageIndex(0); setImageIndex(0);
@ -253,7 +257,10 @@ const IndexPage = ({
<h1 <h1
className={classnames( className={classnames(
"mb-5 mt-0 text-huge-1 md:text-huge-2 text-center font-black filter drop-shadow-dark z-20", "mb-5 mt-0 text-huge-1 md:text-huge-2 text-center font-black filter drop-shadow-dark z-20",
isClient && ( ar > 1 ? "text-vibrant-light landscape:text-gray-50 landscape:opacity-80" : 'text-gray-50 opacity-80 landscape:text-vibrant-light') isClient &&
(ar > 1
? "text-vibrant-light landscape:text-gray-50 landscape:opacity-80"
: "text-gray-50 opacity-80 landscape:text-vibrant-light")
)} )}
style={{ lineHeight: "85%" }} style={{ lineHeight: "85%" }}
> >