From 93f4afe26bd4607cc59915181ef3b93156192c25 Mon Sep 17 00:00:00 2001 From: Agusti Fernandez Pardo Date: Sun, 17 Apr 2022 18:57:05 +0200 Subject: [PATCH] improve styling of swagger --- apps/swagger/pages/index.tsx | 9 +++++---- apps/swagger/styles/swagger-cal.css | 17 ++++++++++------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/apps/swagger/pages/index.tsx b/apps/swagger/pages/index.tsx index 806a64141d..1c826cc86e 100644 --- a/apps/swagger/pages/index.tsx +++ b/apps/swagger/pages/index.tsx @@ -21,18 +21,19 @@ const requestSnippets = { }, }, defaultExpanded: true, - languages: ["curl_bash"], - // e.g. only show curl bash = ["curl_bash"] + languages: ["curl_bash", "curl_powershell", "curl_cmd", "node"], + // e.g. only shxwow curl bash = ["curl_bash"] }; export default function APIDocs() { return ( ); } diff --git a/apps/swagger/styles/swagger-cal.css b/apps/swagger/styles/swagger-cal.css index f909d31a9b..ea8db31167 100644 --- a/apps/swagger/styles/swagger-cal.css +++ b/apps/swagger/styles/swagger-cal.css @@ -175,11 +175,12 @@ .swagger-ui .opblock .opblock-summary-method { font-size: 20px; font-weight: 700; - min-width: 80px; - padding: 3px 12px; - text-align: center; + min-width: 90px; + height: 100%; margin-left: -5px; - display: table; + display: flex; + justify-content: center; + align-items: center; border-radius: 0px; background: #000; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.1); @@ -252,8 +253,8 @@ display: -webkit-box; display: -ms-flexbox; display: flex; - flex-direction: column; - padding: 15px; + flex-direction: row; + /* padding: 15px; */ cursor: pointer; -webkit-box-align: left; -ms-flex-align: left; @@ -726,8 +727,9 @@ } .swagger-ui .authorization__btn { - padding: 0 10px; + padding: 5px; border: none; + width: 30px; background: none; } @@ -771,6 +773,7 @@ display: flex; background: black; color: white; + width: inherit; border: none; } @media only screen and (max-width: 600px) {