diff --git a/helpers/listing-page.js b/helpers/listing-page.js new file mode 100644 index 0000000..3f034e9 --- /dev/null +++ b/helpers/listing-page.js @@ -0,0 +1,32 @@ + + +import { + getAppType +} from './app-derived.js' + + +export class ListingDetails { + constructor ( listing ) { + this.listing = listing + + this.type = getAppType( listing ) + } + + type = '' + + get mainHeading () { + if ( this.type === 'formula' ) { + return `Does ${ this.listing.name } work on Apple Silicon when installed via Homebrew?` + } + + return `Does ${ this.listing.name } work on Apple Silicon?` + } + + get subtitle () { + return this.listing.text + } + + buildListingDetails ( listing ) { + + } +}