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 }}
{{- end }}
{{- end }}
<style>
rapi-doc::part(section-endpoint-head-method) {
font-size: 11px;
}
rapi-doc::part(btn) {
width: unset !important;
}
</style>
<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-server-selection="true"
allow-try="true"
render-style="view"
{{- end }}
default-schema-tab="example"
font-size="largest"
layout="column"
load-fonts="false"
render-style="view"
schema-description-expanded="true"
schema-style="table"
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{
/* 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;

View file

@ -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;
}