Add title and pricing button to app pages

This commit is contained in:
Sam Carlton 2021-04-18 20:41:51 -05:00
parent e222857af5
commit a4d59ee2e6

View file

@ -2,15 +2,33 @@
<section class="container py-24"> <section class="container py-24">
<div class="flex flex-col items-center"> <div class="flex flex-col items-center">
<h1 class="title text-3xl md:text-5xl font-hairline leading-tight text-center pb-4"> <h1 class="title text-3xl md:text-5xl font-hairline leading-tight text-center pb-4">
App support for {{ device.name }} {{ device.name }}
</h1> </h1>
<h2 <div class="summary space-y-4 max-w-2xl">
v-if="supportedAppList.length !== 0" <div class="flex justify-center py-3">
class="subtitle md:text-xl text-center" <LinkButton
> v-if="device.amazonUrl"
Supported apps include {{ supportedAppList.join(', ') }}. :href="device.amazonUrl"
</h2> target="_blank"
>
Check Pricing
</LinkButton>
</div>
<h2
class="subtitle md:text-lg text-center"
>
App support for {{ device.name }}
</h2>
<h2
v-if="supportedAppList.length !== 0"
class="subtitle md:text-lg text-center"
>
Supported apps include {{ supportedAppList.join(', ') }}.
</h2>
</div>
<Search <Search
:app-list="deviceAppList" :app-list="deviceAppList"
@ -67,8 +85,7 @@ export default {
const { allList } = await import('~/helpers/get-list.js') const { allList } = await import('~/helpers/get-list.js')
const { default: deviceList } = await import('~/static/device-list.json') const { default: deviceList } = await import('~/static/device-list.json')
// const { default: gameList } = await import('~/static/game-list.json')
// const { default: videoList } = await import('~/static/video-list.json')
const charCode = slug.charCodeAt( slug.length-2 ) const charCode = slug.charCodeAt( slug.length-2 )
const shuffler = new Chance( charCode ) const shuffler = new Chance( charCode )
@ -77,6 +94,8 @@ export default {
return device.slug === slug return device.slug === slug
}) })
// console.log( 'device', device )
const deviceAppList = allList.map( app => { const deviceAppList = allList.map( app => {
const appIsSupported = deviceSupportsApp( device, app ) const appIsSupported = deviceSupportsApp( device, app )