Skip to content

Commit 8f8b7b8

Browse files
author
Alban Bailly
committed
layout FW fixes
1 parent a15759b commit 8f8b7b8

File tree

9 files changed

+47
-28
lines changed

9 files changed

+47
-28
lines changed

src/components/2_molecules/ResponseItem.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export const ResponseItem = props => {
104104
</div>
105105
</div>
106106
{l.properties && (
107-
<div className="px-4 mt-2 mb-4 ml-4 subResponse">
107+
<div className="px-4 mt-4 mb-4 ml-4 subResponse">
108108
{Object.keys(l.properties).map((e, i) => {
109109
const data = l.properties[e];
110110
return (
@@ -148,7 +148,7 @@ export const ResponseItem = props => {
148148
</div>
149149
)}
150150
{l.items && (
151-
<div className="px-4 mt-2 mb-4 ml-4 subResponse">
151+
<div className="px-4 mt-4 mb-4 ml-4 subResponse">
152152
{l.items.properties &&
153153
Object.keys(l.items.properties).map((e, i) => {
154154
const data = l.items.properties[e];

src/components/2_molecules/Security.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from "react";
33
export const Security = props => {
44
const { oauth } = props;
55
return (
6-
<div class="flex items-start mt-4">
6+
<div className="flex items-start mt-4">
77
<div className="mr-4">
88
<b>Authorizations:</b>
99
</div>

src/components/4_layouts/layout.js

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const Layout = ({ children, title, subtitle, fullWidth }) => (
2424
}
2525
`}
2626
render={data => (
27-
<div className="content">
27+
<div className={`content ${fullWidth ? "layout-fixed" : ""}`}>
2828
<Header
2929
siteTitle={data.site.siteMetadata.title}
3030
menuLinks={data.site.siteMetadata.menuLinks}
@@ -36,16 +36,20 @@ const Layout = ({ children, title, subtitle, fullWidth }) => (
3636
>
3737
<main className="main">{children}</main>
3838
</div>
39-
<div className="footer-nav-wrapper bg-black">
40-
<footer className="max-w-3xl mx-auto py-8 px-4 md:px-8 text-white">
41-
<Footer />
42-
</footer>
43-
</div>
44-
<div className="footer-wrapper bg-BaseBlackFull">
45-
<footer className="max-w-3xl mx-auto py-8 px-4 md:px-8 text-white">
46-
<FooterNav />
47-
</footer>
48-
</div>
39+
{!fullWidth && (
40+
<div className="footer-nav-wrapper bg-black">
41+
<footer className="max-w-3xl mx-auto py-8 px-4 md:px-8 text-white">
42+
<Footer />
43+
</footer>
44+
</div>
45+
)}
46+
{!fullWidth && (
47+
<div className="footer-wrapper bg-BaseBlackFull">
48+
<footer className="max-w-3xl mx-auto py-8 px-4 md:px-8 text-white">
49+
<FooterNav />
50+
</footer>
51+
</div>
52+
)}
4953
</div>
5054
)}
5155
/>

src/components/5_templates/api.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ const apiPage = ({ data }) => {
3434
};
3535
return (
3636
<Layout
37-
title="API Documentation"
38-
subtitle="Linode API Documentation"
37+
// title="API Documentation"
38+
// subtitle="Linode API Documentation"
3939
fullWidth
4040
>
4141
<SEO title="API Documentation" description="" />
4242
<div className="flex flex-wrap">
43-
<div className="w-full md:w-1/6">
43+
<div className="w-full md:w-1/6 sidebar-container">
4444
<Sidebar />
4545
</div>
4646
<div className="w-full md:w-5/6 api-content mx-auto">

src/css/components/0_utilities/typography.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ input[type="text"] {
3131

3232
.api-body table {
3333
width: 100%;
34-
@apply border border-BaseGrey;
34+
@apply border border-grey-light;
3535
}
3636

3737
.api-body thead {
@@ -40,7 +40,7 @@ input[type="text"] {
4040

4141
.api-body th,
4242
.api-body td {
43-
@apply p-2 border border-BaseGrey;
43+
@apply p-2 border border-grey-light;
4444
}
4545

4646
.api-body table code {
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.layout-fixed .header-wrapper {
2+
position: fixed;
3+
width: 100%;
4+
z-index: 2;
5+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.layout-fixed .main-wrapper {
2+
position: relative;
3+
top: 64px;
4+
}

src/css/components/4_pages/api-page.css

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1+
.layout-fixed .sidebar-container {
2+
position: fixed;
3+
top: 64px;
4+
height: calc(100vh - 64px - 4rem);
5+
}
6+
17
.api-navigation-wrapper {
28
padding: 2rem;
39
margin-right: 1rem;
4-
height: 100%;
10+
overflow-y: scroll;
511
}
612

713
.api-navigation {
8-
position: sticky;
14+
/* position: sticky; */
915
z-index: 2;
1016
top: 2rem;
1117
}
@@ -72,15 +78,15 @@
7278
}
7379

7480
.initResponse {
75-
/* border-top-width: 1px;
76-
@apply border-grey-light; */
81+
border-top-width: 1px;
82+
@apply border-grey-light;
7783
}
7884

7985
.response-wrapper .initResponse:first-child {
8086
/* border: 0; */
8187
}
8288

8389
.subResponse {
84-
border-left-width: 2px;
90+
border-left-width: 1px;
8591
@apply border-grey-light;
8692
}

src/pages/api/v4.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,16 @@ const APIDocs = ({ data }) => {
2121

2222
return (
2323
<Layout
24-
title="API Documentation"
25-
subtitle="Linode API Documentation"
24+
// title="API Documentation"
25+
// subtitle="Linode API Documentation"
2626
fullWidth
2727
>
2828
<SEO title="API Documentation" description="" />
2929
<div className="flex flex-wrap">
30-
<div className="w-full md:w-1/6">
30+
<div className="w-full md:w-1/6 sidebar-container">
3131
<Sidebar />
3232
</div>
33-
<div className="w-full md:w-5/6">
33+
<div className="w-full md:w-5/6 api-content mx-auto">
3434
<Markdown
3535
source={n.info.description}
3636
escapeHtml={false}

0 commit comments

Comments
 (0)