diff --git a/docs/app/@core/data/service/bundles.service.ts b/docs/app/@core/data/service/bundles.service.ts index 586d3566..987f8c5a 100644 --- a/docs/app/@core/data/service/bundles.service.ts +++ b/docs/app/@core/data/service/bundles.service.ts @@ -25,6 +25,11 @@ export const BUNDLE_LICENSE = { developer: 'developer', }; +export const STORE_PRODUCTS_URL = { + base: 'https://store.akveo.com/collections/frontpage/products.json', + material: 'https://store.akveo.com/collections/material-bundles/products.json', +}; + export class Feature { text: string; availableInPersonalLicence: boolean; @@ -34,7 +39,6 @@ export class Feature { @Injectable() export class BundlesService { - private readonly STORE_PRODUCTS: string = 'https://store.akveo.com/collections/frontpage/products.json'; private readonly STORE: string = 'https://store.akveo.com/products'; private features: Feature[] = [ @@ -81,8 +85,8 @@ export class BundlesService { return observableOf(this.features); } - getProducts(): Observable { - return this.http.get(this.STORE_PRODUCTS) + getProducts(url: string): Observable { + return this.http.get(url) .pipe(map((result: any) => { return result.products.map((item: any) => { return { diff --git a/docs/app/pages/home/backend-bundles-section/backend-bundles-section.component.html b/docs/app/pages/home/backend-bundles-section/backend-bundles-section.component.html index 8ecdb355..b9bf3f73 100644 --- a/docs/app/pages/home/backend-bundles-section/backend-bundles-section.component.html +++ b/docs/app/pages/home/backend-bundles-section/backend-bundles-section.component.html @@ -40,8 +40,7 @@ ${{ (product.variants | license:selectedLicenseType).price }} + class="package-card__buy-link btn"> Buy now @@ -50,11 +49,11 @@ @@ -107,7 +106,7 @@

Need more details or have a question?

diff --git a/docs/app/pages/home/backend-bundles-section/backend-bundles-section.component.scss b/docs/app/pages/home/backend-bundles-section/backend-bundles-section.component.scss index d565714d..d7c0cbf0 100644 --- a/docs/app/pages/home/backend-bundles-section/backend-bundles-section.component.scss +++ b/docs/app/pages/home/backend-bundles-section/backend-bundles-section.component.scss @@ -112,6 +112,7 @@ &:active { color: #ffffff; } + &.active { color: #000000; background-color: #fafafa; @@ -258,13 +259,18 @@ font-size: 0.75rem; color: #ffffff; text-transform: uppercase; - background-color: #18cb90; - box-shadow: 0 5px 29px 0 rgba(0, 219, 146, 0.32); + background-color: nb-theme(color-active-fg); + box-shadow: nb-theme(shadow-btn); border-radius: 3px; margin-top: 0.5rem; cursor: pointer; + &:hover { - box-shadow: 0 0.375rem 2.125rem 0 rgba(0, 219, 146, 0.32); + box-shadow: nb-theme(shadow-hover-green-btn); + } + + &:active { + box-shadow: nb-theme(shadow-active-green-btn); } } &__type { diff --git a/docs/app/pages/home/backend-bundles-section/backend-bundles-section.component.ts b/docs/app/pages/home/backend-bundles-section/backend-bundles-section.component.ts index 788538ee..4234fc81 100644 --- a/docs/app/pages/home/backend-bundles-section/backend-bundles-section.component.ts +++ b/docs/app/pages/home/backend-bundles-section/backend-bundles-section.component.ts @@ -4,7 +4,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. */ -import { AfterViewInit, Component, ElementRef, EventEmitter, Inject, Output } from '@angular/core'; +import { AfterViewInit, Component, ElementRef, EventEmitter, Inject, Input, Output } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; import { Observable } from 'rxjs'; import { delay, filter, take } from 'rxjs/operators'; @@ -12,6 +12,7 @@ import { NB_WINDOW } from '@nebular/theme'; import { BUNDLE_LICENSE, + STORE_PRODUCTS_URL, BundlesService, Feature, Product, @@ -28,13 +29,22 @@ import { LicensePipe } from '../backend-bundles-section/license.pipe'; export class BackendBundlesSectionComponent implements AfterViewInit { @Output() loaded = new EventEmitter(); + @Input() + set material(value: boolean | undefined) { + if (value) { + this.productUrl = STORE_PRODUCTS_URL.material; + + this.getProducts(); + } + } selectedLicenseType = BUNDLE_LICENSE.personal; + productUrl = STORE_PRODUCTS_URL.base; licenses = Object.values(BUNDLE_LICENSE); descriptions: Observable = this.descriptionService.getBundleDescriptions(); - products: Observable = this.bundlesService.getProducts(); + products: Observable; features: Observable = this.bundlesService.getFeatures(); constructor(private descriptionService: DescriptionsService, @@ -43,6 +53,7 @@ export class BackendBundlesSectionComponent implements AfterViewInit { private el: ElementRef, @Inject(NB_WINDOW) private window, private licensePipe: LicensePipe) { + this.getProducts(); } ngAfterViewInit() { @@ -57,6 +68,10 @@ export class BackendBundlesSectionComponent implements AfterViewInit { }); } + getProducts() { + this.products = this.bundlesService.getProducts(this.productUrl); + } + shouldShowOldPrice(variants: ProductVariant[], selectedLicenseType: string): boolean { const product = this.licensePipe.transform(variants, selectedLicenseType); diff --git a/docs/app/pages/home/material-landing/material-landing.component.html b/docs/app/pages/home/material-landing/material-landing.component.html index 5f9a2287..f00891ef 100644 --- a/docs/app/pages/home/material-landing/material-landing.component.html +++ b/docs/app/pages/home/material-landing/material-landing.component.html @@ -9,6 +9,7 @@ +