Apply response defaults to top level pages

This commit is contained in:
Sam Carlton 2022-06-15 13:10:39 -05:00
parent b665e100af
commit 53feb3c100
5 changed files with 26 additions and 1 deletions

View file

@ -1,4 +1,8 @@
---
import {
applyResponseDefaults
} from '~/helpers/astro/request.js'
import Layout from '../layouts/default.astro'
import AppTestPage from '~/pages/apple-silicon-app-test.vue'
@ -12,6 +16,8 @@ import AppTestPage from '~/pages/apple-silicon-app-test.vue'
// Full Astro Component Syntax:
// https://docs.astro.build/core-concepts/astro-components/
applyResponseDefaults( Astro )
---
<Layout
headOptions={ {

View file

@ -8,12 +8,16 @@
// https://docs.astro.build/core-concepts/astro-components/
import { DoesItAPI } from '~/helpers/api/client.js'
import {
applyResponseDefaults
} from '~/helpers/astro/request.js'
import Layout from '../layouts/default.astro'
import BgPlayer from '~/src/components/video/bg-player.astro'
import VideoRow from '~/src/components/video/row.astro'
// import LinkButton from '~/components/link-button.vue'
applyResponseDefaults( Astro )
const pagesToGet = 10

View file

@ -8,10 +8,15 @@
// https://docs.astro.build/core-concepts/astro-components/
import { DoesItAPI } from '~/helpers/api/client.js'
import {
applyResponseDefaults
} from '~/helpers/astro/request.js'
import Layout from '../layouts/default.astro'
import SimpleList from '../components/simple-list.astro'
applyResponseDefaults( Astro )
const kindIndex = await DoesItAPI.kind.index.get()
const kinds = Object.values( kindIndex ).map( category => {

View file

@ -8,10 +8,15 @@
// https://docs.astro.build/core-concepts/astro-components/
import { DoesItAPI } from '~/helpers/api/client.js'
import {
applyResponseDefaults
} from '~/helpers/astro/request.js'
import Layout from '../layouts/default.astro'
import SimpleList from '../components/simple-list.astro'
applyResponseDefaults( Astro )
const deviceIndex = await DoesItAPI.kind.device(1).get()
const kinds = deviceIndex.items.map( device => {

View file

@ -8,14 +8,19 @@
// https://docs.astro.build/core-concepts/astro-components/
import { DoesItAPI } from '~/helpers/api/client.js'
import {
applyResponseDefaults
} from '~/helpers/astro/request.js'
import Layout from '../layouts/default.astro'
import Search from '~/components/search-stork.vue'
// import ListSummary from '~/components/list-summary.vue'
import ListEndButtons from '~/components/list-end-buttons.vue'
// import ListEndButtons from '~/components/list-end-buttons.vue'
import AllUpdatesSubscribe from '~/components/all-updates-subscribe.vue'
import CarbonInline from '~/components/carbon-inline.vue'
applyResponseDefaults( Astro )
const homePageKindPage = await DoesItAPI.kind.app(1).get()
const allAppsSummary = await DoesItAPI('all-apps-summary').get()