From 82b08449284dca91838cc67de9dbe21bbed07928 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Fri, 3 Mar 2023 02:07:36 -0500 Subject: [PATCH 1/2] Make faq disclaimer more responsive --- frontend/src/app/docs/api-docs/api-docs.component.html | 3 ++- frontend/src/app/docs/api-docs/api-docs.component.scss | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/docs/api-docs/api-docs.component.html b/frontend/src/app/docs/api-docs/api-docs.component.html index 8c8d6ac36..1e5494650 100644 --- a/frontend/src/app/docs/api-docs/api-docs.component.html +++ b/frontend/src/app/docs/api-docs/api-docs.component.html @@ -10,7 +10,8 @@
-

mempool.space merely provides data about the Bitcoin network. It cannot help you with retrieving funds, confirming your transaction quicker, etc.

For any such requests, you need to get in touch with the entity that helped make the transaction (wallet software, exchange company, etc).

+

mempool.space merely provides data about the Bitcoin network. It cannot help you with retrieving funds, confirming your transaction quicker, etc.

For any such requests, you need to get in touch with the entity that helped make the transaction (wallet software, exchange company, etc).

+

mempool.space merely provides data about the Bitcoin network. It cannot help you with retrieving funds, confirming your transaction quicker, etc.

For any such requests, you need to get in touch with the entity that helped make the transaction (wallet software, exchange company, etc).

diff --git a/frontend/src/app/docs/api-docs/api-docs.component.scss b/frontend/src/app/docs/api-docs/api-docs.component.scss index 92e78bc55..180f6830d 100644 --- a/frontend/src/app/docs/api-docs/api-docs.component.scss +++ b/frontend/src/app/docs/api-docs/api-docs.component.scss @@ -274,6 +274,11 @@ h3 { margin: 24px 0; } +#disclaimer > div svg { + display: block; + margin: 2px auto 16px; +} + #disclaimer svg { width: 50px; height: auto; @@ -332,6 +337,10 @@ h3 { .doc-welcome-note { font-size: 0.85rem; } + + #disclaimer table { + display: none; + } } @media (min-width: 992px) { From 7b24b124c23170cf99661e4a04a204c1fa57bc48 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Sat, 4 Mar 2023 03:31:52 -0500 Subject: [PATCH 2/2] Use svg component for warning svg --- .../svg-images/svg-images.component.html | 8 +++++++- .../svg-images/svg-images.component.ts | 1 + .../app/docs/api-docs/api-docs.component.html | 4 ++-- .../app/docs/api-docs/api-docs.component.scss | 17 ++++++++--------- .../src/app/docs/api-docs/api-docs.component.ts | 2 ++ 5 files changed, 20 insertions(+), 12 deletions(-) diff --git a/frontend/src/app/components/svg-images/svg-images.component.html b/frontend/src/app/components/svg-images/svg-images.component.html index f51f3918e..c4d5296bd 100644 --- a/frontend/src/app/components/svg-images/svg-images.component.html +++ b/frontend/src/app/components/svg-images/svg-images.component.html @@ -25,6 +25,12 @@ + + + + + + @@ -104,4 +110,4 @@ - \ No newline at end of file + diff --git a/frontend/src/app/components/svg-images/svg-images.component.ts b/frontend/src/app/components/svg-images/svg-images.component.ts index 287243202..6efba1023 100644 --- a/frontend/src/app/components/svg-images/svg-images.component.ts +++ b/frontend/src/app/components/svg-images/svg-images.component.ts @@ -13,4 +13,5 @@ export class SvgImagesComponent { @Input() width: string; @Input() height: string; @Input() viewBox: string; + @Input() fill: string; } diff --git a/frontend/src/app/docs/api-docs/api-docs.component.html b/frontend/src/app/docs/api-docs/api-docs.component.html index 1e5494650..f5bf519bf 100644 --- a/frontend/src/app/docs/api-docs/api-docs.component.html +++ b/frontend/src/app/docs/api-docs/api-docs.component.html @@ -10,8 +10,8 @@
-

mempool.space merely provides data about the Bitcoin network. It cannot help you with retrieving funds, confirming your transaction quicker, etc.

For any such requests, you need to get in touch with the entity that helped make the transaction (wallet software, exchange company, etc).

-

mempool.space merely provides data about the Bitcoin network. It cannot help you with retrieving funds, confirming your transaction quicker, etc.

For any such requests, you need to get in touch with the entity that helped make the transaction (wallet software, exchange company, etc).

+

mempool.space merely provides data about the Bitcoin network. It cannot help you with retrieving funds, confirming your transaction quicker, etc.

For any such requests, you need to get in touch with the entity that helped make the transaction (wallet software, exchange company, etc).

+

mempool.space merely provides data about the Bitcoin network. It cannot help you with retrieving funds, confirming your transaction quicker, etc.

For any such requests, you need to get in touch with the entity that helped make the transaction (wallet software, exchange company, etc).

diff --git a/frontend/src/app/docs/api-docs/api-docs.component.scss b/frontend/src/app/docs/api-docs/api-docs.component.scss index 180f6830d..8e4c0c7a9 100644 --- a/frontend/src/app/docs/api-docs/api-docs.component.scss +++ b/frontend/src/app/docs/api-docs/api-docs.component.scss @@ -274,15 +274,8 @@ h3 { margin: 24px 0; } -#disclaimer > div svg { - display: block; - margin: 2px auto 16px; -} - -#disclaimer svg { - width: 50px; - height: auto; - margin-right: 32px; +.disclaimer-warning { + margin-right: 50px; } #disclaimer p:last-child { @@ -299,6 +292,12 @@ h3 { display: none; } + .disclaimer-warning { + display: block; + margin: 2px auto 16px; + text-align: center; + } + .doc-content { width: 100%; float: unset; diff --git a/frontend/src/app/docs/api-docs/api-docs.component.ts b/frontend/src/app/docs/api-docs/api-docs.component.ts index 1d5eec453..62a0fadba 100644 --- a/frontend/src/app/docs/api-docs/api-docs.component.ts +++ b/frontend/src/app/docs/api-docs/api-docs.component.ts @@ -29,6 +29,7 @@ export class ApiDocsComponent implements OnInit, AfterViewInit { screenWidth: number; officialMempoolInstance: boolean; auditEnabled: boolean; + mobileViewport: boolean = false; @ViewChildren(FaqTemplateDirective) faqTemplates: QueryList; dict = {}; @@ -43,6 +44,7 @@ export class ApiDocsComponent implements OnInit, AfterViewInit { this.faqTemplates.forEach((x) => this.dict[x.type] = x.template); } this.desktopDocsNavPosition = ( window.pageYOffset > 182 ) ? "fixed" : "relative"; + this.mobileViewport = window.innerWidth <= 992; } ngAfterViewInit() {