-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
index.astro
47 lines (44 loc) · 1.12 KB
/
index.astro
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
---
import {
Aperture,
Camera,
Crosshair,
Maximize,
Stopwatch,
Sun
} from '@/images/components'
import type { Exif } from '@/lib/exif'
import ExifData from './ExifData.astro'
import ExifMap from './ExifMap.tsx'
import styles from './index.module.css'
type Props = {
exif: Exif
}
const { model, focalLength, fstop, shutterspeed, exposure, iso, gps } =
Astro.props.exif.exif
---
<aside class={styles.exif}>
<div class={styles.data}>
{model && <ExifData title="Camera model" value={model} icon={Camera} />}
{
focalLength && (
<ExifData title="Focal length" value={focalLength} icon={Crosshair} />
)
}
{fstop && <ExifData title="Aperture" value={fstop} icon={Aperture} />}
{
shutterspeed && (
<ExifData title="Shutter speed" value={shutterspeed} icon={Stopwatch} />
)
}
{exposure && <ExifData title="Exposure" value={exposure} icon={Sun} />}
{iso && <ExifData title="ISO" value={iso} icon={Maximize} />}
</div>
{
gps?.latitude && (
<div class={styles.map}>
<ExifMap gps={gps} client:only="react" />
</div>
)
}
</aside>