mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 07:47:54 +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 }}
|
||||
{{- 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"
|
||||
|
|
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{
|
||||
/* 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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue