From 6f7d3f807bb206e9f64845220f51a58240d570dd Mon Sep 17 00:00:00 2001 From: nconrad <1194246+nconrad@users.noreply.github.com> Date: Mon, 6 Nov 2023 21:21:02 -0600 Subject: [PATCH] use photo thumbnails instead of full res; minor edits --- src/components/PhotoIndex.tsx | 20 ++++++++++---------- src/pages/Photos.tsx | 22 +++++++++------------- src/pages/Science.tsx | 2 +- src/pages/science/smoke-detection.md | 2 +- 4 files changed, 21 insertions(+), 25 deletions(-) diff --git a/src/components/PhotoIndex.tsx b/src/components/PhotoIndex.tsx index 0e1f218b..afea0231 100644 --- a/src/components/PhotoIndex.tsx +++ b/src/components/PhotoIndex.tsx @@ -2,7 +2,6 @@ import React, {useEffect, useState} from 'react' import styled from 'styled-components' import { Link, useLocation } from 'react-router-dom' - import Card from '@mui/material/Card' @@ -46,18 +45,19 @@ type LinkCardProps = { title: string src: string link: string + alt?: string description?: string } export function LinkCard(props: LinkCardProps) { - const {title, src, link} = props + const {title, src, link, alt} = props return ( - + {alt}

{title}

) @@ -87,7 +87,6 @@ export default function FileIndex(props: Props) { }) const files = await listAllFiles(gapi, folderId) - console.log('files', files) setFiles(files) } @@ -97,18 +96,19 @@ export default function FileIndex(props: Props) { return ( - + {!collection && files && Object.keys(files).map(folderName => { const filesByName = files[folderName] - const {id} = Object.values(filesByName)[0] + const {id, name} = Object.values(filesByName)[0] return ( ) }) @@ -116,9 +116,9 @@ export default function FileIndex(props: Props) { {collection && files &&
- {Object.values(files[collection]).map(({id}) => - ) - } + {Object.values(files[collection]).map(({id, name}) => + {name} + )}
}
diff --git a/src/pages/Photos.tsx b/src/pages/Photos.tsx index d9c88ddb..1782b013 100644 --- a/src/pages/Photos.tsx +++ b/src/pages/Photos.tsx @@ -13,21 +13,17 @@ export default function Photos() { return (
-
-
-

- {collection ? - <>Photos / {collection} : - 'Photo Galleries' - } -

-
- -
-
+

+ {collection ? + <>Photos / {collection} : + 'Photo Galleries' + } +

+
+
diff --git a/src/pages/Science.tsx b/src/pages/Science.tsx index fffd6c44..8b159b2f 100644 --- a/src/pages/Science.tsx +++ b/src/pages/Science.tsx @@ -68,7 +68,7 @@ export default function Science() { src={require('@site/static/img/science/snow-detection.jpg').default} /> diff --git a/src/pages/science/smoke-detection.md b/src/pages/science/smoke-detection.md index 9a5970e3..575011c7 100644 --- a/src/pages/science/smoke-detection.md +++ b/src/pages/science/smoke-detection.md @@ -1,4 +1,4 @@ -# Wildfire classifier +# Wildfire Classifier ![](imgs/smoke_wildfire.jpg)