From f8a54784d0e278d57965b4fef769a607e5c76ba8 Mon Sep 17 00:00:00 2001 From: hunicus <93150691+hunicus@users.noreply.github.com> Date: Thu, 16 Dec 2021 09:28:57 -0500 Subject: [PATCH] Improve styling + switch section headings for tags --- .../components/docs/api-docs.component.html | 112 ++++++++---------- .../components/docs/api-docs.component.scss | 50 ++++++-- 2 files changed, 90 insertions(+), 72 deletions(-) diff --git a/frontend/src/app/components/docs/api-docs.component.html b/frontend/src/app/components/docs/api-docs.component.html index 5f7d725e8..9fc8feef2 100644 --- a/frontend/src/app/components/docs/api-docs.component.html +++ b/frontend/src/app/components/docs/api-docs.component.html @@ -76,11 +76,9 @@

Reference for the {{ network.val === '' ? 'Bitcoin' : network.val.charAt(0).toUpperCase() + network.val.slice(1) }} API service.

- -

General

- GET Difficulty Adjustment + GET Difficulty Adjustment General
Endpoint
@@ -97,11 +95,9 @@
- -

Markets

- GET Market Currencies + GET Market Currencies Markets
Endpoint
GET {{ baseNetworkUrl }}/api/currencies @@ -114,7 +110,7 @@
- GET Market Depth + GET Market Depth Markets
- GET Market HLOC + GET Market HLOC Markets
- GET Markets + GET Markets Markets
Endpoint
GET {{ baseNetworkUrl }}/api/markets @@ -153,7 +149,7 @@
- GET Market Offers + GET Market Offers Markets
- GET Market Ticker + GET Market Ticker Markets
- GET Market Trades + GET Market Trades Markets
- GET Market Volumes + GET Market Volumes Markets
- -

General

- GET Stats + GET Stats General
Endpoint
GET {{ baseNetworkUrl }}/api/stats @@ -226,11 +220,9 @@
- -

Addresses

- GET Address + GET Address Addresses
Endpoint
GET {{ baseNetworkUrl }}/api/address/:address @@ -243,7 +235,7 @@
- GET Address Transactions + GET Address Transactions Addresses
- GET Address Transactions Chain + GET Address Transactions Chain Addresses
- GET Address Transactions Mempool + GET Address Transactions Mempool Addresses
- GET Address UTXO + GET Address UTXO Addresses
- -

Assets

- GET Assets + GET Assets Assets
Endpoint
GET /liquid/api/asset/:asset_id @@ -314,7 +304,7 @@
- GET Asset Supply + GET Asset Supply Assets
Endpoint
GET /liquid/api/asset/:asset_id/supply[/decimal] @@ -341,11 +331,9 @@
- -

Blocks

- GET Block + GET Block Blocks
Endpoint
GET {{ baseNetworkUrl }}/api/block/:hash @@ -358,7 +346,7 @@
- GET Block Header + GET Block Header Blocks
- GET Block Height + GET Block Height Blocks
- GET Block Status + GET Block Status Blocks
Get Block Status
Endpoint
@@ -410,7 +398,7 @@
- GET Block Tip Height + GET Block Tip Height Blocks
Endpoint
GET {{ baseNetworkUrl }}/api/blocks/tip/height @@ -423,7 +411,7 @@
- GET Block Tip Hash + GET Block Tip Hash Blocks
Endpoint
GET {{ baseNetworkUrl }}/api/blocks/tip/hash @@ -436,7 +424,7 @@
- GET Block Transaction ID + GET Block Transaction ID Blocks
- GET Block Transaction IDs + GET Block Transaction IDs Blocks
Endpoint
GET {{ baseNetworkUrl }}/api/block/:hash/txids @@ -462,7 +450,7 @@
- GET Block Transactions + GET Block Transactions Blocks
- GET Blocks + GET Blocks Blocks
- GET Blocks + GET Blocks Blocks
- -

Fees

- GET Mempool Blocks Fees + GET Mempool Blocks Fees Fees
- GET Recommended Fees + GET Recommended Fees Fees
Endpoint
GET {{ baseNetworkUrl }}/api/v1/fees/recommended @@ -535,11 +521,9 @@
- -

Mempool

- GET Mempool + GET Mempool Fees
Endpoint
GET {{ baseNetworkUrl }}/api/mempool @@ -552,7 +536,7 @@
- GET Mempool Transactions IDs + GET Mempool Transactions IDs Fees
Endpoint
GET {{ baseNetworkUrl }}/api/mempool/txids @@ -565,7 +549,7 @@
- GET Mempool Recent + GET Mempool Recent Fees
Endpoint
GET {{ baseNetworkUrl }}/api/mempool/recent @@ -581,10 +565,8 @@
-

Transactions

-
- GET Children Pay for Parent + GET Children Pay for Parent Transactions
Endpoint
GET {{ baseNetworkUrl }}/api/v1/cpfp/:txid @@ -597,7 +579,7 @@
- GET Transaction + GET Transaction Transactions @@ -605,11 +587,11 @@
Description
Returns details about a transaction. Available fields: txid, version, locktime, size, weight, fee, vin, vout, and status.
- +
- GET Transaction Hex + GET Transaction Hex Transactions
Endpoint
GET {{ baseNetworkUrl }}/api/tx/:txid/hex @@ -622,7 +604,7 @@
- GET Transaction Merkleblock Proof + GET Transaction Merkleblock Proof Transactions
- GET Transaction Merkle Proof + GET Transaction Merkle Proof Transactions
- GET Transaction Outspend + GET Transaction Outspend Transactions
- GET Transaction Outspends + GET Transaction Outspends Transactions
- GET Transaction Raw + GET Transaction Raw Transactions
Endpoint
GET {{ baseNetworkUrl }}/api/tx/:txid/raw @@ -687,7 +669,7 @@
- GET Transaction Status + GET Transaction Status Transactions
Endpoint
GET {{ baseNetworkUrl }}/api/tx/:txid/status @@ -700,7 +682,7 @@
- GET Transactions + GET Transactions Transactions
Get Mempool Txids
Endpoint
@@ -714,7 +696,7 @@
- POST Transaction + POST Transaction Transactions
Endpoint
POST /api/tx
diff --git a/frontend/src/app/components/docs/api-docs.component.scss b/frontend/src/app/components/docs/api-docs.component.scss index 089e8d2cf..98222e8f8 100644 --- a/frontend/src/app/components/docs/api-docs.component.scss +++ b/frontend/src/app/components/docs/api-docs.component.scss @@ -124,6 +124,37 @@ li.nav-item { float: right; } +.endpoint-container .section-header { + display: block; + background-color: #2d3348; + color: #1bd8f4; + padding: 1rem 1.3rem 1rem 1.3rem; + font-weight: bold; + border-radius: 0.25rem; + margin: 40px 0 20px 0; + font-size: 24px; + position: relative; +} +.endpoint-container .section-header:first-child { + margin-top: 20px; +} +.endpoint-container .section-header:hover { + text-decoration: none; +} + +.endpoint-container .section-header span { + color: #fff; + background-color: #653b9c; + font-size: 12px; + text-transform: uppercase; + font-weight: 400; + padding: 8px 10px; + letter-spacing: 1px; + border-radius: 0.25rem; + font-family: monospace; + float: right; +} + @media (max-width: 992px){ .doc-nav-desktop { display: none; @@ -133,12 +164,17 @@ li.nav-item { .doc-content { width: 100%; } + + .endpoint-container .section-header { + margin: 40px 0 70px 0; + } + + .endpoint-container .section-header span { + float: none; + position: absolute; + top: unset; + left: 0; + bottom: -50px; + } } -#restAPI .api-category { - margin: 30px 0; -} - -.api-category h4 { - margin-bottom: 15px; -}