Skip to content

Commit

Permalink
remove comments, make gallery buttons larger, make clicking work normal?
Browse files Browse the repository at this point in the history
  • Loading branch information
sandroid committed Dec 15, 2024
1 parent 9ac7e2b commit 7569ef7
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/components/GalleryImageGrid/GalleryImageGrid.astro
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ function getDateFromFilename(filename: string) {
:global(.app-lightbox-nav) {
position: fixed;
top: 50%;
padding: 1rem;
padding: 3rem;
transform: translateY(-50%);
background: rgba(255, 255, 255, 0.8);
background: rgba(255, 255, 255, 0.2);
border: none;
font-size: 3rem;
cursor: pointer;
Expand All @@ -177,7 +177,7 @@ function getDateFromFilename(filename: string) {
}

:global(.app-lightbox-nav:hover) {
background: rgba(255, 255, 255, 1);
background: rgba(255, 255, 255, 0.5);
}

:global(.app-lightbox-prev) {
Expand Down
2 changes: 0 additions & 2 deletions src/components/react/CanvasMapGenerator/Canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ const Canvas =({reRenderTrigger}: {reRenderTrigger: number}) => {

const canvasRef = useRef(null)
const draw = (ctx, frameCount) => {
console.log(frameCount)
console.log(JSON.stringify(player));
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);

fillMapWithGreen(ctx);
Expand Down
6 changes: 1 addition & 5 deletions src/components/react/Images/GalleryImageGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@ interface GalleryImageGridProps {

// TODO: Make this accept 'children', which will be all the images? Made by Astro's Image component?
export const GalleryImageGrid = ({ children }: GalleryImageGridProps) => {
console.log('images', children);

const images = Children.toArray(children);
console.log('images', images);

const [isOpen, setIsOpen] = useState(false);
const [image, setImage] = useState(0);
Expand Down Expand Up @@ -57,8 +55,7 @@ export const GalleryImageGrid = ({ children }: GalleryImageGridProps) => {
};

const handleKeyPress = (event: { key: string | number; }) => {
console.log('KeyPress!');
console.log(event.key);


if (event.key === 'ArrowLeft') {
handleLeftArrow();
Expand All @@ -67,7 +64,6 @@ export const GalleryImageGrid = ({ children }: GalleryImageGridProps) => {
handleRightArrow();
}
if (event.key === 'Escape' || event.key === 27) {
console.log('Closing lightbox');

setIsOpen(false);
}
Expand Down
1 change: 0 additions & 1 deletion src/components/react/Images/ImageComparer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const ImageComparer = (props: ImageComparerProps) => {
const [imageSizeStyleName, setImageSizeStyleName] = React.useState("normal");

const makeImageVisible = (imageNumber: number) => {
console.log("Making image visible: " + imageNumber);
if (imageNumber === 1) {
setImageStyles(styles.image1Visible);
setButton1Styles(styles.buttonSelected);
Expand Down
6 changes: 3 additions & 3 deletions src/components/react/Images/ManyImages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import styles from "./manyImages.module.scss";


export async function getImageFiles(imagesFolder: string) {
console.log("getting image files");

const imageFiles = await fs.readdir(imagesFolder);
console.log(imageFiles)


// Filter the list to include only image files (you can customize this filter)
const imageFilesFiltered = imageFiles.filter((file) =>
Expand All @@ -20,7 +20,7 @@ export async function getImageFiles(imagesFolder: string) {
};

const ManyImages = async ({folderPath}: {folderPath: string}) => {
console.log("Hello")

const imageFiles = await getImageFiles(folderPath);

return <div className="image-gallery">
Expand Down

0 comments on commit 7569ef7

Please sign in to comment.