Merge pull request #4144 from mempool/hunicus/enterprise-cta-docs

Add enterprise cta to docs
This commit is contained in:
wiz 2024-03-06 16:33:38 +09:00 committed by GitHub
commit a2fb16c84c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 71 additions and 0 deletions

View File

@ -1,3 +1,7 @@
<div id="enterprise-cta-desktop">
<p>Get higher API limits with Mempool Enterprise®</p>
<a class="btn btn-small btn-purple" href="/enterprise">More Info <fa-icon [icon]="['fas', 'angle-right']" [styles]="{'font-size': '12px'}"></fa-icon></a>
</div>
<div *ngFor="let item of tabData">
<p *ngIf="( item.type === 'category' ) && ( item.showConditions.indexOf(network.val) > -1 ) && ( !item.hasOwnProperty('options') || ( item.hasOwnProperty('options') && item.options.hasOwnProperty('officialOnly') && item.options.officialOnly && officialMempoolInstance ))">{{ item.title }}</p>
<a *ngIf="( item.type !== 'category' ) && ( item.showConditions.indexOf(network.val) > -1 ) && ( !item.hasOwnProperty('options') || ( item.hasOwnProperty('options') && item.options.hasOwnProperty('officialOnly') && item.options.officialOnly && officialMempoolInstance ) || ( item.hasOwnProperty('options') && item.options.hasOwnProperty('auditOnly') && item.options.auditOnly && auditEnabled ) )" [routerLink]="['./']" fragment="{{ item.fragment }}" (click)="navLinkClick($event)">{{ item.title }}</a>

View File

@ -11,3 +11,22 @@ a {
display: block;
margin: 5px 0;
}
#enterprise-cta-desktop {
text-align: center;
padding: 20px;
margin: 20px 20px 20px 0;
background-color: #1d1f31;
border-radius: 12px;
}
#enterprise-cta-desktop p {
margin: 0 auto 16px auto;
color: #fff;
font-weight: 400;
}
#enterprise-cta-desktop a {
display: inline-block;
}

View File

@ -39,6 +39,14 @@
<div class="doc-content">
<div id="enterprise-cta-mobile" *ngIf="showMobileEnterpriseUpsell">
<p>Get higher API limits with <span class="no-line-break">Mempool Enterprise®</span></p>
<div class="button-group">
<a class="btn btn-small btn-secondary" (click)="showMobileEnterpriseUpsell = false">No Thanks</a>
<a class="btn btn-small btn-purple" href="https://mempool.space/enterprise">More Info <fa-icon [icon]="['fas', 'angle-right']" [styles]="{'font-size': '12px'}"></fa-icon></a>
</div>
</div>
<p class="doc-welcome-note">Below is a reference for the {{ network.val === '' ? 'Bitcoin' : network.val.charAt(0).toUpperCase() + network.val.slice(1) }} <ng-container i18n="api-docs.title">REST API service</ng-container>.</p>
<p class="doc-welcome-note api-note" *ngIf="officialMempoolInstance">Note that we enforce rate limits. If you exceed these limits, you will get an HTTP 429 error. If you repeatedly exceed the limits, you may be banned from accessing the service altogether. Consider an <a href="https://mempool.space/enterprise">enterprise sponsorship</a> if you need higher API limits.</p>

View File

@ -315,6 +315,41 @@ h3 {
margin-bottom: 0;
}
#enterprise-cta-mobile {
padding: 20px;
background-color: #1d1f31;
border-radius: 0.25rem;
text-align: center;
position: fixed;
z-index: 100;
left: 30px;
width: calc(100% - 60px);
bottom: 70px;
display: none;
border: 3px solid #533180;
}
#enterprise-cta-mobile p {
font-size: 16px;
display: inline-block;
margin: 0 auto;
}
#enterprise-cta-mobile a {
padding: 4px 8px;
font-size: 16px;
margin: 15px 5px 5px 5px;
}
#enterprise-cta-mobile .btn-secondary:hover {
background-color: #2d3348;
border-color: #2d3348;
}
#enterprise-cta-mobile .no-line-break {
white-space: nowrap;
}
@media (max-width: 992px) {
h3 {
@ -373,6 +408,10 @@ h3 {
#disclaimer table {
display: none;
}
#enterprise-cta-mobile {
display: initial;
}
}
@media (min-width: 992px) {

View File

@ -30,6 +30,7 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
officialMempoolInstance: boolean;
auditEnabled: boolean;
mobileViewport: boolean = false;
showMobileEnterpriseUpsell: boolean = true;
timeLtrSubscription: Subscription;
timeLtr: boolean = this.stateService.timeLtr.value;