-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathindex.astro
More file actions
51 lines (48 loc) · 1.27 KB
/
index.astro
File metadata and controls
51 lines (48 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
import {
ApertureIcon,
CameraIcon,
CrosshairIcon,
MaximizeIcon,
SunIcon,
WatchIcon
} from '@lucide/astro'
import type { ImageMetadataFormatted } from '../../types'
import ExifData from './ExifData.astro'
import ExifMap from './ExifMap.tsx'
import styles from './index.module.css'
type Props = {
imageMetadata: ImageMetadataFormatted
}
const { exif, gps } = Astro.props.imageMetadata
const { model, focalLength, fstop, shutterspeed, exposure, iso } = exif
---
<aside class={styles.exif}>
<div class={styles.data}>
{model && <ExifData title="Camera model" value={model} icon={CameraIcon} />}
{
focalLength && (
<ExifData
title="Focal length"
value={focalLength}
icon={CrosshairIcon}
/>
)
}
{fstop && <ExifData title="Aperture" value={fstop} icon={ApertureIcon} />}
{
shutterspeed && (
<ExifData title="Shutter speed" value={shutterspeed} icon={WatchIcon} />
)
}
{exposure && <ExifData title="Exposure" value={exposure} icon={SunIcon} />}
{iso && <ExifData title="ISO" value={iso} icon={MaximizeIcon} />}
</div>
{
gps?.latitude && (
<div class:list={[styles.map, "breakout"]}>
<ExifMap gps={gps} client:only="react" />
</div>
)
}
</aside>