diff --git a/gatsby/createExif.js b/gatsby/createExif.js index 34d9c38c..15cdaf35 100644 --- a/gatsby/createExif.js +++ b/gatsby/createExif.js @@ -80,7 +80,7 @@ function formatExif(exifData) { } = exifData.exif const iso = `ISO ${ISO}` - const fstop = `ƒ ${FNumber}` + const fstop = `ƒ/${FNumber}` const focalLength = `${FocalLengthIn35mmFormat || FocalLength}mm` // Shutter speed @@ -126,7 +126,7 @@ function formatGps(gpsData) { } function formatExposure(exposureMode) { - if (!exposureMode) return + if (exposureMode === null || exposureMode === undefined) return const exposureShortened = parseFloat(exposureMode.toFixed(2)) let exposure diff --git a/src/components/atoms/Exif.module.scss b/src/components/atoms/Exif.module.scss index 7ae06b5a..f3b4fa50 100644 --- a/src/components/atoms/Exif.module.scss +++ b/src/components/atoms/Exif.module.scss @@ -23,6 +23,12 @@ padding: $spacer $spacer / 1.5; border-bottom: 1px dashed $brand-grey-dimmed; + svg { + display: block; + margin-bottom: $spacer / 8; + opacity: 0.65; + } + &:first-child { flex-basis: 100%; } diff --git a/src/components/atoms/Exif.tsx b/src/components/atoms/Exif.tsx index 47a0bf8c..bc9361ee 100644 --- a/src/components/atoms/Exif.tsx +++ b/src/components/atoms/Exif.tsx @@ -2,6 +2,22 @@ import React from 'react' import ExifMap from './ExifMap' import styles from './Exif.module.scss' import { Exif as ExifMeta } from '../../@types/Image' +import Icon from './Icon' + +const ExifData = ({ + title, + value, + icon +}: { + title: string + value: string + icon: string +}) => ( + + + {value} + +) export default function Exif({ exif }: { exif: ExifMeta }) { const { @@ -17,12 +33,20 @@ export default function Exif({ exif }: { exif: ExifMeta }) { return (