feat(landing): add admin premium modal (#5782)

This commit is contained in:
SFilinsky 2020-10-09 14:44:18 +03:00 committed by GitHub
parent 067f179ed6
commit 39600d9ba5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 246 additions and 179 deletions

View file

@ -0,0 +1,11 @@
<nb-card>
<nb-card-header>
<span>Premium</span>
<button nbButton status="basic" appearance="ghost" class="close-icon" (click)="closeDialog()">
<i [innerHTML]="'close' | eva: { width: 26, height: 26, fill: '#222b45' }"></i>
</button>
</nb-card-header>
<nb-card-body>
<div id="hubspotForm"></div>
</nb-card-body>
</nb-card>

View file

@ -0,0 +1,31 @@
/**
* @license
* Copyright Akveo. All Rights Reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*/
@import '~@nebular/theme/styles/global/breakpoints';
@import '../../../@theme/styles/themes';
@include nb-install-component() {
nb-card {
width: 30rem;
}
nb-card-header {
display: flex;
align-items: center;
justify-content: flex-end;
}
.close-icon {
margin-left: auto;
padding: 0;
}
::ng-deep .hs-custom-form .hs-submit-btn {
margin-top: 1rem;
}
}

View file

@ -0,0 +1,36 @@
/**
* @license
* Copyright Akveo. All Rights Reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*/
import { AfterViewInit, Component } from '@angular/core';
import { NbDialogRef } from '@nebular/theme';
@Component({
selector: 'ngx-premium-form',
templateUrl: './premium-form.component.html',
styleUrls: ['./premium-form.component.scss'],
})
export class PremiumFormComponent implements AfterViewInit {
constructor(protected ref: NbDialogRef<PremiumFormComponent>) {
}
ngAfterViewInit() {
hbspt.forms.create({
portalId: '2452262',
formId: 'b066428e-c41a-4dce-bbc2-5690cf084a8f',
target: '#hubspotForm',
submitButtonClass: 'hs-submit-btn btn',
css: '',
cssClass: 'hs-custom-form',
redirectUrl: 'https://github.com/akveo/ngx-admin',
});
}
closeDialog() {
this.ref.close();
}
}