mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 15:57:57 +00:00
swagger: improve print version #333
This commit is contained in:
parent
8546871931
commit
74f7ec4571
4 changed files with 36 additions and 12 deletions
|
@ -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"
|
||||||
|
|
4
layouts/shortcodes/swagger.print.html
Normal file
4
layouts/shortcodes/swagger.print.html
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{{- partial "shortcodes/swagger.html" (dict
|
||||||
|
"context" .
|
||||||
|
"src" (.Get "src")
|
||||||
|
) }}
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue