Add theme to redoc docs

This commit is contained in:
Reckless_Satoshi 2022-10-04 17:04:28 -07:00
parent 8e667a1010
commit 45a017a5a6
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
3 changed files with 64 additions and 21 deletions

View File

@ -1,21 +1,68 @@
<head>
<title>RobotSats REST API v0.2</title>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<style>
body {
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<redoc
spec-url='/assets/schemas/api-v0.1.yaml'
expand-responses='200,201'
theme='{
"colors": {
"primary": {
"main": "#1976d2",
"light": "#42a5f5"
},
"secondary": {
"main": "#9c27b0",
"light": "#ba68c8"
},
"error": {
"main": "#d32f2f",
"light": "#ef5350",
"dark": "#c62828"
},
"success": {
"main": "#2e7d32",
"light": "#4caf50",
"dark": "#1b5e20",
"contrastText": "#9c27b0"
},
"text": {
"primary": "rgba(0, 0, 0, 1)",
"secondary": "rgba(0, 0, 0, 0.8)"
},
"http": {
"get": "#42a5f5",
"post": "#9c27b0",
"put": "#ed6c02",
"delete": "#d32f2f"
}
},
"typography": {
"fontSize": "16px",
"fontFamily": "Fira Sans, Roboto, sans-serif",
"optimizeSpeed": true,
"smoothing": "antialiased",
"headings": {
"fontWeight": "bold",
"lineHeight": "1em"
},
"code": {
"fontWeight": "600",
"color": "rgba(92, 62, 189, 1)",
"wrap": true
},
"links": {
"color": "#1976d2",
"visited": "#9c27b0",
"hover": "#42a5f5"
}
},
"sidebar": {
"backgroundColor": "#1976d2",
"width": "18.75em",
"textColor": "#ffffff"
},
"rightPanel": {
"backgroundColor": "#22212c",
"textColor": "#ffffff"
}
}'
>
</redoc>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>
</body>
<script src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"> </script>

View File

@ -2,10 +2,6 @@ openapi: 3.0.3
info:
title: RoboSats REST API v0
version: 0.1.0
x-logo:
url: https://raw.githubusercontent.com/Reckless-Satoshi/robosats/main/frontend/static/assets/images/robosats-0.1.1-banner.png
backgroundColor: '#FFFFFF'
altText: RoboSats logo
description: |2+
REST API Documentation for [RoboSats](https://learn.robosats.com) - A Simple and Private LN P2P Exchange

View File

@ -464,7 +464,7 @@ const BookTable = ({
headerName: t('Bond'),
type: 'number',
width: width * fontSize,
renderCell: (params:any) => {
renderCell: (params: any) => {
return <div style={{ cursor: 'pointer' }}>{`${Number(params.row.bond_size)}%`}</div>;
},
};