Add ibasic home page list

This commit is contained in:
Sam Carlton 2022-05-21 13:08:20 -05:00
parent 36ec23daa9
commit 7f95c013bf
2 changed files with 15 additions and 6 deletions

View file

@ -97,10 +97,13 @@
</div> </div>
<div <div
v-html="makeHighlightedResultTitle( listing.storkResult )" v-html="listing.name"
/> />
<div class="text-xs leading-5 font-light"> <div
v-if="listing.storkResult"
class="text-xs leading-5 font-light"
>
<div <div
v-for="(excerpt, i) in listing.storkResult.excerpts" v-for="(excerpt, i) in listing.storkResult.excerpts"
:key="`excerpt-${i}`" :key="`excerpt-${i}`"
@ -238,8 +241,8 @@ export default {
RelativeTime: () => process.client ? import('~/components/relative-time.vue') : null RelativeTime: () => process.client ? import('~/components/relative-time.vue') : null
}, },
props: { props: {
appList: { kindPage: {
type: Array, type: Object,
required: true required: true
}, },
noEmailSubscribe: { noEmailSubscribe: {
@ -267,6 +270,9 @@ export default {
} }
}, },
computed: { computed: {
appList () {
return this.kindPage.items
},
initialList () { initialList () {
return this.initialLimit !== null ? this.appList.slice(0, this.initialLimit) : this.appList return this.initialLimit !== null ? this.appList.slice(0, this.initialLimit) : this.appList
}, },
@ -452,7 +458,7 @@ export default {
this.listingsResults = storkQuery.results.map( result => { this.listingsResults = storkQuery.results.map( result => {
return { return {
name: result.entry.title, name: makeHighlightedResultTitle( result ),
endpoint: result.entry.url, endpoint: result.entry.url,
slug: '', slug: '',
category: { category: {

View file

@ -7,6 +7,8 @@
// Full Astro Component Syntax: // Full Astro Component Syntax:
// https://docs.astro.build/core-concepts/astro-components/ // https://docs.astro.build/core-concepts/astro-components/
import { DoesItAPI } from '~/helpers/api/client.js'
import Layout from '../layouts/default.astro' import Layout from '../layouts/default.astro'
import Search from '~/components/search-stork.vue' import Search from '~/components/search-stork.vue'
import ListSummary from '~/components/list-summary.vue' import ListSummary from '~/components/list-summary.vue'
@ -16,6 +18,7 @@ import AllUpdatesSubscribe from '~/components/all-updates-subscribe.vue'
import getListSummaryNumbers from '~/helpers/get-list-summary-numbers.js' import getListSummaryNumbers from '~/helpers/get-list-summary-numbers.js'
const homePageKindPage = await DoesItAPI.kind.app(1).get()
--- ---
<Layout <Layout
@ -43,7 +46,7 @@ import getListSummaryNumbers from '~/helpers/get-list-summary-numbers.js'
</div> </div>
<Search <Search
app-list={[]} kind-page={homePageKindPage}
client:load client:load
> >