add G shortcut to jump to gallery
This commit is contained in:
parent
4e7fd5cc9d
commit
b02a548b17
@ -32,6 +32,9 @@ const GalleryImage = ({ data, pageContext }) => {
|
||||
}
|
||||
return;
|
||||
}
|
||||
case 'KeyG': {
|
||||
navigate('/photogallery/');
|
||||
}
|
||||
}
|
||||
};
|
||||
document.addEventListener('keydown', keyListener);
|
||||
@ -74,15 +77,15 @@ const GalleryImage = ({ data, pageContext }) => {
|
||||
<Link
|
||||
className="hover:underline text-vibrant-light hover:text-muted-light mx-1"
|
||||
to="/photogallery/"
|
||||
>gallery</Link>
|
||||
>gallery <span className="bg-gray-300 text-black">g</span></Link>
|
||||
{pageContext.prevImage && <Link
|
||||
className="hover:underline text-vibrant-light hover:text-muted-light mx-1"
|
||||
to={`/photogallery/${pageContext.prevImage}/`}
|
||||
>previous</Link>}
|
||||
>previous <span className="bg-gray-300 text-black">⭠</span></Link>}
|
||||
{pageContext.nextImage && <Link
|
||||
className="hover:underline text-vibrant-light hover:text-muted-light mx-1"
|
||||
to={`/photogallery/${pageContext.nextImage}/`}
|
||||
>next</Link>}
|
||||
>next <span className="bg-gray-300 text-black">⭢</span></Link>}
|
||||
</nav>
|
||||
<div className={classnames('flex', orientationClasses)}>
|
||||
<div className="flex-grow-0">
|
||||
|
@ -92,7 +92,8 @@ const IndexPage = ({ data: { allFile: { edges } } }) => {
|
||||
</Helmet>
|
||||
{/* WIP: ipad portrait hits md breakpoint, looks bad */}
|
||||
<main
|
||||
className={classnames('font-serif hero', ar > 1 ? 'landscape:grid portrait:flex portrait:flex-col' : 'portrait:grid landscape:flex landscape:flex-row-reverse')}
|
||||
className={classnames('font-serif hero', ar > 1
|
||||
? 'landscape:grid portrait:flex portrait:flex-col' : 'portrait:grid landscape:flex landscape:flex-row-reverse')}
|
||||
>
|
||||
{isClient ?
|
||||
<GatsbyImage
|
||||
|
Loading…
x
Reference in New Issue
Block a user