Import photos as assets and properly compress late_afternoon.webp
This commit is contained in:
parent
5131f31a1e
commit
8a06e5c18a
7 changed files with 13 additions and 9 deletions
|
@ -3,7 +3,7 @@
|
|||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite --host",
|
||||
"dev": "vite",
|
||||
"build": "vite-ssg build",
|
||||
"start": "vite preview"
|
||||
},
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.2 MiB |
Before Width: | Height: | Size: 216 KiB After Width: | Height: | Size: 216 KiB |
BIN
src/assets/photography/late_afternoon.webp
Normal file
BIN
src/assets/photography/late_afternoon.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 398 KiB |
Before Width: | Height: | Size: 373 KiB After Width: | Height: | Size: 373 KiB |
14
src/data.ts
14
src/data.ts
|
@ -1,28 +1,32 @@
|
|||
import lateAfternoonUrl from "./assets/photography/late_afternoon.webp"
|
||||
import martyrdomUrl from "./assets/photography/martyrdom.webp"
|
||||
import heatUrl from "./assets/photography/heat.webp"
|
||||
|
||||
interface Photo {
|
||||
file: string
|
||||
title: string
|
||||
altText: string
|
||||
date: string
|
||||
description: string
|
||||
url: string
|
||||
}
|
||||
|
||||
export const photos: Photo[] = [
|
||||
{
|
||||
file: "Late_afternoon.webp",
|
||||
title: "Late afternoon",
|
||||
altText: "A red house in London",
|
||||
date: "2019",
|
||||
description: "65 Curzon Street, Mayfair, London"
|
||||
description: "65 Curzon Street, Mayfair, London",
|
||||
url: lateAfternoonUrl
|
||||
},
|
||||
{
|
||||
file: "Martyrdom.webp",
|
||||
url: martyrdomUrl,
|
||||
title: "Martyrdom",
|
||||
altText: "A church on a vineyard",
|
||||
date: "2019",
|
||||
description: "The Sankt-Laurentius church by the Mosel river in Bremm (Germany)."
|
||||
},
|
||||
{
|
||||
file: "Heat.webp",
|
||||
url: heatUrl,
|
||||
title: "Heat",
|
||||
altText: "An orange passageway with windows on all walls",
|
||||
date: "2022",
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
<div class="flex flex-col space-y-30 lg:space-y-20">
|
||||
<div
|
||||
v-for="photo in photos"
|
||||
:key="photo.file"
|
||||
:key="photo.url"
|
||||
class="flex -lg:space-y-10 lg:space-x-10 -lg:flex-col -lg:items-center"
|
||||
>
|
||||
<a class="lg:max-w-150 block w-full" :href="`/photography/${photo.file}`">
|
||||
<a class="lg:max-w-150 block w-full" :href="photo.url">
|
||||
<SuspendingImage
|
||||
:src="`/photography/${photo.file}`"
|
||||
:src="photo.url"
|
||||
:alt="photo.altText"
|
||||
class="w-full max-h-80vh block object-contain"
|
||||
/>
|
||||
|
|
Loading…
Add table
Reference in a new issue