From 74f7ec4571704d44fddf9a848923ce6ae30afc48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Thu, 6 Oct 2022 15:48:10 +0200 Subject: [PATCH] swagger: improve print version #333 --- layouts/partials/shortcodes/swagger.html | 19 ++++++++++--------- layouts/shortcodes/swagger.print.html | 4 ++++ static/css/format-print.css | 13 ++++++++++--- static/css/theme.css | 12 ++++++++++++ 4 files changed, 36 insertions(+), 12 deletions(-) create mode 100644 layouts/shortcodes/swagger.print.html diff --git a/layouts/partials/shortcodes/swagger.html b/layouts/partials/shortcodes/swagger.html index 68335c0b48..a8ab9fc06c 100644 --- a/layouts/partials/shortcodes/swagger.html +++ b/layouts/partials/shortcodes/swagger.html @@ -6,21 +6,22 @@ {{- $src = .RelPermalink }} {{- end }} {{- end }} - .box-content { } rapi-doc{ /* adjust rapi-doc internals to fill out available space */ - font-size: 4pt; - margin-left: -12px; - width: calc( 100% + 12px + 8px ); + margin-left: calc( -80px ); + width: calc( 100% + 80px + 80px ); } + +rapi-doc::part(section-tag) { + margin-left: 80px; + margin-right: 80px; + padding-left: 0; + padding-right: 0; +} + .btn, #body .tab-nav-button { color: black !important; diff --git a/static/css/theme.css b/static/css/theme.css index 5a6a7abb82..dde9590786 100644 --- a/static/css/theme.css +++ b/static/css/theme.css @@ -1271,6 +1271,18 @@ rapi-doc { width: calc( 100% + 8px + 24px + 8px ); } +rapi-doc::part(section-navbar) { + display: none; +} + +rapi-doc::part(section-endpoint-head-method) { + font-size: 11px; +} + +rapi-doc::part(btn) { + width: unset !important; +} + .select-container i { padding-top: .25em; }