feat(core): add backend bundles section for landing

This commit is contained in:
Valentin Kononov 2019-02-05 18:53:21 +03:00
commit 92acc44a32
24 changed files with 936 additions and 42 deletions

View file

@ -2,7 +2,7 @@
<ngx-landing-main-info></ngx-landing-main-info>
</div>
<ngx-landing-description-section></ngx-landing-description-section>
<ngx-landing-description-section *ngIf="descriptions" [descriptions]="descriptions" ></ngx-landing-description-section>
<ngx-landing-theme-section></ngx-landing-theme-section>
@ -12,6 +12,8 @@
<ngx-landing-reviews-section></ngx-landing-reviews-section>
</div>
<ngx-backend-bundles-section id="backend-bundles"></ngx-backend-bundles-section>
<ngx-landing-our-projects-section></ngx-landing-our-projects-section>
<div class="gray-section">

View file

@ -19,7 +19,8 @@
ngx-landing-reviews-section,
ngx-landing-our-projects-section,
ngx-landing-social-section,
ngx-landing-contact-section {
ngx-landing-contact-section,
ngx-backend-bundles-section {
max-width: $content-width;
margin: 0 auto;
}

View file

@ -4,15 +4,27 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*/
import { Component } from '@angular/core';
import { Component, OnDestroy } from '@angular/core';
import { Descriptions, DescriptionsService } from '../../../@core/data/service/descriptions.service';
import { takeWhile } from 'rxjs/operators';
@Component({
selector: 'ngx-landing-sections-container',
templateUrl: './ngx-landing-sections-container.component.html',
styleUrls: ['./ngx-landing-sections-container.component.scss'],
})
export class NgxLandingSectionsContainerComponent {
export class NgxLandingSectionsContainerComponent implements OnDestroy {
constructor() {
private alive = true;
descriptions: Descriptions[];
constructor(private descriptionsService: DescriptionsService) {
this.descriptionsService.getDescriptions()
.pipe(takeWhile(() => this.alive))
.subscribe((descriptions) => this.descriptions = descriptions);
}
ngOnDestroy() {
this.alive = false;
}
}