add secret debug helper
This commit is contained in:
parent
8e669720bd
commit
c574a31ba2
@ -163,7 +163,7 @@ const MasonryGallery = ({
|
|||||||
<div className="text-white z-20 absolute flex flex-col items-start">
|
<div className="text-white z-20 absolute flex flex-col items-start">
|
||||||
{data.map((dataString, i) => (
|
{data.map((dataString, i) => (
|
||||||
<span
|
<span
|
||||||
className="bg-black/30 backdrop-blur p-[2px] m-[2px] max-w-full"
|
className="bg-black/30 backdrop-blur shadow p-[2px] m-[2px] max-w-full"
|
||||||
key={i}
|
key={i}
|
||||||
>
|
>
|
||||||
{dataString}
|
{dataString}
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import React, { useState } from "react";
|
import React, { useRef, useState } from "react";
|
||||||
import classnames from "classnames";
|
import classnames from "classnames";
|
||||||
import { Link } from "gatsby";
|
import { Link, navigate } from "gatsby";
|
||||||
import { Popover } from "react-tiny-popover";
|
import { Popover } from "react-tiny-popover";
|
||||||
import { StaticImage } from "gatsby-plugin-image";
|
import { StaticImage } from "gatsby-plugin-image";
|
||||||
|
|
||||||
const navClasses = "hover:underline hover:bg-black/10 block p-3 text-black flex-shrink-0 whitespace-nowrap";
|
const navClasses =
|
||||||
|
"hover:underline hover:bg-black/10 block p-3 text-black flex-shrink-0 whitespace-nowrap";
|
||||||
|
|
||||||
const ExternalLinks = () => (
|
const ExternalLinks = () => (
|
||||||
<ul
|
<ul
|
||||||
@ -87,6 +88,8 @@ interface NavProps {
|
|||||||
|
|
||||||
const Nav = ({ internalLinks, className }: NavProps) => {
|
const Nav = ({ internalLinks, className }: NavProps) => {
|
||||||
const [linksMenu, setLinksMenu] = useState(false);
|
const [linksMenu, setLinksMenu] = useState(false);
|
||||||
|
const faceClicks = useRef(0);
|
||||||
|
const faceLastClicked = useRef(0);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<nav
|
<nav
|
||||||
@ -100,21 +103,35 @@ const Nav = ({ internalLinks, className }: NavProps) => {
|
|||||||
<div className="flex flex-auto items-center">
|
<div className="flex flex-auto items-center">
|
||||||
<div
|
<div
|
||||||
className={classnames(
|
className={classnames(
|
||||||
"h-[120px] w-[120px] mr-4 my-5 flex-shrink-0",
|
"h-[120px] w-[120px] mr-4 my-5 flex-shrink-0"
|
||||||
// "ml-[-130px]",
|
|
||||||
// "rounded-full overflow-hidden relative"
|
|
||||||
)}
|
)}
|
||||||
|
onClick={() => {
|
||||||
|
const prevClick = faceLastClicked.current;
|
||||||
|
faceLastClicked.current = Date.now();
|
||||||
|
if (prevClick > 0 && faceLastClicked.current - prevClick > 500) {
|
||||||
|
console.log('too slow!')
|
||||||
|
faceClicks.current = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (faceClicks.current === 4) {
|
||||||
|
navigate("/photogallery/?debug=true");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
faceClicks.current += 1;
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<StaticImage
|
<StaticImage
|
||||||
alt="A picture of me"
|
alt="A picture of me"
|
||||||
className="relative"
|
className="relative"
|
||||||
placeholder="tracedSVG"
|
placeholder="tracedSVG"
|
||||||
src="../images/circle-profile.png"
|
src="../images/circle-profile.png"
|
||||||
style={{
|
style={
|
||||||
|
{
|
||||||
// top: "-70%",
|
// top: "-70%",
|
||||||
// left: "-50%",
|
// left: "-50%",
|
||||||
// width: "200%",
|
// width: "200%",
|
||||||
}}
|
}
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="items-baseline">
|
<div className="items-baseline">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user