Force 3/2 format for non landscape photos on Location page
Center image on a background when square, portrait or other ratio - Fix MutuationObserver for using components (would think a component is an item)
This commit is contained in:
@@ -1,6 +1,19 @@
|
||||
import type { RequestEvent, RequestHandlerOutput } from '@sveltejs/kit'
|
||||
import { fetchAPI } from '$utils/api'
|
||||
|
||||
export const photoFields = `
|
||||
title
|
||||
slug
|
||||
city
|
||||
image {
|
||||
id
|
||||
title
|
||||
}
|
||||
orientation
|
||||
date_taken
|
||||
date_created
|
||||
`
|
||||
|
||||
export async function get({ params }: RequestEvent): Promise<RequestHandlerOutput> {
|
||||
try {
|
||||
const { location } = params
|
||||
@@ -40,15 +53,7 @@ export async function get({ params }: RequestEvent): Promise<RequestHandlerOutpu
|
||||
limit: ${import.meta.env.VITE_LIST_AMOUNT},
|
||||
page: 1,
|
||||
) {
|
||||
title
|
||||
slug
|
||||
city
|
||||
image {
|
||||
id
|
||||
title
|
||||
}
|
||||
date_taken
|
||||
date_created
|
||||
${photoFields}
|
||||
}
|
||||
|
||||
# Total
|
||||
|
||||
Reference in New Issue
Block a user