swagger: improve print version #333

This commit is contained in:
Sören Weber 2022-10-06 15:48:10 +02:00
parent 8546871931
commit 74f7ec4571
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
4 changed files with 36 additions and 12 deletions

View file

@ -6,21 +6,22 @@
{{- $src = .RelPermalink }} {{- $src = .RelPermalink }}
{{- end }} {{- end }}
{{- end }} {{- end }}
<style>
rapi-doc::part(section-endpoint-head-method) {
font-size: 11px;
}
rapi-doc::part(btn) {
width: unset !important;
}
</style>
<rapi-doc <rapi-doc
{{- if eq (partial "output-format.hugo" .Page) "print" }}
allow-spec-file-download="false"
allow-server-selection="false"
allow-try="false"
render-style="read"
{{- else }}
allow-spec-file-download="true" allow-spec-file-download="true"
allow-server-selection="true"
allow-try="true"
render-style="view"
{{- end }}
default-schema-tab="example" default-schema-tab="example"
font-size="largest" font-size="largest"
layout="column" layout="column"
load-fonts="false" load-fonts="false"
render-style="view"
schema-description-expanded="true" schema-description-expanded="true"
schema-style="table" schema-style="table"
show-header="false" show-header="false"

View file

@ -0,0 +1,4 @@
{{- partial "shortcodes/swagger.html" (dict
"context" .
"src" (.Get "src")
) }}

View file

@ -156,10 +156,17 @@ div.box > .box-content {
} }
rapi-doc{ rapi-doc{
/* adjust rapi-doc internals to fill out available space */ /* adjust rapi-doc internals to fill out available space */
font-size: 4pt; margin-left: calc( -80px );
margin-left: -12px; width: calc( 100% + 80px + 80px );
width: calc( 100% + 12px + 8px );
} }
rapi-doc::part(section-tag) {
margin-left: 80px;
margin-right: 80px;
padding-left: 0;
padding-right: 0;
}
.btn, .btn,
#body .tab-nav-button { #body .tab-nav-button {
color: black !important; color: black !important;

View file

@ -1271,6 +1271,18 @@ rapi-doc {
width: calc( 100% + 8px + 24px + 8px ); 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 { .select-container i {
padding-top: .25em; padding-top: .25em;
} }