This commit is contained in:
Chuck Dries 2021-07-17 12:57:41 -07:00
parent 953724826f
commit 4e819976c7

View File

@ -24,12 +24,11 @@ const getDifferentRand = (range, lastNs, iterations = 0) => {
return n; return n;
}; };
const getButtonClasses = (isClient, colorMode = 'vibrant') => const getButtonClasses = (isClient, colorMode = "vibrant") =>
classnames( classnames(
"z-20 rounded-md text-md inline-block px-3 py-2 my-1 mr-2 text-md hover:underline", "z-20 rounded-md text-md inline-block px-3 py-2 my-1 mr-2 text-md hover:underline",
isClient && isClient && `text-muted-light bg-${colorMode}-dark blurred-or-opaque-bg-2`,
`text-muted-light bg-${colorMode}-dark blurred-or-opaque-bg-2`, isClient && colorMode === "muted" ? `hover:bg-muted` : ""
isClient && colorMode === 'muted' ? `hover:bg-muted` : ''
); );
const Nav = ({ ar, isClient }) => ( const Nav = ({ ar, isClient }) => (
@ -89,7 +88,7 @@ const Nav = ({ ar, isClient }) => (
const ImageButtons = ({ isClient, image, shuffleImage }) => ( const ImageButtons = ({ isClient, image, shuffleImage }) => (
<div className="flex mx-6 mb-6"> <div className="flex mx-6 mb-6">
<Link <Link
className={getButtonClasses(isClient, 'muted')} className={getButtonClasses(isClient, "muted")}
id="image-link" id="image-link"
title="view image details" title="view image details"
to={`/photogallery/${image.base}/`} to={`/photogallery/${image.base}/`}
@ -99,7 +98,7 @@ const ImageButtons = ({ isClient, image, shuffleImage }) => (
</span> </span>
</Link> </Link>
<button <button
className={getButtonClasses(isClient, 'muted')} className={getButtonClasses(isClient, "muted")}
id="shuffle-button" id="shuffle-button"
onClick={() => { onClick={() => {
shuffleImage(image); shuffleImage(image);
@ -112,7 +111,7 @@ const ImageButtons = ({ isClient, image, shuffleImage }) => (
</span> </span>
</button> </button>
<Link <Link
className={getButtonClasses(isClient, 'muted')} className={getButtonClasses(isClient, "muted")}
id="photogallery-link" id="photogallery-link"
to="/photogallery/" to="/photogallery/"
> >