diff --git a/src/pages/games.astro b/src/pages/games.astro new file mode 100644 index 0000000..1460486 --- /dev/null +++ b/src/pages/games.astro @@ -0,0 +1,104 @@ +--- +// Full Astro Component Syntax: +// https://docs.astro.build/core-concepts/astro-components/ + + +import { DoesItAPI } from '~/helpers/api/client.js' +import { getPathPartsFromAstroRequest } from '~/helpers/url.js' +import { catchRedirectResponse } from '~/helpers/astro/request.js' +import { + categories, + makeCategoryFilterFromCategorySlug +} from '~/helpers/categories.js' + +import Layout from '~/src/layouts/default.astro' +import Search from '~/components/search-stork.vue' +import ThomasCredit from '~/components/thomas-credit.vue' + + +// Get type and slug from the request path +// so that we don't have extra parts for +// urls like /:type/:slug/benchmarks +const { + pathname, + // pathSlug, + // subSlug = 1 + } = getPathPartsFromAstroRequest( Astro.request ) + + +const redirectResponse = await catchRedirectResponse( Astro ) + +if ( redirectResponse !== null ) { + return redirectResponse +} + +const rawKindPage = await DoesItAPI.kind( 'game' )( 1 ).get() + +// Clean up unused kind data +const kindPage = { + ...rawKindPage, + items: rawKindPage.items.map( item => ({ + ...item, + bundles: undefined, + }) ) +} + +const baseFilters = [] + +const categorySlug = 'games' + +const category = categories[ categorySlug ] + +baseFilters.push( makeCategoryFilterFromCategorySlug( categorySlug ) ) + +const pageLabel = category?.pluralLabel || category.label + +--- + + +
+
+ +
+

+ { pageLabel } that are reported to support Apple Silicon +

+ +

+ Supported apps include { kindPage.summary.sampleNamesShort }. +

+ + +
+ + + + + + + +
+
+ +