Skip to content

Commit 4200a46

Browse files
committed
Redocly: Fix regrid layout
1 parent 3f08fa5 commit 4200a46

File tree

2 files changed

+31
-102
lines changed

2 files changed

+31
-102
lines changed

assets/css/v2/style.css

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,12 @@ ol li:last-child {
395395
justify-self: center;
396396
padding: var(--space-s);
397397
max-width: var(--content-max-width);
398+
399+
/* Allow redocly to fill the entire container */
400+
&.content__redocly {
401+
justify-self: unset;
402+
max-width: unset;
403+
}
398404
}
399405

400406
.footer {
@@ -844,23 +850,6 @@ nav {
844850
grid-template-rows: calc(70px + var(--flow-gap)) max-content;
845851
}
846852

847-
.api {
848-
margin: 0 0 1rem 1rem;
849-
.row {
850-
display: grid !important;
851-
}
852-
853-
.nginx-docs-api-container {
854-
grid-column: 1 / -1;
855-
max-width: 100% !important;
856-
margin-top: 2rem;
857-
}
858-
859-
.content-layout {
860-
grid-template-columns: 1fr var(--side-gutter-width);
861-
}
862-
}
863-
864853
/* MARK: Coveo
865854
*/
866855
#search-v2 {

layouts/redoc/single.html

Lines changed: 25 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,32 @@
11
{{ define "main" }}
22

3-
<!-- Remove upon cleaning up old frame code -->
4-
<style>
5-
.nginx-docs-api-container {
6-
z-index: 0 !important;
7-
max-width: calc(100% + 2.4rem);
8-
margin-top: 2rem;
9-
}
103

11-
@media (min-width: 768px) {
12-
.nginx-docs-api-container {
13-
z-index: 0 !important;
14-
max-width: calc(75% + 2.4rem);
15-
}
16-
}
4+
<div class="grid-container">
5+
<aside class="sidebar">
6+
{{ partial "sidebar-v2.html" . }}
7+
</aside>
178

18-
html {
19-
scroll-behavior: auto !important;
20-
}
9+
<header class="header">
10+
{{ block "header" . }}{{end}}
11+
</header>
2112

22-
.menu-content {
23-
top: 0 !important;
24-
height: 100vh !important;
25-
}
26-
.bCOLCR {
27-
background: #e6e6e6;
28-
}
29-
.fTsuzH {
30-
background-color: #e6e6e6;
31-
}
32-
.fgRoXk {
33-
background-color: #fafafa;
34-
}
35-
#api-component > api-container > redoc {
36-
background-color: #e6e6e6;
37-
}
38-
div.sc-jSFjdj.sc-gKAaRy.dYGhuI.fTsuzH > div > h3 {
39-
color: #000000;
40-
}
41-
div.sc-dvUynV.fgRoXk.redoc-wrap {
42-
margin-left: -15px;
43-
margin-right: -15px;
44-
}
45-
.gKPxXE .collapser {
46-
background-color: transparent !important;
47-
}
48-
div
49-
> div.sc-jSFjdj.sc-gKAaRy.dYGhuI.fTsuzH
50-
> div.sc-EZqKI.iONckA
51-
> button:hover {
52-
background-color: #003963;
53-
}
54-
div > div.sc-giAqHp.hIuvjA > button:hover {
55-
color: #003963;
56-
}
57-
.nginx-docs-api-container button:hover {
58-
background-color: rgb(237, 237, 237);
59-
}
60-
pre {
61-
white-space: pre-wrap;
62-
}
63-
</style>
64-
<!--Use wide page layout for the API reference pages-->
65-
<section class="main-layout api">
66-
<div class="sidebar-layout">
67-
<nav id="sidebar-v2" class="sidebar">
68-
{{ partial "sidebar-v2.html" . }}
69-
</nav>
70-
</div>
71-
<div
72-
class="row flex-md-nowrap content-layout"
73-
style="
74-
position: relative;
75-
flex-wrap: nowrap;
76-
margin-right: 9px;
77-
max-width: calc(100% + 9px);
78-
"
79-
>
80-
<section class="breadcrumb-layout">
81-
{{ if not .IsHome }}
82-
{{ if not (in .Params.display_breadcrumb "false" ) }}
83-
{{ partial "breadcrumb" .}}
13+
14+
<main class="content content__redocly">
15+
16+
<div id="api-component">{{ .Content}}</div>
17+
</main>
18+
19+
<footer class="footer">
20+
{{ block "footer-v2" . }}
21+
{{ partial "footer-v2.html" . }}
8422
{{ end }}
85-
{{ end }}
86-
</section>
87-
<div class="nginx-docs-api-container">
88-
<div id="api-component">{{ .Content}}</div>
89-
</div>
90-
</section>
91-
</div>
23+
</footer>
24+
25+
<!-- If there is a script defined in the page metadata, load it -->
26+
{{if .Params.script}}
27+
{{ $script := (delimit (slice "scripts" .Params.script) "/")}}
28+
{{ partial (string $script) .}}
29+
{{end }}
30+
31+
</div>
9232
{{ end }}

0 commit comments

Comments
 (0)